CORDET Framework - C2 Implementation
CrFwInStreamUserPar.h File Reference

User-modifiable parameters for the InStream components (see CrFwInStream.h). More...

Go to the source code of this file.

Macros

#define CR_FW_NOF_INSTREAM   7
 The number of InStream components in the application. More...
 
#define CR_FW_INSTREAM_PQSIZE   {3,3,3,3,5,6,7}
 The sizes of the packet queues in the InStream components. More...
 
#define CR_FW_INSTREAM_NOF_GROUPS   2
 The number of groups managed by the InStream components. More...
 
#define CR_FW_INSTREAM_NOF_SRCS   8
 The number of distinct sources from which the InStream components may receive packets. More...
 
#define CR_FW_INSTREAM_SRC_PAIRS
 The association of sources to InStreams. More...
 
#define CR_FW_INSTREAM_PCKTCOLLECT
 The functions implementing the Packet Collect Operations of the InStream components. More...
 
#define CR_FW_INSTREAM_PCKTAVAILCHECK
 The functions implementing the Packet Available Check Operations of the InStream components. More...
 
#define CR_FW_INSTREAM_INITCHECK
 The functions implementing the Initialization Check of the InStream components. More...
 
#define CR_FW_INSTREAM_INITACTION
 The functions implementing the Initialization Action of the InStream components. More...
 
#define CR_FW_INSTREAM_CONFIGCHECK
 The functions implementing the Configuration Check of the InStream components. More...
 
#define CR_FW_INSTREAM_CONFIGACTION
 The functions implementing the Configuration Action of the InStream components. More...
 
#define CR_FW_INSTREAM_SHUTDOWNACTION
 The functions implementing the Shutdown Action of the InStream components. More...
 

Detailed Description

User-modifiable parameters for the InStream components (see CrFwInStream.h).

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

The parameters defined in this file determine the configuration of the InStream 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 CrFwInStreamUserPar.h.

Macro Definition Documentation

◆ CR_FW_INSTREAM_CONFIGACTION

#define CR_FW_INSTREAM_CONFIGACTION
Value:
void CrFwClientSocketConfigAction(FwPrDesc_t prDesc)
Configuration action for the client socket.
void CrFwInStreamDefConfigAction(FwPrDesc_t prDesc)
Default configuration action for an InStream.
Definition: CrFwInStream.c:298
void CrFwInStreamSocketConfigAction(FwPrDesc_t prDesc)
Configuration action for the socket-based InStream.
void CrFwInStreamStubConfigAction(FwPrDesc_t prDesc)
Dummy implementation of a configuration action.
void CrFwServerSocketConfigAction(FwPrDesc_t prDesc)
Configuration action for the server socket.

The functions implementing the Configuration Action of the InStream components.

The InStream 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 InStream components. The items in the array must be function pointers of type: FwPrAction_t.

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

The first three Configuration Action functions defined in this file are the default Configuration Action functions CrFwInStreamDefConfigAction offered by the InStream component. The fourth Configuration Action which is defined in the stub InStream of CrFwInStreamStub.h and it is used to verify initialization failures. The last Configuration Action is defined in the Socket-Based InStream of CrFwInStreamSocket.h. Applications may need to use different functions which also cover the configuration of the middleware.

Adaptation Point:
IST-04: Configuration Action in Initialization Procedure of InStream

Definition at line 286 of file CrFwInStreamUserPar.h.

◆ CR_FW_INSTREAM_CONFIGCHECK

#define CR_FW_INSTREAM_CONFIGCHECK
Value:
void CrFwInStreamStubDummyCheck(FwPrDesc_t prDesc)
Dummy implementation of an initialization or configuration check.
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 InStream components.

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

The Configuration Check functions defined in this file are the default Configuration Check functions CrFwBaseCmpDefConfigCheck offered by the Base Component with the exception of the fourth Configuration Check which is defined in the test suite as a dummy check to verify configuration failures. Applications may need to use different functions which also cover the configuration of the middleware.

Definition at line 249 of file CrFwInStreamUserPar.h.

◆ CR_FW_INSTREAM_INITACTION

#define CR_FW_INSTREAM_INITACTION
Value:
void CrFwClientSocketInitAction(FwPrDesc_t prDesc)
Initialization action for the client socket.
void CrFwInStreamDefInitAction(FwPrDesc_t prDesc)
Default initialization action for an InStream.
Definition: CrFwInStream.c:324
void CrFwInStreamSocketInitAction(FwPrDesc_t prDesc)
Initialization action for the socket-based InStream.
void CrFwInStreamStubInitAction(FwPrDesc_t prDesc)
Dummy implementation of an initialization action.
void CrFwServerSocketInitAction(FwPrDesc_t prDesc)
Initialization action for the server socket.

The functions implementing the Initialization Action of the InStream components.

The InStream 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 InStream components. The items in the array must be function pointers of type: FwPrAction_t.

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

The first three Initialization Action functions defined in this file are the default Initialization Action functions CrFwInStreamDefInitAction offered by the InStream component. The fourth Initialization Action is defined in the stub InStream of CrFwInStreamStub.h and it is used to verify initialization failures. The last Initialization Action is defined in the Socket-Based InStream of CrFwInStreamSocket.h. Applications may need to use different functions which also include the initialization of the middleware.

Adaptation Point:
IST-03: Initialization Action in Initialization Procedure of InStream

Definition at line 219 of file CrFwInStreamUserPar.h.

◆ CR_FW_INSTREAM_INITCHECK

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

The functions implementing the Initialization Check of the InStream components.

The InStream 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 Checks for the the InStream 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.

The Initialization Check functions defined for the first 3 InStreams are the default Initialization Check functions CrFwBaseCmpDefInitCheck offered by the base component. The fourth Initialization Check is defined in the stub InStream of CrFwInStreamStub.h and it is used to verify initialization check failures. The last Initialization Check is defined in the Socket-Based InStream of CrFwInStreamSocket.h. Applications may need to use different functions which also cover the initialization of the middleware.

Adaptation Point:
IST-02: Initialization Check in Initialization Procedure of InStream

Definition at line 182 of file CrFwInStreamUserPar.h.

◆ CR_FW_INSTREAM_NOF_GROUPS

#define CR_FW_INSTREAM_NOF_GROUPS   2

The number of groups managed by the InStream components.

The number of groups must be a positive integer.

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

Definition at line 72 of file CrFwInStreamUserPar.h.

◆ CR_FW_INSTREAM_NOF_SRCS

#define CR_FW_INSTREAM_NOF_SRCS   8

The number of distinct sources from which the InStream components may receive packets.

The number of sources must be a positive integer.

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

Definition at line 82 of file CrFwInStreamUserPar.h.

◆ CR_FW_INSTREAM_PCKTAVAILCHECK

#define CR_FW_INSTREAM_PCKTAVAILCHECK
Value:
CrFwBool_t CrFwClientSocketIsPcktAvail(CrFwDestSrc_t nofPcktSrc, CrFwDestSrc_t *pcktSrcs)
Function implementing the Packet Available Check Operation for the client socket.
CrFwBool_t CrFwInStreamSocketIsPcktAvail(CrFwDestSrc_t nofSrc, CrFwDestSrc_t *srcs)
Function implementing the Packet Available Check Operation for the InStream.
CrFwBool_t CrFwInStreamStubIsPcktAvail(CrFwDestSrc_t nofSrc, CrFwDestSrc_t *srcs)
Stub function implementing the packet available check operation for the InStream (see CrFwInStream....
CrFwBool_t CrFwServerSocketIsPcktAvail(CrFwDestSrc_t nofPcktSrc, CrFwDestSrc_t *pcktSrcs)
Function implementing the Packet Available Check Operation for the server socket.

The functions implementing the Packet Available Check Operations of the InStream components.

Each InStream component needs to be able to check whether the middleware is in state WAITING (no packet is available for collection) or PCKT_AVAIL (a packet is available for collection). The functions which query the middleware to check whether a packet is available or not is one of the adaptation points of the framework. This array defines the Packet Available Check Operations for the InStream. The items in the array must be function pointers of type: CrFwPcktAvailCheck_t.

The packet available check operations defined in this file are the ones provided by the InStream stub of CrFwInStreamStub.h and by the socket-based InStream of CrFwInStreamSocket.h.

Adaptation Point:
IST-12: Packet Available Check Operation for InStream

Definition at line 148 of file CrFwInStreamUserPar.h.

◆ CR_FW_INSTREAM_PCKTCOLLECT

#define CR_FW_INSTREAM_PCKTCOLLECT
Value:
CrFwPckt_t CrFwClientSocketPcktCollect(CrFwDestSrc_t nofPcktSrc, CrFwDestSrc_t *pcktSrcs)
Function implementing the Packet Collect Operation for the client socket.
CrFwPckt_t CrFwInStreamSocketPcktCollect(CrFwDestSrc_t nofSrc, CrFwDestSrc_t *srcs)
Function implementing the Packet Collect Operation for the socket-based InStream.
CrFwPckt_t CrFwInStreamStubPcktCollect(CrFwDestSrc_t nofSrc, CrFwDestSrc_t *srcs)
Stub function implementing the packet collect operation for the InStream (see CrFwInStream....
CrFwPckt_t CrFwServerSocketPcktCollect(CrFwDestSrc_t nofPcktSrc, CrFwDestSrc_t *pcktSrcs)
Function implementing the Packet Collect Operation for the server socket.

The functions implementing the Packet Collect Operations of the InStream components.

Each InStream component needs to be able to collect a packet from the middleware. The function implementing this packet collect operation is one of the adaptation points of the framework. This array defines the packet collect operations for the InStream. The items in the arrays must be function pointers of type: CrFwPcktCollect_t.

The packet collection operations defined in this file are the ones provided by the InStream stub of CrFwInStreamStub.h and by the socket-based InStream of CrFwInStreamSocket.h.

Adaptation Point:
IST-11: Packet Collect Operation for InStream

Definition at line 122 of file CrFwInStreamUserPar.h.

◆ CR_FW_INSTREAM_PQSIZE

#define CR_FW_INSTREAM_PQSIZE   {3,3,3,3,5,6,7}

The sizes of the packet queues in the InStream components.

Each InStream has one packet queue. This constant defines the size of the packet queue of the i-th InStream. 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 queue sizes defined in this file are those used for the test cases of CrFwInStreamTestCases.h.

Adaptation Point:
IST-01: Size of the Packet Queue in InStream

Definition at line 63 of file CrFwInStreamUserPar.h.

◆ CR_FW_INSTREAM_SHUTDOWNACTION

#define CR_FW_INSTREAM_SHUTDOWNACTION
Value:
void CrFwClientSocketShutdownAction(FwSmDesc_t smDesc)
Shutdown action for the client socket.
void CrFwInStreamDefShutdownAction(FwSmDesc_t smDesc)
Default shutdown action for an InStream.
Definition: CrFwInStream.c:311
void CrFwInStreamSocketShutdownAction(FwSmDesc_t smDesc)
Shutdown action for the socket-based InStream.
void CrFwInStreamStubShutdown(FwSmDesc_t smDesc)
Stub function implementing the shutdown operation for an InStream (see CrFwInStream....
void CrFwServerSocketShutdownAction(FwSmDesc_t smDesc)
Shutdown action for the server socket.

The functions implementing the Shutdown Action of the InStream components.

The InStream 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 InStream components. The items in the array must be function pointers of type: FwSmAction_t.

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

The first, the third and the fourth Shutdown Action functions defined in this file are the default Shutdown Action functions CrFwInStreamDefShutdownAction offered by the InStream component. The second shutdown action is defined in the stub InStream of CrFwInStreamStub.h and it is used to verify initialization failures. The last Shutdown Action is defined in the Socket-Based InStream of CrFwInStreamSocket.h. Applications may need to use different functions which also cover the shutdown of the middleware.

Adaptation Point:
IST-05: Shutdown Action in Initialization Procedure of InStream

Definition at line 321 of file CrFwInStreamUserPar.h.

◆ CR_FW_INSTREAM_SRC_PAIRS

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

The association of sources to InStreams.

An InStream is responsible for managing incoming commands or reports
from one or more sources. Each element of this array consists of a pair (source, inStreamId) where inStreamId is the identifier of the InStream correponding to source 'source'. The value of the InStreamId must be smaller than CR_FW_NOF_INSTREAM. This is checked by the CrFwAuxInStreamConfigCheck function.

The size of this array must be equal to CR_FW_INSTREAM_NOF_SRCS.

Adaptation Point:
IST-14: Association of Packet Sources to their InStreams

Definition at line 98 of file CrFwInStreamUserPar.h.

◆ CR_FW_NOF_INSTREAM

#define CR_FW_NOF_INSTREAM   7

The number of InStream components in the application.

The value of this constant must be smaller than the range of the CrFwCounterU1_t integer type.

The number of InStream components defined in this file is the one used for the test cases of CrFwInStreamTestCases.h.

Definition at line 47 of file CrFwInStreamUserPar.h.

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