CORDET Framework - C2 Implementation
CrPsRepErr.c
Go to the documentation of this file.
1 
28 #include <stdio.h>
29 #include <stdlib.h>
30 #include <string.h>
31 /* Include Framework Files */
32 #include "CrFwConstants.h"
33 #include "CrPsRepErr.h"
35 
36 /*-----------------------------------------------------------------------------------------*/
37 void CrPsRepErr(CrPsRepErrCode_t errCode, CrFwServType_t tmtcType, CrFwServSubType_t tmtcSubType, CrFwDiscriminant_t tmtcDiscriminant)
38 {
39 
40  switch (errCode)
41  {
42  case crOutfactoryFail:
43  printf("CrFwErrRep: error OUTFACTORY_FAIL generated by component (%d,%d,%d)\n", tmtcType,tmtcSubType, tmtcDiscriminant);
44  break;
45 
46  default:
47  printf("CrFwErrRep: error %d generated by component (%d,%d,%d)\n", errCode,tmtcType,tmtcSubType, tmtcDiscriminant);
48  break;
49  }
50 
51  return;
52 }
53 
54 /*-----------------------------------------------------------------------------------------*/
55 
57  CrFwInstanceId_t instanceId, CrFwInstanceId_t secondaryInstanceId, CrFwDestSrc_t dest)
58 {
59  printf("CrFwRepErrInstanceIdAndDest: error %d generated by component %d of type %d\n",errCode,instanceId,typeId);
60  printf(" secondary sequence identifier: %d, destination: %d\n",secondaryInstanceId,dest);
61 
62  switch (errCode)
63  {
64  case crInLoaderInvDest:
65  printf("CrFwRepErrInstanceIdAndDest: crInLoaderInvDest\n");
66  SendReqVerifPcktReroutFailRep(NULL, INLOADER_INV_DEST); /* TODO: NULL have to be changed to smDesc of in-coming packet */
67  break;
68 
69  default:
70  break;
71  }
72 
73  return;
74 }
void CrFwRepErrInstanceIdAndDest(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId, CrFwInstanceId_t secondaryInstanceId, CrFwDestSrc_t dest)
Report an error which has two parameters attached to it representing the instance identifier of a com...
Definition: CrPsRepErr.c:56
unsigned char CrFwServSubType_t
Type used for the command or report sub-type.
unsigned short CrFwInstanceId_t
Type used for instance identifiers.
unsigned short int CrFwTypeId_t
Type used for the identifier of a component type.
unsigned char CrFwDestSrc_t
Type used for the command or report destination and source.
unsigned char CrFwServType_t
Type used for the service type of a command or report.
Header file to define all invariant publicly available constants and types for the CORDET Framework...
void SendReqVerifPcktReroutFailRep(FwSmDesc_t smDesc, CrPsFailCode_t FailureCode)
Generate a Request Verification Package Rerouting Failed out-going report.
The Outfactory failed to make the component (see CrPsRepErr.h)
The InLoader has retrieved a packet with an invalid destination (see CrFwInLoader.h)
CrPsRepErrCode_t
Identifier for the errors reported through the error reporting interface of CrFwRepErr.h.
CrFwRepErrCode_t
Identifier for the errors reported through the error reporting interface of CrFwRepErr.h.
unsigned short CrFwDiscriminant_t
Type used for the discriminant of a command or report.
static CrFwDestSrc_t dest
Destination.
Interface for reporting an error detected by a PUS Extension component.
Interface through which applications can initialize and execute framework PUS extension components...
void CrPsRepErr(CrPsRepErrCode_t errCode, CrFwServType_t tmtcType, CrFwServSubType_t tmtcSubType, CrFwDiscriminant_t tmtcDiscriminant)
Report an error which has no parameters attached to it.
Definition: CrPsRepErr.c:37
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved