CORDET Framework - C2 Implementation
CrFwInRep.c File Reference

Implementation of InReport component. More...

Go to the source code of this file.

Functions

CrFwDestSrc_t CrFwInRepGetSrc (FwSmDesc_t smDesc)
 Return the source of the InReport. More...
 
CrFwGroup_t CrFwInRepGetGroup (FwSmDesc_t smDesc)
 Return the group of the InReport. More...
 
CrFwServType_t CrFwInRepGetServType (FwSmDesc_t smDesc)
 Return the type of the InReport. More...
 
CrFwServType_t CrFwInRepGetServSubType (FwSmDesc_t smDesc)
 Return the sub-type of the InReport. More...
 
CrFwDiscriminant_t CrFwInRepGetDiscriminant (FwSmDesc_t smDesc)
 Return the discriminant of the InReport. More...
 
CrFwSeqCnt_t CrFwInRepGetSeqCnt (FwSmDesc_t smDesc)
 Return the sequence counter of the InReport. More...
 
CrFwPckt_t CrFwInRepGetParStart (FwSmDesc_t smDesc)
 Return the start address of the parameter area of the InReport. More...
 
CrFwPcktLength_t CrFwInRepGetParLength (FwSmDesc_t smDesc)
 Return the length in bytes of the parameter area of the InReport. More...
 
void CrFwInRepConfigCheck (FwPrDesc_t prDesc)
 Configuration check for an InReport. More...
 
CrFwPckt_t CrFwInRepGetPckt (FwSmDesc_t smDesc)
 Return the pointer to the packet which holds the InReport. More...
 
CrFwPckt_t CrFwInRepGetPcktFromPrDesc (FwPrDesc_t prDesc)
 Convenience function to extract the InReport's packet from the descriptor of the InReport's execution procedure. More...
 
CrFwBool_t CrFwInRepDefValidityCheck (FwPrDesc_t prDesc)
 Default implementation of the validity check of an InReport. More...
 

Detailed Description

Implementation of InReport component.

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 CrFwInRep.c.

Function Documentation

void CrFwInRepConfigCheck ( FwPrDesc_t  prDesc)

Configuration check for an InReport.

This function executes the Validity Check of the InReport and sets the action outcome to 1 if the Validity Check returns true and sets it to zero if it returns false. The Validity Check is implemented in a function of type CrFwInRepValidityCheck_t. The function is defined by the applicaiton developer in CR_FW_INREP_INIT_KIND_DESC

This function is not intended to be called by applications. It is declared as a public function because it is needed by the InFactory (see CrFwInFactory.h).

Parameters
prDescthe descriptor of the InReport Configuration Procedure.

Definition at line 103 of file CrFwInRep.c.

CrFwBool_t CrFwInRepDefValidityCheck ( FwPrDesc_t  prDesc)

Default implementation of the validity check of an InReport.

The validity check of an InReport must conform to the CrFwInRepValidityCheck_t function prototype. This default implementation verifies the correctness of the CRC of the packet which carries the report. The CRC is processed using the CRC functions defined by interface CrFwPckt.h.

Parameters
prDescthe descriptor of the InReport's Reset Procedure
Returns
true if the CRC of the InReport packet is correct

Definition at line 129 of file CrFwInRep.c.

CrFwDiscriminant_t CrFwInRepGetDiscriminant ( FwSmDesc_t  smDesc)

Return the discriminant of the InReport.

Parameters
smDescthe descriptor of the InRep State Machine
Returns
the discriminant of the InReport

Definition at line 73 of file CrFwInRep.c.

CrFwGroup_t CrFwInRepGetGroup ( FwSmDesc_t  smDesc)

Return the group of the InReport.

Parameters
smDescthe descriptor of the InRep State Machine
Returns
the group of the InReport

Definition at line 49 of file CrFwInRep.c.

CrFwPcktLength_t CrFwInRepGetParLength ( FwSmDesc_t  smDesc)

Return the length in bytes of the parameter area of the InReport.

The InReport is encapsulated in a packet. The parameter area of the InReport is the part of the packet which is reserved to the storage of the parameters of the InReport. The parameter area consists of an uninterrupted sequence of bytes. The start address of the parameter area is returned by function CrFwInRepGetParStart.

Parameters
smDescthe descriptor of the Base State Machine of the InReport
Returns
the length in bytes of the InReport parameter area

Definition at line 96 of file CrFwInRep.c.

CrFwPckt_t CrFwInRepGetParStart ( FwSmDesc_t  smDesc)

Return the start address of the parameter area of the InReport.

The InReport is encapsulated in a packet. The parameter area of the InReport is the part of the packet which is reserved to the storage of the parameters of the InReport. The parameter area consists of an uninterrupted sequence of bytes. The size of the parameter area is returned by function CrFwInRepGetParLength.

Parameters
smDescthe descriptor of the Base State Machine of the InReport
Returns
the start address of the InReport parameter area.

Definition at line 89 of file CrFwInRep.c.

CrFwPckt_t CrFwInRepGetPckt ( FwSmDesc_t  smDesc)

Return the pointer to the packet which holds the InReport.

The InReport is encapsulated in a packet. This function returns this packet. The packet is only initialized if the InReport has been correctly de-serialized. This is normally the case if the InReport has been successfully returned by the InFactory. The length of the packet is stored in the packet itself and can be retrieved with function CrFwPcktGetLength.

Parameters
smDescthe descriptor of the Base State Machine of the InReport
Returns
the pointer to the packet holding the InReport.

Definition at line 114 of file CrFwInRep.c.

CrFwPckt_t CrFwInRepGetPcktFromPrDesc ( FwPrDesc_t  prDesc)

Convenience function to extract the InReport's packet from the descriptor of the InReport's execution procedure.

One situation where this function is useful is as follows. The Update Action Operation and the Validity Check Operation are adaptation points of an InReport. These operations are implemented by functions of type, respectively, CrFwInRepUpdateAction_t and CrFwInRepValidityCheck_t. These functions take as an argument the descriptor of the InReport's Execution Procedure. Applications will often have to provide an implementation of these functions and, to do so, they will often need to access the packet holding the InReport so as to access the InReport's parameters, The present function offers an easy way to retrieve this packet.

Parameters
prDescthe descriptor of the InReport's Execution Procedure
Returns
the packet holding the InReport

Definition at line 121 of file CrFwInRep.c.

CrFwSeqCnt_t CrFwInRepGetSeqCnt ( FwSmDesc_t  smDesc)

Return the sequence counter of the InReport.

Parameters
smDescthe descriptor of the InRep State Machine
Returns
the sequence counter of the InReport

Definition at line 81 of file CrFwInRep.c.

CrFwServType_t CrFwInRepGetServSubType ( FwSmDesc_t  smDesc)

Return the sub-type of the InReport.

Parameters
smDescthe descriptor of the InRep State Machine
Returns
the sub-type of the InReport

Definition at line 65 of file CrFwInRep.c.

CrFwServType_t CrFwInRepGetServType ( FwSmDesc_t  smDesc)

Return the type of the InReport.

Parameters
smDescthe descriptor of the InRep State Machine
Returns
the type of the InReport

Definition at line 57 of file CrFwInRep.c.

CrFwDestSrc_t CrFwInRepGetSrc ( FwSmDesc_t  smDesc)

Return the source of the InReport.

Parameters
smDescthe descriptor of the InRep State Machine
Returns
the source of the InReport

Definition at line 41 of file CrFwInRep.c.

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