CORDET Framework - C2 Implementation
CrPsUtilitiesServTest.c
Go to the documentation of this file.
1 
21 #include "CrPsUtilitiesServTest.h"
22 #include "Pckt/CrFwPckt.h" /* --- interface to adaptation point CrFwPckt --- */
23 
24 /* CrFramework includes */
27 #include <CrFwCmpData.h>
28 
29 /* FwProfile includes */
30 #include <FwPrCore.h>
31 #include <FwPrConfig.h>
32 #include <FwSmConfig.h>
33 
37 
38 #include <DataPool/CrPsDp.h>
41 #include <DataPool/CrPsDpServHk.h>
42 #include <DataPool/CrPsDpServEvt.h>
43 /*hier CrPsDpPkt dateien hinzufügen!*/
44 
45 #include <stdlib.h>
46 
47 /* global handles for the procedures */
48 FwPrDesc_t prDescServTestOnBoardConnStart, prDescServTestOnBoardConnPrgr;
49 
50 
54 void CrPsInitServTestApp(unsigned short onBoardTestConnectAppId)
55 {
56  uint16_t destId;
57  uint32_t i, pos;
58 
59  /*************************************************************/
60  /* Service Test On-Board Connection Data Pool Initialization */
61  /*************************************************************/
62  for (i=0; i<10; i++)
63  {
64  pos = i;
65  destId = getDpOnBoardConnectDestLstItem(pos);
66  if (destId == 0) /* got empty#include <> slot */
67  {
68  setDpOnBoardConnectDestLstItem(pos, onBoardTestConnectAppId);
69  return;
70  }
71  }
72 
73  return;
74 }
75 
80 {
81 
82  /***********************************************************************/
83  /* Initialization of Data Pool variables and parameter */
84  /***********************************************************************/
86 
87  /***********************************************************************/
88  /* Service Test On-Board Connection Start Procedure */
89  /***********************************************************************/
90  prDescServTestOnBoardConnStart = CrPsCmd17s3StartCreate(NULL);
91  if (FwPrCheck(prDescServTestOnBoardConnStart) != prSuccess)
92  {
93  return EXIT_FAILURE;
94  }
95 
96  /***********************************************************************/
97  /* Service Test On-Board Connection Progress Procedure */
98  /***********************************************************************/
99  prDescServTestOnBoardConnPrgr = CrPsCmd17s3PrgrCreate(NULL);
100  if (FwPrCheck(prDescServTestOnBoardConnPrgr) != prSuccess)
101  {
102  return EXIT_FAILURE;
103  }
104 
105  /* initialize Datapool Values */
106  initDpServTest();
107 
108  return EXIT_SUCCESS;
109 }
110 
115 {
116 
117  FwPrExecute(prDescServTestOnBoardConnStart);
118  /*FwPrExecute(prDescServTestOnBoardConnPrgr);*/
119 
120  return;
121 }
122 
127 {
128  return prDescServTestOnBoardConnStart;
129 }
130 
135 {
136  return prDescServTestOnBoardConnPrgr;
137 }
CrFwCounterU4_t i
CrPsCmd5EidStart function definitions.
FwPrDesc_t getPrDescServTestOnBoardConnPrgr()
Getter for TestOnBoardConnPrgr procedure descriptor.
void initDpServTest(void)
Initialises ServTest.
Interface for accessing data pool items.
Interface for accessing data pool items.
Interface for accessing data pool items.
static CrPsDestSrc_t getDpOnBoardConnectDestLstItem(int i)
Gets the value of the i-th element in the datapool array OnBoardConnectDestLst.
Definition of the OutFactory component.
static void setDpOnBoardConnectDestLstItem(int i, CrPsDestSrc_t OnBoardConnectDestLst)
Sets the value of the i-th element in the datapool array OnBoardConnectDestLst.
Create one instance of the CrPsCmd17s3Prgr procedure.
Header file to define all service and packet identifiers.
FwPrDesc_t getPrDescServTestOnBoardConnStart()
Getter for TestOnBoardConnStart procedure descriptor.
Interface for creating and accessing a report or command packet.
Create one instance of the CrPsCmd17s3Start procedure.
FwPrDesc_t CrPsCmd17s3PrgrCreate(void *prData)
FW Profile function definitions.
void CrPsInitServTestApp(unsigned short onBoardTestConnectAppId)
Initialization of CORDET Framework PUS Extension application-specific components. ...
FwPrDesc_t CrPsCmd17s3StartCreate(void *prData)
Create a new procedure descriptor.
Interface for accessing data pool items.
void CrPsExecServTest()
Execution of CORDET Framework PUS Extension components.
Interface through which applications can initialize and execute framework PUS extension components...
static void setDpAreYouAliveTimeOut(CrPsTimeOut_t AreYouAliveTimeOut)
Sets the value of the datapool item AreYouAliveTimeOut.
int CrPsInitServTest()
Initialization of CORDET Framework PUS Extension components.
Interface for accessing data pool items.
Definition of the OutLoader component.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved