ephys_link.common
Commonly used functions and dictionaries
Contains globally used helper functions and typed dictionaries (to be used as callback parameters)
Functions
Print message if debug is enabled |
|
Set debug flag |
Classes
Output format for (angles, error) |
|
Data format for |
|
Data format for |
|
Output format for depth driving (depth, error) |
|
Output format for (manipulators) |
|
Data format for |
|
Data format for |
|
Output format for (position, error) |
|
Output format for (state, error) |
- set_debug(debug: bool) None [source]
Set debug flag
- Parameters:
debug (bool) – True to enable debug mode, False to disable
- Returns:
None
- dprint(message: str) None [source]
Print message if debug is enabled
- Parameters:
message (str) – Message to print
- Returns:
None
- class GotoPositionInputDataFormat[source]
Bases:
TypedDict
Data format for
server.goto_pos()
- manipulator_id: str
- pos: list[float]
- speed: int
- class InsideBrainInputDataFormat[source]
Bases:
TypedDict
Data format for
server.set_inside_brain()
- manipulator_id: str
- inside: bool
- class DriveToDepthInputDataFormat[source]
Bases:
TypedDict
Data format for
server.drive_to_depth()
- manipulator_id: str
- depth: float
- speed: int
- class CanWriteInputDataFormat[source]
Bases:
TypedDict
Data format for
server.set_can_write()
- manipulator_id: str
- can_write: bool
- hours: float
- class GetManipulatorsOutputData(manipulators: list, manipulator_type: str, error: str)[source]
Bases:
dict
Output format for (manipulators)
- Parameters:
manipulators (list) – Tuple of manipulator IDs (as strings)
manipulator_type (str) – Type of the output data (temporary solution until #165 is implemented)
error (str) – Error message
- Example:
Example generated dictionary
{"manipulators": ["1", "2"], "error": ""}
- class PositionalOutputData(position: list, error: str)[source]
Bases:
dict
Output format for (position, error)
- Parameters:
position (list) – Position in mm (as a tuple, can be empty) in X, Y, Z, W order
error (str) – Error message
- Example:
Example generated dictionary
{"position": [10.429, 12.332, 2.131, 12.312], "error": ""}
- class AngularOutputData(angles: list, error: str)[source]
Bases:
dict
Output format for (angles, error)
- Parameters:
angles (list) – Angles in degrees (as a tuple, can be empty) in yaw, pitch, roll order
error (str) – Error message