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:
loglogging.Logger

A log either created or passed into the constructor.

Attributes:
hoststr
portint
timeoutint
long_timeoutint
connectedbool
readybool
xint
yint
zint
uint
vint
wint
targettypes.SimpleNamespace
referencedtypes.SimpleNamespace
svint
pivottypes.SimpleNamespace
command_callsdict
commandslist
loglogging.Logger

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.

format_check_active_soft_limit()

Check that the software limits are active.

format_clv()

Return the closed loop velocity.

format_controller_ready()

Return formatted controller ready response.

format_error()

Return get error string

format_high_position_soft_limit()

Return formatted higher position software limit string.

format_low_position_soft_limit()

Return formatted lower position software limit string.

format_motion_status()

Return formatted motion status response.

format_offset(x, y, z, u, v, w)

Set offset for hexapod.

format_on_target()

Return formatted on target string.

format_pivot_point()

Return formatted get pivot point string

format_position_unit()

Return formatted get position unit string.

format_real_position()

Return formatted position response.

format_referencing_result()

Return formatted reference result.

format_sv()

Return the system velocity.

format_target_position()

Return formatted string for target position

reference()

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()

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.