80 likes | 269 Views
AODD Heartbeat. Sent 1/second Starts after AODD has initialized all hardware and is ready to accept commands Other components (specifically AOCA and the GUI) will subscribe to the heartbeat In conjunction with a timer, allows subscriber to determine if AODD is alive or dead. AODD Heartbeat.
E N D
AODD Heartbeat • Sent 1/second • Starts after AODD has initialized all hardware and is ready to accept commands • Other components (specifically AOCA and the GUI) will subscribe to the heartbeat • In conjunction with a timer, allows subscriber to determine if AODD is alive or dead
AODD Heartbeat • AOCA will be able to automatically cancel an automation if AODD fails (see Dave’s presentation for details) • The GUI will be able to display AODD’s health and inform the user if AODD fails • Precise GUI implementation TBD
Error Reporting • Each AODD component has a “state” field and an “error” field • Normally, the state field displays the state of the component (motor moving or stopped, ACAM on or off, etc.) • Error field is “SUCCESS” • If AODD encounters an error, the state field is set to “ERROR”, and the error field contains a specific error code
Error Reporting • The error codes will be standard POSIX codes whenever there is one that is appropriate to the error condition • There will also be P3K-specific codes to describe condition which are not representable by the standard POSIX error codes
Error Reporting Example • Suppose a command is given to move a motor • Initially, we will have • State: MOVING • Error: SUCCESS • Additionally, we will have • Position: Current position • Residual: Commanded position – current position • In position flag: 0
Error Reporting Example • When the move completes, we will have • State: STOPPED • Error: SUCCESS • Additionally, we will have • Position: Current position (= commanded position) • Residual: 0 (within motor accuracy) • In position flag: 1
Error Reporting Example • Now suppose a command is given to move a motor past its limit • Initially, we will have • State: MOVING • Error: SUCCESS • Additionally, we will have • Position: Current position • Residual: Command position – current position • In position flag: 0
Error Reporting Example • When the motor hits the limit, we will have • State: MOTOR_ERROR • Error: MOTOR_HIT_LIMIT • Additionally, we will have • Position: Current position (= limit position, not commanded position) • Residual: Commanded position – limit position • In position flag: 0