CORDET Framework - C2 Implementation
CrPsEvtRepDisabledRep.c
Go to the documentation of this file.
1 
23 #include "CrPsEvtRepDisabledRep.h"
24 
25 /* CrFramework includes */
26 #include <Pckt/CrFwPckt.h>
28 #include <OutCmp/CrFwOutCmp.h>
30 #include <CrFwCmpData.h>
31 
32 /* FwProfile includes */
33 #include "FwSmConstants.h"
34 #include "FwSmConfig.h"
35 #include "FwSmCore.h"
36 #include "FwPrDCreate.h"
37 #include "FwPrConfig.h"
38 #include "FwPrCore.h"
39 #include "FwPrConstants.h"
40 
41 #include <DataPool/CrPsDpServEvt.h>
44 #include <CrPsUserConstants.h>
45 
46 
53 void CrPsEvtRepDisabledRepUpdateAction(FwSmDesc_t smDesc)
54 {
55  CrFwCmpData_t *cmpData;
56  CrFwOutCmpData_t *cmpSpecificData;
57  CrFwPckt_t pckt;
58  CrFwCounterU2_t evtSlot, pos;
59  CrPsEid_t evtEid;
60  CrPsEid_t evtEidArray[EVT_N_EID] = EVT_EID;
61 
62  /* Get packet */
63  cmpData = (CrFwCmpData_t*)FwSmGetData(smDesc);
64  cmpSpecificData = (CrFwOutCmpData_t *) cmpData->cmpSpecificData;
65  pckt = cmpSpecificData->pckt;
66 
67  pos = 0;
68 
69  for (evtSlot = 0; evtSlot < EVT_N_EID; evtSlot++)
70  {
71  if (getDpisEidEnabledItem(evtSlot) == 0)
72  {
73  pos++;
74 
75  evtEid = evtEidArray[evtSlot];
76 
77  setEvtRepDisabledRepEventIdItem(pckt, pos, evtEid);
78  }
79  }
80 
81  return ;
82 }
Type for the Framework Component Data (FCD).
void setEvtRepDisabledRepEventIdItem(void *p, CrPsNumberU4_t N, CrPsEid_t src)
Set "EventId" arrayItem in "EvtRepDisabledRep" packet.
#define EVT_N_EID
Number of event identifiers supported by the application.
Header file to define all user-configurable constants and types for the IASW Application.
Interface for accessing data pool items.
Definition of the OutFactory component.
Type for the data describing an OutComponent.
CrFwPckt_t pckt
Packet to which the out-going command or report is serialized.
Interface for creating and accessing a report or command packet.
uint16_t CrPsEid_t
Type used for Event Id of a Packet.
void * cmpSpecificData
Derived data which are specific to each type of framework component.
void CrPsEvtRepDisabledRepUpdateAction(FwSmDesc_t smDesc)
Update action of TM(5,8) EvtRepDisabledRep.
Interface for accessing fields in packets of service "ServEvt".
char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
Definition: CrFwConstants.h:36
Definition of the OutComponent Component of the framework.
#define EVT_EID
Array of EVT_N_EID elements holding the event identifiers in ascending order.
auxiliary Interface for accessing fields in packets of service "ServEvt".
Definition of the OutLoader component.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
static CrPsFlag_t getDpisEidEnabledItem(int i)
Gets the value of the i-th element in the datapool array isEidEnabled.
Implementation of TM(5,8) EvtRepDisabledRep.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved