pashehnet.cli#
This module provides the command line interface via pashehnet that allows a user to launch a simulated sensor network via a provided YAML configuration file.
Module Contents#
Classes#
Because typos in string literal keys happen |
|
Provides a wrapper to create the network and kick off the simulation from a command line interface |
Functions#
Main entrypoint for command line interface invoked with pashehnet :return: None |
|
Returns the minimal schema required to define a network; does NOT guarantee that said network config will actually work as desired. |
API#
- class pashehnet.cli.ConfigKeys#
Because typos in string literal keys happen
- FORMAT = 'format'#
- FREQUENCY = 'frequency'#
- ID = 'id'#
- RESOURCE = 'resource'#
- SENSORS = 'sensors'#
- SOURCE = 'source'#
- SPEC = 'spec'#
- TARGET = 'target'#
- TOPIC = 'topic'#
- TRANSFORMS = 'transforms'#
- VERSION = 'version'#
- exception pashehnet.cli.ConfigurationError#
Bases:
ExceptionCustom exception raised when a configuration file error is encountered.
Initialization
Initialize self. See help(type(self)) for accurate signature.
- class __cause__#
- class __context__#
- __delattr__()#
- __dir__()#
- __eq__()#
- __format__()#
- __ge__()#
- __getattribute__()#
- __gt__()#
- __hash__()#
- __le__()#
- __lt__()#
- __ne__()#
- __new__()#
- __reduce__()#
- __reduce_ex__()#
- __repr__()#
- __setattr__()#
- __setstate__()#
- __sizeof__()#
- __str__()#
- __subclasshook__()#
- class __suppress_context__#
- class __traceback__#
- class args#
- with_traceback()#
- class pashehnet.cli.Runner(config=DEFAULT_CONFIG_FNAME)#
Bases:
objectProvides a wrapper to create the network and kick off the simulation from a command line interface
Initialization
- Parameters:
config_fname – Network configuration filename
- CURRENT_CONFIG_VERSION = 1#
- DEFAULT_CONFIG_FNAME = 'config.yaml'#
- check()#
Load and validate network configuration, without creating or running it :return: None
- run()#
Create and run the network simulation :return: None
- pashehnet.cli.cli_main()#
Main entrypoint for command line interface invoked with pashehnet :return: None
- pashehnet.cli.config_schema()#
Returns the minimal schema required to define a network; does NOT guarantee that said network config will actually work as desired.
- Returns:
Schema object, cached