22 #include "FwSmConstants.h"
23 #include "FwSmConfig.h"
25 #include "FwPrConfig.h"
27 #include "FwPrConstants.h"
44 FwSmDesc_t outRegistry1, outRegistry2;
49 if (outRegistry1 == NULL)
54 if (outRegistry1 != outRegistry2)
58 if (FwSmCheckRec(outRegistry1) != smSuccess)
CrFwBool_t CrFwCmpIsStarted(FwSmDesc_t smDesc)
Return true if the state machine of the argument component has been started.
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
CrFwBool_t CrFwCmpIsInInitialized(FwSmDesc_t smDesc)
Return true if the argument component is in state INITIALIZED.
void CrFwCmpShutdown(FwSmDesc_t smDesc)
Shutdown a framework component.
CrFwBool_t CrFwCmpIsInConfigured(FwSmDesc_t smDesc)
Return true if the argument component is in state CONFIGURED.
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
CrFwBool_t CrFwCmpIsInCreated(FwSmDesc_t smDesc)
Return true if the argument component is in state CREATED.
Definition of Base Component.
Definition of the Framework Component Data (FCD) Type.
unsigned short CrFwCmdRepIndex_t
Type for the index of a command or report in the InRegistry or OutRegistry.
#define CR_FW_OUTREGISTRY_TYPE
Type identifier for the OutRegistry component.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
static FwSmDesc_t outFactory
The singleton instance of the OutFactory.
FwSmDesc_t CrFwOutFactoryMakeOutCmp(CrFwServType_t type, CrFwServSubType_t subType, CrFwDiscriminant_t discriminant, CrFwPcktLength_t length)
Make function for an OutComponent.
FwSmDesc_t CrFwOutFactoryMake()
Factory function for the singleton instance of the OutFactory.
static FwSmDesc_t outCmp[CR_FW_OUTFACTORY_MAX_NOF_OUTCMP]
The pre-allocated OutComponent instances.
void CrFwOutFactoryReleaseOutCmp(FwSmDesc_t outCmpInstance)
Release function for an OutComponent.
Definition of the OutFactory component.
CrFwCmdRepIndex_t CrFwOutRegistryGetCmdRepIndex(CrFwServType_t servType, CrFwServSubType_t servSubType)
Get the index corresponding to the argument [service type, service sub-type] of an out-going command ...
CrFwServType_t CrFwOutRegistryGetServType(CrFwCmdRepIndex_t cmdRepIndex)
Get the service type of the argument command or report index.
CrFwServSubType_t CrFwOutRegistryGetServSubType(CrFwCmdRepIndex_t cmdRepIndex)
Get the service sub-type of the argument command or report index.
CrFwBool_t CrFwOutRegistryIsEnabled(FwSmDesc_t outCmp)
Query the enable status of an out-going command or report.
void CrFwOutRegistryStartTracking(FwSmDesc_t outCmp)
Ask the OutRegistry to start tracking an out-going command or report.
FwSmDesc_t CrFwOutRegistryMake()
Factory function for the singleton instance of the OutRegistry.
void CrFwOutRegistryUpdateState(FwSmDesc_t outCmp, CrFwOutRegistryCmdRepState_t newState)
Ask the OutRegistry to update the state of an out-going command or report.
CrFwDiscriminant_t CrFwOutRegistryGetLowerDiscriminant(CrFwCmdRepIndex_t cmdRepIndex)
Get the lower bound of the argument command or report index.
static CrFwCmpData_t outRegistryData
The data for the OutRegistry singleton.
CrFwDiscriminant_t CrFwOutRegistryGetUpperDiscriminant(CrFwCmdRepIndex_t cmdRepIndex)
Get the upper bound of the argument command or report index.
void CrFwOutRegistrySetEnable(CrFwServType_t servType, CrFwServSubType_t servSubType, CrFwDiscriminant_t discriminant, CrFwBool_t isEnabled)
Set the enable state of a set of out-going commands or reports.
CrFwBool_t CrFwOutRegistryIsDiscriminantEnabled(CrFwCmdRepIndex_t cmdRepIndex, CrFwDiscriminant_t disc)
Get the enable status of a discriminant in the argument command or report index.
static FwSmDesc_t outRegistry
The OutRegistry singleton.
CrFwOutRegistryCmdRepState_t CrFwOutRegistryGetState(CrFwInstanceId_t cmdRepId)
Query the OutRegistry for the state of an out-going command or report.
Definition of the OutRegistry Component.
@ crOutRegistryTerminated
Out-going command or report has been passed to the OutStream.
@ crOutRegistryAborted
Out-going command or report has been aborted.
@ crOutRegistryPending
Out-going command or report is pending (waiting to be sent)
@ crOutRegistryNotTracked
Out-going command or report is not tracked.
CrFwBool_t CrFwOutRegistryTestCase4()
Test the functions to set and read the enable status of an OutComponent with a discriminant.
CrFwBool_t CrFwOutRegistryTestCase9()
Test the reset service of the OutRegistry.
CrFwBool_t CrFwOutRegistryTestCase2()
Test the functions to manipulate the type, sub-type, discriminant and index of an out-going command o...
CrFwBool_t CrFwOutRegistryTestCase8()
Test the shutdown service of the OutRegistry.
CrFwBool_t CrFwOutRegistryTestCase7()
Test the ability of the OutRegistry to track the state of an OutComponent.
CrFwBool_t CrFwOutRegistryTestCase1()
Test the creation and configuration of the OutRegistry singleton component.
CrFwBool_t CrFwOutRegistryTestCase5()
Test the non-interference of the setting of the enable status for two different discriminant values.
CrFwBool_t CrFwOutRegistryTestCase6()
Test the response of the OutRegistry to an attempt to disable a non-existent kind of OutComponent.
CrFwBool_t CrFwOutRegistryTestCase3()
Test the functions to set and read the enable status of an OutComponent without a discriminant.
Declaration of the test cases for the OutRegistry Component (see CrFwOutRegistry.h).
User-modifiable parameters for the OutRegistry component (see CrFwOutRegistry.h).
#define CR_FW_OUTREGISTRY_N
The maximum number of out-going commands or reports which can be tracked by the OutRegistry.
#define CR_FW_OUTREGISTRY_NSERV
The total number of service types/sub-types provided by the application.
Interface for creating and accessing a report or command packet.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
Interface for reporting an error detected by a framework component.
The CORDET Framework defines an interface for generating error reports (see CrFwRepErr....
Interface through which framework components access the current time.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
@ crNoAppErr
No application errors have been detected.
@ crIllDiscriminant
A framework function was called with an illegal discriminant.
@ crIllServSubType
A framework function was called with an illegal service sub-type.
@ crIllServType
A framework function was called with an illegal service type.
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
void CrFwSetAppErrCode(CrFwAppErrCode_t errCode)
Set the value of the application error code (see CrFwGetAppErrCode).
Definition of the utility functions for the CORDET Framework.
Type for the Framework Component Data (FCD).
CrFwInstanceId_t instanceId
The instance identifier of the framework component.
CrFwTypeId_t typeId
The type identifier of the framework component.