CORDET Framework - C2 Implementation
|
Implementation of InManager State Machine. More...
Go to the source code of this file.
Functions | |
static void | InLoaderExecAction (FwPrDesc_t execPr) |
Implement the logic of the InLoader Execution Procedure (see figure below). More... | |
static void | InLoaderLoadCmdRep (CrFwPckt_t pckt) |
Load the command or report encapsulated in the argument packet into an InManager. More... | |
FwSmDesc_t | CrFwInLoaderMake () |
Factory function to retrieve the state machine implementing the InLoader singleton component. More... | |
void | CrFwInLoaderSetInStream (FwSmDesc_t inStream) |
Set the InStream from which the packets will be retrieved the next time the InLoader is executed. More... | |
CrFwDestSrc_t | CrFwInLoaderDefGetReroutingDestination (CrFwDestSrc_t pcktDest) |
Default implementation of the function which checks the legality of a destination and returns the re-routing destination. More... | |
CrFwDestSrc_t | CrFwInLoaderDefNoRerouting (CrFwDestSrc_t pcktDest) |
Default implementation of the function which checks the legality of a destination and returns the re-routing destination. More... | |
CrFwInstanceId_t | CrFwInLoaderDefGetInManager (CrFwServType_t servType, CrFwServSubType_t servSubType, CrFwDiscriminant_t discriminant, CrFwCmdRepType_t cmdRepFlag) |
Default implementation of the function which selects the InManager to which an incoming InReport or InCommand must be loaded. More... | |
Variables | |
static FwSmDesc_t | inLoader = NULL |
The InLoader singleton. | |
static CrFwCmpData_t | inLoaderData |
The data structure for the InLoader. | |
static CrFwInLoaderData_t | inLoaderCmpSpecificData |
The component-specific data for the InLoader. | |
static CrFwInLoaderGetReroutingDest_t | getReroutingDest = CR_FW_INLOADER_DET_REROUTING_DEST |
Pointer to function which checks the legality of the packet destination. More... | |
static CrFwInLoaderGetInManager_t | getInManager = CR_FW_INLOADER_SEL_INMANAGER |
Pointer to function which selects the InManager. More... | |
Implementation of InManager State Machine.
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 CrFwInLoader.c.
CrFwInstanceId_t CrFwInLoaderDefGetInManager | ( | CrFwServType_t | servType, |
CrFwServSubType_t | servSubType, | ||
CrFwDiscriminant_t | discriminant, | ||
CrFwCmdRepType_t | cmdRepFlag | ||
) |
Default implementation of the function which selects the InManager to which an incoming InReport or InCommand must be loaded.
This default implementation returns 0 if the component to be loaded is an InCommand (namely if argument cmdRepFlag
is equal to crCmdType
) and it returns 1 if the component to be loaded is an InReport (namely if argument cmdRepFlag
is equal to crRepType
). This function must conform to the prototype defined by CrFwInLoaderGetInManager_t
.
servType | the service type of the incoming InCommand or InReport. |
servSubType | the service sub-type of the incoming InCommand or InReport. |
discriminant | the discriminant of the incoming InCommand or InReport. |
cmdRepFlag | a flag indicating whether the item to be loaded is an InCommand or an InReport. |
Definition at line 241 of file CrFwInLoader.c.
CrFwDestSrc_t CrFwInLoaderDefGetReroutingDestination | ( | CrFwDestSrc_t | pcktDest | ) |
Default implementation of the function which checks the legality of a destination and returns the re-routing destination.
This default implementation always assumes that the argument destination is valid and it returns it unchanged. This default implementation is suitable for applications which are acting as gateways with one level of indirection (i.e. a situation where a packet is generated by application A for application B as its final destination, but the packet is sent to application C as a re-routing destination so that the packet travels from A to B and then from B to C). This function must conform to the prototype defined by CrFwInLoaderGetReroutingDest_t
.
pcktDest | the packet destination. |
Definition at line 230 of file CrFwInLoader.c.
CrFwDestSrc_t CrFwInLoaderDefNoRerouting | ( | CrFwDestSrc_t | pcktDest | ) |
Default implementation of the function which checks the legality of a destination and returns the re-routing destination.
This default implementation always assumes that the argument destination is invalid and therefore it always returns zero. This default implementation is suitable for applications which do not perform any packet re-routing (i.e. applications where a packet is always sent to its final destination). This function must conform to the prototype defined by CrFwInLoaderGetReroutingDest_t
.
pcktDest | the packet destination. |
Definition at line 235 of file CrFwInLoader.c.
FwSmDesc_t CrFwInLoaderMake | ( | ) |
Factory function to retrieve the state machine implementing the InLoader singleton component.
The first time this function is called, it creates the InLoader State Machine singleton instance. Subsequent calls returns the same instance.
The first time this function is called, it returns the InLoader State Machine after it has been started but before it has been initialized and configured.
Definition at line 86 of file CrFwInLoader.c.
void CrFwInLoaderSetInStream | ( | FwSmDesc_t | inStream | ) |
Set the InStream from which the packets will be retrieved the next time the InLoader is executed.
inStream | the InStream from which the packets will be retrieved the next time the InLoader is executed. |
Definition at line 128 of file CrFwInLoader.c.
|
static |
Implement the logic of the InLoader Execution Procedure (see figure below).
This function is executed every time the Execution Procedure of the InLoader is executed.
execPr | the Execution Procedure of the InManager |
Definition at line 133 of file CrFwInLoader.c.
|
static |
Load the command or report encapsulated in the argument packet into an InManager.
This function implements the logic shown in the figure.
pckt | the packet to be loaded in the InManager |
Definition at line 168 of file CrFwInLoader.c.
|
static |
Pointer to function which selects the InManager.
Definition at line 65 of file CrFwInLoader.c.
|
static |
Pointer to function which checks the legality of the packet destination.
Definition at line 62 of file CrFwInLoader.c.