CORDET Framework - C2 Implementation
CrFwInCmdTestCases.c
Go to the documentation of this file.
1 
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include "CrFwInCmdTestCases.h"
23 /* Include FW Profile files */
24 #include "FwSmConstants.h"
25 #include "FwSmConfig.h"
26 #include "FwSmCore.h"
27 #include "FwPrConfig.h"
28 #include "FwPrCore.h"
29 #include "FwPrConstants.h"
30 /* Include framework files */
31 #include "CrFwOutRegistryUserPar.h"
33 #include "BaseCmp/CrFwBaseCmp.h"
34 #include "Pckt/CrFwPckt.h"
35 #include "InCmd/CrFwInCmd.h"
37 #include "CrFwTime.h"
38 #include "CrFwRepErr.h"
40 /* Include configuration files */
41 #include "CrFwRepErrStub.h"
42 #include "CrFwInFactoryUserPar.h"
43 #include "CrFwCmpData.h"
44 
45 /* ---------------------------------------------------------------------------------------------*/
47  FwSmDesc_t inFactory, inCmd1, inCmd2;
48  CrFwPckt_t pckt1, pckt2;
49  CrFwInCmdData_t* inCmdSpecificData;
51  CrFwCrc_t crc;
52 
53  /* Instantiate the InFactory */
55 
56  /* Initialize and Configure InFactory and check success */
60  return 0;
61 
62  /* Allocate two InCommands of which one has the correct CRC and one the incorrect CRC */
63  pckt1 = CrFwPcktMake(100);
64  CrFwPcktSetServType(pckt1,8);
65  CrFwPcktSetServSubType(pckt1,1);
66  CrFwPcktSetDiscriminant(pckt1,2);
67  CrFwPcktSetCmdRepId(pckt1,111);
68  CrFwPcktSetSrc(pckt1,11);
69  CrFwPcktSetGroup(pckt1,88);
70  CrFwPcktSetAckLevel(pckt1,1,0,1,0);
71  CrFwPcktSetSeqCnt(pckt1,1111);
72  crc = CrFwPcktComputeCrc(pckt1);
73  CrFwPcktSetCrc(pckt1, crc);
74  inCmd1 = CrFwInFactoryMakeInCmd(pckt1);
75 
76  pckt2 = CrFwPcktMake(100);
77  CrFwPcktSetServType(pckt2,8);
78  CrFwPcktSetServSubType(pckt2,1);
79  CrFwPcktSetDiscriminant(pckt2,1);
80  CrFwPcktSetCmdRepId(pckt2,222);
81  CrFwPcktSetSrc(pckt2,22);
82  CrFwPcktSetGroup(pckt2,89);
83  CrFwPcktSetAckLevel(pckt2,0,1,0,1);
84  CrFwPcktSetSeqCnt(pckt2,2222);
85  crc = CrFwPcktComputeCrc(pckt2);
86  CrFwPcktSetCrc(pckt2, crc-1); /* pckt2 has an incorrect CRC */
87  inCmd2 = CrFwInFactoryMakeInCmd(pckt2);
88 
89  /* Check the instance identifiers and the type identifier */
90  if (CrFwCmpGetInstanceId(inCmd1) != 111)
91  return 0;
92  if (CrFwCmpGetInstanceId(inCmd2) != 222)
93  return 0;
95  return 0;
97  return 0;
98 
99  /* Check correct configuration */
100  if (FwSmCheck(inCmd1) != 1)
101  return 0;
102  if (FwSmCheck(inCmd2) != 1)
103  return 0;
104 
105  /* Check InCommand state */
106  if (!CrFwCmpIsInConfigured(inCmd1))
107  return 0;
108  if (!CrFwInCmdIsInAccepted(inCmd1))
109  return 0;
110  if (CrFwCmpIsInConfigured(inCmd2)) /* Cmd2 has an incorrect CRC */
111  return 0;
112 
113  /* Check the parameter area */
114  inCmdData = (CrFwCmpData_t*)FwSmGetData(inCmd1);
115  inCmdSpecificData = (CrFwInCmdData_t*)inCmdData->cmpSpecificData;
116  if (CrFwInCmdGetParLength(inCmd1) != CrFwPcktGetParLength(inCmdSpecificData->pckt))
117  return 0;
118  if (CrFwInCmdGetParStart(inCmd1) != CrFwPcktGetParStart(inCmdSpecificData->pckt))
119  return 0;
120 
121  /* Check type, sub-type and discriminant */
122  if (CrFwInCmdGetServType(inCmd1) != 8)
123  return 0;
124  if (CrFwInCmdGetServType(inCmd2) != 8)
125  return 0;
126 
127  if (CrFwInCmdGetServSubType(inCmd1) != 1)
128  return 0;
129  if (CrFwInCmdGetServSubType(inCmd2) != 1)
130  return 0;
131 
132  if (CrFwInCmdGetDiscriminant(inCmd1) != 2)
133  return 0;
134  if (CrFwInCmdGetDiscriminant(inCmd2) != 1)
135  return 0;
136 
137  /* Check source and sequence counter*/
138  if (CrFwInCmdGetSrc(inCmd1) != 11)
139  return 0;
140  if (CrFwInCmdGetSrc(inCmd2) != 22)
141  return 0;
142  if (CrFwInCmdGetSeqCnt(inCmd1) != 1111)
143  return 0;
144  if (CrFwInCmdGetSeqCnt(inCmd2) != 2222)
145  return 0;
146  if (CrFwInCmdGetGroup(inCmd1) != 88)
147  return 0;
148  if (CrFwInCmdGetGroup(inCmd2) != 89)
149  return 0;
150 
151  /* Check acknowledge level set and read-back */
152  if (CrFwInCmdIsAcceptAck(inCmd1) != 1)
153  return 0;
154  if (CrFwInCmdIsStartAck(inCmd1) != 0)
155  return 0;
156  if (CrFwInCmdIsProgressAck(inCmd1) != 1)
157  return 0;
158  if (CrFwInCmdIsTermAck(inCmd1) != 0)
159  return 0;
160 
161  if (CrFwInCmdIsAcceptAck(inCmd2) != 0)
162  return 0;
163  if (CrFwInCmdIsStartAck(inCmd2) != 1)
164  return 0;
165  if (CrFwInCmdIsProgressAck(inCmd2) != 0)
166  return 0;
167  if (CrFwInCmdIsTermAck(inCmd2) != 1)
168  return 0;
169 
170  /* Check progress step */
171  if (CrFwInCmdGetProgressStepId(inCmd1) != 0)
172  return 0;
173  if (CrFwInCmdGetProgressStepId(inCmd2) != 0)
174  return 0;
175 
176  /* Check default completion status */
177  if (CrFwInCmdIsProgressActionCompleted(inCmd1) != 1)
178  return 0;
179  if (CrFwInCmdIsProgressActionCompleted(inCmd2) != 1)
180  return 0;
181 
182  /* Retrieve and check the packet holding the InCommand */
183  if (CrFwInCmdGetPckt(inCmd1)!=pckt1)
184  return 0;
185  if (CrFwInCmdGetPckt(inCmd2)!=pckt2)
186  return 0;
187 
188  /* Release the InCommands */
191 
192  /* Check that there are no allocated packets */
193  if (CrFwPcktGetNOfAllocated() != 0)
194  return 0;
195 
196  /* Check application errors */
197  if (CrFwGetAppErrCode() != crNoAppErr)
198  return 0;
199 
200  return 1;
201 }
202 
203 /* ---------------------------------------------------------------------------------------------*/
205  FwSmDesc_t inFactory, inCmd;
206  CrFwPckt_t pckt;
207  CrFwCounterU1_t prgCnt, strCnt;
208 
209  /* Instantiate the InFactory */
211 
212  /* Initialize and Configure InFactory and check success */
216  return 0;
217 
218  /* Allocate the Sample1 InCommand */
219  pckt = CrFwPcktMake(100);
220  CrFwPcktSetServType(pckt,50);
221  CrFwPcktSetServSubType(pckt,1);
222  CrFwPcktSetDiscriminant(pckt,0);
226 
227  /* Check InCommand state */
229  return 0;
231  return 0;
232 
233  /* Configure Ready Check to return "not ready" */
235 
236  /* Execute InCommand and check that it remains in ACCEPTED */
239  return 0;
241  return 0;
242 
243  /* Check that the command type set in the validity check is correct */
244  if (CrFwInCmdSample1GetType() != 50)
245  return 0;
246 
247  /* Configure Ready Check to return "ready" */
249 
250  /* Configure Start Action to have "success" outcome */
252 
253  /* Execute InCommand and check that it enters PROGRESS */
257  return 0;
259  return 0;
260  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
261  return 0;
262 
263  /* Release the InCommands */
265 
266  /* Check that there are no allocated packets */
267  if (CrFwPcktGetNOfAllocated() != 0)
268  return 0;
269 
270  /* Check application errors */
271  if (CrFwGetAppErrCode() != crNoAppErr)
272  return 0;
273 
274  return 1;
275 }
276 
277 /* ---------------------------------------------------------------------------------------------*/
279  FwSmDesc_t inFactory, inCmd;
280  CrFwPckt_t pckt;
281  CrFwCounterU1_t abrCnt;
282  CrFwCounterU2_t cmdRepPos;
283 
284  /* Instantiate the InFactory */
286 
287  /* Initialize and Configure InFactory and check success */
291  return 0;
292 
293  /* Allocate the Sample1 InCommand */
294  pckt = CrFwPcktMake(100);
295  CrFwPcktSetServType(pckt,50);
296  CrFwPcktSetServSubType(pckt,1);
297  CrFwPcktSetDiscriminant(pckt,0);
300  cmdRepPos = CrFwRepInCmdOutcomeStubGetPos();
301 
302  /* Check InCommand state */
304  return 0;
306  return 0;
307 
308  /* Configure Ready Check to return "ready" */
310 
311  /* Configure Start Action to have "failed" outcome */
313 
314  /* Execute InCommand and check that it enters ABORTED */
316  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
317  return 0;
320  return 0;
321  if (CrFwInCmdSample1GetAbortActionCounter() != abrCnt+1)
322  return 0;
323  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos+1)
324  return 0;
326  return 0;
327  if (CrFwRepInCmdOutcomeStubGetFailCode(cmdRepPos) != 11)
328  return 0;
329 
330  /* Execute InCommand again and check that it stays in ABORTED */
333  return 0;
334  if (CrFwInCmdSample1GetAbortActionCounter() != abrCnt+1)
335  return 0;
336 
337  /* Release the InCommands */
339 
340  /* Check that there are no allocated packets */
341  if (CrFwPcktGetNOfAllocated() != 0)
342  return 0;
343 
344  /* Check application errors */
345  if (CrFwGetAppErrCode() != crNoAppErr)
346  return 0;
347 
348  return 1;
349 }
350 
351 /* ---------------------------------------------------------------------------------------------*/
353  FwSmDesc_t inFactory, inCmd;
354  CrFwPckt_t pckt;
355 
356  /* Instantiate the InFactory */
358 
359  /* Initialize and Configure InFactory and check success */
363  return 0;
364 
365  /* Allocate the Sample1 InCommand */
366  pckt = CrFwPcktMake(100);
367  CrFwPcktSetServType(pckt,50);
368  CrFwPcktSetServSubType(pckt,1);
369  CrFwPcktSetDiscriminant(pckt,0);
370  CrFwInCmdSample1SetValidityFlag(0); /* Validity Check will fail */
372 
373  /* Check InCommand state */
375  return 0;
376 
377  /* Release the InCommands */
379 
380  /* Check that there are no allocated packets */
381  if (CrFwPcktGetNOfAllocated() != 0)
382  return 0;
383 
384  /* Check application errors */
385  if (CrFwGetAppErrCode() != crNoAppErr)
386  return 0;
387 
388  return 1;
389 }
390 
391 /* ---------------------------------------------------------------------------------------------*/
393  FwSmDesc_t inFactory, inCmd;
394  CrFwPckt_t pckt;
395  CrFwCounterU1_t prgCnt, strCnt;
396  CrFwCounterU2_t cmdRepPos;
397 
398  /* Instantiate the InFactory */
400 
401  /* Initialize and Configure InFactory and check success */
405  return 0;
406 
407  /* Allocate and configure the Sample1 InCommand */
408  pckt = CrFwPcktMake(100);
409  CrFwPcktSetServType(pckt,50);
410  CrFwPcktSetServSubType(pckt,1);
411  CrFwPcktSetDiscriminant(pckt,0);
412  CrFwPcktSetAckLevel(pckt, 0, 0, 0, 0); /* No acknowledgement of success */
413  CrFwInCmdSample1SetValidityFlag(1); /* Validity Check returns "valid" */
414  CrFwInCmdSample1SetProgressActionCompletionOutcome(0); /* Completion Outcome is "not completed" */
415  CrFwInCmdSample1SetProgressActionOutcome(1); /* Progress action outcome is "success" */
416  CrFwInCmdSample1SetReadyFlag(1); /* Outcome of Ready Check is "ready" */
417  CrFwInCmdSample1SetStartActionOutcome(1); /* Outcome of Start Action is "success" */
420  cmdRepPos = CrFwRepInCmdOutcomeStubGetPos();
422 
423  /* Check that InCommand is correctly configured */
424  if (FwSmCheck(inCmd) != smSuccess)
425  return 0;
426 
427  /* Check InCommand state */
429  return 0;
431  return 0;
432 
433  /* Execute InCommand and check that it enters PROGRESS */
436  return 0;
438  return 0;
439  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
440  return 0;
441  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
442  return 0;
443 
444  /* Execute InCommand again and check that it stays in PROGRESS */
447  return 0;
449  return 0;
450  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
451  return 0;
452  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
453  return 0;
454 
455  /* Send command Terminate to InCommand and check that it is ignored */
458  return 0;
460  return 0;
461  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
462  return 0;
463  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
464  return 0;
465 
466  /* Release the InCommands */
468 
469  /* Check that there are no allocated packets */
470  if (CrFwPcktGetNOfAllocated() != 0)
471  return 0;
472 
473  /* Check application errors */
474  if (CrFwGetAppErrCode() != crNoAppErr)
475  return 0;
476 
477  return 1;
478 }
479 
480 /* ---------------------------------------------------------------------------------------------*/
482  FwSmDesc_t inFactory, inCmd;
483  CrFwPckt_t pckt;
484  CrFwCounterU1_t prgCnt, strCnt, terCnt;
485  CrFwCounterU2_t cmdRepPos;
486 
487  /* Instantiate the InFactory */
489 
490  /* Initialize and Configure InFactory and check success */
494  return 0;
495 
496  /* Allocate and configure the Sample1 InCommand */
497  pckt = CrFwPcktMake(100);
498  CrFwPcktSetServType(pckt,50);
499  CrFwPcktSetServSubType(pckt,1);
500  CrFwPcktSetDiscriminant(pckt,0);
501  CrFwPcktSetAckLevel(pckt, 0, 0, 0, 0); /* No acknowledgement of success */
502  CrFwInCmdSample1SetValidityFlag(1); /* Validity Check returns "valid" */
503  CrFwInCmdSample1SetProgressActionCompletionOutcome(0); /* Completion Outcome is "not completed" */
504  CrFwInCmdSample1SetProgressActionOutcome(1); /* Progress action outcome is "success" */
505  CrFwInCmdSample1SetReadyFlag(1); /* Outcome of Ready Check is "ready" */
506  CrFwInCmdSample1SetStartActionOutcome(1); /* Outcome of Start Action is "success" */
507  CrFwInCmdSample1SetTerminationActionOutcome(1); /* Outcome of Termination Action is "success" */
510  cmdRepPos = CrFwRepInCmdOutcomeStubGetPos();
513 
514  /* Check InCommand state */
516  return 0;
518  return 0;
519 
520  /* Execute InCommand and check that it enters PROGRESS */
523  return 0;
525  return 0;
526  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
527  return 0;
528  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
529  return 0;
530 
531  /* Configure Progress Action to return "completed" */
533  return 0;
534  CrFwInCmdSample1SetProgressActionCompletionOutcome(1); /* Completion outcome of Progress Action is "completed" */
535 
536  /* Execute InCommand again and check that it stays in PROGRESS */
539  return 0;
541  return 0;
542  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
543  return 0;
544  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
545  return 0;
546 
547  /* Send command Terminate to InCommand and check that TERMINATED is entered */
550  return 0;
552  return 0;
553  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
554  return 0;
556  return 0;
558  return 0;
559  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
560  return 0;
561 
562  /* Check progress step */
564  return 0;
565 
566  /* Release the InCommands */
568 
569  /* Check that there are no allocated packets */
570  if (CrFwPcktGetNOfAllocated() != 0)
571  return 0;
572 
573  /* Check application errors */
574  if (CrFwGetAppErrCode() != crNoAppErr)
575  return 0;
576 
577  return 1;
578 }
579 
580 /* ---------------------------------------------------------------------------------------------*/
582  FwSmDesc_t inFactory, inCmd;
583  CrFwPckt_t pckt;
584  CrFwCounterU1_t prgCnt, strCnt, terCnt, abrCnt;
585  CrFwCounterU2_t cmdRepPos;
586 
587  /* Instantiate the InFactory */
589 
590  /* Initialize and Configure InFactory and check success */
594  return 0;
595 
596  /* Allocate and configure the Sample1 InCommand */
597  pckt = CrFwPcktMake(100);
598  CrFwPcktSetServType(pckt,50);
599  CrFwPcktSetServSubType(pckt,1);
600  CrFwPcktSetDiscriminant(pckt,0);
601  CrFwPcktSetAckLevel(pckt, 0, 0, 0, 0); /* No acknowledgement of success */
602  CrFwInCmdSample1SetValidityFlag(1); /* Validity Check returns "valid" */
603  CrFwInCmdSample1SetProgressActionCompletionOutcome(0); /* Completion Outcome is "not completed" */
604  CrFwInCmdSample1SetProgressActionOutcome(22); /* Progress action outcome is "failed" */
605  CrFwInCmdSample1SetReadyFlag(1); /* Outcome of Ready Check is "ready" */
606  CrFwInCmdSample1SetStartActionOutcome(1); /* Outcome of Start Action is "success" */
607  CrFwInCmdSample1SetTerminationActionOutcome(10);/* Outcome of Termination Action is "failed" */
610  cmdRepPos = CrFwRepInCmdOutcomeStubGetPos();
614 
615  /* Check InCommand state */
617  return 0;
619  return 0;
620 
621  /* Execute InCommand and check that it enters PROGRESS */
624  return 0;
625  if (CrFwGetSmOutcome(inCmd) != 22)
626  return 0;
628  return 0;
629  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
630  return 0;
632  return 0;
633  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos+1)
634  return 0;
636  return 0;
637  if (CrFwRepInCmdOutcomeStubGetFailCode(cmdRepPos) != 22)
638  return 0;
640  return 0;
641 
642  /* Configure Progress Action to return "success" */
644 
645  /* Execute InCommand again and check that it stays in PROGRESS */
648  return 0;
650  return 0;
651  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
652  return 0;
654  return 0;
655  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos+1)
656  return 0;
658  return 0;
659 
660  /* Configure Progress Action to return "completed" */
662 
663  /* Execute InCommand again and check that it stays in PROGRESS */
666  return 0;
668  return 0;
669  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
670  return 0;
672  return 0;
673  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos+1)
674  return 0;
676  return 0;
677 
678  /* Send command Terminate to InCommand and check that ABORTED is entered */
681  return 0;
683  return 0;
684  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
685  return 0;
687  return 0;
688  if (CrFwInCmdSample1GetAbortActionCounter() != abrCnt+1)
689  return 0;
690  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos+2)
691  return 0;
693  return 0;
694  if (CrFwRepInCmdOutcomeStubGetFailCode(cmdRepPos+1) != 10)
695  return 0;
696 
697  /* Release the InCommands */
699 
700  /* Check that there are no allocated packets */
701  if (CrFwPcktGetNOfAllocated() != 0)
702  return 0;
703 
704  /* Check application errors */
705  if (CrFwGetAppErrCode() != crNoAppErr)
706  return 0;
707 
708  return 1;
709 }
710 
711 /* ---------------------------------------------------------------------------------------------*/
713  FwSmDesc_t inFactory, inCmd;
714  CrFwPckt_t pckt;
715  CrFwCounterU1_t prgCnt, strCnt, terCnt, abrCnt;
716  CrFwCounterU2_t cmdRepPos;
717 
718  /* Instantiate the InFactory */
720 
721  /* Initialize and Configure InFactory and check success */
725  return 0;
726 
727  /* Allocate and configure the Sample1 InCommand */
728  pckt = CrFwPcktMake(100);
729  CrFwPcktSetServType(pckt,50);
730  CrFwPcktSetServSubType(pckt,1);
731  CrFwPcktSetDiscriminant(pckt,0);
732  CrFwPcktSetAckLevel(pckt, 0, 0, 0, 0); /* No acknowledgement of success */
733  CrFwInCmdSample1SetValidityFlag(1); /* Validity Check returns "valid" */
734  CrFwInCmdSample1SetProgressActionCompletionOutcome(1); /* Completion Outcome is "completed" */
735  CrFwInCmdSample1SetProgressActionOutcome(1); /* Progress action outcome is "success" */
736  CrFwInCmdSample1SetReadyFlag(1); /* Outcome of Ready Check is "ready" */
737  CrFwInCmdSample1SetStartActionOutcome(1); /* Outcome of Start Action is "success" */
738  CrFwInCmdSample1SetTerminationActionOutcome(33); /* Outcome of Termination Action is "failed" */
741  cmdRepPos = CrFwRepInCmdOutcomeStubGetPos();
745 
746  /* Check InCommand state */
748  return 0;
750  return 0;
751 
752  /* Execute InCommand and check that it enters PROGRESS */
755  return 0;
757  return 0;
758  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
759  return 0;
760  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
761  return 0;
762 
763  /* Send command Terminate to InCommand and check that ABORTED is entered */
766  return 0;
768  return 0;
769  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
770  return 0;
772  return 0;
773  if (CrFwInCmdSample1GetAbortActionCounter() != abrCnt+1)
774  return 0;
775  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos+1)
776  return 0;
778  return 0;
779  if (CrFwRepInCmdOutcomeStubGetFailCode(cmdRepPos) != 33)
780  return 0;
782  return 0;
783 
784  /* Release the InCommands */
786 
787  /* Check that there are no allocated packets */
788  if (CrFwPcktGetNOfAllocated() != 0)
789  return 0;
790 
791  /* Check application errors */
792  if (CrFwGetAppErrCode() != crNoAppErr)
793  return 0;
794 
795  return 1;
796 }
797 
798 /* ---------------------------------------------------------------------------------------------*/
800  FwSmDesc_t inFactory, inCmd;
801  CrFwPckt_t pckt;
802  CrFwCounterU1_t prgCnt, strCnt;
803  CrFwCounterU2_t cmdRepPos;
804 
805  /* Instantiate the InFactory */
807 
808  /* Initialize and Configure InFactory and check success */
812  return 0;
813 
814  /* Allocate and configure the Sample1 InCommand */
815  pckt = CrFwPcktMake(100);
816  CrFwPcktSetServType(pckt,50);
817  CrFwPcktSetServSubType(pckt,1);
818  CrFwPcktSetDiscriminant(pckt,0);
819  CrFwPcktSetAckLevel(pckt, 0, 1, 0, 0); /* Only acknowledge Start */
820  CrFwInCmdSample1SetValidityFlag(1); /* Validity Check returns "valid" */
821  CrFwInCmdSample1SetProgressActionCompletionOutcome(0); /* Completion Outcome is "not completed" */
822  CrFwInCmdSample1SetProgressActionOutcome(1); /* Progress action outcome is "success" */
823  CrFwInCmdSample1SetReadyFlag(1); /* Outcome of Ready Check is "ready" */
824  CrFwInCmdSample1SetStartActionOutcome(1); /* Outcome of Start Action is "success" */
827  cmdRepPos = CrFwRepInCmdOutcomeStubGetPos();
829 
830  /* Check InCommand state */
832  return 0;
834  return 0;
835 
836  /* Execute InCommand and check that it enters PROGRESS */
839  return 0;
841  return 0;
842  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
843  return 0;
844  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos+1)
845  return 0;
847  return 0;
848 
849  /* Release the InCommands */
851 
852  /* Check that there are no allocated packets */
853  if (CrFwPcktGetNOfAllocated() != 0)
854  return 0;
855 
856  /* Check application errors */
857  if (CrFwGetAppErrCode() != crNoAppErr)
858  return 0;
859 
860  return 1;
861 }
862 
863 /* ---------------------------------------------------------------------------------------------*/
865  FwSmDesc_t inFactory, inCmd;
866  CrFwPckt_t pckt;
867  CrFwCounterU1_t prgCnt, strCnt;
868  CrFwCounterU2_t cmdRepPos;
869  CrFwProgressStepId_t progressStepId;
870 
871  /* Instantiate the InFactory */
873 
874  /* Initialize and Configure InFactory and check success */
878  return 0;
879 
880  /* Allocate and configure the Sample1 InCommand */
881  pckt = CrFwPcktMake(100);
882  CrFwPcktSetServType(pckt,50);
883  CrFwPcktSetServSubType(pckt,1);
884  CrFwPcktSetDiscriminant(pckt,0);
885  CrFwPcktSetAckLevel(pckt, 0, 0, 1, 0); /* Only acknowledge Progress */
886  CrFwInCmdSample1SetValidityFlag(1); /* Validity Check returns "valid" */
887  CrFwInCmdSample1SetProgressActionCompletionOutcome(0); /* Completion Outcome is "not completed" */
888  CrFwInCmdSample1SetProgressActionOutcome(1); /* Progress action outcome is "success" */
889  CrFwInCmdSample1SetReadyFlag(1); /* Outcome of Ready Check is "ready" */
890  CrFwInCmdSample1SetStartActionOutcome(1); /* Outcome of Start Action is "success" */
893  cmdRepPos = CrFwRepInCmdOutcomeStubGetPos();
895  progressStepId = CrFwInCmdGetProgressStepId(inCmd);
897 
898  /* Check InCommand state */
900  return 0;
902  return 0;
903 
904  /* Execute InCommand and check that it enters PROGRESS */
907  return 0;
909  return 0;
910  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
911  return 0;
912  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
913  return 0;
914  if (CrFwInCmdGetProgressStepId(inCmd) != progressStepId)
915  return 0;
916 
917  /* Execute InCommand again and check that it remains in PROGRESS */
920  return 0;
922  return 0;
923  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
924  return 0;
925  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
926  return 0;
927  if (CrFwInCmdGetProgressStepId(inCmd) != progressStepId)
928  return 0;
929 
930  /* Reconfigure InCommand to complete a progress step and execute it again */
934  return 0;
936  return 0;
937  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
938  return 0;
939  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos+1)
940  return 0;
942  return 0;
943  if (CrFwInCmdGetProgressStepId(inCmd) != progressStepId+1)
944  return 0;
945 
946  /* Execute InCommand again and check that it remains in PROGRESS */
949  return 0;
951  return 0;
952  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
953  return 0;
954  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos+2)
955  return 0;
956  if (CrFwInCmdGetProgressStepId(inCmd) != progressStepId+2)
957  return 0;
958 
959  /* Release the InCommands */
961 
962  /* Check that there are no allocated packets */
963  if (CrFwPcktGetNOfAllocated() != 0)
964  return 0;
965 
966  /* Check application errors */
967  if (CrFwGetAppErrCode() != crNoAppErr)
968  return 0;
969 
970  return 1;
971 }
972 
973 /* ---------------------------------------------------------------------------------------------*/
975  FwSmDesc_t inFactory, inCmd;
976  CrFwPckt_t pckt;
977  CrFwCounterU1_t prgCnt, strCnt, terCnt;
978  CrFwCounterU2_t cmdRepPos;
979 
980  /* Instantiate the InFactory */
982 
983  /* Initialize and Configure InFactory and check success */
987  return 0;
988 
989  /* Allocate and configure the Sample1 InCommand */
990  pckt = CrFwPcktMake(100);
991  CrFwPcktSetServType(pckt,50);
992  CrFwPcktSetServSubType(pckt,1);
993  CrFwPcktSetDiscriminant(pckt,0);
994  CrFwPcktSetAckLevel(pckt, 0, 0, 0, 1); /* Acknowledge only termination */
995  CrFwInCmdSample1SetValidityFlag(1); /* Validity Check returns "valid" */
996  CrFwInCmdSample1SetProgressActionCompletionOutcome(1); /* Completion Outcome is "completed" */
997  CrFwInCmdSample1SetProgressActionOutcome(1); /* Progress action outcome is "success" */
998  CrFwInCmdSample1SetReadyFlag(1); /* Outcome of Ready Check is "ready" */
999  CrFwInCmdSample1SetStartActionOutcome(1); /* Outcome of Start Action is "success" */
1000  CrFwInCmdSample1SetTerminationActionOutcome(1); /* Outcome of Termination Action is "success" */
1002  inCmd = CrFwInFactoryMakeInCmd(pckt);
1003  cmdRepPos = CrFwRepInCmdOutcomeStubGetPos();
1006 
1007  /* Check InCommand state */
1009  return 0;
1011  return 0;
1012 
1013  /* Execute InCommand and check that it enters PROGRESS */
1016  return 0;
1017  if (CrFwInCmdSample1GetProgressActionCounter() != prgCnt+1)
1018  return 0;
1019  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
1020  return 0;
1021  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
1022  return 0;
1023 
1024  /* Configure Progress Action to return "completed" */
1026  return 0;
1027  CrFwInCmdSample1SetProgressActionCompletionOutcome(1); /* Completion Outcome of Progress Action is "completed" */
1028 
1029  /* Execute InCommand again and check that it stays in PROGRESS */
1032  return 0;
1033  if (CrFwInCmdSample1GetProgressActionCounter() != prgCnt+2)
1034  return 0;
1035  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
1036  return 0;
1037  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos)
1038  return 0;
1039 
1040  /* Send command Terminate to InCommand and check that TERMINATED is entered */
1043  return 0;
1044  if (CrFwInCmdSample1GetProgressActionCounter() != prgCnt+2)
1045  return 0;
1046  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
1047  return 0;
1049  return 0;
1050  if (CrFwRepInCmdOutcomeStubGetPos() != cmdRepPos+1)
1051  return 0;
1053  return 0;
1054 
1055  /* Release the InCommands */
1057 
1058  /* Check that there are no allocated packets */
1059  if (CrFwPcktGetNOfAllocated() != 0)
1060  return 0;
1061 
1062  /* Check application errors */
1063  if (CrFwGetAppErrCode() != crNoAppErr)
1064  return 0;
1065 
1066  return 1;
1067 }
1068 
1069 /* ---------------------------------------------------------------------------------------------*/
1071  FwSmDesc_t inFactory, inCmd;
1072  CrFwPckt_t pckt;
1073  CrFwCounterU1_t prgCnt, strCnt, terCnt;
1074 
1075  /* Reset the Interface reporting the InCommand outcomes */
1077 
1078  /* Instantiate the InFactory */
1080 
1081  /* Initialize and Configure InFactory and check success */
1085  return 0;
1086 
1087  /* Allocate and configure the Sample1 InCommand */
1088  pckt = CrFwPcktMake(100);
1089  CrFwPcktSetServType(pckt,50);
1090  CrFwPcktSetServSubType(pckt,1);
1091  CrFwPcktSetDiscriminant(pckt,0);
1092  CrFwPcktSetAckLevel(pckt, 0, 1, 1, 1); /* Acknowledge start, progress and termination */
1093  CrFwInCmdSample1SetValidityFlag(1); /* Validity Check returns "valid" */
1094  CrFwInCmdSample1SetProgressActionCompletionOutcome(1); /* Completion Outcome is "completed" */
1095  CrFwInCmdSample1SetProgressActionOutcome(1); /* Progress action outcome is "success" */
1096  CrFwInCmdSample1SetReadyFlag(1); /* Outcome of Ready Check is "ready" */
1097  CrFwInCmdSample1SetStartActionOutcome(1); /* Outcome of Start Action is "success" */
1098  CrFwInCmdSample1SetTerminationActionOutcome(1); /* Outcome of Termination Action is "success" */
1100  inCmd = CrFwInFactoryMakeInCmd(pckt);
1104 
1105  /* Check InCommand state */
1107  return 0;
1109  return 0;
1110 
1111  /* Execute InCommand and check that it enters PROGRESS */
1114  return 0;
1115  if (CrFwInCmdSample1GetProgressActionCounter() != prgCnt+1)
1116  return 0;
1117  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
1118  return 0;
1119  if (CrFwRepInCmdOutcomeStubGetPos() != 2)
1120  return 0;
1121 
1122  /* Send command Terminate to InCommand and check that TERMINATED is entered */
1125  return 0;
1126  if (CrFwInCmdSample1GetProgressActionCounter() != prgCnt+1)
1127  return 0;
1128  if (CrFwInCmdSample1GetStartActionCounter() != strCnt+1)
1129  return 0;
1131  return 0;
1132  if (CrFwRepInCmdOutcomeStubGetPos() != 3)
1133  return 0;
1135  return 0;
1137  return 0;
1139  return 0;
1140 
1141  /* Check the parameters of the InCommand success reports */
1143  return 0;
1145  return 0;
1147  return 0;
1149  return 0;
1150 
1151  /* Release the InCommands */
1153 
1154  /* Check that there are no allocated packets */
1155  if (CrFwPcktGetNOfAllocated() != 0)
1156  return 0;
1157 
1158  /* Check application errors */
1159  if (CrFwGetAppErrCode() != crNoAppErr)
1160  return 0;
1161 
1162  return 1;
1163 }
1164 
1165 
CrFwInstanceId_t CrFwCmpGetInstanceId(FwSmDesc_t smDesc)
Return the instance identifier of the argument component.
Definition: CrFwBaseCmp.c:150
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
Definition: CrFwBaseCmp.c:112
CrFwBool_t CrFwCmpIsInInitialized(FwSmDesc_t smDesc)
Return true if the argument component is in state INITIALIZED.
Definition: CrFwBaseCmp.c:172
CrFwBool_t CrFwCmpIsInConfigured(FwSmDesc_t smDesc)
Return true if the argument component is in state CONFIGURED.
Definition: CrFwBaseCmp.c:177
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
Definition: CrFwBaseCmp.c:117
void CrFwCmpExecute(FwSmDesc_t smDesc)
Execute a framework component.
Definition: CrFwBaseCmp.c:127
CrFwTypeId_t CrFwCmpGetTypeId(FwSmDesc_t smDesc)
Return the type identifier of the argument component.
Definition: CrFwBaseCmp.c:156
Definition of Base Component.
Definition of the Framework Component Data (FCD) Type.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
Definition: CrFwConstants.h:38
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
Definition: CrFwConstants.h:32
#define CR_FW_INCOMMAND_TYPE
Type identifier for the InCommand component.
CrFwBool_t CrFwInCmdIsStartAck(FwSmDesc_t smDesc)
Return the acknowledge level for command start for the command encapsulated in the InCommand.
Definition: CrFwInCmd.c:366
CrFwBool_t CrFwInCmdIsInAccepted(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state ACCEPTED.
Definition: CrFwInCmd.c:155
CrFwBool_t CrFwInCmdIsProgressAck(FwSmDesc_t smDesc)
Return the acknowledge level for command progress for the command encapsulated in the InCommand.
Definition: CrFwInCmd.c:373
CrFwDiscriminant_t CrFwInCmdGetDiscriminant(FwSmDesc_t smDesc)
Return the discriminant of the InCommand.
Definition: CrFwInCmd.c:352
CrFwPckt_t CrFwInCmdGetParStart(FwSmDesc_t smDesc)
Return the start address of the parameter area of the InCommand.
Definition: CrFwInCmd.c:394
CrFwProgressStepId_t CrFwInCmdGetNOfProgressFailure(FwSmDesc_t smDesc)
Return the number of progress step failures.
Definition: CrFwInCmd.c:429
void CrFwInCmdTerminate(FwSmDesc_t smDesc)
Send command Terminate to the argument InCommand.
Definition: CrFwInCmd.c:150
CrFwBool_t CrFwInCmdIsInProgress(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state PROGRESS.
Definition: CrFwInCmd.c:160
CrFwServType_t CrFwInCmdGetServType(FwSmDesc_t smDesc)
Return the type of the InCommand.
Definition: CrFwInCmd.c:338
CrFwDestSrc_t CrFwInCmdGetSrc(FwSmDesc_t smDesc)
Return the source of the InCommand.
Definition: CrFwInCmd.c:324
CrFwGroup_t CrFwInCmdGetGroup(FwSmDesc_t smDesc)
Return the group of the InCommand.
Definition: CrFwInCmd.c:331
CrFwBool_t CrFwInCmdIsInAborted(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state ABORTED.
Definition: CrFwInCmd.c:170
CrFwBool_t CrFwInCmdIsProgressActionCompleted(FwSmDesc_t smDesc)
Return the Completion Outcome of the progress action.
Definition: CrFwInCmd.c:415
CrFwBool_t CrFwInCmdIsTermAck(FwSmDesc_t smDesc)
Return the acknowledge level for command termination for the command encapsulated in the InCommand.
Definition: CrFwInCmd.c:380
CrFwPcktLength_t CrFwInCmdGetParLength(FwSmDesc_t smDesc)
Return the length in bytes of the parameter area of the InCommand.
Definition: CrFwInCmd.c:401
CrFwSeqCnt_t CrFwInCmdGetSeqCnt(FwSmDesc_t smDesc)
Return the sequence counter of the InCommand.
Definition: CrFwInCmd.c:387
CrFwPckt_t CrFwInCmdGetPckt(FwSmDesc_t smDesc)
Return the pointer to the packet which holds the InCommand.
Definition: CrFwInCmd.c:408
CrFwProgressStepId_t CrFwInCmdGetProgressStepId(FwSmDesc_t smDesc)
Return the progress step identifier of the InCommand.
Definition: CrFwInCmd.c:186
CrFwBool_t CrFwInCmdIsAcceptAck(FwSmDesc_t smDesc)
Return the acknowledge level for command acceptance for the command encapsulated in the InCommand.
Definition: CrFwInCmd.c:359
CrFwBool_t CrFwInCmdIsInTerminated(FwSmDesc_t smDesc)
Return true if the argument InCommand is in state TERMINATED.
Definition: CrFwInCmd.c:165
CrFwServType_t CrFwInCmdGetServSubType(FwSmDesc_t smDesc)
Return the sub-type of the InCommand.
Definition: CrFwInCmd.c:345
Definition of the InCommand Component of the framework.
void CrFwInCmdSample1SetReadyFlag(CrFwBool_t flag)
Set the value of the Ready Flag (see CrFwInCmdSample1ReadyCheck).
CrFwCounterU1_t CrFwInCmdSample1GetStartActionCounter()
Get the value of the Start Action Counter (see CrFwInCmdSample1StartAction).
CrFwCounterU1_t CrFwInCmdSample1GetAbortActionCounter()
Get the value of the Abort Action Counter (see CrFwInCmdSample1AbortAction).
void CrFwInCmdSample1SetProgressActionCompletionOutcome(CrFwOutcome_t outcome)
Set the value of the Progress Action Completion Outcome (see CrFwInCmdSample1ProgressAction).
CrFwCounterU1_t CrFwInCmdSample1GetTerminationActionCounter()
Get the value of the Termination Action Counter (see CrFwInCmdSample1TerminationAction).
void CrFwInCmdSample1SetProgressActionOutcome(CrFwOutcome_t outcome)
Set the value of the Progress Action Outcome (see CrFwInCmdSample1ProgressAction).
void CrFwInCmdSample1SetStartActionOutcome(CrFwOutcome_t outcome)
Set the value of the Start Action Outcome Counter (see CrFwInCmdSample1StartAction).
void CrFwInCmdSample1SetTerminationActionOutcome(CrFwOutcome_t outcome)
Set the value of the Termination Action Outcome Counter (see CrFwInCmdSample1TerminationAction).
CrFwServType_t CrFwInCmdSample1GetType()
Set the value of the Validity Flag (see CrFwInCmdSample1ValidityCheck).
CrFwCounterU1_t CrFwInCmdSample1GetProgressActionCounter()
Get the value of the Progress Action Counter (see CrFwInCmdSample1ProgressAction).
void CrFwInCmdSample1SetProgressStepFlag(CrFwBool_t flag)
Sets the progress step flag used by the progress action of the sample InCommand (if the flag is set,...
void CrFwInCmdSample1SetValidityFlag(CrFwBool_t flag)
Set the value of the Validity Flag (see CrFwInCmdSample1ValidityCheck).
CrFwBool_t CrFwInCmdTestCase3()
Check the transition from ACCEPTED to ABORTED for an InCommand.
CrFwBool_t CrFwInCmdTestCase9()
Check the generation of the "start successful" outcome report of an InCommand.
CrFwBool_t CrFwInCmdTestCase5()
Check the behaviour of the InCommand in state PROGRESS.
CrFwBool_t CrFwInCmdTestCase12()
Check the parameters of the "successful" outcome reports of an InCommand.
CrFwBool_t CrFwInCmdTestCase2()
Check the transition from ACCEPTED to PROGRESS for an InCommand.
CrFwBool_t CrFwInCmdTestCase4()
Check the failure of the Validity Check of an InCommand.
CrFwBool_t CrFwInCmdTestCase11()
Check the generation of the "termination successful" outcome report of an InCommand.
CrFwBool_t CrFwInCmdTestCase7()
Check the transition from state PROGRESS to state ABORTED for an InCommand which has failed one progr...
CrFwBool_t CrFwInCmdTestCase10()
Check the generation of the "progress successful" outcome report of an InCommand.
CrFwBool_t CrFwInCmdTestCase8()
Check the indirect transition from state PROGRESS to state TERMINATED for an InCommand after one prog...
CrFwBool_t CrFwInCmdTestCase1()
Check the configuration of a newly created InCommand.
CrFwBool_t CrFwInCmdTestCase6()
Check the transition from state PROGRESS to state TERMINATED for an InCommand.
Declaration of the test cases for the InCommand Component (see CrFwInCmd.h).
FwSmDesc_t CrFwInFactoryMakeInCmd(CrFwPckt_t pckt)
Make function for a component encapsulating an incoming command (InCommand).
static CrFwCmpData_t inCmdData[CR_FW_INFACTORY_MAX_NOF_INCMD]
The base data for the pre-allocated InCommand instances.
Definition: CrFwInFactory.c:64
static FwSmDesc_t inCmd[CR_FW_INFACTORY_MAX_NOF_INCMD]
The pre-allocated InCommand instances.
Definition: CrFwInFactory.c:58
void CrFwInFactoryReleaseInCmd(FwSmDesc_t inCmdInstance)
Release function for an InCommand.
FwSmDesc_t CrFwInFactoryMake()
Factory function for the singleton instance of the InFactory.
static FwSmDesc_t inFactory
The singleton instance of the InFactory.
Definition of the InFactory component.
User-modifiable parameters for the InFactory component (see CrFwInFactory.h).
Definition of the OutRegistry Component.
User-modifiable parameters for the OutRegistry component (see CrFwOutRegistry.h).
Interface for creating and accessing a report or command packet.
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
Definition: CrFwPckt.c:327
CrFwPckt_t CrFwPcktGetParStart(CrFwPckt_t pckt)
Return the start address of the packet's parameter area.
Definition: CrFwPckt.c:412
void CrFwPcktSetCmdRepId(CrFwPckt_t pckt, CrFwInstanceId_t id)
Set the command or report identifier in the command or report encapsulated in a packet.
Definition: CrFwPckt.c:363
void CrFwPcktSetSeqCnt(CrFwPckt_t pckt, CrFwSeqCnt_t seqCnt)
Set the sequence counter of the command or report encapsulated in a packet.
Definition: CrFwPckt.c:247
CrFwCrc_t CrFwPcktComputeCrc(CrFwPckt_t pckt)
Compute the CRC in the command or report encapsulated in a packet.
Definition: CrFwPckt.c:277
void CrFwPcktSetDiscriminant(CrFwPckt_t pckt, CrFwDiscriminant_t discriminant)
Set the discriminant of the command or report encapsulated in a packet.
Definition: CrFwPckt.c:309
CrFwPcktLength_t CrFwPcktGetParLength(CrFwPckt_t pckt)
Return the length in bytes of the packet's parameter area.
Definition: CrFwPckt.c:417
void CrFwPcktSetServType(CrFwPckt_t pckt, CrFwServType_t servType)
Set the service type of the command or report encapsulated in a packet.
Definition: CrFwPckt.c:315
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
Definition: CrFwPckt.c:214
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: CrFwPckt.c:375
void CrFwPcktSetCrc(CrFwPckt_t pckt, CrFwCrc_t crc)
Set the CRC in the command or report encapsulated in a packet.
Definition: CrFwPckt.c:283
void CrFwPcktSetSrc(CrFwPckt_t pckt, CrFwDestSrc_t src)
Set the source of the command or report encapsulated in a packet.
Definition: CrFwPckt.c:351
void CrFwPcktSetGroup(CrFwPckt_t pckt, CrFwGroup_t group)
Set the group of the command/report encapsulated in a packet.
Definition: CrFwPckt.c:422
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
Definition: CrFwPckt.c:147
Interface for reporting an error detected by a framework component.
The CORDET Framework defines an interface for generating error reports (see CrFwRepErr....
CrFwRepInCmdOutcome_t CrFwRepInCmdOutcomeStubGetOutcome(CrFwCounterU2_t repPos)
Return the outcome of the InCommand Outcome Report at position repPos.
void CrFwRepInCmdOutcomeStubReset()
Reset the InCommand Outcome Reporting interface.
CrFwOutcome_t CrFwRepInCmdOutcomeStubGetFailCode(CrFwCounterU2_t repPos)
Return the failure code of the InCommand Outcome Report at position repPos.
CrFwServSubType_t CrFwRepInCmdOutcomeStubGetServSubType(CrFwCounterU2_t repPos)
Return the service sub-type of the InCommand Outcome Report at position repPos.
CrFwDiscriminant_t CrFwRepInCmdOutcomeStubGetDiscriminant(CrFwCounterU2_t repPos)
Return the discriminant of the InCommand Outcome Report at position repPos.
CrFwInstanceId_t CrFwRepInCmdOutcomeStubGetInstanceId(CrFwCounterU2_t repPos)
Return the instance identifier of the InCommand Outcome Report at position repPos.
CrFwCounterU2_t CrFwRepInCmdOutcomeStubGetPos()
Return the position in the InCommand Outcome Report array at which the next outcome report will be wr...
CrFwServType_t CrFwRepInCmdOutcomeStubGetServType(CrFwCounterU2_t repPos)
Return the service type of the InCommand Outcome Report at position repPos.
@ crCmdAckTrmSucc
Termination success.
@ crCmdAckPrgSucc
Progress success.
@ crCmdAckTrmFail
Termination failure.
@ crCmdAckPrgFail
Progress failure.
@ crCmdAckStrSucc
Start success.
@ crCmdAckStrFail
Start failure.
The CORDET Framework defines an interface for reporting the outcome of an InCommand (see CrFwRepInCmd...
Interface through which framework components access the current time.
unsigned short CrFwProgressStepId_t
Type for the Progress Step Identifier of an InCommand.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
unsigned short CrFwCrc_t
Type used for the CRC field in a packet.
@ crNoAppErr
No application errors have been detected.
CrFwOutcome_t CrFwGetSmOutcome(FwSmDesc_t smDesc)
Convenience function to get the outcome of the last check or action of a state machine.
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
Definition of the utility functions for the CORDET Framework.
Type for the Framework Component Data (FCD).
Definition: CrFwCmpData.h:79
void * cmpSpecificData
Derived data which are specific to each type of framework component.
Definition: CrFwCmpData.h:101
Type for the data describing an InCommand.
CrFwPckt_t pckt
Packet holding the InCommand.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved