Responses¶
Define classes of command responses.
Every command has a response. This module defines the attributes each response has.
Application code should not instantiate classes defined in
this module. Command responses are generated internally by module
commands.
Note
microspec developers: please see microspec.replies
in the Developer Docs.
-
class
microspec.replies.autoExposure_response¶ Response to command
autoExposure().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.If
autoExposure()timed out, consider decreasingmax_triesormax_exposure, or consider increasing thetimeout.Type: str
-
success¶ - 1: SUCCESS
- The peak signal is in the target counts range.
- 0: FAILURE
The peak signal is not in the target counts range. Fail for any of the following reasons:
- reached the maximum number of tries
- hit maximum exposure time and signal is below target range
- hit minimum exposure time and signal is above target range
Type: MicroSpecInteger
-
iterations¶ Number of exposures tried by auto-expose. Valid range: 1-255
iterationsnever exceedssetAutoExposeConfig()parametermax_tries, the maximum number of iterations to try.Type: MicroSpecInteger
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:SensorAutoExposure.See also
~microspec.commands.Devkit.autoExposure
-
-
class
microspec.replies.captureFrame_response¶ Response to command
captureFrame().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.If
captureFrame()timed out in a data logging application, it might improve data quality to check forstatus='TIMEOUT'to note a missing frame and skip logging this bad dataset.Similarly, in a GUI plotting application, it might improve user experience (and simplify the plotting code) to check for
status='TIMEOUT'and replot the previous (good) dataset rather than plot the bad dataset.Type: str
-
num_pixels¶
-
pixels¶
-
frame¶
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:SensorCaptureFrame.See also
~microspec.commands.Devkit.captureFrame
-
-
class
microspec.replies.getSensorConfig_response¶ Response to command
getSensorConfig().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.Type: str
-
binning¶
-
gain¶
-
row_bitmap¶
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:SensorGetSensorConfig.See also
~microspec.commands.Devkit.getSensorConfig
-
-
class
microspec.replies.setSensorConfig_response¶ Response to command
setSensorConfig().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.Type: str
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:SensorSetSensorConfig.See also
~microspec.commands.Devkit.setSensorConfig
-
-
class
microspec.replies.getExposure_response¶ Response to command
getExposure().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.Type: str
-
ms¶
-
cycles¶
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:SensorGetExposure.See also
~microspec.commands.Devkit.getExposure
-
-
class
microspec.replies.setExposure_response¶ Response to command
setExposure().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.Type: str
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:SensorSetExposure.See also
~microspec.commands.Devkit.setExposure
-
-
class
microspec.replies.getAutoExposeConfig_response¶ Response to command
getAutoExposeConfig().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.Type: str
-
max_tries¶
-
start_pixel¶
-
stop_pixel¶
-
target¶
-
target_tolerance¶
-
max_exposure¶
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:SensorGetAutoExposeConfig.See also
~microspec.commands.Devkit.getAutoExposeConfig
-
-
class
microspec.replies.setAutoExposeConfig_response¶ Response to command
setAutoExposeConfig().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.Type: str
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:SensorSetAutoExposeConfig.See also
~microspec.commands.Devkit.setAutoExposeConfig
-
-
class
microspec.replies.getBridgeLED_response¶ Response to command
getBridgeLED().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.Type: str
-
led_setting¶ The LED is set to one of three states:
OFF,GREEN, orRED.Type: str
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:BridgeGetBridgeLED.See also
~microspec.commands.Devkit.getBridgeLED
-
-
class
microspec.replies.setBridgeLED_response¶ Response to command
setBridgeLED().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.Type: str
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:BridgeSetBridgeLED.See also
~microspec.commands.Devkit.setBridgeLED
-
-
class
microspec.replies.getSensorLED_response¶ Response to command
getSensorLED().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.Type: str
-
led_setting¶ The LED is set to one of three states:
OFF,GREEN, orRED.Type: str
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:SensorGetSensorLED.See also
~microspec.commands.Devkit.getSensorLED
-
-
class
microspec.replies.setSensorLED_response¶ Response to command
setSensorLED().-
status¶ Serial communication status is either
OK,ERROR, orTIMEOUT.TIMEOUT:'TIMEOUT'means the command timed out before a response was received from the dev-kit, so the other response attributes are not valid. The timeout time in seconds is set byDevkitattributetimeout.Type: str
Notes
This response contains the attributes output with the
__str__()method ofmicrospeclibresponse:SensorSetSensorLED.See also
~microspec.commands.Devkit.setSensorLED
-