CORDET Framework - C2 Implementation
CrFwOutStreamStub.h File Reference

Interface for the OutStream stub. More...

Go to the source code of this file.

Functions

void CrFwOutStreamStubDummyCheck (FwPrDesc_t prDesc)
 Dummy implementation of an initialization or configuration check for an OutStream. More...
 
void CrFwOutStreamStubSetCheckFlag (CrFwBool_t flag)
 Set the value of the check flag which determines the outcome of the dummy check of CrFwOutStreamStubDummyCheck. More...
 
void CrFwOutStreamStubInitAction (FwPrDesc_t prDesc)
 Dummy implementation of a configuration action for an OutStream. More...
 
void CrFwOutStreamStubConfigAction (FwPrDesc_t prDesc)
 Dummy implementation of a configuration action for an OutStream. More...
 
void CrFwOutStreamStubSetActionFlag (CrFwBool_t flag)
 Set the value of the action flag which determines the outcome of the initialization of configuration action. More...
 
CrFwBool_t CrFwOutStreamStubPcktHandover (CrFwPckt_t pckt)
 Stub function implementing the hand-over operation for the OutStream. More...
 
CrFwCounterU1_t CrFwOutStreamStubGetHandoverCnt ()
 Return the value of the handover counter which is incremented by the packet handover function in CrFwOutStreamStubPcktHandover. More...
 
CrFwCounterU1_t CrFwOutStreamStubGetHandoverSuccCnt ()
 Return the value of the handover successful counter which is incremented by the packet handover function in CrFwOutStreamStubPcktHandover when the packet handover is successful. More...
 
CrFwSeqCnt_t CrFwOutStreamStubGetSeqCnt (CrFwCounterU1_t n)
 Return the sequence counter of the n-th packet to have been handed over to the OutStream Stub. More...
 
CrFwTypeCnt_t CrFwOutStreamStubGetTypeCnt (CrFwCounterU1_t n)
 Return the type counter of the n-th packet to have been handed over to the OutStream Stub. More...
 
void CrFwOutStreamStubSetHandoverFlag (CrFwBool_t flag)
 Set the value of the handover flag which determines the outcome of the packet handover in CrFwOutStreamStubPcktHandover. More...
 
void CrFwOutStreamStubShutdown (FwSmDesc_t smDesc)
 Stub function implementing the shutdown operation for an OutStream. More...
 
CrFwCounterU1_t CrFwOutStreamStubGetShutdownCnt ()
 Return the value of the shutdown counter which is incremented by the packet shutdown function in CrFwOutStreamStubShutdown. More...
 

Detailed Description

Interface for the OutStream stub.

The OutStream stub is used in the CORDET Test Suite to verify the implementation of the OutStream component (see CrFwOutStream.h).

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 CrFwOutStreamStub.h.

Function Documentation

◆ CrFwOutStreamStubConfigAction()

void CrFwOutStreamStubConfigAction ( FwPrDesc_t  prDesc)

Dummy implementation of a configuration action for an OutStream.

The outcome of this implementation is given by the value of a settable flag (actionFlag) whose value is set through function CrFwOutStreamStubSetActionFlag.

Like all application-specific OutStream Configuration Actions, this function also calls the default OutStream Configuration Action.

Parameters
prDescthe initialization or configuration procedure descriptor (this parameter is not used).

Definition at line 122 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubDummyCheck()

void CrFwOutStreamStubDummyCheck ( FwPrDesc_t  prDesc)

Dummy implementation of an initialization or configuration check for an OutStream.

The outcome of this check is given by the value of a settable flag (checkFlag) whose value is set through function CrFwOutStreamStubSetCheckFlag.

Parameters
prDescthe initialization or configuration procedure descriptor (this parameter is not used).

Definition at line 104 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubGetHandoverCnt()

CrFwCounterU1_t CrFwOutStreamStubGetHandoverCnt ( )

Return the value of the handover counter which is incremented by the packet handover function in CrFwOutStreamStubPcktHandover.

Returns
the value of the handover counter

Definition at line 85 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubGetHandoverSuccCnt()

CrFwCounterU1_t CrFwOutStreamStubGetHandoverSuccCnt ( )

Return the value of the handover successful counter which is incremented by the packet handover function in CrFwOutStreamStubPcktHandover when the packet handover is successful.

Returns
the value of the handover successful counter

Definition at line 89 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubGetSeqCnt()

CrFwSeqCnt_t CrFwOutStreamStubGetSeqCnt ( CrFwCounterU1_t  n)

Return the sequence counter of the n-th packet to have been handed over to the OutStream Stub.

The value of n must be between 1 and CR_FW_OUTSTREAM_STUB_MEM_LEN.

Parameters
nthe index of the sequence counter to be returned
Returns
the sequence counter of the n-th packet handed over to the OutStream Stub

Definition at line 140 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubGetShutdownCnt()

CrFwCounterU1_t CrFwOutStreamStubGetShutdownCnt ( )

Return the value of the shutdown counter which is incremented by the packet shutdown function in CrFwOutStreamStubShutdown.

Returns
the value of the shutdown counter

Definition at line 94 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubGetTypeCnt()

CrFwTypeCnt_t CrFwOutStreamStubGetTypeCnt ( CrFwCounterU1_t  n)

Return the type counter of the n-th packet to have been handed over to the OutStream Stub.

The value of n must be between 1 and CR_FW_OUTSTREAM_STUB_MEM_LEN.

Parameters
nthe index of the sequence counter to be returned
Returns
the type counter of the n-th packet handed over to the OutStream Stub

Definition at line 146 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubInitAction()

void CrFwOutStreamStubInitAction ( FwPrDesc_t  prDesc)

Dummy implementation of a configuration action for an OutStream.

The outcome of this implementation is given by the value of a settable flag (actionFlag) whose value is set through function CrFwOutStreamStubSetActionFlag.

Like all application-specific OutStream Initialization Actions, this function also calls the default OutStream Initialization Action (CrFwOutStreamDefInitAction) to ensure that default initialization actions are performed. The CrFwOutStreamDefInitAction function dynamically allocates memory for an internal OutStream data structure. In order to avoid memory leaks, this function should therefore only be called once for each outStream.

Parameters
prDescthe initialization or configuration procedure descriptor (this parameter is not used).

Definition at line 115 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubPcktHandover()

CrFwBool_t CrFwOutStreamStubPcktHandover ( CrFwPckt_t  pckt)

Stub function implementing the hand-over operation for the OutStream.

This function increments a counter when it is called (the Handover Counter) and returns the value of a pre-defined flag. The value of the counter can be read with function CrFwOutStreamStubGetHandoverCnt. The value of the flag can be set with function CrFwOutStreamStubSetHandoverFlag.

If the Handover is successful (i.e. if flag CrFwOutStreamStubSetHandoverFlag is True), the function:

  • Increments the Handover Successful Counter
  • Stores the sequence counter and type counter of the handed over packet in the Sequence Counter Array and in the Type Counter Array.

The value of the Handover Successful Counter can be accessed through function CrFwOutStreamStubGetHandoverSuccCnt. The content of the two arrays can be accessed with functions CrFwOutStreamStubGetSeqCnt and CrFwOutStreamStubGetTypeCnt.

Parameters
pcktthe packet (not used in this stub)
Returns
the value of flag pcktHandOverFlag

Definition at line 72 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubSetActionFlag()

void CrFwOutStreamStubSetActionFlag ( CrFwBool_t  flag)

Set the value of the action flag which determines the outcome of the initialization of configuration action.

Parameters
flagthe action flag

Definition at line 129 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubSetCheckFlag()

void CrFwOutStreamStubSetCheckFlag ( CrFwBool_t  flag)

Set the value of the check flag which determines the outcome of the dummy check of CrFwOutStreamStubDummyCheck.

Parameters
flagthe check flag

Definition at line 110 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubSetHandoverFlag()

void CrFwOutStreamStubSetHandoverFlag ( CrFwBool_t  flag)

Set the value of the handover flag which determines the outcome of the packet handover in CrFwOutStreamStubPcktHandover.

Parameters
flagthe handover flag

Definition at line 99 of file CrFwOutStreamStub.c.

◆ CrFwOutStreamStubShutdown()

void CrFwOutStreamStubShutdown ( FwSmDesc_t  smDesc)

Stub function implementing the shutdown operation for an OutStream.

This function increments a counter and then calls the default shutdown operation (CrFwOutStreamDefShutdownAction). The value of the counter can be read with function CrFwOutStreamStubGetHandoverCnt.

Parameters
smDescthe state machine descriptor of the OutStream

Definition at line 134 of file CrFwOutStreamStub.c.

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