CORDET Framework - C2 Implementation
CrPsEvtTestCases.c
Go to the documentation of this file.
1 
21 /* Include FW Profile files */
22 #include "FwSmConstants.h"
23 #include "FwSmConfig.h"
24 #include "FwSmCore.h"
25 #include "FwPrConfig.h"
26 #include "FwPrCore.h"
27 #include "FwPrConstants.h"
28 #include "FwPrDCreate.h"
29 /* Include framework files */
30 #include "CrFwCmpData.h"
32 #include "BaseCmp/CrFwBaseCmp.h"
33 #include "Pckt/CrFwPckt.h"
34 #include "InCmd/CrFwInCmd.h"
37 #include "InLoader/CrFwInLoader.h"
39 #include "InLoader/CrFwInLoader.h"
40 #include "CrFwTime.h"
41 
42 #include "CrFwRepErr.h"
44 #include <CrPsUtilitiesServEvt.h>
46 #include "config/CrFwOutFactoryUserPar.h"
54 
55 /* Include system files */
56 #include <stdlib.h>
57 #include <unistd.h>
58 #include <stdint.h>
59 
60 #define TESTNMB 10
61 
62 /* ---------------------------------------------------------------------------------------------*/
64 {
65  /* Check Service 5 */
66  FwSmDesc_t inFactory, outFactory, outManager, inCmd, outCmp, outCmpArr[CR_FW_OUTFACTORY_MAX_NOF_OUTCMP];
68  CrFwOutManagerData_t* outManagerCSData;
69  CrFwPckt_t pckt;
70  CrPsNumberU4_t nmbr;
71  CrFwCmpData_t *cmpData;
72  uint32_t i;
73 
74  /* Instantiate all relevant CORDET Framework PUS Extension components, e.g. all the procedures and state machines */
77 
78  /* run the getter for EvtCmd5EidStart procedure descriptor */
80 
81  /* Instantiate the OutFactory, InFactory and OutManager*/
82  outFactory = CrFwOutFactoryMake();
83  if (outFactory == NULL)
84  return 0;
85  if (FwSmCheckRec(outFactory) != smSuccess)
86  return 0;
87 
88  inFactory = CrFwInFactoryMake();
89  if (inFactory == NULL)
90  return 0;
91  if (FwSmCheckRec(inFactory) != smSuccess)
92  return 0;
93 
94  outManager = CrFwOutManagerMake(0);
95  if (outManager == NULL)
96  return 0;
97  if (FwSmCheckRec(outManager) != smSuccess)
98  return 0;
99 
100  /* Initialize and Configure OutFactory, InFactory and Outmanager and check success */
101  CrFwCmpInit(outFactory);
102  CrFwCmpReset(outFactory);
103  if (!CrFwCmpIsInConfigured(outFactory))
104  return 0;
105 
106  CrFwCmpInit(inFactory);
107  CrFwCmpReset(inFactory);
108  if (!CrFwCmpIsInConfigured(inFactory))
109  return 0;
110 
111  CrFwCmpInit(outManager);
112  CrFwCmpReset(outManager);
113  if (!CrFwCmpIsInConfigured(outManager))
114  return 0;
115 
116  /* Check if number of Allocated Packets = 0*/
117  if (CrFwPcktGetNOfAllocated() != 0)
118  return 0;
119 
120  /* Create a 5,1 Packet to get outcome success*/
121  outCmp = CrFwOutFactoryMakeOutCmp(5,1,1,80);
122 
123  /*run the Enable Check and Update Action and check for change of datapool variable*/
124  nmbr = getDpnOfDetectedEvts_1();
125  CrPsEvtRepEnableCheck(outCmp);
126  if (getDpnOfDetectedEvts_1() == nmbr)
127  return 0;
128 
129  nmbr = getDpnOfGenEvtRep_1();
130  CrPsEvtRepUpdateAction(outCmp);
131  cmpData = (CrFwCmpData_t*) FwSmGetData(outCmp);
132  if (cmpData->outcome != 1)
133  {
134  return 0;
135  }
136  if (getDpnOfGenEvtRep_1() == nmbr)
137  return 0;
138 
139  /*Release the OutComponent*/
141 
142  /* Create a 5,2 Packet to get outcome success*/
143  outCmp = CrFwOutFactoryMakeOutCmp(5,2,1,80);
144 
145  /*run the Enable Check and Update Action and check for change of datapool variable*/
146  nmbr = getDpnOfDetectedEvts_2();
147  CrPsEvtRepEnableCheck(outCmp);
148  if (getDpnOfDetectedEvts_2() == nmbr)
149  return 0;
150 
151  nmbr = getDpnOfGenEvtRep_2();
152  CrPsEvtRepUpdateAction(outCmp);
153  cmpData = (CrFwCmpData_t*) FwSmGetData(outCmp);
154  if (cmpData->outcome != 1)
155  {
156  return 0;
157  }
158  if (getDpnOfGenEvtRep_2() == nmbr)
159  return 0;
160 
161  /*Release the OutComponent*/
163 
164  /* Create a 5,3 Packet to get outcome success*/
165  outCmp = CrFwOutFactoryMakeOutCmp(5,3,1,80);
166 
167  /*run the Enable Check and Update Action and check for change of datapool variable*/
168  nmbr = getDpnOfDetectedEvts_3();
169  CrPsEvtRepEnableCheck(outCmp);
170  if (getDpnOfDetectedEvts_3() == nmbr)
171  return 0;
172 
173  nmbr = getDpnOfGenEvtRep_3();
174  CrPsEvtRepUpdateAction(outCmp);
175  cmpData = (CrFwCmpData_t*) FwSmGetData(outCmp);
176  if (cmpData->outcome != 1)
177  {
178  return 0;
179  }
180  if (getDpnOfGenEvtRep_3() == nmbr)
181  return 0;
182 
183  /*Release the OutComponent*/
185 
186  /* Create a 5,4 Packet to get outcome success*/
187  outCmp = CrFwOutFactoryMakeOutCmp(5,4,1,80);
188 
189  /*run the Enable Check and Update Action and check for change of datapool variable*/
190  nmbr = getDpnOfDetectedEvts_4();
191  CrPsEvtRepEnableCheck(outCmp);
192  if (getDpnOfDetectedEvts_4() == nmbr)
193  return 0;
194 
195  nmbr = getDpnOfGenEvtRep_4();
196  CrPsEvtRepUpdateAction(outCmp);
197  cmpData = (CrFwCmpData_t*) FwSmGetData(outCmp);
198  if (cmpData->outcome != 1)
199  {
200  return 0;
201  }
202  if (getDpnOfGenEvtRep_4() == nmbr)
203  return 0;
204 
205  /*Release the OutComponent*/
207 
208  /* Create a 5,8 Packet to trigger an error and get coverage*/
209  outCmp = CrFwOutFactoryMakeOutCmp(5,8,0,80);
210 
211  /*run the Enable Check and update Action for coverage */
212  CrPsEvtRepEnableCheck(outCmp);
213  CrPsEvtRepUpdateAction(outCmp);
214  cmpData = (CrFwCmpData_t*) FwSmGetData(outCmp);
215  if (cmpData->outcome != 1)
216  {
217  return 0;
218  }
219 
220  /*Release the OutComponent*/
222 
223  /* Allocate a 5,5 Packet to get outcome success all valid EID's*/
224  pckt = CrFwPcktMake(80);
225  CrFwPcktSetServType(pckt,5);
226  CrFwPcktSetServSubType(pckt,5);
228  CrFwPcktSetDiscriminant(pckt,0);
229  CrFwPcktSetSrc(pckt,0);
230  CrFwPcktSetDest(pckt,10);
231  CrFwPcktSetGroup(pckt,1);
232  CrFwPcktSetAckLevel(pckt,0,0,0,0);
233  CrFwPcktSetSeqCnt(pckt,0);
234 
235  setEvtEnableCmdN(pckt, 5);
236  setEvtEnableCmdEventIdItem(pckt, 1, 1);
237  setEvtEnableCmdEventIdItem(pckt, 2, 2);
238  setEvtEnableCmdEventIdItem(pckt, 3, 3);
239  setEvtEnableCmdEventIdItem(pckt, 4, 4);
240  setEvtEnableCmdEventIdItem(pckt, 5, 5);
241 
242  inCmd = CrFwInFactoryMakeInCmd(pckt);
243 
244  /* manually set datapool values of disabled EID's */
245  setDpnOfDisabledEid_1(TESTNMB);
246  setDpnOfDisabledEid_2(TESTNMB);
247  setDpnOfDisabledEid_3(TESTNMB);
248  setDpnOfDisabledEid_4(TESTNMB);
249 
250  /* run the start action, the progress action and the termination action */
252  cmpData = (CrFwCmpData_t*) FwSmGetData(inCmd);
253  if (cmpData->outcome != 1)
254  {
255  return 0;
256  }
258  cmpData = (CrFwCmpData_t*) FwSmGetData(inCmd);
259  if (cmpData->outcome != 1)
260  {
261  return 0;
262  }
264  cmpData = (CrFwCmpData_t*) FwSmGetData(inCmd);
265  if (cmpData->outcome != 1)
266  {
267  return 0;
268  }
269 
270  /* Check if Datapool Values change accordingly */
271  if (getDpnOfDisabledEid_1() != TESTNMB-2)
272  return 0;
273  if (getDpnOfDisabledEid_2() != TESTNMB-1)
274  return 0;
275  if (getDpnOfDisabledEid_3() != TESTNMB-1)
276  return 0;
277  if (getDpnOfDisabledEid_4() != TESTNMB-1)
278  return 0;
279 
280  /* Release the inCommand*/
282 
283  /* Allocate a 5,5 Packet to get outcome failure only wrong EID's*/
284  pckt = CrFwPcktMake(80);
285  CrFwPcktSetServType(pckt,5);
286  CrFwPcktSetServSubType(pckt,5);
288  CrFwPcktSetDiscriminant(pckt,0);
289  CrFwPcktSetSrc(pckt,0);
290  CrFwPcktSetDest(pckt,10);
291  CrFwPcktSetGroup(pckt,1);
292  CrFwPcktSetAckLevel(pckt,0,0,0,0);
293  CrFwPcktSetSeqCnt(pckt,0);
294 
295  setEvtEnableCmdN(pckt, 5);
296  setEvtEnableCmdEventIdItem(pckt, 1, 10);
297  setEvtEnableCmdEventIdItem(pckt, 2, 20);
298  setEvtEnableCmdEventIdItem(pckt, 3, 30);
299  setEvtEnableCmdEventIdItem(pckt, 4, 40);
300  setEvtEnableCmdEventIdItem(pckt, 5, 50);
301 
302  inCmd = CrFwInFactoryMakeInCmd(pckt);
303 
305  cmpData = (CrFwCmpData_t*) FwSmGetData(inCmd);
306  if (cmpData->outcome != VER_EID_START_FD)
307  {
308  return 0;
309  }
310 
311  /* Release the inCommand*/
313 
314  /* Get the Data from the out Manager (there is only one Component) */
315  outManagerData = (CrFwCmpData_t*)FwSmGetData(outManager);
316  outManagerCSData = (CrFwOutManagerData_t*)outManagerData->cmpSpecificData;
317  outCmp = outManagerCSData->pocl[0];
318 
319  /* Check if there is a 1,4 Command waitig in the OutManager (loaded) */
320  if (CrFwCmpGetTypeId(outCmp) != CR_FW_OUTCMP_TYPE)
321  return 0;
322  if (CrFwOutCmpGetServType(outCmp) != 1)
323  return 0;
324  if (CrFwOutCmpGetServSubType(outCmp) != 4)
325  return 0;
326  if (CrFwOutCmpGetDiscriminant(outCmp) != VER_ILL_EID)
327  return 0;
328 
329  /*Release the OutComponent and reset the outmanager*/
331  CrFwCmpReset(outManager);
332  if (CrFwOutManagerGetNOfPendingOutCmp(outManager) != 0)
333  return 0;
334 
335  /*Check if an OutComponent Release Error occures*/
337  return 0;
338 
339  /*Reset application error Corde*/
341 
342  /* Allocate a 5,6 Packet to get outcome success*/
343  pckt = CrFwPcktMake(80);
344  CrFwPcktSetServType(pckt,5);
345  CrFwPcktSetServSubType(pckt,6);
347  CrFwPcktSetDiscriminant(pckt,0);
348  CrFwPcktSetSrc(pckt,0);
349  CrFwPcktSetDest(pckt,10);
350  CrFwPcktSetGroup(pckt,1);
351  CrFwPcktSetAckLevel(pckt,0,0,0,0);
352  CrFwPcktSetSeqCnt(pckt,0);
353 
354  setEvtDisableCmdN(pckt, 5);
355  setEvtDisableCmdEventIdItem(pckt, 1, 1);
356  setEvtDisableCmdEventIdItem(pckt, 2, 2);
357  setEvtDisableCmdEventIdItem(pckt, 3, 3);
358  setEvtDisableCmdEventIdItem(pckt, 4, 4);
359  setEvtDisableCmdEventIdItem(pckt, 5, 5);
360 
361  inCmd = CrFwInFactoryMakeInCmd(pckt);
362 
364  cmpData = (CrFwCmpData_t*) FwSmGetData(inCmd);
365  if (cmpData->outcome != 1)
366  {
367  return 0;
368  }
369 
371  cmpData = (CrFwCmpData_t*) FwSmGetData(inCmd);
372  if (cmpData->outcome != 1)
373  {
374  return 0;
375  }
376 
378  cmpData = (CrFwCmpData_t*) FwSmGetData(inCmd);
379  if (cmpData->outcome != 1)
380  {
381  return 0;
382  }
383 
384  /* Release the inCommand*/
386 
387  /* Check if Datapool Values change accordingly */
388  if (getDpnOfDisabledEid_1() != TESTNMB)
389  return 0;
390  if (getDpnOfDisabledEid_2() != TESTNMB)
391  return 0;
392  if (getDpnOfDisabledEid_3() != TESTNMB)
393  return 0;
394  if (getDpnOfDisabledEid_4() != TESTNMB)
395  return 0;
396 
397  /* Allocate a 5,7 Packet to get outcome success*/
398  pckt = CrFwPcktMake(80);
399  CrFwPcktSetServType(pckt,5);
400  CrFwPcktSetServSubType(pckt,7);
402  CrFwPcktSetDiscriminant(pckt,0);
403  CrFwPcktSetSrc(pckt,0);
404  CrFwPcktSetDest(pckt,10);
405  CrFwPcktSetGroup(pckt,1);
406  CrFwPcktSetAckLevel(pckt,0,0,0,0);
407  CrFwPcktSetSeqCnt(pckt,0);
408 
409  inCmd = CrFwInFactoryMakeInCmd(pckt);
410 
412  if (cmpData->outcome != 1)
413  {
414  return 0;
415  }
417  if (cmpData->outcome != 1)
418  {
419  return 0;
420  }
422  if (cmpData->outcome != 1)
423  {
424  return 0;
425  }
426 
427  /* Release the inCommand*/
429 
430  /* Get the Data from the out Manager (there is only one Component) */
431  outManagerData = (CrFwCmpData_t*)FwSmGetData(outManager);
432  outManagerCSData = (CrFwOutManagerData_t*)outManagerData->cmpSpecificData;
433  outCmp = outManagerCSData->pocl[0];
434 
435  /* Check if there is a 5,8 Command waitig in the OutManager (loaded) */
436  if (CrFwCmpGetTypeId(outCmp) != CR_FW_OUTCMP_TYPE)
437  return 0;
438  if (CrFwOutCmpGetServType(outCmp) != 5)
439  return 0;
440  if (CrFwOutCmpGetServSubType(outCmp) != 8)
441  return 0;
442 
443  /*Release the OutComponent and reset the outmanager*/
445  CrFwCmpReset(outManager);
446  if (CrFwOutManagerGetNOfPendingOutCmp(outManager) != 0)
447  return 0;
448 
449  /*Check if an OutComponent Release Error occures*/
451  return 0;
452 
453  /*Reset application error Corde*/
455 
456  /* Allocate a 5,7 Packet to get outcome Outfactory Failure*/
457  pckt = CrFwPcktMake(80);
458  CrFwPcktSetServType(pckt,5);
459  CrFwPcktSetServSubType(pckt,7);
461  CrFwPcktSetDiscriminant(pckt,0);
462  CrFwPcktSetSrc(pckt,0);
463  CrFwPcktSetDest(pckt,10);
464  CrFwPcktSetGroup(pckt,1);
465  CrFwPcktSetAckLevel(pckt,0,0,0,0);
466  CrFwPcktSetSeqCnt(pckt,0);
467 
468  inCmd = CrFwInFactoryMakeInCmd(pckt);
469 
470  /* Fill the outfactory so that an Error could occur (leave one free slot) */
471  for (i=0;i<=CR_FW_OUTFACTORY_MAX_NOF_OUTCMP-1;i++)
472  {
473  outCmpArr[i] = CrFwOutFactoryMakeOutCmp(17,2,0,0);
474  }
475 
477  if (cmpData->outcome != 0)
478  {
479  return 0;
480  }
481 
482  /*Check if an OutComponent allocation Error occures*/
484  return 0;
485 
486  /*Reset application error Corde*/
488 
489  /* Release all outcomponents, that have been created to fill the outfactory */
490  for (i=0;i<=CR_FW_OUTFACTORY_MAX_NOF_OUTCMP-1;i++)
491  {
492  CrFwOutFactoryReleaseOutCmp(outCmpArr[i]);
493  }
494 
495  /* Release the inCommand*/
497 
498 
499  /* Allocate a 5,7 Packet to trigger an error in the enable start procedure*/
500  pckt = CrFwPcktMake(80);
501  CrFwPcktSetServType(pckt,5);
502  CrFwPcktSetServSubType(pckt,7);
504  CrFwPcktSetDiscriminant(pckt,0);
505  CrFwPcktSetSrc(pckt,0);
506  CrFwPcktSetDest(pckt,10);
507  CrFwPcktSetGroup(pckt,1);
508  CrFwPcktSetAckLevel(pckt,0,0,0,0);
509  CrFwPcktSetSeqCnt(pckt,0);
510 
511  setEvtEnableCmdN(pckt, 5);
512  setEvtEnableCmdEventIdItem(pckt, 1, 1);
513  setEvtEnableCmdEventIdItem(pckt, 2, 2);
514  setEvtEnableCmdEventIdItem(pckt, 3, 3);
515  setEvtEnableCmdEventIdItem(pckt, 4, 4);
516  setEvtEnableCmdEventIdItem(pckt, 5, 5);
517 
518  inCmd = CrFwInFactoryMakeInCmd(pckt);
519 
521  if (cmpData->outcome != VER_EID_START_FD)
522  {
523  return 0;
524  }
525 
526  /* Release the inCommand*/
528 
529  /* Create a 5,8 Packet to get outcome success*/
530  outCmp = CrFwOutFactoryMakeOutCmp(5,8,0,80);
531 
532  /*run the Update Action and check for outcome = success*/
534  cmpData = (CrFwCmpData_t*) FwSmGetData(outCmp);
535  if (cmpData->outcome != 1)
536  {
537  return 0;
538  }
539 
540  /*Release the OutComponent*/
542 
543  /* Reset OutManager and check that all OutComponents are unloaded and released */
544  CrFwCmpReset(outManager);
545  if (CrFwOutManagerGetNOfPendingOutCmp(outManager) != 0)
546  return 0;
547 
548  /* Reset the OutFactory */
549  CrFwCmpReset(outFactory);
551  return 0;
552 
553  /* Reset the InFactory and check that no InCommands are allocated */
554  CrFwCmpReset(inFactory);
556  return 0;
557 
558  /* Check application errors */
559  if (CrFwGetAppErrCode() != crNoAppErr)
560  return 0;
561 
562  return 1;
563 }
564 
void CrPsEvtDisableCmdProgressAction(FwSmDesc_t smDesc)
Progress action of TC(5,6) EvtDisableCmd.
Type for the Framework Component Data (FCD).
Interface through which framework components access the current time.
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.
Definition: CrFwBaseCmp.c:156
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
Definition: CrFwBaseCmp.c:112
static CrPsNumberU4_t getDpnOfGenEvtRep_4()
Gets the value of the datapool item nOfGenEvtRep_4.
void CrFwPcktSetServType(CrFwPckt_t pckt, CrFwServType_t servType)
Set the service type of the command or report encapsulated in a packet.
void CrPsEvtRepDisabledCmdTerminationAction(FwSmDesc_t smDesc)
Termination action of TC(5,7) EvtRepDisabledCmd.
static FwSmDesc_t outCmp[CR_FW_OUTFACTORY_MAX_NOF_OUTCMP]
The pre-allocated OutComponent instances.
#define CRFW_UNUSED(x)
A macro that can be used to specify that a function parameter is not used.
Definition: CrFwConstants.h:27
CrFwBool_t CrFwCmpIsInConfigured(FwSmDesc_t smDesc)
Return true if the argument component is in state CONFIGURED.
Definition: CrFwBaseCmp.c:177
void CrFwSetAppErrCode(CrFwAppErrCode_t errCode)
Set the value of the application error code (see CrFwGetAppErrCode).
Implementation of TC(5,7) EvtRepDisabledCmd.
void setEvtEnableCmdEventIdItem(void *p, CrPsNumberU4_t N, CrPsEid_t src)
Set "EventId" arrayItem in "EvtEnableCmd" packet.
static FwSmDesc_t inFactory
The singleton instance of the InFactory.
void CrFwPcktSetSrc(CrFwPckt_t pckt, CrFwDestSrc_t src)
Set the source of the command or report encapsulated in a packet.
static void setDpnOfDisabledEid_3(CrPsNumberU2_t nOfDisabledEid_3)
Sets the value of the datapool item nOfDisabledEid_3.
void CrPsEvtEnableCmdStartAction(FwSmDesc_t smDesc)
Start action of TC(5,5) EvtEnableCmd.
#define CR_FW_OUTFACTORY_MAX_NOF_OUTCMP
The maximum number of OutComponents which may be allocated at any one time.
Definition of the OutFactory component.
An OutComponent allocation request has failed (see CrFwOutFactoryMakeOutCmp).
CrFwBool_t CrPsEvtTestCase1()
Test the Service 5 EventReporting Service.
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
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.
FwPrDesc_t getPrDescEvtCmd5EidStart()
Getter for EvtCmd5EidStart procedure descriptor.
void CrPsEvtEnableCmdProgressAction(FwSmDesc_t smDesc)
Progress action of TC(5,5) EvtEnableCmd.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
Definition: CrFwConstants.h:30
CrFwServType_t CrFwOutCmpGetServType(FwSmDesc_t smDesc)
Return the type of the OutComponent.
Definition: CrFwOutCmp.c:230
static CrPsNumberU4_t getDpnOfGenEvtRep_1()
Gets the value of the datapool item nOfGenEvtRep_1.
An OutComponent release request has encountered an error (see CrFwOutFactoryReleaseOutCmp).
static void setEvtDisableCmdN(void *p, CrPsNumberU4_t N)
Set "N" in "EvtDisableCmd" packet.
static CrPsNumberU4_t getDpnOfDetectedEvts_3()
Gets the value of the datapool item nOfDetectedEvts_3.
static CrPsNumberU2_t getDpnOfDisabledEid_1()
Gets the value of the datapool item nOfDisabledEid_1.
static CrPsNumberU4_t getDpnOfDetectedEvts_1()
Gets the value of the datapool item nOfDetectedEvts_1.
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).
void CrFwPcktSetSeqCnt(CrFwPckt_t pckt, CrFwSeqCnt_t seqCnt)
Set the sequence counter of the command or report encapsulated in a packet.
static void setDpnOfDisabledEid_1(CrPsNumberU2_t nOfDisabledEid_1)
Sets the value of the datapool item nOfDisabledEid_1.
Command type.
Definition: CrFwConstants.h:41
int CrPsInitServEvt()
Initialization of CORDET Framework PUS Extension components.
void CrPsEvtRepUpdateAction(FwSmDesc_t smDesc)
Update action of TM(5,1) EvtRep1.
Definition: CrPsEvtRep.c:131
static FwSmDesc_t outFactory
The singleton instance of the OutFactory.
#define VER_EID_START_FD
Outcome Failure Codes for Service 5 (Event Report)
Interface for reporting an error detected by a framework component.
Implementation of TC(5,6) EvtDisableCmd.
static CrPsNumberU4_t getDpnOfDetectedEvts_2()
Gets the value of the datapool item nOfDetectedEvts_2.
void CrFwPcktSetGroup(CrFwPckt_t pckt, CrFwGroup_t group)
Set the group of the command/report encapsulated in a packet.
CrFwServType_t CrFwOutCmpGetServSubType(FwSmDesc_t smDesc)
Return the sub-type of the OutComponent.
Definition: CrFwOutCmp.c:244
CrFwBool_t CrPsEvtRepEnableCheck(FwSmDesc_t smDesc)
Enable check of TM(5,x) EvtRep.
Definition: CrPsEvtRep.c:55
void CrPsEvtRepDisabledCmdStartAction(FwSmDesc_t smDesc)
Start action of TC(5,7) EvtRepDisabledCmd.
Implementation of TC(5,5) EvtEnableCmd.
static CrPsNumberU4_t getDpnOfDetectedEvts_4()
Gets the value of the datapool item nOfDetectedEvts_4.
void * cmpSpecificData
Derived data which are specific to each type of framework component.
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.
void CrPsEvtRepDisabledCmdProgressAction(FwSmDesc_t smDesc)
Progress action of TC(5,7) EvtRepDisabledCmd.
Interface through which applications can initialize and execute framework PUS extension components...
Definition of the utility functions for the CORDET Framework.
Implementation of TM(5,x) EvtRep.
static CrPsNumberU2_t getDpnOfDisabledEid_3()
Gets the value of the datapool item nOfDisabledEid_3.
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
static CrPsNumberU4_t getDpnOfGenEvtRep_3()
Gets the value of the datapool item nOfGenEvtRep_3.
void setEvtDisableCmdEventIdItem(void *p, CrPsNumberU4_t N, CrPsEid_t src)
Set "EventId" arrayItem in "EvtDisableCmd" packet.
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
Definition: CrFwBaseCmp.c:117
FwSmDesc_t * pocl
Pending OutComponent List (POCL) for the OutManager.
void CrPsEvtDisableCmdStartAction(FwSmDesc_t smDesc)
Start action of TC(5,6) EvtDisableCmd.
static void setDpnOfDisabledEid_4(CrPsNumberU2_t nOfDisabledEid_4)
Sets the value of the datapool item nOfDisabledEid_4.
void CrPsExecServEvt()
Execution of CORDET Framework PUS Extension components.
void CrPsEvtRepDisabledRepUpdateAction(FwSmDesc_t smDesc)
Update action of TM(5,8) EvtRepDisabledRep.
CrFwDiscriminant_t CrFwOutCmpGetDiscriminant(FwSmDesc_t smDesc)
Return the discriminant of the OutComponent.
Definition: CrFwOutCmp.c:251
static CrPsNumberU2_t getDpnOfDisabledEid_2()
Gets the value of the datapool item nOfDisabledEid_2.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
Interface for accessing fields in packets of service "ServEvt".
void CrPsEvtEnableCmdTerminationAction(FwSmDesc_t smDesc)
Termination action of TC(5,5) EvtEnableCmd.
CrFwOutFactoryPoolIndex_t CrFwOutFactoryGetNOfAllocatedOutCmp()
Return the number of OutComponents which are currently allocated.
void CrFwPcktSetDest(CrFwPckt_t pckt, CrFwDestSrc_t dest)
Set the destination of the command or report encapsulated in a packet.
Definition of Base Component.
FwSmDesc_t CrFwInFactoryMake()
Factory function for the singleton instance of the InFactory.
void CrFwOutFactoryReleaseOutCmp(FwSmDesc_t outCmpInstance)
Release function for an OutComponent.
void CrFwInFactoryReleaseInCmd(FwSmDesc_t inCmdInstance)
Release function for an InCommand.
static CrPsNumberU4_t getDpnOfGenEvtRep_2()
Gets the value of the datapool item nOfGenEvtRep_2.
char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
Definition: CrFwConstants.h:36
static void setDpnOfDisabledEid_2(CrPsNumberU2_t nOfDisabledEid_2)
Sets the value of the datapool item nOfDisabledEid_2.
FwSmDesc_t CrFwOutFactoryMake()
Factory function for the singleton instance of the OutFactory.
static CrPsNumberU2_t getDpnOfDisabledEid_4()
Gets the value of the datapool item nOfDisabledEid_4.
#define VER_ILL_EID
Failure Codes of Service 5 (Event Report) for Service 1 (Request Verification)
Interface through which applications can initialize and execute framework PUS extension components...
void CrPsEvtDisableCmdTerminationAction(FwSmDesc_t smDesc)
Termination action of TC(5,6) EvtDisableCmd.
auxiliary Interface for accessing fields in packets of service "ServEvt".
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.
Definition: CrFwInFactory.c:58
Definition of the OutLoader component.
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.
static void setEvtEnableCmdN(void *p, CrPsNumberU4_t N)
Set "N" in "EvtEnableCmd" packet.
Implementation of TM(5,8) EvtRepDisabledRep.
Definition of the InCommand Component of the framework.
Type for the data describing an OutManager.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved