CORDET Framework - C2 Implementation
|
Definition of the OutComponent Component of the framework. More...
Go to the source code of this file.
Functions | |
FwSmDesc_t | CrFwOutCmpMakeBase () |
Return the base OutComponent from which all other OutComponents are derived. More... | |
void | CrFwOutCmpTerminate (FwSmDesc_t smDesc) |
Send command Terminate to the argument OutComponent. More... | |
CrFwBool_t | CrFwOutCmpIsInLoaded (FwSmDesc_t smDesc) |
Return true if the argument OutComponent is in state LOADED. More... | |
CrFwBool_t | CrFwOutCmpIsInAborted (FwSmDesc_t smDesc) |
Return true if the argument OutComponent is in state ABORTED. More... | |
CrFwBool_t | CrFwOutCmpIsInPending (FwSmDesc_t smDesc) |
Return true if the argument OutComponent is in state PENDING. More... | |
CrFwBool_t | CrFwOutCmpIsInTerminated (FwSmDesc_t smDesc) |
Return true if the argument OutComponent is in state TERMINATED. More... | |
CrFwBool_t | CrFwOutCmpDefEnableCheck (FwSmDesc_t smDesc) |
Default implementation of the Enable Check Operation for an OutComponent. More... | |
void | CrFwOutCmpDefSerialize (FwSmDesc_t smDesc) |
Default implementation of the Serialize Operation for an OutComponent. More... | |
CrFwDestSrc_t | CrFwOutCmpGetDest (FwSmDesc_t smDesc) |
Return the destination of the OutComponent. More... | |
void | CrFwOutCmpSetDest (FwSmDesc_t smDesc, CrFwDestSrc_t dest) |
Set the destination of the OutComponent. More... | |
CrFwGroup_t | CrFwOutCmpGetGroup (FwSmDesc_t smDesc) |
Return the group of the OutComponent. More... | |
void | CrFwOutCmpSetGroup (FwSmDesc_t smDesc, CrFwGroup_t group) |
Set the group of the OutComponent. More... | |
CrFwTimeStamp_t | CrFwOutCmpGetTimeStamp (FwSmDesc_t smDesc) |
Return the time stamp attribute of the OutComponent. More... | |
void | CrFwOutCmpSetTimeStamp (FwSmDesc_t smDesc, CrFwTimeStamp_t timeStamp) |
Set the time stamp attribute of the OutComponent. More... | |
CrFwDestSrc_t | CrFwOutCmpGetSrc (FwSmDesc_t smDesc) |
Return the source of the OutComponent. More... | |
CrFwServType_t | CrFwOutCmpGetServType (FwSmDesc_t smDesc) |
Return the type of the OutComponent. More... | |
CrFwServType_t | CrFwOutCmpGetServSubType (FwSmDesc_t smDesc) |
Return the sub-type of the OutComponent. More... | |
CrFwDiscriminant_t | CrFwOutCmpGetDiscriminant (FwSmDesc_t smDesc) |
Return the discriminant of the OutComponent. More... | |
void | CrFwOutCmpSetDiscriminant (FwSmDesc_t smDesc, CrFwDiscriminant_t discriminant) |
Set the discriminant of the OutComponent. More... | |
void | CrFwOutCmpSetAckLevel (FwSmDesc_t smDesc, CrFwBool_t accept, CrFwBool_t start, CrFwBool_t progress, CrFwBool_t term) |
Set the acknowledge level for the command encapsulated in the OutComponent. More... | |
CrFwBool_t | CrFwOutCmpIsAcceptAck (FwSmDesc_t smDesc) |
Return the acknowledge level for command acceptance for the command encapsulated in the OutComponent. More... | |
CrFwBool_t | CrFwOutCmpIsStartAck (FwSmDesc_t smDesc) |
Return the acknowledge level for command start for the command encapsulated in the OutComponent. More... | |
CrFwBool_t | CrFwOutCmpIsProgressAck (FwSmDesc_t smDesc) |
Return the acknowledge level for command progress for the command encapsulated in the OutComponent. More... | |
CrFwBool_t | CrFwOutCmpIsTermAck (FwSmDesc_t smDesc) |
Return the acknowledge level for command termination for the command encapsulated in the OutComponent. More... | |
CrFwPckt_t | CrFwOutCmpGetParStart (FwSmDesc_t smDesc) |
Return the start address of the parameter area of the OutComponent. More... | |
CrFwPcktLength_t | CrFwOutCmpGetParLength (FwSmDesc_t smDesc) |
Return the length in bytes of the parameter area of the OutComponent. More... | |
CrFwPcktLength_t | CrFwOutCmpGetLength (FwSmDesc_t smDesc) |
Return the length in bytes of the packet to which the OutComponent is serialized. More... | |
CrFwPckt_t | CrFwOutCmpGetPckt (FwSmDesc_t smDesc) |
Return the pointer to the packet which holds the OutComponent. More... | |
Definition of the OutComponent Component of the framework.
An OutComponent encapsulates an out-going command or an out-going report. The OutComponent is responsible for serializing the out-going command or report to a packet and sending the packet to an OutStream for dispatching to its destination. The behaviour of an OutComponent is defined by the OutComponent State Machine embedded in the CONFIGURED state of the Base State Machine and by the Send Packet Procedure (see figures below).
Mode of Use of an OutComponent Component
Applications create OutComponents dynamically through calls to the factory function CrFwOutFactoryMakeOutCmp
. OutComponents thus returned are expected to be in state CREATED (if this is not the case - perhaps because the OutComponent's configuration action has failed to complete successfully - the OutComponent will remain permanently pending and will never be sent to its destination).
An OutComponent is used to encapsulate an out-going command or report of a certain kind. The "kind" of an out-going command or report is defined by the triplet: [service type, service sub-type, discriminant]. OutComponents are adapted to a certain kind of out-going report or command by modifying one or more of the following:
These operations are statically defined for each kind of OutComponent in CrFwOutFactoryUserPar.h
.
This header file defines default values for all configurable operations listed above. The default implementations for the Enable Check, Ready Check and Repeat Check will often be suitable for many kinds of out-going reports or commands but dedicated implementations of the Serialize and Update Action will probably have to be provided for application-specific out-going reports or commands.
This file is part of the CORDET Framework.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
For information on alternative licensing, please contact P&P Software GmbH.
Definition in file CrFwOutCmp.h.
CrFwBool_t CrFwOutCmpDefEnableCheck | ( | FwSmDesc_t | smDesc | ) |
Default implementation of the Enable Check Operation for an OutComponent.
This function retrieves the enable status of the OutComponent from the OutRegistry (see CrFwOutRegistryIsEnabled
).
This function should never be directly called by the end-application. It is declared as a public function so that it may be used in application-specific Enable Check Operations.
smDesc | the descriptor of the Base State Machine of the OutComponent. |
Definition at line 168 of file CrFwOutCmp.c.
void CrFwOutCmpDefSerialize | ( | FwSmDesc_t | smDesc | ) |
Default implementation of the Serialize Operation for an OutComponent.
This implementation writes to the packet encapsulated in the OutComponent all the following attributes of the out-going report or command:
This function should never be directly called by the end-application. It is declared as a public function so that it may be used in application-specific Serialize Operations.
smDesc | the descriptor of the Base State Machine of the OutComponent. |
Definition at line 173 of file CrFwOutCmp.c.
CrFwDestSrc_t CrFwOutCmpGetDest | ( | FwSmDesc_t | smDesc | ) |
Return the destination of the OutComponent.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 185 of file CrFwOutCmp.c.
CrFwDiscriminant_t CrFwOutCmpGetDiscriminant | ( | FwSmDesc_t | smDesc | ) |
Return the discriminant of the OutComponent.
The discriminant of the OutComponent is set when the OutComponent is created by function CrFwOutFactoryMakeOutCmp
but can subsequently be changed through function CrFwOutCmpSetDiscriminant
.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 251 of file CrFwOutCmp.c.
CrFwGroup_t CrFwOutCmpGetGroup | ( | FwSmDesc_t | smDesc | ) |
Return the group of the OutComponent.
By default, the group of an OutComponent is set when the OutComponent is created by function CrFwOutFactoryMakeOutCmp
but its value can be overridden with function CrFwOutCmpSetGroup
.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 200 of file CrFwOutCmp.c.
CrFwPcktLength_t CrFwOutCmpGetLength | ( | FwSmDesc_t | smDesc | ) |
Return the length in bytes of the packet to which the OutComponent is serialized.
The length returned by this function covers both the packet header and the packet parameter area. The length of the packet parameter area is returned by function CrFwOutCmpGetParLength
.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 395 of file CrFwOutCmp.c.
CrFwPcktLength_t CrFwOutCmpGetParLength | ( | FwSmDesc_t | smDesc | ) |
Return the length in bytes of the parameter area of the OutComponent.
The OutComponent is encapsulated in a packet. The parameter area of the OutComponent is the part of the packet which is reserved to the storage of the parameters of the OutComponent. The parameter area consists of an uninterrupted sequence of bytes. The start address of the parameter area is returned by function CrFwOutCmpGetParStart
.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 388 of file CrFwOutCmp.c.
CrFwPckt_t CrFwOutCmpGetParStart | ( | FwSmDesc_t | smDesc | ) |
Return the start address of the parameter area of the OutComponent.
The OutComponent is encapsulated in a packet. The parameter area of the OutComponent is the part of the packet which is reserved to the storage of the parameters of the OutComponent. The parameter area consists of an uninterrupted sequence of bytes. The size of the parameter area is returned by function CrFwOutCmpGetParLength
.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 381 of file CrFwOutCmp.c.
CrFwPckt_t CrFwOutCmpGetPckt | ( | FwSmDesc_t | smDesc | ) |
Return the pointer to the packet which holds the OutComponent.
The OutComponent is encapsulated in a packet. This function returns this packet. The packet is only initialized if the OutComponent has been correctly configured. This is normally the case if the OutComponent has been successfully returned by the OutFactory. The length of the packet is stored in the packet itself and can be retrieved with function CrFwPcktGetLength
.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 402 of file CrFwOutCmp.c.
CrFwServType_t CrFwOutCmpGetServSubType | ( | FwSmDesc_t | smDesc | ) |
Return the sub-type of the OutComponent.
The sub-type of the OutComponent is set when the OutComponent is created by function CrFwOutFactoryMakeOutCmp
and cannot be changed afterwards.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 244 of file CrFwOutCmp.c.
CrFwServType_t CrFwOutCmpGetServType | ( | FwSmDesc_t | smDesc | ) |
Return the type of the OutComponent.
The type of the OutComponent is set when the OutComponent is created by function CrFwOutFactoryMakeOutCmp
and cannot be changed afterwards.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 230 of file CrFwOutCmp.c.
CrFwDestSrc_t CrFwOutCmpGetSrc | ( | FwSmDesc_t | smDesc | ) |
Return the source of the OutComponent.
The source of the OutComponent is set when the OutComponent is created by function CrFwOutFactoryMakeOutCmp
and cannot be changed afterwards.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 237 of file CrFwOutCmp.c.
CrFwTimeStamp_t CrFwOutCmpGetTimeStamp | ( | FwSmDesc_t | smDesc | ) |
Return the time stamp attribute of the OutComponent.
By default, the time stamp is set when the OutComponent is loaded into the OutLoader (see CrFwOutLoaderLoad
) but its value can be overridden with function CrFwOutCmpSetTimeStamp
.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 215 of file CrFwOutCmp.c.
CrFwBool_t CrFwOutCmpIsAcceptAck | ( | FwSmDesc_t | smDesc | ) |
Return the acknowledge level for command acceptance for the command encapsulated in the OutComponent.
If the OutComponent does not hold a command, the behaviour of the function is undefined.
smDesc | the descriptor of the Base State Machine of the OutComponent. |
Definition at line 274 of file CrFwOutCmp.c.
CrFwBool_t CrFwOutCmpIsInAborted | ( | FwSmDesc_t | smDesc | ) |
Return true if the argument OutComponent is in state ABORTED.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 153 of file CrFwOutCmp.c.
CrFwBool_t CrFwOutCmpIsInLoaded | ( | FwSmDesc_t | smDesc | ) |
Return true if the argument OutComponent is in state LOADED.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 148 of file CrFwOutCmp.c.
CrFwBool_t CrFwOutCmpIsInPending | ( | FwSmDesc_t | smDesc | ) |
Return true if the argument OutComponent is in state PENDING.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 158 of file CrFwOutCmp.c.
CrFwBool_t CrFwOutCmpIsInTerminated | ( | FwSmDesc_t | smDesc | ) |
Return true if the argument OutComponent is in state TERMINATED.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 163 of file CrFwOutCmp.c.
CrFwBool_t CrFwOutCmpIsProgressAck | ( | FwSmDesc_t | smDesc | ) |
Return the acknowledge level for command progress for the command encapsulated in the OutComponent.
If the OutComponent does not hold a command, the behaviour of the function is undefined.
smDesc | the descriptor of the Base State Machine of the OutComponent. |
Definition at line 288 of file CrFwOutCmp.c.
CrFwBool_t CrFwOutCmpIsStartAck | ( | FwSmDesc_t | smDesc | ) |
Return the acknowledge level for command start for the command encapsulated in the OutComponent.
If the OutComponent does not hold a command, the behaviour of the function is undefined.
smDesc | the descriptor of the Base State Machine of the OutComponent. |
Definition at line 281 of file CrFwOutCmp.c.
CrFwBool_t CrFwOutCmpIsTermAck | ( | FwSmDesc_t | smDesc | ) |
Return the acknowledge level for command termination for the command encapsulated in the OutComponent.
If the OutComponent does not hold a command, the behaviour of the function is undefined.
smDesc | the descriptor of the Base State Machine of the OutComponent. |
Definition at line 295 of file CrFwOutCmp.c.
FwSmDesc_t CrFwOutCmpMakeBase | ( | ) |
Return the base OutComponent from which all other OutComponents are derived.
The base OutComponent is a singleton. The first time it is called, this function creates and configures the base OutComponent instance. Subsequent calls return this same instance. This function is only intended to be used by the OutFactory (see CrFwOutFactory.h
) and should not be used by applications.
Definition at line 105 of file CrFwOutCmp.c.
void CrFwOutCmpSetAckLevel | ( | FwSmDesc_t | smDesc, |
CrFwBool_t | accept, | ||
CrFwBool_t | start, | ||
CrFwBool_t | progress, | ||
CrFwBool_t | term | ||
) |
Set the acknowledge level for the command encapsulated in the OutComponent.
This function should only be called on OutComponents which encapsulate an out-going command (but no check is performed that this is actually the case).
smDesc | the descriptor of the Base State Machine of the OutComponent. |
accept | 1 if acknowledge of command acceptance is desired, 0 otherwise. |
start | 1 if acknowledge of command start is desired, 0 otherwise. |
progress | 1 if acknowledge of command progress is desired, 0 otherwise. |
term | 1 if acknowledge of command acceptance termination is desired, 0 otherwise. |
Definition at line 265 of file CrFwOutCmp.c.
void CrFwOutCmpSetDest | ( | FwSmDesc_t | smDesc, |
CrFwDestSrc_t | dest | ||
) |
Set the destination of the OutComponent.
smDesc | the descriptor of the Base State Machine of the OutComponent |
dest | the destination of the OutComponent |
Definition at line 192 of file CrFwOutCmp.c.
void CrFwOutCmpSetDiscriminant | ( | FwSmDesc_t | smDesc, |
CrFwDiscriminant_t | discriminant | ||
) |
Set the discriminant of the OutComponent.
The default value of the discriminant of the OutComponent is set when the OutComponent is created by function CrFwOutFactoryMakeOutCmp
. This function allows this default value to be changed.
smDesc | the descriptor of the Base State Machine of the OutComponent |
discriminant | the discriminant of the OutComponent |
Definition at line 258 of file CrFwOutCmp.c.
void CrFwOutCmpSetGroup | ( | FwSmDesc_t | smDesc, |
CrFwGroup_t | group | ||
) |
Set the group of the OutComponent.
By default, the group of an OutComponent is set when the OutComponent is created by function CrFwOutFactoryMakeOutCmp
but its value can be overridden with this function.
smDesc | the descriptor of the Base State Machine of the OutComponent |
group | the group |
Definition at line 207 of file CrFwOutCmp.c.
void CrFwOutCmpSetTimeStamp | ( | FwSmDesc_t | smDesc, |
CrFwTimeStamp_t | timeStamp | ||
) |
Set the time stamp attribute of the OutComponent.
By default, the time stamp is set when the OutComponent is loaded into the OutLoader (see CrFwOutLoaderLoad
). This function can be used to override this default setting.
smDesc | the descriptor of the Base State Machine of the OutComponent |
timeStamp | the time stamp of the OutComponent |
Definition at line 222 of file CrFwOutCmp.c.
void CrFwOutCmpTerminate | ( | FwSmDesc_t | smDesc | ) |
Send command Terminate to the argument OutComponent.
smDesc | the descriptor of the Base State Machine of the OutComponent |
Definition at line 143 of file CrFwOutCmp.c.