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

Detailed Description

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.

CrPsLpt.png
Author
FW Profile code generator version 5.01
Date
Created on: Nov 26 2017 12:16:43
Author
Christian Reimers chris.nosp@m.tian.nosp@m..reim.nosp@m.ers@.nosp@m.univi.nosp@m.e.ac.nosp@m..at
Markus Rockenbauer marku.nosp@m.s.ro.nosp@m.ckenb.nosp@m.auer.nosp@m.@univ.nosp@m.ie.a.nosp@m.c.at

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.

Macro Definition Documentation

#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.

Function Documentation

FwSmDesc_t CrPsLptCreate ( void *  smData)

Create a new state machine descriptor.

This interface creates the state machine descriptor dynamically.

Parameters
smDatathe 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).
Returns
the pointer to the state machine descriptor

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;
Parameters
smDescthe 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;
Parameters
smDescthe 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--;
Parameters
smDescthe 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
Parameters
smDescthe 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

Parameters
smDescthe 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

Parameters
smDescthe state machine descriptor
Returns
1 if the guard is fulfilled, otherwise 0.

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

Parameters
smDescthe state machine descriptor
Returns
1 if the guard is fulfilled, otherwise 0.

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

Parameters
smDescthe 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

Parameters
smDescthe 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;
Parameters
smDescthe state machine descriptor

Definition at line 163 of file CrPsLptFunc.c.

void CrPsLptUpTransferExitAction ( FwSmDesc_t  smDesc)

Exit Action for the state UP_TRANSFER.

nOfDownlinks–

Parameters
smDescthe state machine descriptor

Definition at line 216 of file CrPsLptFunc.c.

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