Testing with jaeger¶
- class jaeger.testing.VirtualFPS(layout=None, **kwargs)[source]¶
Bases:
jaeger.fps.FPS
A mock Focal Plane System for testing and development.
This class listens to the python-can virtual bus and responds as if real positioners were plugged into the system.
- Parameters
layout (str) – The layout describing the position of the robots on the focal plane. If
None
, the default layout will be used. Can be either a layout name to be recovered from the database, or a file path to the layout configuration.loop (event loop or
None
) – The asyncio event loop. IfNone
, usesasyncio.get_event_loop
to get a valid loop.engineering_mode (bool) – If
True
, disables most safety checks to enable debugging. This may result in hardware damage so it must not be used lightly.
- class jaeger.testing.VirtualPositioner(positioner_id, centre=None, position=(0.0, 0.0), speed=None, channel=None, loop=None, notifier=None, firmware='10.11.12')[source]¶
Bases:
Generic
[jaeger.utils.helpers.Status_co
]A virtual positioner that listen to CAN commands.
An object of
VirtualPositioner
represents a real positioner firmware. It knows it’s own state at any time and replies.- Parameters
positioner_id (int) – The ID of the positioner.
centre (tuple) – A tuple of two floats indicating where on the focal plane the positioner is located.
position (tuple) – A tuple of two floats indicating the angles of the alpha and beta arms.
speed (tuple) – A tuple of two float indicating the RPM on the input for alpha and beta.
channel (str) – The channel on which to listen to the virtual CAN bus. Defaults to
config['profiles']['virtual']['channel']
.loop – The event loop.
notifier (Notifier) – The python-can
Notifier
instance that informs of new messages in the bus.firmware (str) – The firmware version, as a string with the format
AB.CD.EF
.
- _initial_status = 17384367873¶
The initial status of the positioner. Represents a positioner that is not moving and is fully calibrated.