MockServer¶
- class lsst.ts.athexapod.MockServer(log=None)¶
Bases:
object
Mock server for ATHexapod controller.
A server which mimics responses from the controller by using asyncio’s tcp connections to read responses and parse them with regular expressions.
- Parameters:
- log
logging.Logger
A log either created or passed into the constructor.
- log
- Attributes:
- host
str
- port
int
- timeout
int
- long_timeout
int
- connected
bool
- ready
bool
- x
int
- y
int
- z
int
- u
int
- v
int
- w
int
- target
types.SimpleNamespace
- referenced
types.SimpleNamespace
- sv
int
- pivot
types.SimpleNamespace
- command_calls
dict
- commands
list
- log
logging.Logger
- host
Methods Summary
activate_soft_limit
(x, y, z, u, v, w)Activate the software limits.
check_offset
(x, y, z, u, v, w)Check that the hexapod can move.
cmd_loop
(reader, writer)Handle received commands.
Check that the software limits are active.
Return the closed loop velocity.
Return formatted controller ready response.
Return get error string
Return formatted higher position software limit string.
Return formatted lower position software limit string.
Return formatted motion status response.
format_offset
(x, y, z, u, v, w)Set offset for hexapod.
Return formatted on target string.
Return formatted get pivot point string
Return formatted get position unit string.
Return formatted position response.
Return formatted reference result.
Return the system velocity.
Return formatted string for target position
Reference the hexapod.
set_clv
(x, y, z, u, v, w)Set the closed loop velocity.
set_high_position_soft_limit
(x, y, z, u, v, w)Set higher position software limit.
set_low_position_soft_Limit
(x, y, z, u, v, w)Set the lower position software limit.
set_pivot_point
(x, y, z)Set the pivot point.
set_position
(x, y, z, u, v, w)Set the position.
set_sv
(velocity)Set the system velocity.
start
()Start the server.
stop
()Stop the server
Stop all axes.
Methods Documentation
- async activate_soft_limit(x, y, z, u, v, w)¶
Activate the software limits.
- async check_offset(x, y, z, u, v, w)¶
Check that the hexapod can move.
- async cmd_loop(reader, writer)¶
Handle received commands.
- async format_check_active_soft_limit()¶
Check that the software limits are active.
- async format_clv()¶
Return the closed loop velocity.
- async format_controller_ready()¶
Return formatted controller ready response.
- async format_error()¶
Return get error string
- async format_high_position_soft_limit()¶
Return formatted higher position software limit string.
- async format_low_position_soft_limit()¶
Return formatted lower position software limit string.
- async format_motion_status()¶
Return formatted motion status response.
- async format_offset(x, y, z, u, v, w)¶
Set offset for hexapod.
- async format_on_target()¶
Return formatted on target string.
Not implemented.
- async format_pivot_point()¶
Return formatted get pivot point string
- async format_position_unit()¶
Return formatted get position unit string.
- async format_real_position()¶
Return formatted position response.
- async format_referencing_result()¶
Return formatted reference result.
- async format_sv()¶
Return the system velocity.
- async format_target_position()¶
Return formatted string for target position
- async reference()¶
Reference the hexapod.
- async set_clv(x, y, z, u, v, w)¶
Set the closed loop velocity.
- async set_high_position_soft_limit(x, y, z, u, v, w)¶
Set higher position software limit.
- async set_low_position_soft_Limit(x, y, z, u, v, w)¶
Set the lower position software limit.
- async set_pivot_point(x, y, z)¶
Set the pivot point.
- async set_position(x, y, z, u, v, w)¶
Set the position.
- async set_sv(velocity)¶
Set the system velocity.
- async start()¶
Start the server.
- async stop()¶
Stop the server
- async stop_all_axes()¶
Stop all axes.
Not implemented due to axes not actually moving naturally.