22 #include "FwSmConstants.h" 23 #include "FwSmConfig.h" 25 #include "FwPrConfig.h" 27 #include "FwPrConstants.h" 28 #include "FwPrDCreate.h" 30 #include "CrFwCmpData.h" 46 #include "config/CrFwOutFactoryUserPar.h" 65 #define datapool8bit_ID 54 66 #define datapool16bit_ID 53 67 #define datapool32bit_ID 6 68 #define datapool8bitarray_ID 3 69 #define datapool16bitarray_ID 7 70 #define datapool32bitarray_ID 29 72 #define datapool32bit_IDa 41 73 #define datapool32bit_IDb 42 74 #define datapool32bit_IDc 43 75 #define datapool32bit_IDd 44 76 #define datapool32bit_IDe 45 103 if (outFactory == NULL)
105 if (FwSmCheckRec(outFactory) != smSuccess)
109 if (inFactory == NULL)
111 if (FwSmCheckRec(inFactory) != smSuccess)
115 if (outManager == NULL)
117 if (FwSmCheckRec(outManager) != smSuccess)
208 outCmp = outManagerCSData->
pocl[0];
328 if (cmpData->
outcome != VER_RDL_CONSTR)
419 outCmp = outManagerCSData->
pocl[0];
528 if (cmpData->
outcome != VER_SID_IN_USE)
671 if (cmpData->
outcome != VER_RDL_CONSTR)
737 if (cmpData->
outcome != VER_DUPL_DI)
814 if (cmpData->
outcome != VER_REP_CR_FD)
890 if (cmpData->
outcome != VER_DUPL_DI)
932 if (outFactory == NULL)
934 if (FwSmCheckRec(outFactory) != smSuccess)
938 if (inFactory == NULL)
940 if (FwSmCheckRec(inFactory) != smSuccess)
944 if (outManager == NULL)
946 if (FwSmCheckRec(outManager) != smSuccess)
1196 if (cmpData->
outcome != VER_S3S_START_FD)
1211 outCmp = outManagerCSData->
pocl[0];
1296 if (cmpData->
outcome != VER_S3S_START_FD)
1311 outCmp = outManagerCSData->
pocl[0];
1578 if (cmpData->
outcome != VER_SID_START_FD)
1593 outCmp = outManagerCSData->
pocl[0];
1857 if (cmpData->
outcome != VER_SID_START_FD)
1872 outCmp = outManagerCSData->
pocl[0];
1931 if (outFactory == NULL)
1933 if (FwSmCheckRec(outFactory) != smSuccess)
1937 if (inFactory == NULL)
1939 if (FwSmCheckRec(inFactory) != smSuccess)
1943 if (outManager == NULL)
1945 if (FwSmCheckRec(outManager) != smSuccess)
2086 outCmp = outManagerCSData->
pocl[0];
2208 outCmp = outManagerCSData->
pocl[0];
2607 if (outFactory == NULL)
2609 if (FwSmCheckRec(outFactory) != smSuccess)
2613 if (inFactory == NULL)
2615 if (FwSmCheckRec(inFactory) != smSuccess)
2619 if (outManager == NULL)
2621 if (FwSmCheckRec(outManager) != smSuccess)
Type for the Framework Component Data (FCD).
Interface through which framework components access the current time.
CrFwBool_t CrPsHkTestCase2()
Test the Service 3 Housekeeping Service Test all the 3,3 3,4 3,5 3,6 3,7 and 3,8 actions and procedur...
void setHkEnableCmdRepStrucIdItem(void *p, CrFwCounterU4_t N, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkEnableCmd" packet.
CrFwOutcome_t outcome
The outcome of an action or check executed by a state machine or by one of its procedures.
Definition of the InLoader component.
CrFwCounterU4_t i
CrPsCmd5EidStart function definitions.
#define CR_FW_OUTCMP_TYPE
Type identifier for the OutComponent components.
CrFwTypeId_t CrFwCmpGetTypeId(FwSmDesc_t smDesc)
Return the type identifier of the argument component.
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
Interface through which applications can initialize and execute framework PUS extension components...
void CrFwPcktSetServType(CrFwPckt_t pckt, CrFwServType_t servType)
Set the service type of the command or report encapsulated in a packet.
static FwSmDesc_t outCmp[CR_FW_OUTFACTORY_MAX_NOF_OUTCMP]
The pre-allocated OutComponent instances.
void setHkRepStructCmdRepStrucIdItem(void *p, CrFwCounterU4_t N, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkRepStructCmd" packet.
CrFwBool_t CrFwCmpIsInConfigured(FwSmDesc_t smDesc)
Return true if the argument component is in state CONFIGURED.
void CrFwSetAppErrCode(CrFwAppErrCode_t errCode)
Set the value of the application error code (see CrFwGetAppErrCode).
Command (3,27) to Generate One-Shot Housekeeping Report.
static void setHkRepStructCmdN(void *p, CrFwCounterU4_t N)
Set "N" in "HkRepStructCmd" packet.
void CrPsHkRepUpdateAction(FwSmDesc_t smDesc)
Update action of the Periodic Housekeeping Report (3,25) out-going report packet. ...
static FwSmDesc_t inFactory
The singleton instance of the InFactory.
void setHkDeleteCmdRepStrucIdItem(void *p, CrFwCounterU4_t N, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkDeleteCmd" packet.
void CrPsHkRepStructCmdStartAction(FwSmDesc_t smDesc)
FW Profile function definitions.
void CrFwPcktSetSrc(CrFwPckt_t pckt, CrFwDestSrc_t src)
Set the source of the command or report encapsulated in a packet.
#define CR_FW_OUTFACTORY_MAX_NOF_OUTCMP
The maximum number of OutComponents which may be allocated at any one time.
Interface for accessing data pool items.
static void setHkDisableCmdN(void *p, CrFwCounterU4_t N)
Set "N" in "HkDisableCmd" packet.
Definition of the OutFactory component.
void setHkDisableCmdRepStrucIdItem(void *p, CrFwCounterU4_t N, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkDisableCmd" packet.
An OutComponent allocation request has failed (see CrFwOutFactoryMakeOutCmp).
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
static CrPsFlag_t getDpisEnabledItem(int i)
Gets the value of the i-th element in the datapool array isEnabled.
static CrFwCmpData_t outManagerData[CR_FW_NOF_OUTMANAGER]
The data structures for the OutManager State Machines and their Procedures.
FwSmDesc_t CrFwOutManagerMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th OutManager State Machine instance.
Interface for creating and accessing a report or command packet.
void CrPsExecServHk()
Execution of CORDET Framework PUS Extension components.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
void CrPsHkOneShotCmdProgressAction(FwSmDesc_t smDesc)
Progress action of the Command (3,27) to Generate One-Shot Housekeeping Report in-coming command pack...
CrFwServType_t CrFwOutCmpGetServType(FwSmDesc_t smDesc)
Return the type of the OutComponent.
void setHkOneShotCmdRepStrucIdItem(void *p, CrFwCounterU4_t N, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkOneShotCmd" packet.
An OutComponent release request has encountered an error (see CrFwOutFactoryReleaseOutCmp).
void setHkCreateCmdN1ParamIdItem(void *p, CrFwCounterU4_t N, CrPsParamId_t N1ParamId)
Set "N1ParamId" arrayItem in "HkCreateCmd" packet.
Definition of the OutRegistry Component.
void CrFwPcktSetCmdRepType(CrFwPckt_t pckt, CrFwCmdRepType_t type)
Set the type of a packet (either a command packet or a report packet).
Command (3,3) to Delete a Housekeeping Report Structure.
void setHkCreateCmdN2ParamIdItem(void *p, CrFwCounterU4_t NFA, CrFwCounterU4_t N2, CrPsParamId_t N2ParamId)
Set "N2ParamID" in "HkCreateCmd" packet.
void CrFwPcktSetSeqCnt(CrFwPckt_t pckt, CrFwSeqCnt_t seqCnt)
Set the sequence counter of the command or report encapsulated in a packet.
void CrPsHkDisableCmdProgressAction(FwSmDesc_t smDesc)
Progress action of the Command (3,6) to Disable Periodic Generation of a Housekeeping Report Structur...
CrFwServType_t CrFwInCmdGetServSubType(FwSmDesc_t smDesc)
Return the sub-type of the InCommand.
static void setDplstNSampRepItem(int i, CrPsNumberU2_t lstNSampRep)
Sets the value of the i-th element in the datapool array lstNSampRep.
static CrPsSid_t getDpsidItem(int i)
Gets the value of the i-th element in the datapool array sid.
static void setDpsidItem(int i, CrPsSid_t sid)
Sets the value of the i-th element in the datapool array sid.
static FwSmDesc_t outFactory
The singleton instance of the OutFactory.
Command (3,6) to Disable Periodic Generation of a Housekeeping Report Structure.
CrFwBool_t CrFwInCmdIsInAccepted(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state ACCEPTED.
Interface for reporting an error detected by a framework component.
CrFwBool_t CrPsHkRepEnableCheck(FwSmDesc_t smDesc)
Enable check of the Periodic Housekeeping Report (3,25) out-going report packet.
void CrPsHkEnableCmdStartAction(FwSmDesc_t smDesc)
Start action of the Command (3,5) to Enable Periodic Generation of a Housekeeping Report Structure in...
static void setDpisEnabledItem(int i, CrPsFlag_t isEnabled)
Sets the value of the i-th element in the datapool array isEnabled.
auxiliary Interface for accessing fields in packets of service "ServHk".
void CrPsHkDeleteCmdStartAction(FwSmDesc_t smDesc)
CR Framework function definitions.
void CrPsHkRepStructCmdTerminationAction(FwSmDesc_t smDesc)
Termination Action of the Command (3,9) to Report Structure of a Housekeeping Report in-coming comman...
void CrFwPcktSetGroup(CrFwPckt_t pckt, CrFwGroup_t group)
Set the group of the command/report encapsulated in a packet.
static void setDplstSampleRepItem(int i, CrPsRepetition_t lstSampleRep)
Sets the value of the i-th element in the datapool array lstSampleRep.
CrFwServType_t CrFwOutCmpGetServSubType(FwSmDesc_t smDesc)
Return the sub-type of the OutComponent.
CrFwBool_t CrPsHkTestCase4()
Test the Service 3 Housekeeping service Test all the 3,10 3,12 3,25 and 3,26 actions and procedures...
void * cmpSpecificData
Derived data which are specific to each type of framework component.
void CrPsHkDisableCmdStartAction(FwSmDesc_t smDesc)
Start action of the Command (3,6) to Disable Periodic Generation of a Housekeeping Report Structure i...
void CrFwPcktSetAckLevel(CrFwPckt_t pckt, CrFwBool_t accept, CrFwBool_t start, CrFwBool_t progress, CrFwBool_t term)
Set the acknowledge level for the command encapsulated in a packet.
Definition of the InFactory component.
#define CR_FW_INCOMMAND_TYPE
Type identifier for the InCommand component.
void CrPsHkCreateCmdProgressAction(FwSmDesc_t smDesc)
Progress action of the Command (3,1) to Create a Housekeeping Report Structure in-coming command pack...
static void setHkCreateCmdN1(void *p, CrFwCounterU4_t N1)
Set "N1" in "HkCreateCmd" packet.
Definition of the utility functions for the CORDET Framework.
static void setDpnSimpleItem(int i, CrPsNumberU2_t nSimple)
Sets the value of the i-th element in the datapool array nSimple.
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
void setHkCreateCmdN2(void *p, CrFwCounterU4_t NFA, CrFwCounterU4_t N2)
Set "N2" in "HkCreateCmd" packet.
CrFwBool_t CrPsHkRepReadyCheck(FwSmDesc_t smDesc)
Ready check of the Periodic Housekeeping Report (3,25) out-going report packet.
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
static void setHkEnableCmdN(void *p, CrFwCounterU4_t N)
Set "N" in "HkEnableCmd" packet.
FwSmDesc_t * pocl
Pending OutComponent List (POCL) for the OutManager.
CrFwBool_t CrPsHkTestCase1()
Test the Service 3 Housekeeping Service Part 1 Test all the 3,1 and 3,2 actions and procedures...
void CrPsHkEnableCmdProgressAction(FwSmDesc_t smDesc)
Progress action of the Command (3,5) to Enable Periodic Generation of a Housekeeping Report Structure...
CrFwDiscriminant_t CrFwOutCmpGetDiscriminant(FwSmDesc_t smDesc)
Return the discriminant of the OutComponent.
static void setHkOneShotCmdN(void *p, CrFwCounterU4_t N)
Set "N" in "HkOneShotCmd" packet.
Command (3,1) to Create a Housekeeping Report Structure.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
void CrPsHkDisableCmdTerminationAction(FwSmDesc_t smDesc)
Termination Action of the DCommand (3,6) to Disable Periodic Generation of a Housekeeping Report Stru...
CrFwOutFactoryPoolIndex_t CrFwOutFactoryGetNOfAllocatedOutCmp()
Return the number of OutComponents which are currently allocated.
void CrPsHkDeleteCmdProgressAction(FwSmDesc_t smDesc)
Progress action of the Command (3,3) to Delete a Housekeeping Report Structure in-coming command pack...
void CrFwPcktSetDest(CrFwPckt_t pckt, CrFwDestSrc_t dest)
Set the destination of the command or report encapsulated in a packet.
Definition of Base Component.
void CrPsHkDeleteCmdTerminationAction(FwSmDesc_t smDesc)
Termination Action of the Command (3,3) to Delete a Housekeeping Report Structure in-coming command p...
FwSmDesc_t CrFwInFactoryMake()
Factory function for the singleton instance of the InFactory.
int CrPsInitServHk()
Initialization of CORDET Framework PUS Extension components.
#define HK_N_REP_DEF
Number of Report Definitions in the Report Definition List (maximum number of housekeeping/diagnostic...
void CrFwOutFactoryReleaseOutCmp(FwSmDesc_t outCmpInstance)
Release function for an OutComponent.
static void setHkCreateCmdCollectionInterval(void *p, CrPsCollectInterval_t CollectionInterval)
Set "CollectionInterval" in "HkCreateCmd" packet.
static void setDpperiodItem(int i, CrPsPeriod_t period)
Sets the value of the i-th element in the datapool array period.
void CrPsHkRepStructCmdProgressAction(FwSmDesc_t smDesc)
Progress action of the Command (3,9) to Report Structure of a Housekeeping Report in-coming command p...
void CrFwInFactoryReleaseInCmd(FwSmDesc_t inCmdInstance)
Release function for an InCommand.
char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
#define HK_MAX_N_GR
Maximum number of super-commutated groups in a house- keeping/diagnostic report.
void CrPsHkOneShotCmdTerminationAction(FwSmDesc_t smDesc)
Termination Action of the Command (3,27) to Generate One-Shot Housekeeping Report in-coming command p...
void CrPsHkEnableCmdTerminationAction(FwSmDesc_t smDesc)
Termination Action of the Command (3,5) to Enable Periodic Generation of a Housekeeping Report Struct...
void CrPsHkCreateCmdTerminationAction(FwSmDesc_t smDesc)
Termination Action of the Command (3,1) to Create a Housekeeping Report Structure in-coming command p...
CrFwBool_t CrPsHkTestCase3()
Test the Service 3 Housekeeping service Test all the 3,9 3,11 3,27 and 3,28 actions and procedures...
Command (3,5) to Enable Periodic Generation of a Housekeeping Report Structure.
FwSmDesc_t CrFwOutFactoryMake()
Factory function for the singleton instance of the OutFactory.
Command (3,9) to Report Structure of a Housekeeping Report.
static void setDplstIdItem(int i, CrPsParamId_t lstId)
Sets the value of the i-th element in the datapool array lstId.
Interface through which applications can initialize and execute framework PUS extension components...
int CrPsInitServReqVerif()
Initialization of CORDET Framework PUS Extension components.
Interface for accessing fields in packets of service "ServHk".
void setHkCreateCmdNFA(void *p, CrFwCounterU4_t NFA)
Set "NFA" in "HkCreateCmd" packet.
#define VER_FULL_RDL
Outcome Failure Codes for Service 3 (Housekeeping)
void CrPsHkRepStructRepUpdateAction(FwSmDesc_t smDesc)
Update action of the Housekeeping Structure Report (3,10) out-going report packet.
CrFwCounterU1_t CrFwOutManagerGetNOfPendingOutCmp(FwSmDesc_t smDesc)
Return the number of OutComponents currently in the POCL of an OutManager.
CrFwInFactoryPoolIndex_t CrFwInFactoryGetNOfAllocatedInCmd()
Return the number of InCommands which are currently allocated.
No application errors have been detected.
static FwSmDesc_t inCmd[CR_FW_INFACTORY_MAX_NOF_INCMD]
The pre-allocated InCommand instances.
void CrPsHkOneShotCmdStartAction(FwSmDesc_t smDesc)
Start action of the Command (3,27) to Generate One-Shot Housekeeping Report in-coming command packet...
#define VER_ILL_SID
Failure Codes of Service 3 (Housekeeping) for Service 1 (Request Verification)
Interface for accessing data pool items.
CrFwServType_t CrFwInCmdGetServType(FwSmDesc_t smDesc)
Return the type of the InCommand.
Definition of the OutLoader component.
void setHkCreateCmdSCSampleRepNumItem(void *p, CrFwCounterU4_t NFA, CrPsRepNum_t SCSampleRepNum)
Set "SCSampleRepNum" in "HkCreateCmd" packet.
void CrPsHkCreateCmdStartAction(FwSmDesc_t smDesc)
Start action of the Command (3,1) to Create a Housekeeping Report Structure in-coming command packet...
FwSmDesc_t CrFwOutFactoryMakeOutCmp(CrFwServType_t type, CrFwServSubType_t subType, CrFwDiscriminant_t discriminant, CrFwPcktLength_t length)
Make function for an OutComponent.
FwSmDesc_t CrFwInFactoryMakeInCmd(CrFwPckt_t pckt)
Make function for a component encapsulating an incoming command (InCommand).
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
void CrFwPcktSetDiscriminant(CrFwPckt_t pckt, CrFwDiscriminant_t discriminant)
Set the discriminant of the command or report encapsulated in a packet.
Definition of the InCommand Component of the framework.
Type for the data describing an OutManager.
static void setHkDeleteCmdN(void *p, CrFwCounterU4_t N)
Set "N" in "HkDeleteCmd" packet.