32 #include "CrFwCmpData.h" 35 #include "FwSmConstants.h" 36 #include "FwSmConfig.h" 38 #include "FwPrDCreate.h" 39 #include "FwPrConfig.h" 41 #include "FwPrConstants.h" 63 LptBufferId = DownTransferLptBufferId;
87 LptBufferId = DownTransferLptBufferId;
105 LptBufferId = DownTransferLptBufferId;
167 LptBufferId = UpTransferLptBufferId;
183 time_t coarse_prev, coarse_now;
184 uint16_t fine_prev, fine_now;
188 LptBufferId = UpTransferLptBufferId;
197 coarse_prev = (ts.t[0] << 24) | (ts.t[1] << 16) | (ts.t[2] << 8) | ts.t[3];
198 fine_prev = (ts.t[4] << 7) | (ts.t[5] & 0xfe);
201 coarse_now = (ts.t[0] << 24) | (ts.t[1] << 16) | (ts.t[2] << 8) | ts.t[3];
202 fine_now = (ts.t[4] << 7) | (ts.t[5] & 0xfe);
204 if ((
int)(coarse_now - coarse_prev) > (
int)timeOut)
244 LptBufferId = DownTransferLptBufferId;
285 LptBufferId = UpTransferLptBufferId;
302 for (i=0; i<LPT_N_BUF; i++)
static void setDpnOfDownlinks(CrFwCounterU4_t nOfDownlinks)
Sets the value of the datapool item nOfDownlinks.
CrFwCounterU4_t i
CrPsCmd5EidStart function definitions.
void CrPsLptUpTransferExitAction(FwSmDesc_t smDesc)
Exit Action for the state UP_TRANSFER.
static CrFwCounterU4_t getDpnOfUplinks()
Gets the value of the datapool item nOfUplinks.
#define CR_FW_MAX_PCKT_LENGTH
The maximum size in number of bytes of a packet.
#define CRFW_UNUSED(x)
A macro that can be used to specify that a function parameter is not used.
static CrPsSize_t getDplptRemSizeItem(int i)
Gets the value of the i-th element in the datapool array lptRemSize.
static void setDplargeMsgTransIdItem(int i, CrPsTid_t largeMsgTransId)
Sets the value of the i-th element in the datapool array largeMsgTransId.
#define CRC_LENGTH
The length of CRC.
#define CRPS_LPT_DOWNFIRST_REP
Subtype identifier of the Large Packet Transfer First Downlink Part out-going report packet...
static void setDplptFailCodeItem(int i, CrPsFailCode_t lptFailCode)
Sets the value of the i-th element in the datapool array lptFailCode.
Interface for accessing data pool items.
static CrPsTimeOut_t getDplptTimeOutItem(int i)
Gets the value of the i-th element in the datapool array lptTimeOut.
FwSmDesc_t rep
CrPsCmd3s9Prgr function definitions.
Definition of the OutFactory component.
Header file to define all service and packet identifiers.
Interface for creating and accessing a report or command packet.
Interface through which applications can initialize and execute framework PUS extension components...
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
void CrPsLptLoadReport(FwSmDesc_t smDesc)
Action on the transition from UP_TRANSFER to INACTIVE.
void CrPsLptGenerateAbortEvent(FwSmDesc_t smDesc)
Action on the transition from DOWN_TRANSFER to INACTIVE.
void CrPsLptUpTransferDoAction(FwSmDesc_t smDesc)
Do Action for the state UP_TRANSFER.
Create one instance of the CrPsLpt state machine.
static void setDpnOfUplinks(CrFwCounterU4_t nOfUplinks)
Sets the value of the datapool item nOfUplinks.
static CrPsFailCode_t getDplptFailCodeItem(int i)
Gets the value of the i-th element in the datapool array lptFailCode.
static void setDplptRemSizeItem(int i, CrPsSize_t lptRemSize)
Sets the value of the i-th element in the datapool array lptRemSize.
static CrFwCounterU4_t getDpnOfDownlinks()
Gets the value of the datapool item nOfDownlinks.
void CrPsLptDownTransferDoAction(FwSmDesc_t smDesc)
Do Action for the state DOWN_TRANSFER.
static CrPsTid_t getDplargeMsgTransIdItem(int i)
Gets the value of the i-th element in the datapool array largeMsgTransId.
void CrFwOutLoaderLoad(FwSmDesc_t outCmp)
Load an OutComponent into its OutManager.
#define CRPS_LPT_UPABORT_REP
Subtype identifier of the Large Packet Transfer Abort Uplink out-going report packet.
The Outfactory failed to make the component (see CrPsRepErr.h)
void CrPsLptUpTransferEntryAction(FwSmDesc_t smDesc)
Entry Action for the state UP_TRANSFER.
#define CRPS_LPT_DOWNINTER_REP
Subtype identifier of the Large Packet Transfer Intermediate Downlink Part out-going report packet...
#define CRPS_LPT_DOWNLAST_REP
Subtype identifier of the Large Packet Transfer Last Downlink Part out-going report packet...
static CrPsSize_t getDplptSizeItem(int i)
Gets the value of the i-th element in the datapool array lptSize.
CrFwBool_t FirstPartFlag
CrPsLpt function definitions.
FwSmBool_t CrPsLptIsTransferFinished(FwSmDesc_t smDesc)
Guard on the transition from DOWN_TRANSFER to INACTIVE.
#define CRPS_LPT
Type identifier of the Large Packet Transfer Service.
void CrPsRepErr(CrPsRepErrCode_t errCode, CrFwServType_t repType, CrFwServSubType_t repSubType, CrFwDiscriminant_t repDiscriminant)
Report an error which has no parameters attached to it.
static CrPsDestSrc_t getDplptSrcItem(int i)
Gets the value of the i-th element in the datapool array lptSrc.
FwSmBool_t CrPsLptIsFailed(FwSmDesc_t smDesc)
Guard on the transition from UP_TRANSFER to INACTIVE.
Interface for reporting an error detected by a PUS Extension component.
Definition of the OutComponent Component of the framework.
static CrFwCounterU4_t getDppartSeqNmbItem(int i)
Gets the value of the i-th element in the datapool array partSeqNmb.
static CrFwTimeStamp_t getDplptTimeItem(int i)
Gets the value of the i-th element in the datapool array lptTime.
void CrPsLptDownTransferExitAction(FwSmDesc_t smDesc)
Exit Action for the state DOWN_TRANSFER.
void CrPsLptDownTransferEntryAction(FwSmDesc_t smDesc)
Entry Action for the state DOWN_TRANSFER.
void CrFwOutCmpSetDest(FwSmDesc_t smDesc, CrFwDestSrc_t dest)
Set the destination of the OutComponent.
uint32_t CrPsTimeOut_t
Type used for the Timeout for packets.
static void setDppartSeqNmbItem(int i, CrFwCounterU4_t partSeqNmb)
Sets the value of the i-th element in the datapool array partSeqNmb.
void CrPsLptInitialization(FwSmDesc_t smDesc)
Action on the transition from Initial State to INACTIVE.
Definition of the OutLoader component.
CrFwTimeStamp_t CrFwGetCurrentTimeServer()
Provide the current time.
FwSmDesc_t CrFwOutFactoryMakeOutCmp(CrFwServType_t type, CrFwServSubType_t subType, CrFwDiscriminant_t discriminant, CrFwPcktLength_t length)
Make function for an OutComponent.
unsigned int CrFwTimeStamp_t
Type used for the time stamp of a command or report.