|
Mercury2 Hardware Manager
1.0dev
The hardware manager component of the Mercury2 ground station suite.
|
The base command handler interface. More...
Public Member Functions | |
| def | __init__ |
| Initializes the command handler. More... | |
Public Attributes | |
| name | |
The base command handler interface.
This class defines the base command handler interface that all system and device command handlers should extend. Command handlers are responsible for responding to commands that control the behavior of the hardware manager. These commands can be submitted manually by users during their reservations, or automatically in the case of pipeline and session setup commands (which both run before any session begins).
Every command response method is prefixed with "command_" and will be called by the command parser when it receives a raw command request for that command. Command methods can also have a sibling "settings_" method which returns a standardized dictionary containing information about the command such as what parameters it accepts. The user interface uses this command metadata to keep track of what commands are available and to build appropriate forms for each command. If a command does not define a "settings_" method, it will not be included in the user interface.
For system commands that require an active session, the individual command methods must perform any necessary validations on the session to determine if the command should be executed. For device commands that require an active session, the command parser will ensure that the command method only gets called if the user has an active session with a pipeline that contains that hardware device (although the Session reference will still be passed to the command method to allow for additional checks if needed).
| def hwm.command.handlers.handler.CommandHandler.__init__ | ( | self, | |
| command_handler_name | |||
| ) |
Initializes the command handler.
This constructor initializes the command handler by setting some common attributes.
| command_handler_name | The name of the command handler. If the command handler is a system level command handler, this will be the destination for this handler's commands. |