Description
This article describes the framework pFS follows
Overview
There are only two common methods that are shared among all aspects of pFS:
__init__()This is the default constructor for Python classes.
The constructor is used to only instantiate all objects for that class.
start()This method basically "starts" the specific class
For example,
start()insubmodulesshould start all threads and processes for that class.The
start()incoreruns through the startup processes, and begins all application processes.
These are some important variables within pFS:
core.submodulesThis is a dictionary inside
corethat stores instances to all thesubmoduleclassesKey
Type: str
e.g. "telemetry
Value
Type: Submodule
e.g. Telemetry
core.processesThis is a dictionary inside
corethat stores instances toThreadobjects that handlecoreprocessesRead more about
coreprocesses here
submodule.modulesThis is a dictionary inside
submodulethat stores instances to all thesubmoduledependency classesThis dictionary is similar to
core.submodulesbut does not contain references to all thesubmoduleclasses
submodule.procesesThis is a dictionary inside
submodulethat stores instances toThreadobjects that handle processes specific to thatsubmoduleThis dictionary is similar to
core.processesbut only containsThreadobjects specific to thesubmodule
nameThis is a string that stores the name for the class
For core
name = "core"For a submodule(telemetry):
name = "telemetry"This is used in the
__str__method
configThis is a dictionary that stores the content in
config/config_*.ymlin a dictionary formatEvery class(
coreandsubmodule) contain an instance to the sameconfigvariable
Classes
Core is a class inside the core/core.py file.
Submodule is an abstract class inside the submodules/submodule.py file.
main.py instantiates an instance of the Core class and calls the start() method on that instance
Each specific submodule extends the Submodule abstract class
Last updated
Was this helpful?