CORDET Framework - C2 Implementation
CrFwInStreamStub.h File Reference

Interface for the InStream stub. More...

Go to the source code of this file.

Functions

CrFwPckt_t CrFwInStreamStubPcktCollect (CrFwDestSrc_t nofSrc, CrFwDestSrc_t *srcs)
 Stub function implementing the packet collect operation for the InStream (see CrFwInStream.h). More...
 
CrFwBool_t CrFwInStreamStubIsPcktAvail (CrFwDestSrc_t nofSrc, CrFwDestSrc_t *srcs)
 Stub function implementing the packet available check operation for the InStream (see CrFwInStream.h). More...
 
void CrFwInStreamStubShutdown (FwSmDesc_t smDesc)
 Stub function implementing the shutdown operation for an InStream (see CrFwInStream.h). More...
 
void CrFwInStreamStubDummyCheck (FwPrDesc_t prDesc)
 Dummy implementation of an initialization or configuration check. More...
 
void CrFwInStreamStubSetCheckFlag (CrFwBool_t flag)
 Set the value of the check flag which determines the outcome of the dummy check of CrFwInStreamStubDummyCheck. More...
 
void CrFwInStreamStubInitAction (FwPrDesc_t prDesc)
 Dummy implementation of an initialization action. More...
 
void CrFwInStreamStubConfigAction (FwPrDesc_t prDesc)
 Dummy implementation of a configuration action. More...
 
void CrFwInStreamStubSetActionFlag (CrFwBool_t flag)
 Set the value of the action flag which determines the outcome of the initialization or configuration action. More...
 
void CrFwInStreamStubSetPcktCollectionCnt (CrFwCounterU1_t cnt)
 Set the value of the packet collection counter which defines the number of packets available at the middleware interface (see CrFwInStreamStubPcktCollect). More...
 
void CrFwInStreamStubSetPcktSeqCnt (CrFwSeqCnt_t cnt)
 Set the value of the sequence counter of the next packet collected (see CrFwInStreamStubPcktCollect). More...
 
void CrFwInStreamStubSetPcktGroup (CrFwGroup_t group)
 Set the value of the group of the next packet collected (see CrFwInStreamStubPcktCollect). More...
 
void CrFwInStreamStubSetPcktType (CrFwServType_t servType, CrFwServSubType_t servSubType, CrFwDiscriminant_t disc)
 Set the value of the service type, sub-type and discriminant of the next packet collected (see CrFwInStreamStubPcktCollect). More...
 
CrFwCounterU1_t CrFwInStreamStubGetShutdownCnt ()
 Get the value of the shutdown counter (see CrFwInStreamStubShutdown). More...
 
void CrFwInStreamStubSetPcktDest (CrFwDestSrc_t dest)
 Set the value of the destination of the next packet collected (see CrFwInStreamStubPcktCollect). More...
 
void CrFwInStreamStubSetPcktCmdRepId (CrFwInstanceId_t id)
 Set the value of the command or report identifier of the next packet collected (see CrFwInStreamStubPcktCollect). More...
 
void CrFwInStreamStubSetPcktAckLevel (CrFwBool_t acc, CrFwBool_t str, CrFwBool_t prg, CrFwBool_t trm)
 Set the value of the acknowledge level of the next packet collected (see CrFwInStreamStubPcktCollect). More...
 
void CrFwInStreamStubSetPcktCmdRepType (CrFwCmdRepType_t cmdRepType)
 Set the type (command or report) of the next packet collected (see CrFwInStreamStubPcktCollect). More...
 

Detailed Description

Interface for the InStream stub.

The InStream stub is used in the CORDET Test Suite to verify the implementation of the InStream component (see CrFwInStream.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 CrFwInStreamStub.h.

Function Documentation

◆ CrFwInStreamStubConfigAction()

void CrFwInStreamStubConfigAction ( FwPrDesc_t  prDesc)

Dummy implementation of a configuration action.

The outcome of this action is given by the value of the actionFlag whose value is set through function CrFwInStreamStubSetActionFlag.

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

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

Definition at line 136 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubDummyCheck()

void CrFwInStreamStubDummyCheck ( FwPrDesc_t  prDesc)

Dummy implementation of an initialization or configuration check.

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

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

Definition at line 121 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubGetShutdownCnt()

CrFwCounterU1_t CrFwInStreamStubGetShutdownCnt ( )

Get the value of the shutdown counter (see CrFwInStreamStubShutdown).

Returns
the value of the packet sequence counter

Definition at line 205 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubInitAction()

void CrFwInStreamStubInitAction ( FwPrDesc_t  prDesc)

Dummy implementation of an initialization action.

The outcome of this action is given by the value of the actionFlag whose value is set through function CrFwInStreamStubSetActionFlag.

Like all application-specific InStream Initialization Actions, this function also calls the default OutStream Initialization Action (CrFwInStreamDefInitAction) to ensure that default initialization actions are performed. The CrFwInStreamDefInitAction function dynamically allocates memory for an internal InStream data structure. In order to avoid memory leaks, the CrFwInStreamDefInitAction function is only called if the internal InStream data structures are no allocated.

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

Definition at line 127 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubIsPcktAvail()

CrFwBool_t CrFwInStreamStubIsPcktAvail ( CrFwDestSrc_t  nofSrc,
CrFwDestSrc_t srcs 
)

Stub function implementing the packet available check operation for the InStream (see CrFwInStream.h).

This stub returns true if the packet collection counter is greater than zero.

Parameters
nofSrcthe number of sources associated to the InStream (not used in this stub)
srcsthe sources associated to the InStream (not used in this stub)
Returns
the value of a predefined flag

Definition at line 114 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubPcktCollect()

CrFwPckt_t CrFwInStreamStubPcktCollect ( CrFwDestSrc_t  nofSrc,
CrFwDestSrc_t srcs 
)

Stub function implementing the packet collect operation for the InStream (see CrFwInStream.h).

This stub manages a counter (the packet collection counter) which is decremented every time the function is called. The value of the packet collection counter can be set with function CrFwInStreamStubSetPcktCollectionCnt. This stub creates and returns a packet. The packet is unconfigured other than for the following fields:

Parameters
nofSrcthe number of sources associated to the InStream (not used in this stub)
srcsthe sources associated to the InStream (not used in this stub)
Returns
the packet

Definition at line 89 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubSetActionFlag()

void CrFwInStreamStubSetActionFlag ( CrFwBool_t  flag)

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

Parameters
flagthe action flag

Definition at line 154 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubSetCheckFlag()

void CrFwInStreamStubSetCheckFlag ( CrFwBool_t  flag)

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

Parameters
flagthe value of the check flag

Definition at line 149 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubSetPcktAckLevel()

void CrFwInStreamStubSetPcktAckLevel ( CrFwBool_t  acc,
CrFwBool_t  str,
CrFwBool_t  prg,
CrFwBool_t  trm 
)

Set the value of the acknowledge level of the next packet collected (see CrFwInStreamStubPcktCollect).

Parameters
accacknowledge level for command acceptance
stracknowledge level for command start
prgacknowledge level for command progress
trmacknowledge level for command termination

Definition at line 189 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubSetPcktCmdRepId()

void CrFwInStreamStubSetPcktCmdRepId ( CrFwInstanceId_t  id)

Set the value of the command or report identifier of the next packet collected (see CrFwInStreamStubPcktCollect).

Parameters
idthe command or report identifier

Definition at line 179 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubSetPcktCmdRepType()

void CrFwInStreamStubSetPcktCmdRepType ( CrFwCmdRepType_t  cmdRepType)

Set the type (command or report) of the next packet collected (see CrFwInStreamStubPcktCollect).

Parameters
cmdRepTypethe command or report type

Definition at line 184 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubSetPcktCollectionCnt()

void CrFwInStreamStubSetPcktCollectionCnt ( CrFwCounterU1_t  cnt)

Set the value of the packet collection counter which defines the number of packets available at the middleware interface (see CrFwInStreamStubPcktCollect).

Parameters
cntthe value of the packet collection counter

Definition at line 159 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubSetPcktDest()

void CrFwInStreamStubSetPcktDest ( CrFwDestSrc_t  dest)

Set the value of the destination of the next packet collected (see CrFwInStreamStubPcktCollect).

Parameters
destthe packet destination

Definition at line 174 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubSetPcktGroup()

void CrFwInStreamStubSetPcktGroup ( CrFwGroup_t  group)

Set the value of the group of the next packet collected (see CrFwInStreamStubPcktCollect).

Parameters
groupthe value of the group

Definition at line 169 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubSetPcktSeqCnt()

void CrFwInStreamStubSetPcktSeqCnt ( CrFwSeqCnt_t  cnt)

Set the value of the sequence counter of the next packet collected (see CrFwInStreamStubPcktCollect).

Parameters
cntthe value of the packet sequence counter

Definition at line 164 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubSetPcktType()

void CrFwInStreamStubSetPcktType ( CrFwServType_t  servType,
CrFwServSubType_t  servSubType,
CrFwDiscriminant_t  disc 
)

Set the value of the service type, sub-type and discriminant of the next packet collected (see CrFwInStreamStubPcktCollect).

Parameters
servTypethe service type
servSubTypethe service sub-type
discthe discriminant

Definition at line 197 of file CrFwInStreamStub.c.

◆ CrFwInStreamStubShutdown()

void CrFwInStreamStubShutdown ( FwSmDesc_t  smDesc)

Stub function implementing the shutdown operation for an InStream (see CrFwInStream.h).

This function increments a counter (the shutdown counter) and then calls the default shutdown operation (CrFwInStreamDefShutdownAction).

Parameters
smDescthe descriptor of the InStream state machine

Definition at line 143 of file CrFwInStreamStub.c.

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