Mercury2 Hardware Manager  1.0dev
The hardware manager component of the Mercury2 ground station suite.
 All Classes Namespaces Functions Variables Pages
hwm.command.connection.CommandResource Class Reference

Handles commands received over the network. More...

Inheritance diagram for hwm.command.connection.CommandResource:

Public Member Functions

def __init__
 Sets up the command resource. More...
 
def render_POST
 Responds to POST'd command requests. More...
 

Public Attributes

 command_parser
 

Static Public Attributes

 isLeaf = True
 

Private Member Functions

def _command_response_ready
 Writes the command response back to the originating request. More...
 

Detailed Description

Handles commands received over the network.

This Resource handles commands received over the hardware manager's command connection.

Constructor & Destructor Documentation

def hwm.command.connection.CommandResource.__init__ (   self,
  command_parser 
)

Sets up the command resource.

Parameters
command_parserA reference to the previously initialized command parser.

Member Function Documentation

def hwm.command.connection.CommandResource._command_response_ready (   self,
  command_response,
  request 
)
private

Writes the command response back to the originating request.

 This callback writes the response of a command back to the network via the request that generated it. It handles 
 both successful and failed command responses.
Parameters
command_responseThe results of the command. If the command was successful, this will be a dictionary containing the command response. If the command failed, this will be a Failure object containing the command response encapsulated in a CommandError exception.
requestThe original HTTP request for the connection.
def hwm.command.connection.CommandResource.render_POST (   self,
  request 
)

Responds to POST'd command requests.

Parameters
requestThe request object for the submitted command.
Returns
Returns NOT_DONE_YET, indicating that the results of the request may not be ready yet (results handled by self._command_response_ready).

The documentation for this class was generated from the following file: