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

Provides access the collection of available hardware pipelines. More...

Public Member Functions

def __init__
 Sets up the pipeline manager. More...
 
def get_pipeline
 Returns a reference to the specified pipeline. More...
 

Public Attributes

 config
 
 device_manager
 
 command_parser
 
 pipelines
 

Private Member Functions

def _initialize_pipelines
 Initializes the configured pipelines. More...
 
def _validate_pipeline_schema
 Validates the provided pipeline configuration. More...
 

Detailed Description

Provides access the collection of available hardware pipelines.

This class initializes and manages the collection of loaded hardware pipelines.

Constructor & Destructor Documentation

def hwm.hardware.pipelines.manager.PipelineManager.__init__ (   self,
  device_manager,
  command_parser 
)

Sets up the pipeline manager.

 This constructor sets up the pipeline manager and calls a method that initializes the available pipelines.
Note
This class does not load the pipeline configuration file itself. Instead, Configuration is instructed to load it at runtime and this class accesses it via the 'configuration' module. If this class is initialized before the pipeline configuration has been loaded an exception will be raised
Exceptions
Maypass on exceptions from the pipeline initialization process (see _initialize_pipelines).
Parameters
device_managerA reference to the DeviceManager instance that should be used.
command_parserA reference to a CommandParser that will be used to process pipeline setup commands.

Member Function Documentation

def hwm.hardware.pipelines.manager.PipelineManager._initialize_pipelines (   self)
private

Initializes the configured pipelines.

 This method initializes all of the configured pipelines (i.e. available in the configuration) and saves their
 references.
Exceptions
ThrowsPipelinesAllReadyInitialized if this method is called after pipelines have been initialized.
ThrowsPipelinesNotDefined if no pipelines are defined in the runtime configuration.
Maypass on PipelineSchemaInvalid exceptions if the pipeline configuration doesn't match the defined schema.
Maypass on PipelineConfigInvalid exceptions if the pipeline configuration contains other errors.
def hwm.hardware.pipelines.manager.PipelineManager._validate_pipeline_schema (   self,
  pipeline_configuration 
)
private

Validates the provided pipeline configuration.

 This method validates the provided pipeline configuration (loaded from the configuration files) by comparing it
 against the defined schema.
Note
Each pipeline class may perform additional validations when initialized. This method simply checks the pipeline configuration schema as a whole.
Exceptions
ThrowsPipelineSchemaInvalid if the provided pipeline configuration schema is invalid.
Parameters
pipeline_configurationAn object containing the pipeline configuration from the YAML configuration files.
def hwm.hardware.pipelines.manager.PipelineManager.get_pipeline (   self,
  pipeline_id 
)

Returns a reference to the specified pipeline.

Note
This method does not perform any pipeline locking. That is managed by the individual pipeline classes and is typically triggered by the session coordinator.
Exceptions
ThrowsPipelineNotFound when the requested pipeline can't be found.
Parameters
pipeline_idThe ID of the requested pipeline.
Returns
Returns a reference to the specified pipeline object.

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