CORDET Framework - C2 Implementation
tests/CrFwOutStreamStub.c File Reference

Implementation of OutStream stub. More...

Go to the source code of this file.

Functions

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 CrFwOutStreamStubGetShutdownCnt ()
 Return the value of the shutdown counter which is incremented by the packet shutdown function in CrFwOutStreamStubShutdown. 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 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...
 
void CrFwOutStreamStubShutdown (FwSmDesc_t smDesc)
 Stub function implementing the shutdown operation for an OutStream. More...
 

Variables

static CrFwCounterU1_t pcktHandOverCnt = 0
 Counter incremented every time the packet hand-over operation is called.
 
static CrFwBool_t pcktHandOverFlag = 1
 Return value of the packet hand-over operation.
 
static CrFwBool_t checkFlag = 1
 Outcome of dummy check.
 
static CrFwBool_t actionFlag = 1
 Outcome of dummy action.
 
static CrFwCounterU1_t shutdownCnt = 0
 Counter incremented by stub Shutdown Operation.
 

Detailed Description

Implementation of OutStream stub.

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 tests/CrFwOutStreamStub.c.

Function Documentation

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 98 of file tests/CrFwOutStreamStub.c.

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 78 of file tests/CrFwOutStreamStub.c.

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 63 of file tests/CrFwOutStreamStub.c.

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 68 of file tests/CrFwOutStreamStub.c.

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, function CrFwOutStreamDefInitAction is only called if the OutStream data structure has not yet been initialized.

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

Definition at line 89 of file tests/CrFwOutStreamStub.c.

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

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

Definition at line 56 of file tests/CrFwOutStreamStub.c.

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 105 of file tests/CrFwOutStreamStub.c.

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 84 of file tests/CrFwOutStreamStub.c.

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 73 of file tests/CrFwOutStreamStub.c.

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 110 of file tests/CrFwOutStreamStub.c.

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