CORDET Framework - C2 Implementation
CrFwOutStreamUserPar.h File Reference

User-modifiable parameters for the OutStream components (see CrFwOutStream.h). More...

Go to the source code of this file.

Macros

#define CR_FW_NOF_OUTSTREAM   7
 The number of OutStream components in the application. More...
 
#define CR_FW_OUTSTREAM_NOF_DEST   8
 Number of destinations for out-going packets. More...
 
#define CR_FW_OUTSTREAM_DEST_PAIRS
 The association of destinations to OutStreams. More...
 
#define CR_FW_OUTSTREAM_PQSIZE   {3,3,3,3,5,5,5}
 The sizes of the packet queues in the OutStream component. More...
 
#define CR_FW_OUTSTREAM_NOF_GROUPS   2
 The number of groups managed by the OutStream components. More...
 
#define CR_FW_OUTSTREAM_SET_DTS   &CrFwOutStreamDefSetDTS
 Pointer to Set DTS function which populates the DTS_SET for the OutStreams. More...
 
#define CR_FW_OUTSTREAM_PCKTHANDOVER
 The functions implementing the packet hand-over operations of the OutStream components. More...
 
#define CR_FW_OUTSTREAM_INITCHECK
 The functions implementing the Initialization Check of the OutStream components. More...
 
#define CR_FW_OUTSTREAM_INITACTION
 The functions implementing the Initialization Action of the OutStream components. More...
 
#define CR_FW_OUTSTREAM_CONFIGCHECK
 The functions implementing the Configuration Check of the OutStream components. More...
 
#define CR_FW_OUTSTREAM_CONFIGACTION
 The functions implementing the Configuration Action of the OutStream components. More...
 
#define CR_FW_OUTSTREAM_SHUTDOWNACTION
 The functions implementing the Shutdown Action of the OutStream components. More...
 

Detailed Description

User-modifiable parameters for the OutStream components (see CrFwOutStream.h).

This file defines all the user-modifiable parameters for the OutStream. Users will normally have to modify this file as part of the framework instantiation process.

The parameters defined in this file determine the configuration of the OutStream Components. The value of these parameters cannot be changed dynamically.

The default values defined in this file are those used for the testing of the CORDET Framework.

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

Macro Definition Documentation

◆ CR_FW_NOF_OUTSTREAM

#define CR_FW_NOF_OUTSTREAM   7

The number of OutStream components in the application.

An application must have at least one OutStream but it can also have more. The value of this constant must be smaller than the range of the CrFwCounterU1_t integer type.

Definition at line 45 of file CrFwOutStreamUserPar.h.

◆ CR_FW_OUTSTREAM_CONFIGACTION

#define CR_FW_OUTSTREAM_CONFIGACTION
Value:
void CrFwClientSocketConfigAction(FwPrDesc_t prDesc)
Configuration action for the client socket.
void CrFwOutStreamDefConfigAction(FwPrDesc_t prDesc)
Default configuration action for an OutStream.
void CrFwOutStreamStubConfigAction(FwPrDesc_t prDesc)
Dummy implementation of a configuration action for an OutStream.
void CrFwServerSocketConfigAction(FwPrDesc_t prDesc)
Configuration action for the server socket.

The functions implementing the Configuration Action of the OutStream components.

The OutStream components are derived from the Base Component and they therefore inherit its Reset Procedure (see CrFwResetProc.h). The reset procedure must be configured with two actions: the Configuration Action and the Configuration Check. This constant defines the functions implementing the Configuration Actions for the the OutStream components. The items in the array must be function pointers of type: FwPrAction_t.

Function CrFwOutStreamDefConfigAction can be used as a default implementation for this function. This function resets the internal data structures for the OutStream. An application-specific Configuration Action should therefore include a call to this function.

Adaptation Point:
OST-05: Configuration Action in Reset Procedure of OutStream

Definition at line 236 of file CrFwOutStreamUserPar.h.

◆ CR_FW_OUTSTREAM_CONFIGCHECK

#define CR_FW_OUTSTREAM_CONFIGCHECK
Value:
void CrFwOutStreamSocketConfigCheck(FwPrDesc_t prDesc)
Configuration check for the socket-based OutStream.
void CrFwOutStreamStubDummyCheck(FwPrDesc_t prDesc)
Dummy implementation of an initialization or configuration check for an OutStream.
void CrFwBaseCmpDefConfigCheck(FwPrDesc_t prDesc)
Function which performs the default Configuration Check of the CRP.
Definition: CrFwResetProc.c:33
void CrFwServerSocketConfigCheck(FwPrDesc_t prDesc)
Configuration check for the server socket.

The functions implementing the Configuration Check of the OutStream components.

The OutStream components are derived from the Base Component and they therefore inherit its Reset Procedure (see CrFwResetProc.h). The reset procedure must be configured with two actions: the Configuration Action and the Configuration Check. This constant defines the functions implementing the Configuration Checks for the the OutStream components. The items in the array must be function pointers of type: FwPrAction_t. Function CrFwBaseCmpDefConfigCheck can be used as a default implementation for this function.

Adaptation Point:
OST-04: Configuration Check in Reset Procedure of OutStream

Definition at line 209 of file CrFwOutStreamUserPar.h.

◆ CR_FW_OUTSTREAM_DEST_PAIRS

#define CR_FW_OUTSTREAM_DEST_PAIRS
Value:
{{1,0},\
{2,0},\
{3,2},\
{4,3},\
{5,4},\
{6,5},\
{7,6},\
{8,1}}

The association of destinations to OutStreams.

An OutStream is responsible for routing commands or reports to one or more destinations. Each element of this array consists of a pair (dest, outStreamId) where outStreamId is the identifier of the OutStream correponding to destination dest. The value of the outStreamId must be smaller than CR_FW_NOF_OUTSTREAM. This is checked by the CrFwAuxOutStreamConfigCheck function.

The size of this array must be equal to CR_FW_OUTSTREAM_NOF_DEST.

Adaptation Point:

OSR-07: Get OutStream Operation of OutStreamRegistry

OST-15: Association of Packet Destinations to their OutStreams

Definition at line 68 of file CrFwOutStreamUserPar.h.

◆ CR_FW_OUTSTREAM_INITACTION

#define CR_FW_OUTSTREAM_INITACTION
Value:
void CrFwClientSocketInitAction(FwPrDesc_t prDesc)
Initialization action for the client socket.
void CrFwOutStreamDefInitAction(FwPrDesc_t prDesc)
Default initialization action for an OutStream.
void CrFwOutStreamSocketInitAction(FwPrDesc_t prDesc)
Initialization action for the socket-based OutStream.
void CrFwOutStreamStubInitAction(FwPrDesc_t prDesc)
Dummy implementation of a configuration action for an OutStream.
void CrFwServerSocketInitAction(FwPrDesc_t prDesc)
Initialization action for the server socket.

The functions implementing the Initialization Action of the OutStream components.

The OutStream components are derived from the Base Component and they therefore inherit its Initialization Procedure (see CrFwInitProc.h). The initialization procedure must be configured with two actions: the Initialization Action and the Initialization Check. This constant defines the functions implementing the Initialization Actions for the the OutStream components. The items in the array must be function pointers of type: FwPrAction_t.

Function CrFwOutStreamDefInitAction can be used as a default implementation for this function. This function initializes the internal data structures for the OutStream. An application-specific Initialization Action should therefore include a call to this function.

Adaptation Point:
OST-03: Initialization Action in Initialization Procedure of OutStream

Definition at line 186 of file CrFwOutStreamUserPar.h.

◆ CR_FW_OUTSTREAM_INITCHECK

#define CR_FW_OUTSTREAM_INITCHECK
Value:
void CrFwClientSocketInitCheck(FwPrDesc_t prDesc)
Initialization check for the client socket.
void CrFwBaseCmpDefInitCheck(FwPrDesc_t prDesc)
Function which performs the default Initialization Check of the CIP.
Definition: CrFwInitProc.c:36
void CrFwOutStreamSocketInitCheck(FwPrDesc_t prDesc)
Initialization check for the socket-based OutStream.
void CrFwServerSocketInitCheck(FwPrDesc_t prDesc)
Initialization check for the server socket.

The functions implementing the Initialization Check of the OutStream components.

The OutStream components are derived from the Base Component and they therefore inherit its Initialization Procedure (see CrFwInitProc.h). The initialization procedure must be configured with two actions: the Initialization Action and the Initiation Check. This constant defines the functions implementing the Initialization Checks for the the OutStream components. The items in the array must be function pointers of type: FwPrAction_t. Function CrFwBaseCmpDefInitCheck can be used as a default implementation for this function.

Definition at line 159 of file CrFwOutStreamUserPar.h.

◆ CR_FW_OUTSTREAM_NOF_DEST

#define CR_FW_OUTSTREAM_NOF_DEST   8

Number of destinations for out-going packets.

The destinations are specified in CR_FW_OUTSTREAM_DEST_PAIRS.

Definition at line 51 of file CrFwOutStreamUserPar.h.

◆ CR_FW_OUTSTREAM_NOF_GROUPS

#define CR_FW_OUTSTREAM_NOF_GROUPS   2

The number of groups managed by the OutStream components.

The number of groups must be a positive integer. The packet group identifiers are non-negative integers in increasing order starting at zero (i.e. they are: 0, 1, 2, ...CR_FW_OUTSTREAM_NOF_GROUPS-1). Thus, only packet group identifiers smaller than CR_FW_OUTSTREAM_NOF_GROUPS are legal. If a packet with an illegal group attribute is passed to an OutStream, the error condition crOutStreamIllGroup is declared.

The number of groups defined in this file are those used for the test cases of CrFwOutStreamTestCases.h.

Definition at line 106 of file CrFwOutStreamUserPar.h.

◆ CR_FW_OUTSTREAM_PCKTHANDOVER

#define CR_FW_OUTSTREAM_PCKTHANDOVER
Value:
CrFwBool_t CrFwClientSocketPcktHandover(CrFwPckt_t pckt)
Function implementing the hand-over operation for the client socket.
CrFwBool_t CrFwOutStreamSocketPcktHandover(CrFwPckt_t pckt)
Function implementing the hand-over operation for the socket-based OutStream.
CrFwBool_t CrFwOutStreamStubPcktHandover(CrFwPckt_t pckt)
Stub function implementing the hand-over operation for the OutStream.
CrFwBool_t CrFwServerSocketPcktHandover(CrFwPckt_t pckt)
Function implementing the hand-over operation for the server socket.

The functions implementing the packet hand-over operations of the OutStream components.

Each OutStream component needs to be able to hand-over a packet to the middleware. The function implementing this packet hand-over operation is one of the adaptation points of the framework. This array defines the packet hand-over operations for the OutStream. The items in the arrays must be function pointers of type: CrFwPcktHandover_t. No default is defined at framework level for this function.

The packet handover functions defined in this file are those used for the test cases of CrFwOutStreamTestCases.h.

Adaptation Point:
OST-08: Packet Hand-Over Operation of OutStream

Definition at line 138 of file CrFwOutStreamUserPar.h.

◆ CR_FW_OUTSTREAM_PQSIZE

#define CR_FW_OUTSTREAM_PQSIZE   {3,3,3,3,5,5,5}

The sizes of the packet queues in the OutStream component.

Each OutStream has one packet queue. This constant defines the size of the packet queue of the i-th OutStream. The size of the packet queue represents the maximum number of packets which may remain pending in the packet queue. The size of a packet queue must be a positive integer (i.e. it is not legal to define a zero-size packet queue).

The packet sizes defined in this file are those used for the test cases of CrFwOutStreamTestCases.h.

Adaptation Point:
OST-01: Packet Queue Size for OutStream

Definition at line 91 of file CrFwOutStreamUserPar.h.

◆ CR_FW_OUTSTREAM_SET_DTS

#define CR_FW_OUTSTREAM_SET_DTS   &CrFwOutStreamDefSetDTS

Pointer to Set DTS function which populates the DTS_SET for the OutStreams.

The DTS_SET set holds the triplets (d,t,s) where d is a destination identifier, t is a service type and s is a service sub-type. The elements of DTS_SET are those for which the OutStreams maintain a type counter.

A default value of the Set DTS function is provided by function CrFwOutStreamDefSetDTS. The Set DTS function must be a function pointers of type: CrFwSetDst_t.

Adaptation Point:
OST-11: Type Counter Set DST_SET

Definition at line 121 of file CrFwOutStreamUserPar.h.

◆ CR_FW_OUTSTREAM_SHUTDOWNACTION

#define CR_FW_OUTSTREAM_SHUTDOWNACTION
Value:
void CrFwClientSocketShutdownAction(FwSmDesc_t smDesc)
Shutdown action for the client socket.
void CrFwOutStreamDefShutdownAction(FwSmDesc_t smDesc)
Default shutdown action for an OutStream.
void CrFwOutStreamSocketShutdownAction(FwSmDesc_t smDesc)
Shutdown action for the socket-based OutStream.
void CrFwOutStreamStubShutdown(FwSmDesc_t smDesc)
Stub function implementing the shutdown operation for an OutStream.
void CrFwServerSocketShutdownAction(FwSmDesc_t smDesc)
Shutdown action for the server socket.

The functions implementing the Shutdown Action of the OutStream components.

The OutStream components are derived from the Base Component and they therefore inherit its Shutdown Action (see CrFwBaseCmp.h). This constant defines the shutdown functions for the the OutStream components. The items in the array must be function pointers of type: FwSmAction_t.

Function CrFwOutStreamDefShutdownAction can be used as a default implementation for this function. This function releases the memory resources used by the OutStream. An application-specific Shutdown Action should therefore include a call to this function.

Adaptation Point:
OST-06: Shutdown Action in OutStream

Definition at line 260 of file CrFwOutStreamUserPar.h.

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