CORDET Framework - C2 Implementation
CrFwRepErr.h File Reference

Interface for reporting an error detected by a framework component. More...

Go to the source code of this file.

Functions

void CrFwRepErr (CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId)
 Report an error which has no parameters attached to it. More...
 
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 destination or source. More...
 
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. More...
 
void CrFwRepErrSeqCnt (CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId, CrFwSeqCnt_t expSeqCnt, CrFwSeqCnt_t actSeqCnt, CrFwPckt_t pckt)
 Report an error which has two parameters attached to it representing expected and actual sequence counter values. More...
 
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 component other than the originator of the error report (the secondary instance identifier) and the outcome field of a component's data. More...
 
void CrFwRepErrInstanceIdAndDest (CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId, CrFwInstanceId_t secondaryInstanceId, CrFwDestSrc_t dest, CrFwPckt_t pckt)
 Report an error which has three parameters attached to it representing the instance identifier of a component other than the originator of the error report (the secondary instance identifier), a command or report destination and a command or report packet. More...
 
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. More...
 
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. More...
 
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. More...
 
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 command as given by the triplet [type, sub-type, discriminant]. More...
 

Detailed Description

Interface for reporting an error detected by a framework component.

When a framework component encounters an error, it reports it by calling one of the functions defined by this header file (error report).

An error report is defined by the following attributes:

  • The error code: a positive integer which identifies the type of error.
  • The source type identifier: the type identifier of the component which generated the error report.
  • The source instance identifier: the instance identifier of the component which generated the error report.
  • The error parameters: any additional parameters which are useful to characterize the circumstances in which the error arose.

The type and number of error parameters depends on the type of error which is being reported. This interface defines several error reporting functions, one for each set of error parameter types. Not all functions defined in this interface are used by the CORDET Framework. Some are intended for use by application components.

The range of error codes is defined in type CrFwRepErrCode_t. Note that this is a configurable type that users are expected to extend with their own error codes.

In general, the implementation of this interface is entirely application-specific but a simple default implementation is provided in CrFwRepErr.c. This default implementation is primarily intended for testing and demonstration purposes.

Author
Vaclav Cechticky vacla.nosp@m.v.ce.nosp@m.chtic.nosp@m.ky@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m
Alessandro Pasetti paset.nosp@m.ti@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m

This file is part of the CORDET Framework.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

For information on alternative licensing, please contact P&P Software GmbH.

Definition in file CrFwRepErr.h.

Function Documentation

void CrFwRepErr ( CrFwRepErrCode_t  errCode,
CrFwTypeId_t  typeId,
CrFwInstanceId_t  instanceId 
)

Report an error which has no parameters attached to it.

This function generate an error report without error parameters.

Parameters
errCodethe error code
instanceIdthe instance identifier of the component which raises the error report
typeIdthe type identifier of the component which raises the error report

Definition at line 81 of file CrFwRepErr.c.

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.

This function generate an error report with one parameter.

Parameters
errCodethe error code
instanceIdthe instance identifier of the component which raises the error report
typeIdthe type identifier of the component which raises the error report
cmda component holding a command

Definition at line 224 of file CrFwRepErr.c.

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 destination or source.

This function generate an error report with one parameter.

Parameters
errCodethe error code
instanceIdthe instance identifier of the component which raises the error report
typeIdthe type identifier of the component which raises the error report
destSrcthe invalid destination or source

Definition at line 94 of file CrFwRepErr.c.

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.

This function generate an error report with one parameter.

Parameters
errCodethe error code
instanceIdthe instance identifier of the component which raises the error report
typeIdthe type identifier of the component which raises the error report
groupthe invalid group

Definition at line 128 of file CrFwRepErr.c.

void CrFwRepErrInstanceIdAndDest ( CrFwRepErrCode_t  errCode,
CrFwTypeId_t  typeId,
CrFwInstanceId_t  instanceId,
CrFwInstanceId_t  secondaryInstanceId,
CrFwDestSrc_t  dest,
CrFwPckt_t  pckt 
)

Report an error which has three parameters attached to it representing the instance identifier of a component other than the originator of the error report (the secondary instance identifier), a command or report destination and a command or report packet.

This function generate an error report with two parameters.

Parameters
errCodethe error code
instanceIdthe instance identifier of the component which raises the error report
typeIdthe type identifier of the component which raises the error report
secondaryInstanceIdinstance identifier of a component other than the originator of the error report
desta command or report destination
pckta packet holding a command or report (this is a pointer which is only guaranteed valid during the function execution)

Definition at line 109 of file CrFwRepErr.c.

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 component other than the originator of the error report (the secondary instance identifier) and the outcome field of a component's data.

This function generate an error report with two parameters.

Parameters
errCodethe error code
instanceIdthe instance identifier of the component which raises the error report
typeIdthe type identifier of the component which raises the error report
secondaryInstanceIdinstance identifier of a component other than the originator of the error report
outcomeoutcome field of a component's data

Definition at line 175 of file CrFwRepErr.c.

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 command as given by the triplet [type, sub-type, discriminant].

This function generate an error report with three parameters.

Parameters
errCodethe error code
instanceIdthe instance identifier of the component which raises the error report
typeIdthe type identifier of the component which raises the error report
servTypethe report or command type
servSubTypethe report or command sub-type
discthe report or command discriminant

Definition at line 241 of file CrFwRepErr.c.

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.

This function generate an error report with one parameter.

Parameters
errCodethe error code
instanceIdthe instance identifier of the component which raises the error report
typeIdthe type identifier of the component which raises the error report
pckta packet holding a command or report (this is a pointer which is only guaranteed valid during the function execution)

Definition at line 193 of file CrFwRepErr.c.

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.

This function generate an error report with one parameter.

Parameters
errCodethe error code
instanceIdthe instance identifier of the component which raises the error report
typeIdthe type identifier of the component which raises the error report
repa component holding a report

Definition at line 207 of file CrFwRepErr.c.

void CrFwRepErrSeqCnt ( CrFwRepErrCode_t  errCode,
CrFwTypeId_t  typeId,
CrFwInstanceId_t  instanceId,
CrFwSeqCnt_t  expSeqCnt,
CrFwSeqCnt_t  actSeqCnt,
CrFwPckt_t  pckt 
)

Report an error which has two parameters attached to it representing expected and actual sequence counter values.

This function generate an error report with two parameters.

Parameters
errCodethe error code
instanceIdthe instance identifier of the component which raises the error report
typeIdthe type identifier of the component which raises the error report
expSeqCntthe expected sequence counter
actSeqCntthe actual sequence counter
pckta packet holding a command or report (this is a pointer which is only guaranteed valid during the function execution)

Definition at line 143 of file CrFwRepErr.c.

P&P Software GmbH, Copyright 2012-2013, All Rights Reserved