App
- class olaf.App[source]
The application class that manages the CANopen node and resources.
Use the global
olaf.appobect.- setup(network: CanNetwork, od: ObjectDictionary, master_od_db: dict | None = None, load_core: bool = True)[source]
Setup the app. Will be called by
olaf_setupautomatically.- Parameters:
- Raises:
ValueError – Invalid parameter(s)
- add_resource(resource: Resource)[source]
Add a resource for the app
- Parameters:
resource (Resource) – The resource to add.
- add_service(service: Service)[source]
Add a resource for the app
- Parameters:
service (Service) – The service to add.
- property od: ObjectDictionary
The node’s Object Dictionary.
- Type:
canopen.ObjectDictionary
- olaf.olaf_setup(name: str, args: Namespace | None = None) tuple[Namespace, dict][source]
Parse runtime args and setup the app and REST API.
- Parameters:
name (str) – The card’s node name.
args (Namespace) – Optional runtime args. If not set, the default from olaf_parser will be used.
- Returns:
Namespace – The runtime args.
dict – The OreSat configs.