![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Svc/ComAggregator/ComAggregator.hpp>
Public Member Functions | |
| ComAggregator (const char *const compName) | |
| Construct ComAggregator object. More... | |
| ~ComAggregator () | |
| Destroy ComAggregator object. More... | |
| void | configure (FwSizeType aggregationSize, bool spanningEnabled, FwEnumStoreType allocationId, Fw::MemAllocator &allocator) |
| void | cleanup () |
| void | preamble () override |
| A function that will be called before the event loop is entered. More... | |
Public Member Functions inherited from Svc::ComAggregatorComponentBase | |
| void | init (FwSizeType queueDepth, FwEnumStoreType instance=0) |
| Initialize ComAggregatorComponentBase object. More... | |
| Fw::InputSuccessConditionPort * | get_comStatusIn_InputPort (FwIndexType portNum) |
| Svc::InputComDataWithContextPort * | get_dataIn_InputPort (FwIndexType portNum) |
| Svc::InputComDataWithContextPort * | get_dataReturnIn_InputPort (FwIndexType portNum) |
| Svc::InputSchedPort * | get_timeout_InputPort (FwIndexType portNum) |
| void | set_comStatusOut_OutputPort (FwIndexType portNum, Fw::InputSuccessConditionPort *port) |
| Connect port to comStatusOut[portNum]. More... | |
| void | set_dataOut_OutputPort (FwIndexType portNum, Svc::InputComDataWithContextPort *port) |
| Connect port to dataOut[portNum]. More... | |
| void | set_dataReturnOut_OutputPort (FwIndexType portNum, Svc::InputComDataWithContextPort *port) |
| Connect port to dataReturnOut[portNum]. More... | |
Public Member Functions inherited from Fw::ActiveComponentBase | |
| void | start (FwTaskPriorityType priority=Os::Task::TASK_PRIORITY_DEFAULT, FwSizeType stackSize=Os::Task::TASK_DEFAULT, FwSizeType cpuAffinity=Os::Task::TASK_DEFAULT, FwTaskIdType identifier=static_cast< FwTaskIdType >(Os::Task::TASK_DEFAULT)) |
| called by instantiator when task is to be started More... | |
| void | exit () |
| exit task in active component More... | |
| Os::Task::Status | join () |
| Join the thread. More... | |
| DEPRECATED (Os::Task::Status join(void **value_ptr), "Switch to .join()") | |
| Join to thread with discarded value_ptr. More... | |
Public Member Functions inherited from Fw::QueuedComponentBase | |
| void | deinit () override |
| Allows de-initialization on teardown. More... | |
Public Member Functions inherited from Fw::PassiveComponentBase | |
| void | setIdBase (const FwIdType) |
| Set the ID base. More... | |
| FwIdType | getIdBase () const |
Static Public Attributes | |
| static constexpr FwSizeType | MIN_NON_SPANNING_AGGREGATION_SIZE |
| Smallest aggregate that holds a full com buffer and a full file buffer Space Packet without spanning. More... | |
Friends | |
| class | ComAggregatorTester |
Definition at line 21 of file ComAggregator.hpp.
| Svc::ComAggregator::ComAggregator | ( | const char *const | compName | ) |
Construct ComAggregator object.
| compName | The component name |
Definition at line 22 of file ComAggregator.cpp.
| Svc::ComAggregator::~ComAggregator | ( | ) |
Destroy ComAggregator object.
Definition at line 39 of file ComAggregator.cpp.
| void Svc::ComAggregator::cleanup | ( | ) |
Deallocate the aggregation buffer
Must only be called once the downstream framer has returned the aggregate and no further data or status can arrive (i.e. after the component's task has stopped); asserts if the aggregate is still held downstream. Any packet held for the next aggregate is dropped (its owner reclaims it at teardown) and the buffer, held-packet, and idle-fill state is reset. The aggregation state machine is not reset, so configure() may be called again but subsequent data flow depends on the state the machine was left in.
Definition at line 72 of file ComAggregator.cpp.
| void Svc::ComAggregator::configure | ( | FwSizeType | aggregationSize, |
| bool | spanningEnabled, | ||
| FwEnumStoreType | allocationId, | ||
| Fw::MemAllocator & | allocator | ||
| ) |
Configure the aggregator and allocate the aggregation buffer
Every emitted aggregate is exactly aggregationSize bytes: residual space is filled with an SPP idle packet. With spanning disabled, incoming packets are never split: a packet is added to the current aggregate only if it completes it exactly or leaves room for a minimum idle packet, and a single packet may be at most aggregationSize - Ccsds::Utils::IdlePacket::MIN_SIZE bytes, which must hold a full com buffer and a full file buffer Space Packet. When spanning is enabled, packets that do not fit in the remaining aggregation space are split across aggregates (CCSDS TM packet spanning): the leading bytes fill the current aggregate and the remainder continues in subsequent aggregates. The First Header Pointer is reported through the ComCfg::FrameContext for the downstream TM framer, and aggregationSize must not exceed 2046 (0x7FE). Must be called before the component is started and before any data is received; asserts otherwise.
| aggregationSize | Size in bytes of every emitted aggregate |
| spanningEnabled | Enable CCSDS TM packet spanning across aggregates |
| allocationId | Identifier used when dealing with the Fw::MemAllocator |
| allocator | Fw::MemAllocator used to acquire the aggregation buffer |
Definition at line 41 of file ComAggregator.cpp.
|
overridevirtual |
A function that will be called before the event loop is entered.
Reimplemented from Fw::ActiveComponentBase.
Definition at line 93 of file ComAggregator.cpp.
|
friend |
Definition at line 22 of file ComAggregator.hpp.
|
static |
Smallest aggregate that holds a full com buffer and a full file buffer Space Packet without spanning.
Definition at line 64 of file ComAggregator.hpp.