CORDET Framework - C2 Implementation
|
Implementation of InRegistry component. More...
Go to the source code of this file.
Data Structures | |
struct | CrFwTrackedState_t |
An instance of this type holds the information about an incoming command or report which is being tracked by the InRegistry. More... | |
Functions | |
static void | InRegistryConfigAction (FwPrDesc_t resetPr) |
Configuration action for InRegistry. More... | |
static void | InRegistryShutdownAction (FwSmDesc_t smDesc) |
Shutdown action for InRegistry. More... | |
FwSmDesc_t | CrFwInRegistryMake () |
Factory function for the singleton instance of the InRegistry. More... | |
void | CrFwInRegistryStartTracking (FwSmDesc_t inCmp) |
Ask the InRegistry to start tracking an incoming command or report. More... | |
void | CrFwInRegistryUpdateState (FwSmDesc_t inCmp, CrFwInRegistryCmdRepState_t newState) |
Ask the InRegistry to update the state of an incoming command or report. More... | |
CrFwInRegistryCmdRepState_t | CrFwInRegistryGetState (CrFwInstanceId_t cmdRepId) |
Query the InRegistry for the state of an incoming command or report. More... | |
Variables | |
static CrFwTrackedState_t | cmdRepState [CR_FW_INREGISTRY_N] |
Array to track the state of incoming commands or reports. | |
static CrFwTrackingIndex_t | cmdRepStateIndex = 0 |
The index of the most recent entry in cmdRepState . | |
static FwSmDesc_t | inRegistry = NULL |
The InRegistry singleton. | |
static CrFwCmpData_t | inRegistryData |
The data for the InRegistry singleton. | |
Implementation of InRegistry component.
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 CrFwInRegistry.c.
CrFwInRegistryCmdRepState_t CrFwInRegistryGetState | ( | CrFwInstanceId_t | cmdRepId | ) |
Query the InRegistry for the state of an incoming command or report.
If the specified index does not correspond to any command or report being tracked by the InRegistry, a value of crInRegistryNotTracked
is returned. This function searches all locations in the InRegistry in sequence until it finds the incoming command or report.
cmdRepId | the instance identifier of the incoming command or report. |
crInRegistryNotTracked
if the command or report is not tracked) Definition at line 162 of file CrFwInRegistry.c.
FwSmDesc_t CrFwInRegistryMake | ( | ) |
Factory function for the singleton instance of the InRegistry.
The first time this function is called, it creates and configures the InRegistry. Subsequent calls returns the same singleton instance. The first time this function is called, it returns the InRegistry in state CREATED.
If the creation or the configuration of the InRegistry fails, the function returns NULL.
Definition at line 78 of file CrFwInRegistry.c.
void CrFwInRegistryStartTracking | ( | FwSmDesc_t | inCmp | ) |
Ask the InRegistry to start tracking an incoming command or report.
The InRegistry tracks the state of the last N incoming command or reports to have been loaded with this function. Initially, when this function is called, the incoming command or report is placed in state PENDING.
This function runs the procedure in the left-hand side of the activity diagram shown in the figure.
inCmp | the incoming command or report to be tracked |
Definition at line 121 of file CrFwInRegistry.c.
void CrFwInRegistryUpdateState | ( | FwSmDesc_t | inCmp, |
CrFwInRegistryCmdRepState_t | newState | ||
) |
Ask the InRegistry to update the state of an incoming command or report.
If the argument component is not tracked by the InRegistry (perhaps because too many commands and reports have been added to the list of tracked components), nothing is done. This function runs the procedure in the right-hand side of the activity diagram shown in the figure.
inCmp | the incoming command or report to be tracked |
newState | the new state of the incoming command or report |
Definition at line 143 of file CrFwInRegistry.c.
|
static |
Configuration action for InRegistry.
This function resets the queue of tracked commands and reports. The outcome of the configuration action is always: "successful"
resetPr | the Configuration Procedure of the InRegistry |
Definition at line 186 of file CrFwInRegistry.c.
|
static |
Shutdown action for InRegistry.
This function resets the queue of tracked commands and reports.
smDesc | the InRegistry state machine |
Definition at line 199 of file CrFwInRegistry.c.