|
Mercury2 Hardware Manager
1.0dev
The hardware manager component of the Mercury2 ground station suite.
|
Represents a Pipeline data connection. More...
Public Member Functions | |
| def | __init__ |
| Sets up the PipelineData protocol instance. More... | |
| def | write_output |
| Sends a chunk of pipeline output to the user. More... | |
| def | dataReceived |
| Receives data that the user is trying to write to the pipeline. More... | |
| def | connectionMade |
| Sets up the data protocol before any data transfer occurs. More... | |
| def | connectionLost |
| Called when the pipeline data connection is lost. | |
| def | perform_registrations |
| Performs the necessary registrations between the protocol and its associated session. More... | |
Public Attributes | |
| session_coordinator | |
| session | |
Private Member Functions | |
| def | _connection_setup_error |
| Handles errors that arise during the data protocol connection setup. More... | |
Represents a Pipeline data connection.
This Protocol represents a Pipeline data stream connection to the pipeline's active user (through its currently active session). It is responsible for sending the pipeline's output to the end user as well as passing the user's input to the pipeline. It uses a basic TCP protocol.
| def hwm.network.protocols.data.PipelineData.__init__ | ( | self, | |
| session_coordinator | |||
| ) |
Sets up the PipelineData protocol instance.
| session_coordinator | A SessionCoordinator instance that will be used to locate requested sessions. |
|
private |
Handles errors that arise during the data protocol connection setup.
This callback handles errors that may occur when authenticating the protocol user and loading their requested session. It logs the error and cleans up the protocol's connection.
| failure | A Failure object encapsulating the error. |
| def hwm.network.protocols.data.PipelineData.connectionMade | ( | self) |
Sets up the data protocol before any data transfer occurs.
This method sets up the protocol right after the connection has been established. It is responsible for calling a function that will wait and load the user's certificate after the TLS handshake has been performed.
| def hwm.network.protocols.data.PipelineData.dataReceived | ( | self, | |
| data | |||
| ) |
Receives data that the user is trying to write to the pipeline.
This method receives data from the pipeline user and passes it along to the target pipeline via the associated session.
| data | A chunk of data of indeterminate size that is to be passed to the session. |
| def hwm.network.protocols.data.PipelineData.perform_registrations | ( | self, | |
| requested_session | |||
| ) |
Performs the necessary registrations between the protocol and its associated session.
This callback makes the necessary registrations between the pipeline data protocol and its Session. It will be called with session specified in the client's TLS certificate after the TLS handshake is complete.
| May | pass along session.ProtocolAlreadyRegistered exceptions when trying to register this protocol with its session. |
| requested_session | The Session associated with the protocol. |
| def hwm.network.protocols.data.PipelineData.write_output | ( | self, | |
| output_data | |||
| ) |
Sends a chunk of pipeline output to the user.
This method writes the provided chunk of data (output from the pipeline) to the end user.
| output_data | A chunk of pipeline output of arbitrary size that is to be sent to the pipeline user. |