CORDET Framework - C2 Implementation
|
Create one instance of the CrPsLpt state machine. More...
Go to the source code of this file.
Macros | |
#define | CrPsLpt_DOWN_TRANSFER (1) /* The identifier of state DOWN_TRANSFER in State Machine CrPsLpt */ |
Make sure to include this header file only once. More... | |
#define | CrPsLpt_INACTIVE (2) /* The identifier of state INACTIVE in State Machine CrPsLpt */ |
#define | CrPsLpt_UP_TRANSFER (3) /* The identifier of state UP_TRANSFER in State Machine CrPsLpt */ |
#define | Execute (0) |
The identifiers of transition commands (triggers) | |
#define | Abort (18) |
#define | StartDownTransfer (19) |
#define | StartUpTransfer (20) |
#define | EndUpTransfer (21) |
Functions | |
FwSmDesc_t | CrPsLptCreate (void *smData) |
Create a new state machine descriptor. More... | |
void | CrPsLptDownTransferEntryAction (FwSmDesc_t smDesc) |
Entry Action for the state DOWN_TRANSFER. More... | |
void | CrPsLptDownTransferExitAction (FwSmDesc_t smDesc) |
Exit Action for the state DOWN_TRANSFER. More... | |
void | CrPsLptDownTransferDoAction (FwSmDesc_t smDesc) |
Do Action for the state DOWN_TRANSFER. More... | |
void | CrPsLptUpTransferEntryAction (FwSmDesc_t smDesc) |
Entry Action for the state UP_TRANSFER. More... | |
void | CrPsLptUpTransferExitAction (FwSmDesc_t smDesc) |
Exit Action for the state UP_TRANSFER. More... | |
void | CrPsLptUpTransferDoAction (FwSmDesc_t smDesc) |
Do Action for the state UP_TRANSFER. More... | |
void | CrPsLptGenerateAbortEvent (FwSmDesc_t smDesc) |
Action on the transition from DOWN_TRANSFER to INACTIVE. More... | |
FwSmBool_t | CrPsLptIsTransferFinished (FwSmDesc_t smDesc) |
Guard on the transition from DOWN_TRANSFER to INACTIVE. More... | |
void | CrPsLptLoadReport (FwSmDesc_t smDesc) |
Action on the transition from UP_TRANSFER to INACTIVE. More... | |
FwSmBool_t | CrPsLptIsFailed (FwSmDesc_t smDesc) |
Guard on the transition from UP_TRANSFER to INACTIVE. More... | |
void | CrPsLptInitialization (FwSmDesc_t smDesc) |
Action on the transition from Initial State to INACTIVE. More... | |
Create one instance of the CrPsLpt state machine.
This header file declares the function to create one instance of the CrPsLpt state machine. The state machine is configured with a set of function pointers representing the non-default actions and guards of the state machine. Some of these functions may also be declared in this header file in accordance with the configuration of the state machine in the FW Profile Editor. In the latter case, the user has to provide an implementation for these functions in a user-supplied body file.
This header file has been automatically generated by the FW Profile Editor. The state machine created by this file is shown in the figure below.
last modification: 22.01.2018
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/.
Definition in file CrPsLptCreate.h.
#define CrPsLpt_DOWN_TRANSFER (1) /* The identifier of state DOWN_TRANSFER in State Machine CrPsLpt */ |
Make sure to include this header file only once.
FW Profile function definitions State identifiers
Definition at line 43 of file CrPsLptCreate.h.
FwSmDesc_t CrPsLptCreate | ( | void * | smData | ) |
Create a new state machine descriptor.
This interface creates the state machine descriptor dynamically.
smData | the pointer to the state machine data. A value of NULL is legal (note that the default value of the pointer to the state machine data when the state machine is created is NULL). |
Create a new state machine descriptor.
FW Profile function definitions
Create state machine smDesc
Configure the state machine smDesc
Definition at line 34 of file CrPsLptCreate.c.
void CrPsLptDownTransferDoAction | ( | FwSmDesc_t | smDesc | ) |
Do Action for the state DOWN_TRANSFER.
if (partSeqNmb == 0) Load (13,1) report with lptDest as destination; elseif (partSeqNmb == 1) Load (13,2) report with lptDest as destination; elseif (lptRemSize <= partSize) Load (13,3) report with lptDest as destination;
smDesc | the state machine descriptor |
Definition at line 99 of file CrPsLptFunc.c.
void CrPsLptDownTransferEntryAction | ( | FwSmDesc_t | smDesc | ) |
Entry Action for the state DOWN_TRANSFER.
nOfDownlinks++; partSeqNmb = 1; lptRemSize = lptSize;
smDesc | the state machine descriptor |
Definition at line 58 of file CrPsLptFunc.c.
void CrPsLptDownTransferExitAction | ( | FwSmDesc_t | smDesc | ) |
Exit Action for the state DOWN_TRANSFER.
Increment largeMsgTransId by LPT; nOfDownlinks--;
smDesc | the state machine descriptor |
Definition at line 83 of file CrPsLptFunc.c.
void CrPsLptGenerateAbortEvent | ( | FwSmDesc_t | smDesc | ) |
Action on the transition from DOWN_TRANSFER to INACTIVE.
Generate event EVT_DOWN_ABORT
smDesc | the state machine descriptor |
Definition at line 227 of file CrPsLptFunc.c.
void CrPsLptInitialization | ( | FwSmDesc_t | smDesc | ) |
Action on the transition from Initial State to INACTIVE.
Initialize largeMsgTransId
smDesc | the state machine descriptor |
Definition at line 295 of file CrPsLptFunc.c.
FwSmBool_t CrPsLptIsFailed | ( | FwSmDesc_t | smDesc | ) |
Guard on the transition from UP_TRANSFER to INACTIVE.
lptFailCode != NO_FAIL
smDesc | the state machine descriptor |
Definition at line 281 of file CrPsLptFunc.c.
FwSmBool_t CrPsLptIsTransferFinished | ( | FwSmDesc_t | smDesc | ) |
Guard on the transition from DOWN_TRANSFER to INACTIVE.
Transfer is finished
smDesc | the state machine descriptor |
Definition at line 238 of file CrPsLptFunc.c.
void CrPsLptLoadReport | ( | FwSmDesc_t | smDesc | ) |
Action on the transition from UP_TRANSFER to INACTIVE.
Load (13,16) report
smDesc | the state machine descriptor |
Definition at line 257 of file CrPsLptFunc.c.
void CrPsLptUpTransferDoAction | ( | FwSmDesc_t | smDesc | ) |
Do Action for the state UP_TRANSFER.
if (Flag_1) lptFailCode = TIME_OUT
smDesc | the state machine descriptor |
Definition at line 179 of file CrPsLptFunc.c.
void CrPsLptUpTransferEntryAction | ( | FwSmDesc_t | smDesc | ) |
Entry Action for the state UP_TRANSFER.
nOfUplinks++; lptFailCode = NO_FAIL;
smDesc | the state machine descriptor |
Definition at line 163 of file CrPsLptFunc.c.
void CrPsLptUpTransferExitAction | ( | FwSmDesc_t | smDesc | ) |
Exit Action for the state UP_TRANSFER.
nOfDownlinks–
smDesc | the state machine descriptor |
Definition at line 216 of file CrPsLptFunc.c.