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, or TIMEOUT.

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 by Devkit attribute timeout.

If autoExposure() timed out, consider decreasing max_tries or max_exposure, or consider increasing the timeout.

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

iterations never exceeds setAutoExposeConfig() parameter max_tries, the maximum number of iterations to try.

Type:MicroSpecInteger

Notes

This response contains the attributes output with the __str__() method of microspeclib response: SensorAutoExposure.

See also

~microspec.commands.Devkit.autoExposure

class microspec.replies.captureFrame_response

Response to command captureFrame().

status

Serial communication status is either OK, ERROR, or TIMEOUT.

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 by Devkit attribute timeout.

If captureFrame() timed out in a data logging application, it might improve data quality to check for status='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 of microspeclib response: SensorCaptureFrame.

See also

~microspec.commands.Devkit.captureFrame

class microspec.replies.getSensorConfig_response

Response to command getSensorConfig().

status

Serial communication status is either OK, ERROR, or TIMEOUT.

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 by Devkit attribute timeout.
Type:str
binning
gain
row_bitmap

Notes

This response contains the attributes output with the __str__() method of microspeclib response: SensorGetSensorConfig.

See also

~microspec.commands.Devkit.getSensorConfig

class microspec.replies.setSensorConfig_response

Response to command setSensorConfig().

status

Serial communication status is either OK, ERROR, or TIMEOUT.

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 by Devkit attribute timeout.
Type:str

Notes

This response contains the attributes output with the __str__() method of microspeclib response: SensorSetSensorConfig.

See also

~microspec.commands.Devkit.setSensorConfig

class microspec.replies.getExposure_response

Response to command getExposure().

status

Serial communication status is either OK, ERROR, or TIMEOUT.

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 by Devkit attribute timeout.
Type:str
ms
cycles

Notes

This response contains the attributes output with the __str__() method of microspeclib response: SensorGetExposure.

See also

~microspec.commands.Devkit.getExposure

class microspec.replies.setExposure_response

Response to command setExposure().

status

Serial communication status is either OK, ERROR, or TIMEOUT.

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 by Devkit attribute timeout.
Type:str

Notes

This response contains the attributes output with the __str__() method of microspeclib response: SensorSetExposure.

See also

~microspec.commands.Devkit.setExposure

class microspec.replies.getAutoExposeConfig_response

Response to command getAutoExposeConfig().

status

Serial communication status is either OK, ERROR, or TIMEOUT.

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 by Devkit attribute timeout.
Type:str
max_tries
start_pixel
stop_pixel
target
target_tolerance
max_exposure

Notes

This response contains the attributes output with the __str__() method of microspeclib response: SensorGetAutoExposeConfig.

See also

~microspec.commands.Devkit.getAutoExposeConfig

class microspec.replies.setAutoExposeConfig_response

Response to command setAutoExposeConfig().

status

Serial communication status is either OK, ERROR, or TIMEOUT.

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 by Devkit attribute timeout.
Type:str

Notes

This response contains the attributes output with the __str__() method of microspeclib response: SensorSetAutoExposeConfig.

See also

~microspec.commands.Devkit.setAutoExposeConfig

class microspec.replies.getBridgeLED_response

Response to command getBridgeLED().

status

Serial communication status is either OK, ERROR, or TIMEOUT.

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 by Devkit attribute timeout.
Type:str
led_setting

The LED is set to one of three states: OFF, GREEN, or RED.

Type:str

Notes

This response contains the attributes output with the __str__() method of microspeclib response: BridgeGetBridgeLED.

See also

~microspec.commands.Devkit.getBridgeLED

class microspec.replies.setBridgeLED_response

Response to command setBridgeLED().

status

Serial communication status is either OK, ERROR, or TIMEOUT.

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 by Devkit attribute timeout.
Type:str

Notes

This response contains the attributes output with the __str__() method of microspeclib response: BridgeSetBridgeLED.

See also

~microspec.commands.Devkit.setBridgeLED

class microspec.replies.getSensorLED_response

Response to command getSensorLED().

status

Serial communication status is either OK, ERROR, or TIMEOUT.

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 by Devkit attribute timeout.
Type:str
led_setting

The LED is set to one of three states: OFF, GREEN, or RED.

Type:str

Notes

This response contains the attributes output with the __str__() method of microspeclib response: SensorGetSensorLED.

See also

~microspec.commands.Devkit.getSensorLED

class microspec.replies.setSensorLED_response

Response to command setSensorLED().

status

Serial communication status is either OK, ERROR, or TIMEOUT.

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 by Devkit attribute timeout.
Type:str

Notes

This response contains the attributes output with the __str__() method of microspeclib response: SensorSetSensorLED.

See also

~microspec.commands.Devkit.setSensorLED