You are reading the documentation for the main branch, which may contain unreleased changes. The most recent release is v0.1.0.
pnpq.devices.switch_thorlabs_osw_e_stub module#
- class pnpq.devices.switch_thorlabs_osw_e_stub.OpticalSwitchThorlabsEStub(*, _is_open: bool = False, _current_state: pnpq.devices.switch_thorlabs_osw_e.State = <State.BAR: 1>)#
Bases:
AbstractOpticalSwitchThorlabsE- Parameters:
_is_open (bool)
_current_state (State)
- close()#
Close the serial connection to the switch.
Once closed, attempting to re-open the connection will cause an
InvalidStateException.- Return type:
None
- get_board_name()#
- Returns:
The switch name and firmware version as a human-readable, unstructured string.
- Return type:
str
- get_state()#
Get the current state of the switch.
- Returns:
The current state of the switch.
- Return type:
- get_type_code()#
- Returns:
The board type code according to the configuration table, as a human-readable, unstructured string. The Thorlabs manual does not seem to explain what the configuration table is.
- Return type:
str
- open()#
Open the serial connection to the switch.
Once opened, attempting to call open() again will cause an
InvalidStateException.- Return type:
None