Specification of PowerControlUnit class
1. Overview
1. Functions
PowerControlUnitclass is a base class of power control units and manages multiplePowerPorts.
2. Related files
- Main file:
power_control_unit.cpp, .hpp - Related file:
power_port.cpp, .hpp
3. How to use
- Example: The
sample_componentsin thes2e-core/simulation_sample/spacecraftis useful to know how to use this class. - Users can make their original
PowerControlUnitclass by inheriting this base class. - Users need to override the
MainRoutine,GetLogHeader, andGetLogValuefunctions to define the behavior of their PCUs.
2. Explanation of Algorithm
1. ConnectPort
1. overview
- This function makes a new
PowerPort.
2. inputs and outputs
- Inputs: the port ID and the arguments for
PowerPort - Outputs: the error code (0 is a success, -1 is an error)
3. algorithm
- Make a new
PowerPortwhen the port ID is not used.
4. note: N/A
2. ClosePort
1. overview
- This function deletes the designated
PowerPort.
2. inputs and outputs
- Inputs: the port ID.
- Outputs: the error code (0 is a success, -1 is an error).
3. algorithm
- Delete the designated
PowerPortwhen the port still exists.
4. note: N/A
3. Results of verifications
N/A
4. References
N/A