CORDET Framework - C2 Implementation
cordetfw-examples/src/CrConfigDemoMaster/CrFwRepErr.c
Go to the documentation of this file.
1 
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <string.h>
24 /* Include Framework Files */
25 #include "CrFwConstants.h"
26 #include "CrFwRepErr.h"
27 
28 /*-----------------------------------------------------------------------------------------*/
29 void CrFwRepErr(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId) {
30  printf("CrFwErrRep: error %d generated by component %d of type %d\n", errCode,instanceId,typeId);
31 }
32 
33 /*-----------------------------------------------------------------------------------------*/
35  CrFwDestSrc_t destSrc) {
36  printf("CrFwRepErrDestSrc: error %d generated by component %d of type %d for dest/src %d\n",
37  errCode,instanceId,typeId,destSrc);
38 }
39 
40 /*-----------------------------------------------------------------------------------------*/
41 void CrFwRepErrInstanceIdAndDest(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId,
42  CrFwInstanceId_t instanceId, CrFwInstanceId_t secondaryInstanceId, CrFwDestSrc_t dest) {
43  printf("CrFwRepErrInstanceIdAndDest: error %d generated by component %d of type %d\n",errCode,instanceId,typeId);
44  printf(" secondary sequence identifier: %d, destination: %d\n",secondaryInstanceId,dest);
45 }
46 
47 /*-----------------------------------------------------------------------------------------*/
48 void CrFwRepErrSeqCnt(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId,
49  CrFwSeqCnt_t expSeqCnt, CrFwSeqCnt_t actSeqCnt) {
50  printf("CrFwRepErrSeqCnt: error %d generated by component %d of type %d\n",errCode,instanceId,typeId);
51  printf(" expected sequence counter: %d, actual sequence counter: %d\n",expSeqCnt,actSeqCnt);
52 }
53 
54 /*-----------------------------------------------------------------------------------------*/
56  CrFwGroup_t group) {
57  printf("CrFwRepErrGroup: error %d generated by component %d of type %d\n",errCode,instanceId,typeId);
58  printf(" invalid group: %d\n",group);
59 
60 }
61 
62 /*-----------------------------------------------------------------------------------------*/
64  CrFwInstanceId_t instanceId, CrFwInstanceId_t secondaryInstanceId, CrFwOutcome_t outcome) {
65  printf("CrFwRepErrInstanceIdAndOutcome: error %d generated by component %d of type %d\n",errCode,instanceId,typeId);
66  printf(" secondary sequence identifier: %d, outcome: %d\n",secondaryInstanceId,outcome);
67 }
68 
69 /*-----------------------------------------------------------------------------------------*/
71  CrFwInstanceId_t instanceId, CrFwPckt_t pckt) {
72  printf("CrFwRepErrPckt: error %d generated by component %d of type %d\n",errCode,instanceId,typeId);
73  printf(" pckt[0] : %d, pckt[1]: %d\n",pckt[0],pckt[1]);
74 }
75 
76 /*-----------------------------------------------------------------------------------------*/
78  CrFwInstanceId_t instanceId, FwSmDesc_t rep) {
79  printf("CrFwRepErrRep: error %d generated by component %d of type %d\n",errCode,instanceId,typeId);
80 }
81 
82 /*-----------------------------------------------------------------------------------------*/
84  CrFwInstanceId_t instanceId, FwSmDesc_t cmd) {
85  printf("CrFwRepErrCmd: error %d generated by component %d of type %d\n",errCode,instanceId,typeId);
86 }
87 
88 /*-----------------------------------------------------------------------------------------*/
92  printf("CrFwRepErrKind: error %d generated by component %d of type %d\n",errCode,instanceId,typeId);
93 }
void CrFwRepErrGroup(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId, CrFwGroup_t group)
Report an error which has one single parameter attached to it representing a command or report group...
CrFwPckt_t * pckt
The list of packets in the PQ.
unsigned char CrFwServSubType_t
Type used for the command or report sub-type.
unsigned char CrFwGroup_t
Type used for the destination or source group of a packet.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
Definition: CrFwConstants.h:38
void CrFwRepErrKind(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId, CrFwServType_t servType, CrFwServSubType_t servSubType, CrFwDiscriminant_t disc)
Report an error which has three parameters attached to it representing the kind of a report or comman...
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.
void CrFwRepErrCmd(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId, FwSmDesc_t cmd)
Report an error which has one parameter attached to it representing a command component.
void CrFwRepErrDestSrc(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId, CrFwDestSrc_t destSrc)
Report an error which has one single parameter attached to it representing a command or report destin...
static CrFwServSubType_t servSubType
Service sub-type.
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 CrFwRepErrPckt(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId, CrFwPckt_t pckt)
Report an error which has one parameter attached to it representing a command or report packet...
Interface for reporting an error detected by a framework component.
static CrFwDiscriminant_t disc
Discriminant.
void CrFwRepErrInstanceIdAndOutcome(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId, CrFwInstanceId_t secondaryInstanceId, CrFwOutcome_t outcome)
Report an error which has two parameters attached to it representing the instance identifier of a com...
CrFwRepErrCode_t
Identifier for the errors reported through the error reporting interface of CrFwRepErr.h.
unsigned char CrFwOutcome_t
Type used for the outcome of a check (see CrFwCmpData).
unsigned short CrFwDiscriminant_t
Type used for the discriminant of a command or report.
static CrFwServType_t servType
The InCommand type as computed in the Validity Check.
static CrFwDestSrc_t dest
Destination.
void CrFwRepErr(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId)
Report an error which has no parameters attached to it.
void CrFwRepErrRep(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId, FwSmDesc_t rep)
Report an error which has one parameter attached to it representing an report component.
unsigned int CrFwSeqCnt_t
Type used for the sequence counter of commands or reports.
P&P Software GmbH, Copyright 2012-2013, All Rights Reserved