F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Svc::Ccsds::Cfdp Namespace Reference

Classes

class  AckPdu
 The type of an ACK PDU. More...
 
class  CfdpChunkList
 C++ class encapsulation of CFDP chunk list operations. More...
 
struct  CfdpChunkWrapper
 Wrapper around a CfdpChunkList object. More...
 
struct  CfdpFlagsCommon
 Data that applies to all types of transactions. More...
 
struct  CfdpFlagsRx
 Flags that apply to receive transactions. More...
 
struct  CfdpFlagsTx
 Flags that apply to send transactions. More...
 
class  CfdpManager
 
class  CfdpManagerComponentBase
 Auto-generated base for CfdpManager component. More...
 
struct  CfdpPollDir
 Directory poll entry. More...
 
struct  CfdpRxS2Data
 Data specific to a class 2 receive file transaction. More...
 
struct  CfdpRxStateData
 Data specific to a receive file transaction. More...
 
union  CfdpStateData
 Summary of all possible transaction state information (tx and rx) More...
 
union  CfdpStateFlags
 Summary of all possible transaction flags (tx and rx) More...
 
struct  CfdpTraverseAllArg
 Argument structure for use with Channel::traverseAllTransactions() More...
 
struct  CfdpTraversePriorityArg
 Argument structure for use with CfdpCListTraverseR() More...
 
struct  CfdpTraverseTransSeqArg
 Argument structure for use with CList_Traverse() More...
 
struct  CfdpTxnFilenames
 Cache of source and destination filename. More...
 
struct  CfdpTxS2Data
 Data specific to a class 2 send file transaction. More...
 
struct  CfdpTxStateData
 Data specific to a send file transaction. More...
 
class  Channel
 CFDP Channel class. More...
 
class  ChannelArrayParams
 Structure for telemetry counters for a single CFDP channel. More...
 
class  ChannelParams
 Structure for the configured array of CFDP channels. More...
 
class  ChannelTelemetry
 Structure for the telemetry array of CFDP channels. More...
 
class  ChannelTelemetryArray
 
struct  Chunk
 Pairs an offset with a size to identify a specific piece of a file. More...
 
class  Class
 
struct  CListNode
 Circular linked list node structure. More...
 
struct  CycleTxArgs
 Structure for use with the Channel::cycleTx() function. More...
 
class  Engine
 CFDP Protocol Engine. More...
 
class  EofPdu
 The type of an EOF PDU. More...
 
class  FileDataPdu
 The type of a File Data PDU. More...
 
struct  FileDirectiveDispatchTable
 A table of receive handler functions based on file directive code. More...
 
class  FinPdu
 The type of a Finished PDU. More...
 
class  Flow
 
struct  History
 CFDP History entry. More...
 
class  Keep
 Enum used to determine if a file should be kept or deleted after a CFDP transaction. More...
 
class  MetadataPdu
 The type of a Metadata PDU. More...
 
class  NakPdu
 The type of a NAK PDU. More...
 
class  PduBase
 
class  PduHeader
 The type of a PDU header (common to all PDUs) More...
 
class  PduTypeEnum
 PDU type enumeration. More...
 
struct  Playback
 CFDP Playback entry. More...
 
class  QueueId
 
struct  RSubstateDispatchTable
 A dispatch table for receive file transactions, receive side. More...
 
struct  SegmentRequest
 Segment request structure for NAK PDU. More...
 
struct  SSubstateRecvDispatchTable
 A dispatch table for send file transactions, receive side. More...
 
struct  SSubstateSendDispatchTable
 A dispatch table for send file transactions, transmit side. More...
 
class  Status
 
class  SuspendResume
 Suspend/resume action. More...
 
struct  TickArgs
 Structure for use with the Channel::doTick() function. More...
 
class  Timer
 
class  Tlv
 Single TLV entry. More...
 
class  TlvData
 TLV data storage. More...
 
class  TlvList
 List of TLVs. More...
 
class  Transaction
 CFDP Transaction state machine class. More...
 
struct  TxnRecvDispatchTable
 A table of receive handler functions based on transaction state. More...
 
struct  TxnSendDispatchTable
 A table of transmit handler functions based on transaction state. More...
 

Typedefs

using EntityId = U32
 Entity id size. More...
 
using FileSize = U32
 File size and offset type. More...
 
using TransactionSeq = U32
 transaction sequence number size More...
 
using ChunkIdx = U16
 
using GapComputeCallback = void(*)(const Chunk *chunk, void *opaque)
 Callback type for gap computation. More...
 
using CListFunc = CListTraverseStatus(*)(CListNode *, void *)
 Callback function type for use with CfdpCListTraverse() More...
 
using CListTraverseCallback = CListTraverseStatus(*)(CListNode *, void *)
 Callback type for list traversal. More...
 
using StateSendFunc = void(Transaction::*)()
 A member function pointer for dispatching actions to a handler, without existing PDU data. More...
 
using StateRecvFunc = void(Transaction::*)(const Fw::Buffer &buffer)
 A member function pointer for dispatching actions to a handler, with existing PDU data. More...
 
using CfdpTraverseAllTransactionsFunc = void(*)(Transaction *txn, void *context)
 Callback function type for use with Channel::traverseAllTransactions() More...
 

Enumerations

enum  { NumChannels = 2 }
 Number of CFDP channels. More...
 
enum  { MaxFilePathSize = 200 }
 File path size used for CFDP file system operations. More...
 
enum  { MaxPduSize = 1024 }
 Maximum PDU size in bytes. More...
 
enum  { NakMaxSegments = 58 }
 Max NAK segments supported in a NAK PDU. More...
 
enum  { MaxTlv = 4 }
 Maximum TLVs (Type-Length-Value) per PDU. More...
 
enum  { R2CrcChunkSize = 1024 }
 R2 CRC calc chunk size. More...
 
enum  { MaxSimultaneousRx = 5 }
 Max number of simultaneous file receives. More...
 
enum  { MaxCommandedPlaybackFilesPerChan = 10 }
 Number of max commanded playback files per channel. More...
 
enum  { MaxCommandedPlaybackDirectoriesPerChan = 2 }
 Max number of commanded playback directories per channel. More...
 
enum  { MaxPollingDirPerChan = 5 }
 Max number of polling directories per channel. More...
 
enum  { NumTransactionsPerPlayback = 5 }
 Number of transactions per playback directory. More...
 
enum  { NumHistoriesPerChannel = 256 }
 Number of histories per channel. More...
 
enum  CListTraverseStatus : U8 { CLIST_TRAVERSE_CONTINUE = 0, CLIST_TRAVERSE_EXIT = 1 }
 Traverse status for circular list operations. More...
 
enum  PduType : U8 { PduType::PDU_TYPE_DIRECTIVE = 0, PduType::PDU_TYPE_FILE_DATA = 1 }
 
enum  PduDirection : U8 { PduDirection::DIRECTION_TOWARD_RECEIVER = 0, PduDirection::DIRECTION_TOWARD_SENDER = 1 }
 
enum  CrcFlag : U8 { CrcFlag::CRC_NOT_PRESENT = 0, CrcFlag::CRC_PRESENT = 1 }
 
enum  LargeFileFlag : U8 { LargeFileFlag::LARGE_FILE_32_BIT = 0, LargeFileFlag::LARGE_FILE_64_BIT = 1 }
 
enum  TlvType : U8 {
  TlvType::TLV_TYPE_FILESTORE_REQUEST = 0, TlvType::TLV_TYPE_FILESTORE_RESPONSE = 1, TlvType::TLV_TYPE_MESSAGE_TO_USER = 2, TlvType::TLV_TYPE_FAULT_HANDLER_OVERRIDE = 4,
  TlvType::TLV_TYPE_FLOW_LABEL = 5, TlvType::TLV_TYPE_ENTITY_ID = 6
}
 
enum  FileDirective : U8 {
  FileDirective::FILE_DIRECTIVE_INVALID_MIN = 0, FileDirective::FILE_DIRECTIVE_END_OF_FILE = 4, FileDirective::FILE_DIRECTIVE_FIN = 5, FileDirective::FILE_DIRECTIVE_ACK = 6,
  FileDirective::FILE_DIRECTIVE_METADATA = 7, FileDirective::FILE_DIRECTIVE_NAK = 8, FileDirective::FILE_DIRECTIVE_PROMPT = 9, FileDirective::FILE_DIRECTIVE_KEEP_ALIVE = 12,
  FileDirective::FILE_DIRECTIVE_INVALID_MAX = 13
}
 
enum  ConditionCode : U8 {
  ConditionCode::CONDITION_CODE_NO_ERROR = 0, ConditionCode::CONDITION_CODE_POS_ACK_LIMIT_REACHED = 1, ConditionCode::CONDITION_CODE_KEEP_ALIVE_LIMIT_REACHED = 2, ConditionCode::CONDITION_CODE_INVALID_TRANSMISSION_MODE = 3,
  ConditionCode::CONDITION_CODE_FILESTORE_REJECTION = 4, ConditionCode::CONDITION_CODE_FILE_CHECKSUM_FAILURE = 5, ConditionCode::CONDITION_CODE_FILE_SIZE_ERROR = 6, ConditionCode::CONDITION_CODE_NAK_LIMIT_REACHED = 7,
  ConditionCode::CONDITION_CODE_INACTIVITY_DETECTED = 8, ConditionCode::CONDITION_CODE_INVALID_FILE_STRUCTURE = 9, ConditionCode::CONDITION_CODE_CHECK_LIMIT_REACHED = 10, ConditionCode::CONDITION_CODE_UNSUPPORTED_CHECKSUM_TYPE = 11,
  ConditionCode::CONDITION_CODE_SUSPEND_REQUEST_RECEIVED = 14, ConditionCode::CONDITION_CODE_CANCEL_REQUEST_RECEIVED = 15
}
 
enum  AckTxnStatus : U8 {
  AckTxnStatus::ACK_TXN_STATUS_UNDEFINED = 0, AckTxnStatus::ACK_TXN_STATUS_ACTIVE = 1, AckTxnStatus::ACK_TXN_STATUS_TERMINATED = 2, AckTxnStatus::ACK_TXN_STATUS_UNRECOGNIZED = 3,
  AckTxnStatus::ACK_TXN_STATUS_INVALID = 4
}
 
enum  FinDeliveryCode : U8 { FinDeliveryCode::FIN_DELIVERY_CODE_COMPLETE = 0, FinDeliveryCode::FIN_DELIVERY_CODE_INCOMPLETE = 1 }
 
enum  FinFileStatus : U8 { FinFileStatus::FIN_FILE_STATUS_DISCARDED = 0, FinFileStatus::FIN_FILE_STATUS_DISCARDED_FILESTORE = 1, FinFileStatus::FIN_FILE_STATUS_RETAINED = 2, FinFileStatus::FIN_FILE_STATUS_UNREPORTED = 3 }
 
enum  ChecksumType : U8 { ChecksumType::CHECKSUM_TYPE_MODULAR = 0, ChecksumType::CHECKSUM_TYPE_CRC_32 = 1, ChecksumType::CHECKSUM_TYPE_NULL_CHECKSUM = 15 }
 
enum  TxnState : U8 {
  TxnState::TXN_STATE_UNDEF = 0, TxnState::TXN_STATE_INIT = 1, TxnState::TXN_STATE_R1 = 2, TxnState::TXN_STATE_S1 = 3,
  TxnState::TXN_STATE_R2 = 4, TxnState::TXN_STATE_S2 = 5, TxnState::TXN_STATE_DROP = 6, TxnState::TXN_STATE_HOLD = 7,
  TxnState::TXN_STATE_INVALID = 8
}
 High-level state of a transaction. More...
 
enum  TxSubState : U8 {
  TxSubState::TX_SUB_STATE_METADATA = 0, TxSubState::TX_SUB_STATE_FILEDATA = 1, TxSubState::TX_SUB_STATE_EOF = 2, TxSubState::TX_SUB_STATE_CLOSEOUT_SYNC = 3,
  TxSubState::TX_SUB_STATE_NUM_STATES = 4
}
 Sub-state of a send file transaction. More...
 
enum  RxSubState : U8 { RxSubState::RX_SUB_STATE_FILEDATA = 0, RxSubState::RX_SUB_STATE_EOF = 1, RxSubState::RX_SUB_STATE_CLOSEOUT_SYNC = 2, RxSubState::RX_SUB_STATE_NUM_STATES = 3 }
 Sub-state of a receive file transaction. More...
 
enum  Direction : U8 { Direction::DIRECTION_RX = 0, Direction::DIRECTION_TX = 1, Direction::DIRECTION_NUM = 2 }
 Direction identifier. More...
 
enum  TransactionInitType : U8 { TransactionInitType::INIT_BY_COMMAND = 0, TransactionInitType::INIT_BY_PORT = 1 }
 Transaction initiation method. More...
 
enum  CfdpTickType : U8 { CfdpTickType::CFDP_TICK_TYPE_RX, CfdpTickType::CFDP_TICK_TYPE_TXW_NORM, CfdpTickType::CFDP_TICK_TYPE_TXW_NAK, CfdpTickType::CFDP_TICK_TYPE_NUM_TYPES }
 Identifies the type of timer tick being processed. More...
 
enum  TxnStatus : I32 {
  TxnStatus::TXN_STATUS_UNDEFINED = -1, TxnStatus::TXN_STATUS_NO_ERROR = static_cast<I32>(ConditionCode::CONDITION_CODE_NO_ERROR), TxnStatus::TXN_STATUS_POS_ACK_LIMIT_REACHED = static_cast<I32>(ConditionCode::CONDITION_CODE_POS_ACK_LIMIT_REACHED), TxnStatus::TXN_STATUS_KEEP_ALIVE_LIMIT_REACHED = static_cast<I32>(ConditionCode::CONDITION_CODE_KEEP_ALIVE_LIMIT_REACHED),
  TxnStatus::TXN_STATUS_INVALID_TRANSMISSION_MODE = static_cast<I32>(ConditionCode::CONDITION_CODE_INVALID_TRANSMISSION_MODE), TxnStatus::TXN_STATUS_FILESTORE_REJECTION = static_cast<I32>(ConditionCode::CONDITION_CODE_FILESTORE_REJECTION), TxnStatus::TXN_STATUS_FILE_CHECKSUM_FAILURE = static_cast<I32>(ConditionCode::CONDITION_CODE_FILE_CHECKSUM_FAILURE), TxnStatus::TXN_STATUS_FILE_SIZE_ERROR = static_cast<I32>(ConditionCode::CONDITION_CODE_FILE_SIZE_ERROR),
  TxnStatus::TXN_STATUS_NAK_LIMIT_REACHED = static_cast<I32>(ConditionCode::CONDITION_CODE_NAK_LIMIT_REACHED), TxnStatus::TXN_STATUS_INACTIVITY_DETECTED = static_cast<I32>(ConditionCode::CONDITION_CODE_INACTIVITY_DETECTED), TxnStatus::TXN_STATUS_INVALID_FILE_STRUCTURE = static_cast<I32>(ConditionCode::CONDITION_CODE_INVALID_FILE_STRUCTURE), TxnStatus::TXN_STATUS_CHECK_LIMIT_REACHED = static_cast<I32>(ConditionCode::CONDITION_CODE_CHECK_LIMIT_REACHED),
  TxnStatus::TXN_STATUS_UNSUPPORTED_CHECKSUM_TYPE = static_cast<I32>(ConditionCode::CONDITION_CODE_UNSUPPORTED_CHECKSUM_TYPE), TxnStatus::TXN_STATUS_SUSPEND_REQUEST_RECEIVED = static_cast<I32>(ConditionCode::CONDITION_CODE_SUSPEND_REQUEST_RECEIVED), TxnStatus::TXN_STATUS_CANCEL_REQUEST_RECEIVED = static_cast<I32>(ConditionCode::CONDITION_CODE_CANCEL_REQUEST_RECEIVED), TxnStatus::TXN_STATUS_PROTOCOL_ERROR = 16,
  TxnStatus::TXN_STATUS_ACK_LIMIT_NO_FIN = 17, TxnStatus::TXN_STATUS_ACK_LIMIT_NO_EOF = 18, TxnStatus::TXN_STATUS_NAK_RESPONSE_ERROR = 19, TxnStatus::TXN_STATUS_SEND_EOF_FAILURE = 20,
  TxnStatus::TXN_STATUS_EARLY_FIN = 21, TxnStatus::TXN_STATUS_MAX = 22
}
 Values for Transaction Status code. More...
 

Functions

static FileSize CfdpChunkMax (FileSize a, FileSize b)
 Selects the larger of the two passed-in offsets. More...
 
void CfdpCListInitNode (CListNode *node)
 Initialize a clist node. More...
 
void CfdpCListInsertFront (CListNode **head, CListNode *node)
 Insert the given node into the front of a list. More...
 
void CfdpCListInsertBack (CListNode **head, CListNode *node)
 Insert the given node into the back of a list. More...
 
CListNodeCfdpCListPop (CListNode **head)
 Remove the first node from a list and return it. More...
 
void CfdpCListRemove (CListNode **head, CListNode *node)
 Remove the given node from the list. More...
 
void CfdpCListInsertAfter (CListNode **head, CListNode *start, CListNode *after)
 Insert the given node into the last after the given start node. More...
 
void CfdpCListTraverse (CListNode *start, CListFunc fn, void *context)
 Traverse the entire list, calling the given function on all nodes. More...
 
void CfdpCListTraverseR (CListNode *end, CListFunc fn, void *context)
 Reverse list traversal, starting from end, calling given function on all nodes. More...
 
static bool CfdpCListTraverseStatusIsContinue (CListTraverseStatus stat)
 
template<typename Container , typename Member >
constexpr Container * container_of_cpp (Member *member_ptr, Member Container::*member)
 Obtains a pointer to the parent structure. More...
 
static Fw::SerializeStatus encodeIntegerInSize (Fw::SerialBufferBase &serialBuffer, U64 value, U8 encodeSize)
 
static U64 decodeIntegerInSize (Fw::SerialBufferBase &serialBuffer, U8 decodeSize, Fw::SerializeStatus &status)
 
PduTypeEnum::T peekPduType (const Fw::Buffer &buffer)
 
AckTxnStatus GetTxnStatus (Transaction *txn)
 Gets the status of this transaction. More...
 
CListTraverseStatus FindTransactionBySequenceNumberImpl (CListNode *node, void *context)
 List traversal function to check if the desired sequence number matches. More...
 
CListTraverseStatus PrioSearch (CListNode *node, void *context)
 Searches for the first transaction with a lower priority than given. More...
 
bool TxnStatusIsError (TxnStatus txn_stat)
 Check if the internal transaction status represents an error. More...
 
ConditionCode TxnStatusToConditionCode (TxnStatus txn_stat)
 Converts the internal transaction status to a CFDP condition code. More...
 

Variables

constexpr U8 CFDP_CLIST_CONT = CLIST_TRAVERSE_CONTINUE
 Constant indicating to continue traversal. More...
 
constexpr U8 CFDP_CLIST_EXIT = CLIST_TRAVERSE_EXIT
 Constant indicating to stop traversal. More...
 
static constexpr U32 CFDP_NUM_TRANSACTIONS_PER_CHANNEL
 Maximum possible number of transactions that may exist on a single CFDP channel. More...
 

Typedef Documentation

◆ CfdpTraverseAllTransactionsFunc

using Svc::Ccsds::Cfdp::CfdpTraverseAllTransactionsFunc = typedef void (*)(Transaction* txn, void* context)

Callback function type for use with Channel::traverseAllTransactions()

Parameters
txnPointer to current transaction being traversed
contextOpaque object passed from initial call

Definition at line 421 of file Types.hpp.

◆ ChunkIdx

using Svc::Ccsds::Cfdp::ChunkIdx = typedef U16

Definition at line 44 of file Chunk.hpp.

◆ CListFunc

Callback function type for use with CfdpCListTraverse()

Parameters
nodeCurrent node being traversed
contextOpaque pointer passed through from initial call
Returns
integer status code indicating whether to continue traversal
Return values
CFDP_CLIST_CONTIndicates to continue traversing the list
CFDP_CLIST_EXITIndicates to stop traversing the list

Definition at line 95 of file Clist.hpp.

◆ CListTraverseCallback

Callback type for list traversal.

Function pointer callback for list traversal operations. The callback receives the node and an opaque context pointer.

Definition at line 103 of file Clist.hpp.

◆ EntityId

using Svc::Ccsds::Cfdp::EntityId = typedef U32

Entity id size.

Description:
The maximum size of the entity id as expected for all CFDP packets. CF supports the spec's variable size of EID, where the actual size is selected at runtime, and therefore the size in CFDP PDUs may be smaller than the size specified here. This type only establishes the maximum size (and therefore maximum value) that an EID may be.
Note
This type is used in several commands, and so changing the size of this type will affect various command structures.
Limits
Must be one of U8, U16, U32, U64.

Definition at line 32 of file EntityIdAliasAc.hpp.

◆ FileSize

using Svc::Ccsds::Cfdp::FileSize = typedef U32

File size and offset type.

Description:
The type used for file sizes and offsets in CFDP operations. The CFDP protocol permits use of 64-bit values for file size/offsets. Changes have been made to support U64, but it remains untested.
Limits
Must be one of U8, U16, U32, U64.

Definition at line 27 of file FileSizeAliasAc.hpp.

◆ GapComputeCallback

using Svc::Ccsds::Cfdp::GapComputeCallback = typedef void (*)(const Chunk* chunk, void* opaque)

Callback type for gap computation.

Function pointer callback used by CfdpChunkList::computeGaps(). The callback receives the gap chunk and an opaque context pointer.

Definition at line 75 of file Chunk.hpp.

◆ StateRecvFunc

using Svc::Ccsds::Cfdp::StateRecvFunc = typedef void (Transaction::*)(const Fw::Buffer& buffer)

A member function pointer for dispatching actions to a handler, with existing PDU data.

This allows quick delegation of PDUs to handler functions using dispatch tables. This version is used on the receive side where a PDU buffer is associated with the activity, which is then interpreted by the handler being invoked.

Parameters
[in,out]bufferThe buffer containing the PDU currently being received/processed
Note
This is a member function pointer - invoke with: (txn->*fn)(buffer)

Definition at line 82 of file Transaction.hpp.

◆ StateSendFunc

using Svc::Ccsds::Cfdp::StateSendFunc = typedef void (Transaction::*)()

A member function pointer for dispatching actions to a handler, without existing PDU data.

This allows quick delegation to handler functions using dispatch tables. This version is used on the transmit side, where a PDU will likely be generated/sent by the handler being invoked.

Note
This is a member function pointer - invoke with: (txn->*fn)()

Definition at line 70 of file Transaction.hpp.

◆ TransactionSeq

using Svc::Ccsds::Cfdp::TransactionSeq = typedef U32

transaction sequence number size

Description:
The max size of the transaction sequence number as expected for all CFDP packets. CF supports the spec's variable size of TSN, where the actual size is selected at runtime, and therefore the size in CFDP PDUs may be smaller than the size specified here. This type only establishes the maximum size (and therefore maximum value) that a TSN may be.
Note
This type is used in several commands, and so changing the size of this type will affect various command structures.
Limits
Must be one of U8, U16, U32, U64.

Definition at line 32 of file TransactionSeqAliasAc.hpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Number of CFDP channels.

Enumerator
NumChannels 

Definition at line 135 of file FppConstantsAc.hpp.

◆ anonymous enum

anonymous enum

File path size used for CFDP file system operations.

Enumerator
MaxFilePathSize 

Definition at line 140 of file FppConstantsAc.hpp.

◆ anonymous enum

anonymous enum

Maximum PDU size in bytes.

Description:
Limits the maximum possible Tx PDU size.
Limits:
Must respect any CCSDS packet size limits on the system.
Enumerator
MaxPduSize 

Definition at line 151 of file FppConstantsAc.hpp.

◆ anonymous enum

anonymous enum

Max NAK segments supported in a NAK PDU.

Description:
When a NAK PDU is sent or received, this is the max number of segment requests supported. This number should match the ground CFDP engine configuration as well.
Enumerator
NakMaxSegments 

Definition at line 161 of file FppConstantsAc.hpp.

◆ anonymous enum

anonymous enum

Maximum TLVs (Type-Length-Value) per PDU.

Description:
Maximum number of TLV tuples that can be included in a single CFDP PDU. TLVs are optional metadata fields used in EOF and FIN PDUs. The limit of 4 is sufficient for typical operations (1 Entity ID TLV plus 3 additional for filestore requests/responses or messages).
Limits:
Must be > 0.

CCSDS 727.0-B-5, section 5.4, table 5-3

Enumerator
MaxTlv 

Definition at line 178 of file FppConstantsAc.hpp.

◆ anonymous enum

anonymous enum

R2 CRC calc chunk size.

Description:
R2 performs CRC calculation upon file completion in chunks. This is the size of the buffer. A larger size uses more stack but computes faster. The overall bytes calculated per wakeup is set in the configuration table.
Enumerator
R2CrcChunkSize 

Definition at line 188 of file FppConstantsAc.hpp.

◆ anonymous enum

anonymous enum

Max number of simultaneous file receives.

Description:
Each channel can support this number of active/concurrent file receive transactions. This contributes to the total transaction pool size.
Enumerator
MaxSimultaneousRx 

Definition at line 197 of file FppConstantsAc.hpp.

◆ anonymous enum

anonymous enum

Number of max commanded playback files per channel.

Description:
The max number of outstanding ground commanded file transmits per channel.
Enumerator
MaxCommandedPlaybackFilesPerChan 

Definition at line 205 of file FppConstantsAc.hpp.

◆ anonymous enum

anonymous enum

Max number of commanded playback directories per channel.

Description:
Each channel can support this number of ground commanded directory playbacks.
Enumerator
MaxCommandedPlaybackDirectoriesPerChan 

Definition at line 213 of file FppConstantsAc.hpp.

◆ anonymous enum

anonymous enum

Max number of polling directories per channel.

Description:
This affects the configuration table. There must be an entry (can be empty) for each of these polling directories per channel.
Enumerator
MaxPollingDirPerChan 

Definition at line 222 of file FppConstantsAc.hpp.

◆ anonymous enum

anonymous enum

Number of transactions per playback directory.

Description:
Each playback/polling directory operation can have this many active transfers at a time pending or active.
Enumerator
NumTransactionsPerPlayback 

Definition at line 231 of file FppConstantsAc.hpp.

◆ anonymous enum

anonymous enum

Number of histories per channel.

Description:
Each channel maintains a circular buffer of completed transaction records (history entries) for debugging and reference.
Limits:
65536 is the current max.
Enumerator
NumHistoriesPerChannel 

Definition at line 243 of file FppConstantsAc.hpp.

◆ AckTxnStatus

Enumerator
ACK_TXN_STATUS_UNDEFINED 
ACK_TXN_STATUS_ACTIVE 
ACK_TXN_STATUS_TERMINATED 
ACK_TXN_STATUS_UNRECOGNIZED 
ACK_TXN_STATUS_INVALID 

Definition at line 81 of file Types.hpp.

◆ CfdpTickType

Identifies the type of timer tick being processed.

Enumerator
CFDP_TICK_TYPE_RX 
CFDP_TICK_TYPE_TXW_NORM 
CFDP_TICK_TYPE_TXW_NAK 
CFDP_TICK_TYPE_NUM_TYPES 

Definition at line 173 of file Types.hpp.

◆ ChecksumType

Enumerator
CHECKSUM_TYPE_MODULAR 
CHECKSUM_TYPE_CRC_32 
CHECKSUM_TYPE_NULL_CHECKSUM 

Definition at line 107 of file Types.hpp.

◆ CListTraverseStatus

Traverse status for circular list operations.

Enumerator
CLIST_TRAVERSE_CONTINUE 

Continue traversing the list.

CLIST_TRAVERSE_EXIT 

Stop traversing the list.

Definition at line 45 of file Clist.hpp.

◆ ConditionCode

Enumerator
CONDITION_CODE_NO_ERROR 
CONDITION_CODE_POS_ACK_LIMIT_REACHED 
CONDITION_CODE_KEEP_ALIVE_LIMIT_REACHED 
CONDITION_CODE_INVALID_TRANSMISSION_MODE 
CONDITION_CODE_FILESTORE_REJECTION 
CONDITION_CODE_FILE_CHECKSUM_FAILURE 
CONDITION_CODE_FILE_SIZE_ERROR 
CONDITION_CODE_NAK_LIMIT_REACHED 
CONDITION_CODE_INACTIVITY_DETECTED 
CONDITION_CODE_INVALID_FILE_STRUCTURE 
CONDITION_CODE_CHECK_LIMIT_REACHED 
CONDITION_CODE_UNSUPPORTED_CHECKSUM_TYPE 
CONDITION_CODE_SUSPEND_REQUEST_RECEIVED 
CONDITION_CODE_CANCEL_REQUEST_RECEIVED 

Definition at line 62 of file Types.hpp.

◆ CrcFlag

Enumerator
CRC_NOT_PRESENT 
CRC_PRESENT 

Definition at line 35 of file PduHeader.hpp.

◆ Direction

Direction identifier.

Differentiates between send and receive history entries

Enumerator
DIRECTION_RX 
DIRECTION_TX 
DIRECTION_NUM 

Definition at line 154 of file Types.hpp.

◆ FileDirective

Enumerator
FILE_DIRECTIVE_INVALID_MIN 
FILE_DIRECTIVE_END_OF_FILE 
FILE_DIRECTIVE_FIN 
FILE_DIRECTIVE_ACK 
FILE_DIRECTIVE_METADATA 
FILE_DIRECTIVE_NAK 
FILE_DIRECTIVE_PROMPT 
FILE_DIRECTIVE_KEEP_ALIVE 
FILE_DIRECTIVE_INVALID_MAX 

Definition at line 48 of file Types.hpp.

◆ FinDeliveryCode

Enumerator
FIN_DELIVERY_CODE_COMPLETE 
FIN_DELIVERY_CODE_INCOMPLETE 

Definition at line 91 of file Types.hpp.

◆ FinFileStatus

Enumerator
FIN_FILE_STATUS_DISCARDED 
FIN_FILE_STATUS_DISCARDED_FILESTORE 
FIN_FILE_STATUS_RETAINED 
FIN_FILE_STATUS_UNREPORTED 

Definition at line 98 of file Types.hpp.

◆ LargeFileFlag

Enumerator
LARGE_FILE_32_BIT 
LARGE_FILE_64_BIT 

Definition at line 41 of file PduHeader.hpp.

◆ PduDirection

Enumerator
DIRECTION_TOWARD_RECEIVER 
DIRECTION_TOWARD_SENDER 

Definition at line 29 of file PduHeader.hpp.

◆ PduType

Enumerator
PDU_TYPE_DIRECTIVE 
PDU_TYPE_FILE_DATA 

Definition at line 23 of file PduHeader.hpp.

◆ RxSubState

Sub-state of a receive file transaction.

Enumerator
RX_SUB_STATE_FILEDATA 

receive file data PDUs

RX_SUB_STATE_EOF 

got EOF directive

RX_SUB_STATE_CLOSEOUT_SYNC 

pending final acks from remote

RX_SUB_STATE_NUM_STATES 

Definition at line 142 of file Types.hpp.

◆ TlvType

Enumerator
TLV_TYPE_FILESTORE_REQUEST 
TLV_TYPE_FILESTORE_RESPONSE 
TLV_TYPE_MESSAGE_TO_USER 
TLV_TYPE_FAULT_HANDLER_OVERRIDE 
TLV_TYPE_FLOW_LABEL 
TLV_TYPE_ENTITY_ID 

Definition at line 21 of file Tlv.hpp.

◆ TransactionInitType

Transaction initiation method.

Differentiates between command-initiated and port-initiated transactions

Enumerator
INIT_BY_COMMAND 

Transaction initiated via command interface.

INIT_BY_PORT 

Transaction initiated via port interface.

Definition at line 165 of file Types.hpp.

◆ TxnState

High-level state of a transaction.

Enumerator
TXN_STATE_UNDEF 

State assigned to an unused object on the free list.

TXN_STATE_INIT 

State assigned to a newly allocated transaction object.

TXN_STATE_R1 

Receive file as class 1.

TXN_STATE_S1 

Send file as class 1.

TXN_STATE_R2 

Receive file as class 2.

TXN_STATE_S2 

Send file as class 2.

TXN_STATE_DROP 

State where all PDUs are dropped.

TXN_STATE_HOLD 

State assigned to a transaction after freeing it.

TXN_STATE_INVALID 

Marker value for the highest possible state number.

Definition at line 116 of file Types.hpp.

◆ TxnStatus

enum Svc::Ccsds::Cfdp::TxnStatus : I32
strong

Values for Transaction Status code.

This enum defines the possible values representing the result of a transaction. This is a superset of the condition codes defined in CCSDS book 727 (condition codes) but with additional values for local conditions that the blue book does not have, such as protocol/state machine or decoding errors.

The values here are designed to not overlap with the condition codes defined in the blue book, but can be translated to one of those codes for the purposes of FIN/ACK/EOF PDUs.

Enumerator
TXN_STATUS_UNDEFINED 

The undefined status is a placeholder for new transactions before a value is set.

TXN_STATUS_NO_ERROR 
TXN_STATUS_POS_ACK_LIMIT_REACHED 
TXN_STATUS_KEEP_ALIVE_LIMIT_REACHED 
TXN_STATUS_INVALID_TRANSMISSION_MODE 
TXN_STATUS_FILESTORE_REJECTION 
TXN_STATUS_FILE_CHECKSUM_FAILURE 
TXN_STATUS_FILE_SIZE_ERROR 
TXN_STATUS_NAK_LIMIT_REACHED 
TXN_STATUS_INACTIVITY_DETECTED 
TXN_STATUS_INVALID_FILE_STRUCTURE 
TXN_STATUS_CHECK_LIMIT_REACHED 
TXN_STATUS_UNSUPPORTED_CHECKSUM_TYPE 
TXN_STATUS_SUSPEND_REQUEST_RECEIVED 
TXN_STATUS_CANCEL_REQUEST_RECEIVED 
TXN_STATUS_PROTOCOL_ERROR 
TXN_STATUS_ACK_LIMIT_NO_FIN 
TXN_STATUS_ACK_LIMIT_NO_EOF 
TXN_STATUS_NAK_RESPONSE_ERROR 
TXN_STATUS_SEND_EOF_FAILURE 
TXN_STATUS_EARLY_FIN 
TXN_STATUS_MAX 

Definition at line 193 of file Types.hpp.

◆ TxSubState

Sub-state of a send file transaction.

Enumerator
TX_SUB_STATE_METADATA 

sending the initial MD directive

TX_SUB_STATE_FILEDATA 

sending file data PDUs

TX_SUB_STATE_EOF 

sending the EOF directive

TX_SUB_STATE_CLOSEOUT_SYNC 

pending final acks from remote

TX_SUB_STATE_NUM_STATES 

Definition at line 131 of file Types.hpp.

Function Documentation

◆ CfdpChunkMax()

static FileSize Svc::Ccsds::Cfdp::CfdpChunkMax ( FileSize  a,
FileSize  b 
)
inlinestatic

Selects the larger of the two passed-in offsets.

Parameters
aFirst chunk offset
bSecond chunk offset
Returns
the larger FileSize value

Definition at line 61 of file Chunk.hpp.

◆ CfdpCListInitNode()

void Svc::Ccsds::Cfdp::CfdpCListInitNode ( CListNode node)

Initialize a clist node.

Parameters
nodePointer to node structure to be initialized

Definition at line 43 of file Clist.cpp.

◆ CfdpCListInsertAfter()

void Svc::Ccsds::Cfdp::CfdpCListInsertAfter ( CListNode **  head,
CListNode start,
CListNode after 
)

Insert the given node into the last after the given start node.

Parameters
headPointer to head of list to remove from
startPointer to node to insert
afterPointer to position to insert after

Definition at line 125 of file Clist.cpp.

◆ CfdpCListInsertBack()

void Svc::Ccsds::Cfdp::CfdpCListInsertBack ( CListNode **  head,
CListNode node 
)

Insert the given node into the back of a list.

Parameters
headPointer to head of list to insert into
nodePointer to node to insert

Definition at line 69 of file Clist.cpp.

◆ CfdpCListInsertFront()

void Svc::Ccsds::Cfdp::CfdpCListInsertFront ( CListNode **  head,
CListNode node 
)

Insert the given node into the front of a list.

Parameters
headPointer to head of list to insert into
nodePointer to node to insert

Definition at line 48 of file Clist.cpp.

◆ CfdpCListPop()

CListNode * Svc::Ccsds::Cfdp::CfdpCListPop ( CListNode **  head)

Remove the first node from a list and return it.

Parameters
headPointer to head of list to remove from
Returns
The first node (now removed) in the list
Return values
nullptrif list was empty.

Definition at line 89 of file Clist.cpp.

◆ CfdpCListRemove()

void Svc::Ccsds::Cfdp::CfdpCListRemove ( CListNode **  head,
CListNode node 
)

Remove the given node from the list.

Parameters
headPointer to head of list to remove from
nodePointer to node to remove

Definition at line 102 of file Clist.cpp.

◆ CfdpCListTraverse()

void Svc::Ccsds::Cfdp::CfdpCListTraverse ( CListNode start,
CListFunc  fn,
void *  context 
)

Traverse the entire list, calling the given function on all nodes.

Note
on traversal it's ok to delete the current node, but do not delete other nodes in the same list!!
Parameters
startList to traverse (first node)
fnCallback function to invoke for each node
contextOpaque pointer to pass to callback

Definition at line 139 of file Clist.cpp.

◆ CfdpCListTraverseR()

void Svc::Ccsds::Cfdp::CfdpCListTraverseR ( CListNode end,
CListFunc  fn,
void *  context 
)

Reverse list traversal, starting from end, calling given function on all nodes.

Note
traverse_R will work backwards from the parameter's prev, and end on param
Parameters
endList to traverse (last node)
fnCallback function to invoke for each node
contextOpaque pointer to pass to callback

Definition at line 173 of file Clist.cpp.

◆ CfdpCListTraverseStatusIsContinue()

static bool Svc::Ccsds::Cfdp::CfdpCListTraverseStatusIsContinue ( CListTraverseStatus  stat)
inlinestatic

Checks if the list traversal should continue

Definition at line 59 of file Clist.hpp.

◆ container_of_cpp()

template<typename Container , typename Member >
constexpr Container* Svc::Ccsds::Cfdp::container_of_cpp ( Member *  member_ptr,
Member Container::*  member 
)

Obtains a pointer to the parent structure.

Given a pointer to a CListNode object which is known to be a member of a larger container, this converts the pointer to that of the parent. This is the C++ equivalent of the Linux kernel's container_of macro.

Definition at line 79 of file Clist.hpp.

◆ decodeIntegerInSize()

static U64 Svc::Ccsds::Cfdp::decodeIntegerInSize ( Fw::SerialBufferBase serialBuffer,
U8  decodeSize,
Fw::SerializeStatus status 
)
static

Definition at line 64 of file PduHeader.cpp.

◆ encodeIntegerInSize()

static Fw::SerializeStatus Svc::Ccsds::Cfdp::encodeIntegerInSize ( Fw::SerialBufferBase serialBuffer,
U64  value,
U8  encodeSize 
)
static

Definition at line 50 of file PduHeader.cpp.

◆ FindTransactionBySequenceNumberImpl()

CListTraverseStatus Svc::Ccsds::Cfdp::FindTransactionBySequenceNumberImpl ( CListNode node,
void *  context 
)

List traversal function to check if the desired sequence number matches.

Parameters
nodePointer to node currently being traversed
contextPointer to state object passed through from initial call
Return values
1when it's found, which terminates list traversal
0when it isn't found, which causes list traversal to continue

Definition at line 105 of file Utils.cpp.

◆ GetTxnStatus()

AckTxnStatus Svc::Ccsds::Cfdp::GetTxnStatus ( Transaction txn)

Gets the status of this transaction.

Determines if the transaction is ACTIVE or TERMINATED. (By definition if it has a txn object then it is not UNRECOGNIZED)

Parameters
txnTransaction
Returns
AckTxnStatus value corresponding to transaction

Definition at line 43 of file Utils.cpp.

◆ peekPduType()

PduTypeEnum::T Svc::Ccsds::Cfdp::peekPduType ( const Fw::Buffer buffer)

Peek at the PDU type from a buffer without consuming it

Parameters
bufferThe buffer containing the PDU
Returns
The PDU type, or NONE if the buffer is invalid

Definition at line 230 of file PduHeader.cpp.

◆ PrioSearch()

CListTraverseStatus Svc::Ccsds::Cfdp::PrioSearch ( CListNode node,
void *  context 
)

Searches for the first transaction with a lower priority than given.

Parameters
nodeNode being currently traversed
contextPointer to CfdpTraversePriorityArg object indicating the priority to search for
Return values
CFDP_CLIST_EXITwhen it's found, which terminates list traversal
CFDP_CLIST_CONTwhen it isn't found, which causes list traversal to continue

Definition at line 109 of file Utils.cpp.

◆ TxnStatusIsError()

bool Svc::Ccsds::Cfdp::TxnStatusIsError ( TxnStatus  txn_stat)

Check if the internal transaction status represents an error.

Transaction status is a superset of condition codes, and includes other error conditions for which CFDP will not send FIN/ACK/EOF and thus there is no corresponding condition code.

Parameters
txn_statTransaction status
Returns
Boolean value indicating if the transaction is in an errored state
Return values
trueif an error has occurred during the transaction
falseif no error has occurred during the transaction yet

Definition at line 113 of file Utils.cpp.

◆ TxnStatusToConditionCode()

ConditionCode Svc::Ccsds::Cfdp::TxnStatusToConditionCode ( TxnStatus  txn_stat)

Converts the internal transaction status to a CFDP condition code.

Transaction status is a superset of condition codes, and includes other error conditions for which CFDP will not send FIN/ACK/EOF and thus there is no corresponding condition code.

Parameters
txn_statTransaction status
Returns
CFDP protocol condition code

Definition at line 120 of file Utils.cpp.

Variable Documentation

◆ CFDP_CLIST_CONT

constexpr U8 Svc::Ccsds::Cfdp::CFDP_CLIST_CONT = CLIST_TRAVERSE_CONTINUE

Constant indicating to continue traversal.

Definition at line 51 of file Clist.hpp.

◆ CFDP_CLIST_EXIT

constexpr U8 Svc::Ccsds::Cfdp::CFDP_CLIST_EXIT = CLIST_TRAVERSE_EXIT

Constant indicating to stop traversal.

Definition at line 54 of file Clist.hpp.

◆ CFDP_NUM_TRANSACTIONS_PER_CHANNEL