CORDET Framework - C2 Implementation
|
Interface for reporting the outcome of the processing of an InCommand. More...
Go to the source code of this file.
Enumerations | |
enum | CrFwRepInCmdOutcome_t { crCmdAckAccFail = 1, crCmdAckAccSucc = 2, crCmdAckStrFail = 3, crCmdAckStrSucc = 4, crCmdAckPrgFail = 5, crCmdAckPrgSucc = 6, crCmdAckTrmFail = 7, crCmdAckTrmSucc = 8, crCmdAckCreFail = 9, crCmdAckLdFail = 10 } |
Enumerated type for the outcome of the processing of an incoming command. More... | |
Functions | |
void | CrFwRepInCmdOutcome (CrFwRepInCmdOutcome_t outcome, CrFwInstanceId_t instanceId, CrFwServType_t servType, CrFwServSubType_t servSubType, CrFwDiscriminant_t disc, CrFwOutcome_t failCode, FwSmDesc_t inCmd) |
Report the outcome of the processing of an InCommand. More... | |
void | CrFwRepInCmdOutcomeCreFail (CrFwRepInCmdOutcome_t outcome, CrFwOutcome_t failCode, CrFwPckt_t pckt) |
Report the a "creation failure" outcome for the processing of a packet carrying an InCommand. More... | |
Interface for reporting the outcome of the processing of an InCommand.
The InCommand arrives at the framework interface as a packet. Its processing can have one of the following outcomes:
The command outcome is reported either by the InLoader or by the InCommand itself. This interface declares functions through which these components can report the outcome of an InCommand.
The InCommand outcome report generated by the functions declared in this file is defined by the following attributes:
In general, the implementation of this interface is entirely application-specific but a simple default implementation is provided in CrFwInCmdOutcome.c
. This default implementation is primarily intended for testing and demonstration purposes.
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 CrFwRepInCmdOutcome.h.
Enumerated type for the outcome of the processing of an incoming command.
An incoming command goes through several processing stages. At the end of each stage, an outcome report is generated by either function CrFwRepInCmdOutcome
or CrFwRepInCmdOutcomeCreFail
. The outcome of the processing of the incoming command is determined as follows:
CrFwBaseCmp.h
) receives the packet encapsulating the incoming command and attempts to create an InCommand component to hold the command. If the attempt fails (either because there are not enough resources to build the InCommand or because its type/sub-type/discriminant are not recognized), the processing of the InCommand is terminated with outcome "Creation Failure"CrFwInManager.h
). If the load operation fails, the processing of the InCommand is terminaed with outcome "Load Failure". If, instead, the load operation succeeds, the outcome report "Acceptance Success" is generated.CrFwInCmd.h
). Depending on the success or failure of this Start Check, an outcome of either "Start Success" or "Start Failure" is generated by the InCommand component.Definition at line 97 of file CrFwRepInCmdOutcome.h.
void CrFwRepInCmdOutcome | ( | CrFwRepInCmdOutcome_t | outcome, |
CrFwInstanceId_t | instanceId, | ||
CrFwServType_t | servType, | ||
CrFwServSubType_t | servSubType, | ||
CrFwDiscriminant_t | disc, | ||
CrFwOutcome_t | failCode, | ||
FwSmDesc_t | inCmd | ||
) |
Report the outcome of the processing of an InCommand.
The last parameter of this function is the InCommand whose outcome is being reported. This is a pointer variable. The owner of the pointer is the caller of the function. The function can use it in read-only mode to access the values of the command parameters.
outcome | the outcome of the InCommand processing |
instanceId | the instance identifier of the InCommand |
servType | the service type of the InCommand |
servSubType | the service sub-type of the InCommand |
disc | the discriminant of the InCommand |
failCode | the failure code (don't care in case of a "successful" outcome) |
inCmd | the InCommand component whose outcome is being reported |
Definition at line 80 of file CrFwRepInCmdOutcome.c.
void CrFwRepInCmdOutcomeCreFail | ( | CrFwRepInCmdOutcome_t | outcome, |
CrFwOutcome_t | failCode, | ||
CrFwPckt_t | pckt | ||
) |
Report the a "creation failure" outcome for the processing of a packet carrying an InCommand.
The "creation failure" outcome is declared when a packet carrying an InCommand is received but it is not possible to create an InCommand component to encapsulate it. The failure to create the InCommand may be due either to a lack of resources in the application or to the fact that the command kind as given by its [type, sub-type, discriminant] is illegal. The last parameter of this function is the packet which carries the incoming command for which no InCommand component could be created. This is a pointer variable. The owner of the pointer is the caller of the function. The function can use it in read-only mode to access the values of the command parameters.
outcome | the outcome of the packet processing (always equal to crCmdAckCreFail in this version of the framework) |
failCode | the failure code |
pckt | the packet carrying the InCommand |
Definition at line 95 of file CrFwRepInCmdOutcome.c.