diff --git a/fsw/platform_inc/cf_platform_cfg.h b/fsw/platform_inc/cf_platform_cfg.h index 7a832578..8f0c4ba3 100644 --- a/fsw/platform_inc/cf_platform_cfg.h +++ b/fsw/platform_inc/cf_platform_cfg.h @@ -85,7 +85,7 @@ typedef uint32 CF_TransactionSeq_t; * Dictates the pipe depth of the cf command pipe. * * @par Limits: - * The minimum size of this paramater is 1 + * The minimum size of this parameter is 1 * The maximum size dictated by cFE platform configuration * parameter is CFE_SB_MAX_PIPE_DEPTH */ @@ -95,7 +95,7 @@ typedef uint32 CF_TransactionSeq_t; * @brief Number of channels * * @par Description: - * The number of chanenls in the engine. Changing this + * The number of channels in the engine. Changing this * value changes the configuration table for the application. * * @par Limits: @@ -123,13 +123,13 @@ typedef uint32 CF_TransactionSeq_t; * Number of chunks per transaction per channel (RX). * * CHUNKS - - * A chunk is a representatino of a range range (offset, size) of data received by a receiver. + * A chunk is a representation of a range range (offset, size) of data received by a receiver. * * Class 2 CFDP deals with NAK, so received data must be tracked for receivers in order to generate * the NAK. The sender must also keep track of NAK requests and send new file data PDUs as a result. * (array size must be CF_NUM_CHANNELS) * CF_CHANNEL_NUM_RX_CHUNKS_PER_TRANSACTION is an array for each channel indicating the number of chunks per transaction - * CF_CHANNEL_NUM_TX_CHUNKS_PER_TRANSACTION is an array for each channel indciate the number of chunks to keep track of + * CF_CHANNEL_NUM_TX_CHUNKS_PER_TRANSACTION is an array for each channel indicate the number of chunks to keep track of * NAK requests from the receiver per transaction * * @par Limits: @@ -197,7 +197,7 @@ typedef uint32 CF_TransactionSeq_t; * @brief Max number of commanded playback directories per channel. * * @par Description: - * Each channel can support this number of groudn commanded directory playbacks. + * Each channel can support this number of ground commanded directory playbacks. * * @par Limits: * @@ -217,7 +217,7 @@ typedef uint32 CF_TransactionSeq_t; #define CF_MAX_POLLING_DIR_PER_CHAN (5) /** - * @brief Number of transactions per playback directoriy. + * @brief Number of transactions per playback directory. * * @par Description: * Each playback/polling directory operation will be able to have this diff --git a/fsw/src/cf_app.c b/fsw/src/cf_app.c index 38a1397f..9dd0f600 100644 --- a/fsw/src/cf_app.c +++ b/fsw/src/cf_app.c @@ -233,7 +233,7 @@ int32 CF_Init(void) status = CFE_SB_CreatePipe(&CF_AppData.cmd_pipe, CF_PIPE_DEPTH, CF_PIPE_NAME); if (status != CFE_SUCCESS) { - CFE_ES_WriteToSysLog("CF app: error creating pipe %s, returend 0x%08lx", CF_PIPE_NAME, + CFE_ES_WriteToSysLog("CF app: error creating pipe %s, returned 0x%08lx", CF_PIPE_NAME, (unsigned long)status); } } diff --git a/fsw/src/cf_cfdp.c b/fsw/src/cf_cfdp.c index c5364ecb..3f5861e4 100644 --- a/fsw/src/cf_cfdp.c +++ b/fsw/src/cf_cfdp.c @@ -274,7 +274,7 @@ CF_Logical_PduBuffer_t *CF_CFDP_ConstructPduHeader(const CF_Transaction_t *t, CF hdr->version = 1; hdr->pdu_type = (directive_code == 0); /* set to '1' for file data pdu, '0' for a directive pdu */ - hdr->direction = (towards_sender != 0); /* set to '1' for toward sender, '0' for toward recevier */ + hdr->direction = (towards_sender != 0); /* set to '1' for toward sender, '0' for toward receiver */ hdr->txm_mode = (CF_CFDP_GetClass(t) == CF_CFDP_CLASS_1); /* set to '1' for class 1 data, '0' for class 2 */ /* choose the larger of the two EIDs to determine size */ @@ -374,10 +374,8 @@ CF_SendRet_t CF_CFDP_SendMd(CF_Transaction_t *t) /* this does not actually copy here - that is done during encode */ md->source_filename.length = CF_strnlen(t->history->fnames.src_filename, sizeof(t->history->fnames.src_filename)); - ; md->source_filename.data_ptr = t->history->fnames.src_filename; md->dest_filename.length = CF_strnlen(t->history->fnames.dst_filename, sizeof(t->history->fnames.dst_filename)); - ; md->dest_filename.data_ptr = t->history->fnames.dst_filename; CF_CFDP_EncodeMd(ph->penc, md); @@ -805,7 +803,6 @@ int CF_CFDP_RecvFd(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) *-----------------------------------------------------------------*/ int CF_CFDP_RecvEof(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) { - /* CF_CFDP_RecvPh() must have been called before this, so use ldst to access pdu header */ int ret = 0; CF_CFDP_DecodeEof(ph->pdec, &ph->int_header.eof); @@ -830,7 +827,6 @@ int CF_CFDP_RecvEof(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) *-----------------------------------------------------------------*/ int CF_CFDP_RecvAck(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) { - /* CF_CFDP_RecvPh() must have been called before this, so use ldst to access pdu header */ int ret = 0; CF_CFDP_DecodeAck(ph->pdec, &ph->int_header.ack); @@ -856,7 +852,6 @@ int CF_CFDP_RecvAck(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) *-----------------------------------------------------------------*/ int CF_CFDP_RecvFin(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) { - /* CF_CFDP_RecvPh() must have been called before this, so use ldst to access pdu header */ int ret = 0; CF_CFDP_DecodeFin(ph->pdec, &ph->int_header.fin); @@ -869,7 +864,7 @@ int CF_CFDP_RecvFin(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) } /* NOTE: right now we don't care about the fault location */ - /* nothing to do for this one. all fields are bytes */ + /* nothing to do for this one. All fields are bytes */ return ret; } @@ -968,7 +963,7 @@ void CF_CFDP_RecvIdle(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph) status = CF_CFDP_RecvMd(t, ph); if (!status) { - /* NOTE: whether or not class 1 or 2, get a free chunks. it's cheap, and simplifies cleanup path */ + /* NOTE: whether or not class 1 or 2, get a free chunks. It's cheap, and simplifies cleanup path */ t->state = ph->pdu_header.txm_mode ? CF_TxnState_R1 : CF_TxnState_R2; t->flags.rx.md_recv = 1; CF_CFDP_R_Init(t); /* initialize R */ @@ -1146,7 +1141,7 @@ void CF_CFDP_CycleTx(CF_Channel_t *c) /* loop through as long as there are pending transactions, and a message buffer to send their pdus on */ - /* NOTE: tick processesing is higher priority than sending new filedata pdus, so only send however many + /* NOTE: tick processing is higher priority than sending new filedata pdus, so only send however many * PDUs that can be sent once we get to here */ if (!c->cur) { /* don't enter if cur is set, since we need to pick up where we left off on tick processing next wakeup */ @@ -1235,7 +1230,7 @@ void CF_CFDP_TickTransactions(CF_Channel_t *c) CF_CList_Traverse(c->qs[qs[c->tick_type]], CF_CFDP_DoTick, &args); if (args.early_exit) { - /* early exit means we ran out of availalbe outgoing messages this wakeup. + /* early exit means we ran out of available outgoing messages this wakeup. * If current tick type is nak response, then reset tick type. It would be * bad to let NAK response starve out RX or TXW ticks on the next cycle. * @@ -1317,7 +1312,7 @@ static void CF_CFDP_TxFile_Initiate(CF_Transaction_t *t, CF_CFDP_Class_t cfdp_cl CF_CFDP_ArmInactTimer(t); - /* NOTE: whether or not class 1 or 2, get a free chunks. it's cheap, and simplifies cleanup path */ + /* NOTE: whether or not class 1 or 2, get a free chunks. It's cheap, and simplifies cleanup path */ t->chunks = CF_CFDP_FindUnusedChunks(&CF_AppData.engine.channels[chan], CF_Direction_TX); CF_InsertSortPrio(t, CF_QueueIdx_PEND); } @@ -1596,7 +1591,7 @@ void CF_CFDP_ProcessPollingDirectories(CF_Channel_t *c) } else { - /* error occured in playback directory, so reset the timer */ + /* error occurred in playback directory, so reset the timer */ /* an event is sent in CF_CFDP_PlaybackDir_Initiate so there is no reason to * to have another here */ CF_Timer_InitRelSec(&p->interval_timer, pd->interval_sec); @@ -1701,7 +1696,7 @@ void CF_CFDP_ResetTransaction(CF_Transaction_t *t, int keep_history) if (t->p) { - /* a playback's transaction is now done. decrement the playback counter */ + /* a playback's transaction is now done, decrement the playback counter */ CF_Assert(t->p->num_ts); --t->p->num_ts; } @@ -1813,7 +1808,7 @@ void CF_CFDP_DisableEngine(void) CF_CList_Traverse(c->qs[CLOSE_QUEUES[j]], CF_CFDP_CloseFiles, NULL); } - /* any playback directories need to have their dirents closed */ + /* any playback directories need to have their directory ids closed */ for (j = 0; j < CF_MAX_COMMANDED_PLAYBACK_DIRECTORIES_PER_CHAN; ++j) { if (c->playback[j].busy) diff --git a/fsw/src/cf_cfdp.h b/fsw/src/cf_cfdp.h index 4de2f3fb..ad27c1ef 100644 --- a/fsw/src/cf_cfdp.h +++ b/fsw/src/cf_cfdp.h @@ -66,7 +66,7 @@ void CF_CFDP_EncodeStart(CF_EncoderState_t *penc, void *msgbuf, CF_Logical_PduBu /********************************************************************************/ /** - * @brief Initiate the process of decoding a receieved PDU + * @brief Initiate the process of decoding a received PDU * * This resets the decoder and PDU buffer to initial values, and prepares for decoding a new PDU * that was received from a remote entity. @@ -186,7 +186,7 @@ int32 CF_CFDP_PlaybackDir(const char *src_filename, const char *dst_filename, CF * @param dst_eid Value to set in destination entity ID field * @param towards_sender Whether this is transmitting toward the sender entity * @param tsn Transaction sequence number to put into PDU - * @param silent If true, supresses error event if no message buffer available + * @param silent If true, suppress error event if no message buffer available * * @returns Pointer to PDU buffer which may be filled with additional data * @retval NULL if no message buffer available @@ -222,7 +222,7 @@ CF_SendRet_t CF_CFDP_SendMd(CF_Transaction_t *t); * @note Unlike other "send" routines, the file data PDU must be acquired and * filled by the caller prior to invoking this routine. This routine only * sends the PDU that was previously allocated and assembled. As such, the - * typical failure possibilies do not apply to this call. + * typical failure possibilities do not apply to this call. * * @returns CF_SendRet_t status code * @retval CF_SendRet_SUCCESS on success. @@ -301,7 +301,7 @@ CF_SendRet_t CF_CFDP_SendFin(CF_Transaction_t *t, CF_CFDP_FinDeliveryCode_t dc, * @note Unlike other "send" routines, the NAK PDU must be acquired and * filled by the caller prior to invoking this routine. This routine only * encodes and sends the previously-assembled PDU buffer. As such, the - * typical failure possibilies do not apply to this call. + * typical failure possibilities do not apply to this call. * * @returns CF_SendRet_t status code * @retval CF_SendRet_SUCCESS on success. @@ -403,7 +403,7 @@ int CF_CFDP_RecvEof(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph); /** @brief Unpack an ack PDU from a received message. * * This should only be invoked for buffers that have been identified - * as an acknowledgement PDU. + * as an acknowledgment PDU. * * @par Assumptions, External Events, and Notes: * t must not be NULL. @@ -441,7 +441,7 @@ int CF_CFDP_RecvFin(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph); /** @brief Unpack a nak PDU from a received message. * * This should only be invoked for buffers that have been identified - * as an negative/non-acknowledgement PDU. + * as an negative/non-acknowledgment PDU. * * @par Assumptions, External Events, and Notes: * t must not be NULL. @@ -615,7 +615,7 @@ void CF_CFDP_CycleTx(CF_Channel_t *c); * data pdus until there are no outgoing message buffers. * * @par Assumptions, External Events, and Notes: - * node must not be NULL. context must not be NULL. + * node must not be NULL. Context must not be NULL. * * @param node Pointer to list node * @param context Pointer to CF_CFDP_CycleTx_args_t object (passed through) @@ -649,7 +649,7 @@ void CF_CFDP_TickTransactions(CF_Channel_t *c); * if a valid file is found initiates playback on it. * * @par Assumptions, External Events, and Notes: - * c must not be NULL. p must not be NULL. + * c must not be NULL, p must not be NULL. * * @param c The channel associated with the playback * @param p The playback state @@ -676,7 +676,7 @@ void CF_CFDP_ProcessPollingDirectories(CF_Channel_t *c); * This helper is used in conjunction with CF_CList_Traverse(). * * @par Assumptions, External Events, and Notes: - * node must not be NULL. context must not be NULL. + * node must not be NULL, context must not be NULL. * * @param node Pointer to list node * @param context Pointer to CF_CFDP_Tick_args_t object (passed through) diff --git a/fsw/src/cf_cfdp_dispatch.c b/fsw/src/cf_cfdp_dispatch.c index 777c3ae4..39528946 100644 --- a/fsw/src/cf_cfdp_dispatch.c +++ b/fsw/src/cf_cfdp_dispatch.c @@ -136,9 +136,9 @@ void CF_CFDP_S_DispatchRecv(CF_Transaction_t *t, CF_Logical_PduBuffer_t *ph, (unsigned long)t->history->src_eid, (unsigned long)t->history->seq_num); } - /* check that there's a valid function pointer. if there isn't, + /* check that there's a valid function pointer. If there isn't, * then silently ignore. We may want to discuss if it's worth - * shutting down the whole transation if a PDU is received + * shutting down the whole transaction if a PDU is received * that doesn't make sense to be received (For example, * class 1 CFDP receiving a NAK PDU) but for now, we silently * ignore the received packet and keep chugging along. */ diff --git a/fsw/src/cf_cfdp_dispatch.h b/fsw/src/cf_cfdp_dispatch.h index f0b60abd..f3149f6a 100644 --- a/fsw/src/cf_cfdp_dispatch.h +++ b/fsw/src/cf_cfdp_dispatch.h @@ -91,7 +91,7 @@ typedef struct } CF_CFDP_FileDirectiveDispatchTable_t; /** - * @brief A dispatch table for receive file transactions, recieve side + * @brief A dispatch table for receive file transactions, receive side * * This is used for "receive file" transactions upon receipt of a directive PDU. * Depending on the sub-state of the transaction, a different action may be taken. @@ -125,7 +125,7 @@ typedef struct /************************************************************************/ /** - * @brief Dispatch function for received PDUs on receieve-file transactions + * @brief Dispatch function for received PDUs on receive-file transactions * * Receive file transactions primarily only react/respond to received PDUs * diff --git a/fsw/src/cf_cfdp_pdu.h b/fsw/src/cf_cfdp_pdu.h index 5624d743..6a3fff35 100644 --- a/fsw/src/cf_cfdp_pdu.h +++ b/fsw/src/cf_cfdp_pdu.h @@ -23,7 +23,7 @@ * Structures defining to CFDP PDUs * * Note that structures and enumerations defined in this file with a CF_CFDP - * prefix are defined according to the CCSDS CFDP specifiction (727.0-B-5). + * prefix are defined according to the CCSDS CFDP specification (727.0-B-5). * These values must match the specification for that structure/field, they are * not locally changeable. * @@ -232,9 +232,9 @@ typedef enum } CF_CFDP_Class_t; /** - * @brief Values for "acknowledgement transfer status" + * @brief Values for "acknowledgment transfer status" * - * This enum is pertient to the ACK PDU type, defines the + * This enum is pertinent to the ACK PDU type, defines the * values for the directive field. * * Defined per section 5.2.4 / table 5-8 of CCSDS 727.0-B-5 @@ -251,7 +251,7 @@ typedef enum /** * @brief Values for "finished delivery code" * - * This enum is pertient to the FIN PDU type, defines the + * This enum is pertinent to the FIN PDU type, defines the * values for the delivery code field. * * Defined per section 5.2.3 / table 5-7 of CCSDS 727.0-B-5 @@ -266,7 +266,7 @@ typedef enum /** * @brief Values for "finished file status" * - * This enum is pertient to the FIN PDU type, defines the + * This enum is pertinent to the FIN PDU type, defines the * values for the file status field. * * Defined per section 5.2.3 / table 5-7 of CCSDS 727.0-B-5 diff --git a/fsw/src/cf_cfdp_r.c b/fsw/src/cf_cfdp_r.c index e35baf81..1170bf60 100644 --- a/fsw/src/cf_cfdp_r.c +++ b/fsw/src/cf_cfdp_r.c @@ -126,12 +126,12 @@ void CF_CFDP_R2_Complete(CF_Transaction_t *t, int ok_to_send_nak) { int send_nak = 0; int send_fin = 0; - /* checking if r2 is complete. check nak list, and send NAK if appropriate */ + /* checking if r2 is complete. Check nak list, and send NAK if appropriate */ /* if all data is present, then there will be no gaps in the chunk */ if (t->history->cc == CF_CFDP_ConditionCode_NO_ERROR) { - /* first, check if md is received. if not, send specialized nak */ + /* first, check if md is received. If not, send specialized nak */ if (!t->flags.rx.md_recv) { send_nak = 1; @@ -716,7 +716,7 @@ int CF_CFDP_R2_CalcCrcChunk(CF_Transaction_t *t) /* all bytes calculated, so now check */ if (!CF_CFDP_R_CheckCrc(t, t->state_data.r.r2.eof_crc)) { - /* crc matched! we are happy */ + /* crc matched! We are happy */ t->keep = 1; /* save the file */ /* set fin pdu status */ diff --git a/fsw/src/cf_cfdp_r.h b/fsw/src/cf_cfdp_r.h index de6981ae..a6fa305b 100644 --- a/fsw/src/cf_cfdp_r.h +++ b/fsw/src/cf_cfdp_r.h @@ -173,7 +173,7 @@ int CF_CFDP_R_CheckCrc(CF_Transaction_t *t, uint32 expected_crc); * t must not be NULL. * * @param t Pointer to the transaction object - * @param ok_to_send_nak If set to 0, supresses sending of a NAK packet + * @param ok_to_send_nak If set to 0, suppress sending of a NAK packet */ void CF_CFDP_R2_Complete(CF_Transaction_t *t, int ok_to_send_nak); @@ -288,7 +288,7 @@ void CF_CFDP_R2_SubstateRecvFileData(CF_Transaction_t *t, CF_Logical_PduBuffer_t * This is a function callback from CF_ChunkList_ComputeGaps(). * * @par Assumptions, External Events, and Notes: - * chunks must not be NULL. c must not be NULL. opaque must not be NULL. + * chunks must not be NULL, c must not be NULL, opaque must not be NULL. * * @retval 0 on success. Returns anything else on error. * diff --git a/fsw/src/cf_cfdp_s.c b/fsw/src/cf_cfdp_s.c index 2016611a..120e7099 100644 --- a/fsw/src/cf_cfdp_s.c +++ b/fsw/src/cf_cfdp_s.c @@ -131,7 +131,7 @@ int32 CF_CFDP_S_SendFileData(CF_Transaction_t *t, uint32 foffs, uint32 bytes_to_ if (!ph) { - ret = 0; /* couldn't get message, so no bytes sent. will try again next time */ + ret = 0; /* couldn't get message, so no bytes sent. Will try again next time */ success = false; } else diff --git a/fsw/src/cf_cfdp_sbintf.c b/fsw/src/cf_cfdp_sbintf.c index 109b1e0a..5b7a87be 100644 --- a/fsw/src/cf_cfdp_sbintf.c +++ b/fsw/src/cf_cfdp_sbintf.c @@ -207,7 +207,7 @@ void CF_CFDP_ReceiveMessage(CF_Channel_t *c) t = CF_FindTransactionBySequenceNumber(c, ph->pdu_header.sequence_num, ph->pdu_header.source_eid); if (t) { - /* found one! send it to the transaction state processor */ + /* found one! Send it to the transaction state processor */ CF_Assert(t->state > CF_TxnState_IDLE); CF_CFDP_DispatchRecv(t, ph); } diff --git a/fsw/src/cf_cfdp_types.h b/fsw/src/cf_cfdp_types.h index ad2d409b..c770805f 100644 --- a/fsw/src/cf_cfdp_types.h +++ b/fsw/src/cf_cfdp_types.h @@ -69,7 +69,7 @@ typedef enum { CF_TxnState_IDLE = 0, /**< \brief State assigned to a newly allocated transaction object */ - CF_TxnState_R1 = 1, /**< \brief Recieve file as class 1 */ + CF_TxnState_R1 = 1, /**< \brief Receive file as class 1 */ CF_TxnState_S1 = 2, /**< \brief Send file as class 1 */ CF_TxnState_R2 = 3, /**< \brief Receive file as class 2 */ CF_TxnState_S2 = 4, /**< \brief Send file as class 2 */ diff --git a/fsw/src/cf_chunk.c b/fsw/src/cf_chunk.c index ea85910d..d726cae7 100644 --- a/fsw/src/cf_chunk.c +++ b/fsw/src/cf_chunk.c @@ -25,7 +25,7 @@ * This class handles the complexity of sparse gap tracking so that * the CFDP engine doesn't need to worry about it. Information is given * to the class and when needed calculations are made internally to - * help the engine build NAK packets. Received NAK segmnent requests + * help the engine build NAK packets. Received NAK segment requests * are stored in this class as well and used for re-transmit processing. * * This is intended to be mostly a generic purpose class used by CF. diff --git a/fsw/src/cf_chunk.h b/fsw/src/cf_chunk.h index 2b86d81c..8610e9cb 100644 --- a/fsw/src/cf_chunk.h +++ b/fsw/src/cf_chunk.h @@ -215,7 +215,7 @@ void CF_Chunks_EraseChunk(CF_ChunkList_t *chunks, CF_ChunkIdx_t erase_index); * Items in the list after the index_before will be shifted/moved to open a gap. * * @par Assumptions, External Events, and Notes: - * chunks must not be NULL. chunk must not be NULL. + * chunks must not be NULL, chunk must not be NULL. * * @param chunks Pointer to CF_ChunkList_t object * @param index_before position to insert at - this becomes the ID of the inserted chunk @@ -230,7 +230,7 @@ void CF_Chunks_InsertChunk(CF_ChunkList_t *chunks, CF_ChunkIdx_t index_before, c * This is a C version of std::lower_bound from C++ algorithms. * * @par Assumptions, External Events, and Notes: - * chunks must not be NULL. chunk must not be NULL. + * chunks must not be NULL, chunk must not be NULL. * * @param chunks Pointer to CF_ChunkList_t object * @param chunk Chunk data to insert @@ -244,7 +244,7 @@ CF_ChunkIdx_t CF_Chunks_FindInsertPosition(CF_ChunkList_t *chunks, const CF_Chun /** @brief Possibly combines the given chunk with the previous chunk. * * @par Assumptions, External Events, and Notes: - * chunks must not be NULL. chunk must not be NULL. + * chunks must not be NULL, chunk must not be NULL. * * @param chunks Pointer to CF_ChunkList_t object * @param i Index of chunk to combine @@ -261,7 +261,7 @@ int CF_Chunks_CombinePrevious(CF_ChunkList_t *chunks, CF_ChunkIdx_t i, const CF_ /** @brief Possibly combines the given chunk with the next chunk. * * @par Assumptions, External Events, and Notes: - * chunks must not be NULL. chunk must not be NULL. + * chunks must not be NULL, chunk must not be NULL. * * @param chunks Pointer to CF_ChunkList_t object * @param i Index of chunk to combine @@ -296,7 +296,7 @@ CF_ChunkIdx_t CF_Chunks_FindSmallestSize(const CF_ChunkList_t *chunks); * an existing chunk if contiguous. * * @par Assumptions, External Events, and Notes: - * chunks must not be NULL. chunk must not be NULL. + * chunks must not be NULL, chunk must not be NULL. * * @param chunks Pointer to CF_ChunkList_t object * @param i Position to insert chunk at diff --git a/fsw/src/cf_clist.h b/fsw/src/cf_clist.h index c90f7a9e..a9c12772 100644 --- a/fsw/src/cf_clist.h +++ b/fsw/src/cf_clist.h @@ -79,7 +79,7 @@ void CF_CList_InitNode(CF_CListNode_t *node); /** @brief Insert the given node into the front of a list. * * @par Assumptions, External Events, and Notes: - * head must not be NULL. node must not be NULL. + * head must not be NULL, node must not be NULL. * * @param head Pointer to head of list to insert into * @param node Pointer to node to insert @@ -90,7 +90,7 @@ void CF_CList_InsertFront(CF_CListNode_t **head, CF_CListNode_t *node); /** @brief Insert the given node into the back of a list. * * @par Assumptions, External Events, and Notes: - * head must not be NULL. node must not be NULL. + * head must not be NULL, node must not be NULL. * * @param head Pointer to head of list to insert into * @param node Pointer to node to insert @@ -101,7 +101,7 @@ void CF_CList_InsertBack(CF_CListNode_t **head, CF_CListNode_t *node); /** @brief Remove the given node from the list. * * @par Assumptions, External Events, and Notes: - * head must not be NULL. node must not be NULL. + * head must not be NULL, node must not be NULL. * * @param head Pointer to head of list to remove from * @param node Pointer to node to remove @@ -126,7 +126,7 @@ CF_CListNode_t *CF_CList_Pop(CF_CListNode_t **head); /** @brief Insert the given node into the last after the given start node. * * @par Assumptions, External Events, and Notes: - * head must not be NULL. node must not be NULL. + * head must not be NULL, node must not be NULL. * * @param head Pointer to head of list to remove from * @param start Pointer to node to insert @@ -138,7 +138,7 @@ void CF_CList_InsertAfter(CF_CListNode_t **head, CF_CListNode_t *start, CF_CList /** @brief Traverse the entire list, calling the given function on all nodes. * * @par Assumptions, External Events, and Notes: - * start may be NULL. fn must be a valid function. context may be NULL. + * start may be NULL, fn must be a valid function, context may be NULL. * * @note on traversal it's ok to delete the current node, but do not delete * other nodes in the same list!! @@ -153,7 +153,7 @@ void CF_CList_Traverse(CF_CListNode_t *start, CF_CListFn_t fn, void *context); /** @brief Reverse list traversal, starting from end, calling given function on all nodes. * * @par Assumptions, External Events, and Notes: - * end may be NULL. fn must be a valid function. context may be NULL. + * end may be NULL. fn must be a valid function, context may be NULL. * * @note traverse_R will work backwards from the parameter's prev, and end on param * diff --git a/fsw/src/cf_cmd.c b/fsw/src/cf_cmd.c index 8bfc88c3..93186600 100644 --- a/fsw/src/cf_cmd.c +++ b/fsw/src/cf_cmd.c @@ -334,7 +334,7 @@ CF_Transaction_t *CF_FindTransactionBySequenceNumberAllChannels(CF_TransactionSe /* transaction sequence numbers are referenced with the tuple (eid, tsn) * Even though these tuples are unique to a channel, they should be unique - * across the entire system. Meaning, it isn't correect to have the same + * across the entire system. Meaning, it isn't correct to have the same * EID re-using a TSN in the same system. So, in order to locate the transaction * to suspend, we need to search across all channels for it. */ for (i = 0; i < CF_NUM_CHANNELS; ++i) @@ -374,7 +374,7 @@ int CF_TsnChanAction(CF_TransactionCmd_t *cmd, const char *cmdstr, CF_TsnChanAct else { CFE_EVS_SendEvent(CF_EID_ERR_CMD_TRANS_NOT_FOUND, CFE_EVS_EventType_ERROR, - "CF: %s cmd: failed to find transactino for (eid %lu, ts %lu)", cmdstr, + "CF: %s cmd: failed to find transaction for (eid %lu, ts %lu)", cmdstr, (unsigned long)cmd->eid, (unsigned long)cmd->ts); } } @@ -1272,10 +1272,10 @@ void CF_ProcessGroundCommand(CFE_SB_Buffer_t *msg) CF_CmdDisableDequeue, /* CF_DISABLE_DEQUEUE_CC */ CF_CmdEnablePolldir, /* CF_ENABLE_DIR_POLLING_CC */ CF_CmdDisablePolldir, /* CF_DISABLE_DIR_POLLING_CC */ - NULL, /* CF_DELETE_QUEUE_NODE_CC */ - CF_CmdPurgeQueue, /* CF_PURGE_QUEUE_CC */ - CF_CmdEnableEngine, /* CF_ENABLE_ENGINE_CC */ - CF_CmdDisableEngine, /* CF_DISABLE_ENGINE_CC */ + NULL, + CF_CmdPurgeQueue, /* CF_PURGE_QUEUE_CC */ + CF_CmdEnableEngine, /* CF_ENABLE_ENGINE_CC */ + CF_CmdDisableEngine, /* CF_DISABLE_ENGINE_CC */ }; static const uint16 expected_lengths[CF_NUM_COMMANDS] = { @@ -1293,16 +1293,16 @@ void CF_ProcessGroundCommand(CFE_SB_Buffer_t *msg) sizeof(CF_GetParamCmd_t), /* CF_GET_MIB_PARAM_CC */ 0, 0, - sizeof(CF_NoArgsCmd_t), /* CF_SendRet_CFG_PARAMS_CC */ + 0, sizeof(CF_WriteQueueCmd_t), /* CF_WRITE_QUEUE_CC */ sizeof(CF_UnionArgsCmd_t), /* CF_ENABLE_DEQUEUE_CC */ sizeof(CF_UnionArgsCmd_t), /* CF_DISABLE_DEQUEUE_CC */ sizeof(CF_UnionArgsCmd_t), /* CF_ENABLE_DIR_POLLING_CC */ sizeof(CF_UnionArgsCmd_t), /* CF_DISABLE_DIR_POLLING_CC */ - 0, /* CF_DELETE_QUEUE_NODE_CC */ - sizeof(CF_UnionArgsCmd_t), /* CF_PURGE_QUEUE_CC */ - sizeof(CF_NoArgsCmd_t), /* CF_ENABLE_ENGINE_CC */ - sizeof(CF_NoArgsCmd_t), /* CF_DISABLE_ENGINE_CC */ + 0, + sizeof(CF_UnionArgsCmd_t), /* CF_PURGE_QUEUE_CC */ + sizeof(CF_NoArgsCmd_t), /* CF_ENABLE_ENGINE_CC */ + sizeof(CF_NoArgsCmd_t), /* CF_DISABLE_ENGINE_CC */ }; CFE_MSG_FcnCode_t cmd = 0; diff --git a/fsw/src/cf_cmd.h b/fsw/src/cf_cmd.h index 6647d9de..3c25a3bc 100644 --- a/fsw/src/cf_cmd.h +++ b/fsw/src/cf_cmd.h @@ -147,7 +147,7 @@ void CF_CmdPlaybackDir(CFE_SB_Buffer_t *msg); * accept or reject counters. * * @par Assumptions, External Events, and Notes: - * cmd must not be NULL. errstr must not be NULL. fn must be a valid function. context may be NULL. + * cmd must not be NULL, errstr must not be NULL, fn must be a valid function, context may be NULL. * * @param cmd Pointer to command being processed * @param errstr String to be included in the EVS event if command should fail @@ -216,7 +216,7 @@ CF_Transaction_t *CF_FindTransactionBySequenceNumberAllChannels(CF_TransactionSe * does handle the command accept or reject counters. * * @par Assumptions, External Events, and Notes: - * cmd must not be NULL. fn must be a valid function. context may be NULL. + * cmd must not be NULL, fn must be a valid function, context may be NULL. * * @param cmd Pointer to the command message * @param cmdstr String to include in any generated EVS events diff --git a/fsw/src/cf_codec.c b/fsw/src/cf_codec.c index 451a0b4e..65de2363 100644 --- a/fsw/src/cf_codec.c +++ b/fsw/src/cf_codec.c @@ -925,7 +925,6 @@ void CF_CFDP_DecodeTLV(CF_DecoderState_t *state, CF_Logical_Tlv_t *pltlv) { /* not implemented, but must not send random data */ pltlv->data.data_ptr = CF_CFDP_DoDecodeChunk(state, pltlv->length); - ; } } } diff --git a/fsw/src/cf_codec.h b/fsw/src/cf_codec.h index 7f469e45..fa1d33c4 100644 --- a/fsw/src/cf_codec.h +++ b/fsw/src/cf_codec.h @@ -166,7 +166,7 @@ static inline void CF_CFDP_CodecReset(CF_CodecState_t *state, size_t max_size) * * @param state Encoder/Decoder common state * @param chunksize Size of next block to encode/decode - * @retval true If encode/deocde is possible, enough space exists + * @retval true If encode/decode is possible, enough space exists * @retval false If encode/decode is not possible, not enough space or prior error occurred */ bool CF_CFDP_CodecCheckSize(CF_CodecState_t *state, size_t chunksize); @@ -357,7 +357,7 @@ uint64 CF_DecodeIntegerInSize(CF_DecoderState_t *state, uint8 decode_size); * @brief Encodes a CFDP PDU base header block, bypassing the size field * * On transmit side, the common/base header must be encoded in two parts, to deal - * with the "total_size" field. The initial encoding of the the basic fields is + * with the "total_size" field. The initial encoding of the basic fields is * done as soon as it is known that a PDU of this type needs to be sent, but the * total size may not be yet known, as it depends on the remainder of encoding * and any additional data that might get added to the variable length sections. diff --git a/fsw/src/cf_events.h b/fsw/src/cf_events.h index b372d590..808bf6e6 100644 --- a/fsw/src/cf_events.h +++ b/fsw/src/cf_events.h @@ -141,7 +141,7 @@ * * \par Cause: * - * Failure from SB Recieve Buffer call in application run loop + * Failure from SB Receive Buffer call in application run loop */ #define CF_EID_ERR_INIT_MSG_RECV (29) @@ -405,7 +405,7 @@ * * \par Cause: * - * Command request to transimit a file received when channel is already + * Command request to transmit a file received when channel is already * handling the maximum number of concurrent command transmit transactions */ #define CF_EID_ERR_CFDP_MAX_CMD_TX (64) @@ -601,7 +601,7 @@ * * \par Cause: * - * Out-of-order RX Class 2 Metadata PDU reveived with file size that doesn't + * Out-of-order RX Class 2 Metadata PDU received with file size that doesn't * match already received EOF PDU file size */ #define CF_EID_ERR_CFDP_R_EOF_MD_SIZE (82) @@ -895,7 +895,7 @@ * * \par Cause: * - * Receipt and sucessful processing of reset counters command + * Receipt and successful processing of reset counters command */ #define CF_EID_INF_CMD_RESET (111) @@ -1137,7 +1137,7 @@ * * \par Cause: * - * Suspend/resume command received affectina single transaction already set to that state + * Suspend/resume command received affecting single transaction already set to that state */ #define CF_EID_ERR_CMD_SUSPRES_SAME (133) @@ -1192,7 +1192,7 @@ * * \par Cause: * - * Write Queue command recived with invalid queue selection arguments + * Write Queue command received with invalid queue selection arguments */ #define CF_EID_ERR_CMD_WQ_ARGS (138) @@ -1291,7 +1291,7 @@ * * \par Cause: * - * Invalid channel value recieved in set or get parameter command + * Invalid channel value received in set or get parameter command */ #define CF_EID_ERR_CMD_GETSET_CHAN (147) diff --git a/fsw/src/cf_logical_pdu.h b/fsw/src/cf_logical_pdu.h index ce3abd5b..8aa2a2eb 100644 --- a/fsw/src/cf_logical_pdu.h +++ b/fsw/src/cf_logical_pdu.h @@ -31,7 +31,7 @@ * Specifically, this intent differs in the following ways: * - All numeric fields are in native byte order * - All structures are padded/aligned according to native CPU (i.e. not packed) - * - All bitfields are exploded, where each field/group is a separate member + * - All bit-fields are exploded, where each field/group is a separate member * - Variable-size content is normalized, allocated as the maximum possible size */ @@ -50,7 +50,7 @@ * This just serves to set an upper bound on the logical structures, to keep * things simple. The real limit varies depending on the specific PDU type * being processed. This caps the amount of storage memory for the worst - * case, the actual number present is always part of the runtime state. + * case, the actual number present is always part of the run-time state. * * Without filestore requests, use of TLV is pretty limited. * @@ -76,7 +76,7 @@ typedef uint32 CF_FileSize_t; /* - * Note that by exploding the bitfields into separate members, this will make the + * Note that by exploding the bit-fields into separate members, this will make the * storage much less efficient (in many cases using 8 bits to store only 1 logical bit) * but this greatly improves and simplifies the access during processing, avoiding * repeated shifts and mask. Furthermore, it only needs to be stored this way @@ -140,7 +140,7 @@ typedef struct CF_Logical_PduFileDirectiveHeader * * These are only used for string data (mostly filenames) so * the data can refer directly to the encoded bits, it does - * not necesarily need to be duplicated here. + * not necessarily need to be duplicated here. */ typedef struct CF_Logical_Lv { @@ -270,7 +270,7 @@ typedef struct CF_Logical_PduAck */ typedef struct CF_Logical_PduMd { - uint8 close_req; /**< \brief transation closure not requested (0) or requested (1) */ + uint8 close_req; /**< \brief transaction closure not requested (0) or requested (1) */ uint8 checksum_type; /**< \brief 0 indicates legacy modular checksum */ CF_FileSize_t size; diff --git a/fsw/src/cf_msg.h b/fsw/src/cf_msg.h index 464abe56..2e7f0feb 100644 --- a/fsw/src/cf_msg.h +++ b/fsw/src/cf_msg.h @@ -36,112 +36,788 @@ * \{ */ +/** + * \brief Housekeeping command counters + */ typedef struct CF_HkCmdCounters { - uint16 cmd; - uint16 err; + uint16 cmd; /**< \brief Command success counter */ + uint16 err; /**< \brief Command error counter */ } CF_HkCmdCounters_t; +/** + * \brief Housekeeping sent counters + */ typedef struct CF_HkSent { - uint64 file_data_bytes; - uint32 pdu; - uint32 nak_segment_requests; + uint64 file_data_bytes; /**< \brief Sent File data bytes */ + uint32 pdu; /**< \brief Sent PDUs counter */ + uint32 nak_segment_requests; /**< \brief Sent NAK segment requests counter */ } CF_HkSent_t; +/** + * \brief Housekeeping received counters + */ typedef struct CF_HkRecv { - uint64 file_data_bytes; - uint32 pdu; - uint32 error; /* generic pdu error */ - uint16 spurious; - uint16 dropped; - uint32 nak_segment_requests; + uint64 file_data_bytes; /**< \brief Received File data bytes */ + uint32 pdu; /**< \brief Received PDUs with valid header counter */ + uint32 error; /**< \brief Received PDUs with error counter, see related event for cause */ + uint16 spurious; /**< \brief Received PDUs with invalid directive code for current context or + * file directive FIN without matching active transaction counter, + * see related event for cause + */ + uint16 dropped; /**< \brief Received PDUs dropped due to a transaction error */ + uint32 nak_segment_requests; /**< \brief Received NAK segment requests counter */ } CF_HkRecv_t; +/** + * \brief Housekeeping fault counters + */ typedef struct CF_HkFault { - uint16 file_open; - uint16 file_read; - uint16 file_seek; - uint16 file_write; - uint16 file_rename; - uint16 directory_read; - uint16 crc_mismatch; - uint16 file_size_mismatch; - uint16 nak_limit; - uint16 ack_limit; - uint16 inactivity_timer; - uint16 spare; + uint16 file_open; /**< \brief File open fault counter */ + uint16 file_read; /**< \brief File read fault counter */ + uint16 file_seek; /**< \brief File seek fault counter */ + uint16 file_write; /**< \brief File write fault counter */ + uint16 file_rename; /**< \brief File rename fault counter */ + uint16 directory_read; /**< \brief Directory read fault counter */ + uint16 crc_mismatch; /**< \brief CRC mismatch fault counter */ + uint16 file_size_mismatch; /**< \brief File size mismatch fault counter */ + uint16 nak_limit; /**< \brief NAK limit exceeded fault counter */ + uint16 ack_limit; /**< \brief ACK limit exceeded fault counter */ + uint16 inactivity_timer; /**< \brief Inactivity timer exceeded counter */ + uint16 spare; /**< \brief Alignment spare to avoid implicit padding */ } CF_HkFault_t; +/** + * \brief Housekeeping counters + */ typedef struct CF_HkCounters { - CF_HkSent_t sent; - CF_HkRecv_t recv; - CF_HkFault_t fault; + CF_HkSent_t sent; /**< \brief Sent counters */ + CF_HkRecv_t recv; /**< \brief Received counters */ + CF_HkFault_t fault; /**< \brief Fault counters */ } CF_HkCounters_t; +/** + * \brief Housekeeping channel data + */ typedef struct CF_HkChannel_Data { - CF_HkCounters_t counters; - uint16 q_size[CF_QueueIdx_NUM]; - uint8 poll_counter; - uint8 playback_counter; - uint8 frozen; /* NOTE: this could be more than one flag if we ever need it */ - uint8 spare[7]; /* Structure has uint64 values in the counters, so size should be multiple of 8 */ + CF_HkCounters_t counters; /**< \brief Counters */ + uint16 q_size[CF_QueueIdx_NUM]; /**< \brief Queue sizes */ + uint8 poll_counter; /**< \brief Number of active polling directories */ + uint8 playback_counter; /**< \brief Number of active playback directories */ + uint8 frozen; /**< \brief Frozen state: 0 == not frozen, else frozen */ + uint8 spare[7]; /**< \brief Alignment spare (uint64 values in the counters) */ } CF_HkChannel_Data_t; +/** + * \brief Housekeeping packet + */ typedef struct CF_HkPacket { - CFE_MSG_TelemetryHeader_t tlm_header; - - /* app HK */ - CF_HkCmdCounters_t counters; + CFE_MSG_TelemetryHeader_t tlm_header; /**< \brief Telemetry header */ + CF_HkCmdCounters_t counters; /**< \brief Command counters */ + uint8 spare[4]; /**< \brief Alignment spare (CF_HkCmdCounters_t is 4 bytes) */ - uint8 spare[4]; /* CF_HkCmdCounters_t is 4 bytes, and CF_HkChannel_Data_t uses uint64 values */ - - /* per-channel HK */ - CF_HkChannel_Data_t channel_hk[CF_NUM_CHANNELS]; + CF_HkChannel_Data_t channel_hk[CF_NUM_CHANNELS]; /**< \brief Per channel housekeeping data */ } CF_HkPacket_t; /**\}*/ /** * \defgroup cfscfcmdcodes CFS CFDP Command Codes - * - * NOTE: these are what was in the original app (may have slightly different names) - * Not sure that we need to implement all these for cf 3.0 - * - * ANOTHER NOTE: not all of these are used, but they are here legacy from the old app * \{ */ typedef enum { - CF_NOOP_CC = 0, - CF_RESET_CC = 1, - CF_TX_FILE_CC = 2, - CF_PLAYBACK_DIR_CC = 3, - CF_FREEZE_CC = 4, - CF_THAW_CC = 5, - CF_SUSPEND_CC = 6, - CF_RESUME_CC = 7, - CF_CANCEL_CC = 8, - CF_ABANDON_CC = 9, + + /** + * \brief No-op + * + * \par Description + * No-operation command for aliveness verification and version reporting + * + * \par Command Structure + * #CF_NoArgsCmd_t + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_NOOP + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + */ + CF_NOOP_CC = 0, + + /** + * \brief Reset counters + * + * \par Description + * Resets the requested housekeeping counters + * + * \par Command Structure + * #CF_UnionArgsCmd_t where byte[0] specifies the counters type, byte[1-3] don't care: + * - 0 = all counters + * - 1 = command counters + * - 2 = fault counters + * - 3 = up counters + * - 4 = down counters + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_RESET + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid counter type, #CF_EID_ERR_CMD_RESET_INVALID + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + */ + CF_RESET_CC = 1, + + /** + * \brief Transmit file + * + * \par Description + * Requests transmission of a file + * + * \par Command Structure + * #CF_TxFileCmd_t + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_TX_FILE + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid parameter, #CF_EID_ERR_CMD_BAD_PARAM + * - Transaction initialization failure, #CF_EID_ERR_CMD_TX_FILE + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_PLAYBACK_DIR_CC + */ + CF_TX_FILE_CC = 2, + + /** + * \brief Playback a directory + * + * \par Description + * Transmits all the files in a directory + * + * \par Command Structure + * #CF_PlaybackDirCmd_t - note it's currently a typedef of CF_TxFileCmd_t, where + * the source filename and destination filename are directories + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_PLAYBACK_DIR + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid parameter, #CF_EID_ERR_CMD_BAD_PARAM + * - Playback initialization failure, #CF_EID_ERR_CMD_PLAYBACK_DIR + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_TX_FILE_CC + */ + CF_PLAYBACK_DIR_CC = 3, + + /** + * \brief Freeze a channel + * + * \par Description + * Disables the transmission of all PDUs and disables tick processing (timeouts, ACK/NAK, etc) + * for the specified channel, will still consume all received messages. Note + * this could cause failures for class 2 transactions in progress. + * + * \par Command Structure + * #CF_UnionArgsCmd_t where byte[0] specifies the channel number or all channels + * - 255 = all channels + * - else = single channel + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_FREEZE + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM + * - Command processing failure, #CF_EID_ERR_CMD_FREEZE + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_THAW_CC + */ + CF_FREEZE_CC = 4, + + /** + * \brief Thaw a channel + * + * \par Description + * Enables the transmission of all PDUs and resumes tick processing (timeouts, ACK/NAK, etc) + * for the specified channel, note received messages are consumed either way. + * + * \par Command Structure + * #CF_UnionArgsCmd_t where byte[0] specifies the channel number or all channels + * - 255 = all channels + * - else = single channel + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_THAW + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM + * - Command processing failure, #CF_EID_ERR_CMD_THAW + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_FREEZE_CC + */ + CF_THAW_CC = 5, + + /** + * \brief Suspend a transaction + * + * \par Description + * Disables the transmission of all PDUs and disables tick processing (timeouts, ACK/NAK, etc) on a single + * transaction, all channels and transactions, or all transactions on a specific channel. + * Will still consume all received messages. Note suspension is tracked per transaction, + * whereas freeze/thaw are tracked per channel. + * + * \par Command Structure + * #CF_TransactionCmd_t + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_SUSPRES + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Transaction not found using compound key, #CF_EID_ERR_CMD_TRANS_NOT_FOUND + * - Invalid channel number, #CF_EID_ERR_CMD_TSN_CHAN_INVALID + * - Already in requested state, #CF_EID_ERR_CMD_SUSPRES_SAME + * - No matching transaction, #CF_EID_ERR_CMD_SUSPRES_CHAN + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_RESUME_CC, #CF_CANCEL_CC, #CF_ABANDON_CC + */ + CF_SUSPEND_CC = 6, + + /** + * \brief Resume a transaction + * + * \par Description + * Enables the transmission of all PDUs and resumes tick processing (timeouts, ACK/NAK, etc) on a single + * transaction, all channels and transactions, or all transactions on a specific channel. + * Note a suspended transaction still consume all received messages. Note suspension is tracked per + * transaction, whereas freeze/thaw are tracked per channel. + * + * \par Command Structure + * #CF_TransactionCmd_t + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_SUSPRES + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Transaction not found using compound key, #CF_EID_ERR_CMD_TRANS_NOT_FOUND + * - Invalid channel number, #CF_EID_ERR_CMD_TSN_CHAN_INVALID + * - Already in requested state, #CF_EID_ERR_CMD_SUSPRES_SAME + * - No matching transaction, #CF_EID_ERR_CMD_SUSPRES_CHAN + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_SUSPEND_CC, #CF_CANCEL_CC, #CF_ABANDON_CC + */ + CF_RESUME_CC = 7, + + /** + * \brief Cancel a transaction + * + * \par Description + * Cancel transaction processing by taking steps to close out cleanly (based on transaction + * type and direction) for a single transaction, all channels and transactions, + * or all transactions on a specific channel. + * + * \par Command Structure + * #CF_TransactionCmd_t + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_CANCEL + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Transaction not found using compound key, #CF_EID_ERR_CMD_TRANS_NOT_FOUND + * - Invalid channel number, #CF_EID_ERR_CMD_TSN_CHAN_INVALID + * - No matching transaction, #CF_EID_ERR_CMD_CANCEL_CHAN + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_SUSPEND_CC, #CF_RESUME_CC, #CF_ABANDON_CC + */ + CF_CANCEL_CC = 8, + + /** + * \brief Abandon a transaction + * + * \par Description + * Abandon transaction processing with an immediate reset (no close out attempted) + * for a single transaction, all channels and transactions, + * or all transactions on a specific channel. + * + * \par Command Structure + * #CF_TransactionCmd_t + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_ABANDON + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Transaction not found using compound key, #CF_EID_ERR_CMD_TRANS_NOT_FOUND + * - Invalid channel number, #CF_EID_ERR_CMD_TSN_CHAN_INVALID + * - No matching transaction, #CF_EID_ERR_CMD_ABANDON_CHAN + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_SUSPEND_CC, #CF_RESUME_CC, #CF_CANCEL_CC + */ + CF_ABANDON_CC = 9, + + /** + * \brief Set parameter + * + * \par Description + * Sets a configuration parameter + * + * \par Command Structure + * #CF_SetParamCmd_t + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_GETSET1 + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid configuration parameter key, #CF_EID_ERR_CMD_GETSET_PARAM + * - Invalid channel number, #CF_EID_ERR_CMD_GETSET_CHAN + * - Parameter value failed validation, #CF_EID_ERR_CMD_GETSET_VALIDATE + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_GET_MIB_PARAM_CC + */ CF_SET_MIB_PARAM_CC = 10, + + /** + * \brief Get parameter + * + * \par Description + * Gets a configuration parameter + * + * \par Command Structure + * #CF_GetParamCmd_t + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_GETSET2 + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid configuration parameter key, #CF_EID_ERR_CMD_GETSET_PARAM + * - Invalid channel number, #CF_EID_ERR_CMD_GETSET_CHAN + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_SET_MIB_PARAM_CC + */ CF_GET_MIB_PARAM_CC = 11, - CF_WRITE_QUEUE_CC = 15, - /* NOTE: ENABLE/DISABLE commands should be a single command code, but legacy has them separate (ugh) */ - CF_ENABLE_DEQUEUE_CC = 16, - CF_DISABLE_DEQUEUE_CC = 17, - CF_ENABLE_DIR_POLLING_CC = 18, + /** + * \brief Write queue + * + * \par Description + * Writes requested queue(s) to a file + * + * \par Command Structure + * #CF_WriteQueueCmd_t + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_WQ + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid parameter combination, #CF_EID_ERR_CMD_WQ_ARGS + * - Invalid channel number, #CF_EID_ERR_CMD_WQ_CHAN + * - Open file to write failed, #CF_EID_ERR_CMD_WQ_OPEN + * - Write RX data failed, #CF_EID_ERR_CMD_WQ_WRITEQ_RX + * - Write RX history data failed, #CF_EID_ERR_CMD_WQ_WRITEHIST_RX + * - Write TX data failed, #CF_EID_ERR_CMD_WQ_WRITEQ_TX + * - Write TX history data failed, #CF_EID_ERR_CMD_WQ_WRITEHIST_TX + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_PURGE_QUEUE_CC + */ + CF_WRITE_QUEUE_CC = 15, + + /** + * \brief Enable dequeue + * + * \par Description + * Enables the sending of file data PDUs. + * + * \par Command Structure + * #CF_UnionArgsCmd_t where byte[0] specifies the channel number or all channels + * - 255 = all channels + * - else = single channel + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_ENABLE_DEQUEUE + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM + * - Enable dequeue failed, #CF_EID_ERR_CMD_ENABLE_DEQUEUE + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_DISABLE_DEQUEUE_CC + */ + CF_ENABLE_DEQUEUE_CC = 16, + + /** + * \brief Disable dequeue + * + * \par Description + * Disables the sending of file data PDUs. + * + * \par Command Structure + * #CF_UnionArgsCmd_t where byte[0] specifies the channel number or all channels + * - 255 = all channels + * - else = single channel + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_DISABLE_DEQUEUE + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM + * - Disable dequeue failed, #CF_EID_INF_CMD_DISABLE_DEQUEUE + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_ENABLE_DEQUEUE_CC + */ + CF_DISABLE_DEQUEUE_CC = 17, + + /** + * \brief Enable directory polling + * + * \par Description + * Enables the processing of polling directories + * + * \par Command Structure + * #CF_UnionArgsCmd_t + * + * byte[0] specifies the channel number or all channels + * - 255 = all channels + * - else = single channel + * + * byte[1] specifies the polling directory index + * - 255 = all polling directories + * - else = single polling directory index + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_ENABLE_POLLDIR + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM + * - Invalid polling directory index, #CF_EID_ERR_CMD_POLLDIR_INVALID + * - Enable directory polling failed, #CF_EID_ERR_CMD_ENABLE_POLLDIR + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_DISABLE_DIR_POLLING_CC + */ + CF_ENABLE_DIR_POLLING_CC = 18, + + /** + * \brief Disable directory polling + * + * \par Description + * Disable the processing of polling directories + * + * \par Command Structure + * #CF_UnionArgsCmd_t + * + * byte[0] specifies the channel number or all channels + * - 255 = all channels + * - else = single channel + * + * byte[1] specifies the polling directory index + * - 255 = all polling directories + * - else = single polling directory index + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_DISABLE_POLLDIR + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM + * - Invalid polling directory index, #CF_EID_ERR_CMD_POLLDIR_INVALID + * - Disable directory polling failed, #CF_EID_ERR_CMD_DISABLE_POLLDIR + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_ENABLE_DIR_POLLING_CC + */ CF_DISABLE_DIR_POLLING_CC = 19, - CF_DELETE_QUEUE_NODE_CC = 20, - CF_PURGE_QUEUE_CC = 21, - CF_ENABLE_ENGINE_CC = 22, - CF_DISABLE_ENGINE_CC = 23, - CF_NUM_COMMANDS = 24, + + /** + * \brief Purge queue + * + * \par Description + * Purge the requested queue + * + * \par Command Structure + * #CF_UnionArgsCmd_t + * + * byte[0] specifies the channel number or all channels + * - 255 = all channels + * - else = single channel + * + * byte[1] specifies the queue + * - 0 = Pending queue + * - 1 = History queue + * - 2 = Both pending and history queue + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_PURGE_QUEUE + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Invalid channel number, #CF_EID_ERR_CMD_CHAN_PARAM + * - Invalid purge queue argument, #CF_EID_ERR_CMD_PURGE_ARG + * - Purge queue failed, #CF_EID_ERR_CMD_PURGE_QUEUE + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_WRITE_QUEUE_CC + */ + CF_PURGE_QUEUE_CC = 21, + + /** + * \brief Enable engine + * + * \par Description + * Reinitialize engine and enable processing. Note configuration table updates + * are not processed while the engine is enabled. + * + * \par Command Structure + * #CF_NoArgsCmd_t + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_ENABLE_ENGINE + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Engine initialization failed, #CF_EID_ERR_CMD_ENABLE_ENGINE + * - Engine already enabled, #CF_EID_ERR_CMD_ENG_ALREADY_ENA + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_DISABLE_ENGINE_CC + */ + CF_ENABLE_ENGINE_CC = 22, + + /** + * \brief Disable engine + * + * \par Description + * Disable engine processing. Note configuration table updates + * can be performed while the engine is disabled, and when the engine is + * re-enabled the new configuration will take affect. + * + * \par Command Structure + * #CF_NoArgsCmd_t + * + * \par Command Verification + * Successful execution of this command may be verified with + * the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.cmd will increment + * - #CF_EID_INF_CMD_DISABLE_ENGINE + * + * \par Error Conditions + * This command may fail for the following reason(s): + * - Command packet length not as expected, #CF_EID_ERR_CMD_GCMD_LEN + * - Engine already disabled, #CF_EID_ERR_CMD_ENG_ALREADY_DIS + * + * \par Evidence of failure may be found in the following telemetry: + * - #CF_HkPacket_t.counters #CF_HkCmdCounters_t.err will increment + * + * \par Criticality + * None + * + * \sa #CF_DISABLE_ENGINE_CC + */ + CF_DISABLE_ENGINE_CC = 23, + + /** \brief Command code limit used for validity check and array sizing */ + CF_NUM_COMMANDS = 24, } CF_CMDS; /**\}*/ @@ -151,97 +827,137 @@ typedef enum * \{ */ +/** + * \brief No arguments command structure + * + * For command details see #CF_NOOP_CC, #CF_ENABLE_ENGINE_CC, #CF_DISABLE_ENGINE_CC + */ typedef struct CF_NoArgsCmd { - CFE_MSG_CommandHeader_t cmd_header; + CFE_MSG_CommandHeader_t cmd_header; /**< \brief Command header */ } CF_NoArgsCmd_t; -/* unionargs - - * - * A lot of commands have a single byte arg, and the old application had 3 spare bytes after that. - * - * So this structure gives the flexibility of a single byte arg, 2 halfwords, or a dword, all in one declaration. */ +/** + * \brief Command payload argument union to support 4 uint8's, 2 uint16's or 1 uint32 + */ typedef union CF_UnionArgs_Payload { - uint32 dword; - uint16 hword[2]; - uint8 byte[4]; + uint32 dword; /**< \brief Generic uint32 argument */ + uint16 hword[2]; /**< \brief Generic uint16 array of arguments */ + uint8 byte[4]; /**< \brief Generic uint8 array of arguments */ } CF_UnionArgs_Payload_t; +/** + * \brief Generic command structure with arguments supports common handling on multiple command types + * + * For command details see #CF_RESET_CC, #CF_FREEZE_CC, #CF_THAW_CC, #CF_ENABLE_DEQUEUE_CC, + * #CF_DISABLE_DEQUEUE_CC, #CF_ENABLE_DIR_POLLING_CC, #CF_ENABLE_DIR_POLLING_CC, #CF_PURGE_QUEUE_CC + */ typedef struct { - CFE_MSG_CommandHeader_t cmd_header; - CF_UnionArgs_Payload_t data; + CFE_MSG_CommandHeader_t cmd_header; /**< \brief Command header */ + CF_UnionArgs_Payload_t data; /**< \brief Generic command arguments */ } CF_UnionArgsCmd_t; /** - * @brief Parameter IDs for use with Get/Set param messages + * \brief Parameter IDs for use with Get/Set parameter messages * * Specifically these are used for the "key" field within CF_GetParamCmd_t and * CF_SetParamCmd_t message structures. */ typedef enum { - CF_GetSet_ValueID_ticks_per_second, - CF_GetSet_ValueID_rx_crc_calc_bytes_per_wakeup, - CF_GetSet_ValueID_ack_timer_s, - CF_GetSet_ValueID_nak_timer_s, - CF_GetSet_ValueID_inactivity_timer_s, - CF_GetSet_ValueID_outgoing_file_chunk_size, - CF_GetSet_ValueID_ack_limit, - CF_GetSet_ValueID_nak_limit, - CF_GetSet_ValueID_local_eid, - CF_GetSet_ValueID_chan_max_outgoing_messages_per_wakeup, - CF_GetSet_ValueID_MAX + CF_GetSet_ValueID_ticks_per_second, /**< \brief Ticks per second key */ + CF_GetSet_ValueID_rx_crc_calc_bytes_per_wakeup, /**< \brief Receive CRC calculated bytes per wake-up key */ + CF_GetSet_ValueID_ack_timer_s, /**< \brief ACK timer in seconds key */ + CF_GetSet_ValueID_nak_timer_s, /**< \brief NAK timer in seconds key */ + CF_GetSet_ValueID_inactivity_timer_s, /**< \brief Inactivity timer in seconds key */ + CF_GetSet_ValueID_outgoing_file_chunk_size, /**< \brief Outgoing file chunk size key */ + CF_GetSet_ValueID_ack_limit, /**< \brief ACK retry limit key */ + CF_GetSet_ValueID_nak_limit, /**< \brief NAK retry limit key */ + CF_GetSet_ValueID_local_eid, /**< \brief Local entity id key */ + CF_GetSet_ValueID_chan_max_outgoing_messages_per_wakeup, /**< \brief Max outgoing messages per wake-up key */ + CF_GetSet_ValueID_MAX /**< \brief Key limit used for validity check */ } CF_GetSet_ValueID_t; +/** + * \brief Get parameter command structure + * + * For command details see #CF_GET_MIB_PARAM_CC + */ typedef struct CF_GetParamCmd { - CFE_MSG_CommandHeader_t cmd_header; - uint8 key; - uint8 chan_num; + CFE_MSG_CommandHeader_t cmd_header; /**< \brief Command header */ + uint8 key; /**< \brief Parameter key, see #CF_GetSet_ValueID_t */ + uint8 chan_num; /**< \brief Channel number */ } CF_GetParamCmd_t; +/** + * \brief Set parameter command structure + * + * For command details see #CF_SET_MIB_PARAM_CC + */ typedef struct CF_SetParamCmd { - CFE_MSG_CommandHeader_t cmd_header; - uint32 value; - uint8 key; - uint8 chan_num; - uint8 spare[2]; /* Required to make the size a multiple of uint32 */ + CFE_MSG_CommandHeader_t cmd_header; /**< \brief Command header */ + uint32 value; /**< \brief Parameter value to set */ + uint8 key; /**< \brief Parameter key, see #CF_GetSet_ValueID_t */ + uint8 chan_num; /**< \brief Channel number */ + uint8 spare[2]; /**< \brief Alignment spare, uint32 multiple */ } CF_SetParamCmd_t; +/** + * \brief Transmit file command structure + * + * For command details see #CF_TX_FILE_CC + */ typedef struct CF_TxFileCmd { - CFE_MSG_CommandHeader_t cmd_header; - uint8 cfdp_class; /* 0=class 1, 1=class 2 */ - uint8 keep; /* if 1, then keep the file -- otherwise delete */ - uint8 chan_num; - uint8 priority; - CF_EntityId_t dest_id; - char src_filename[CF_FILENAME_MAX_LEN]; - char dst_filename[CF_FILENAME_MAX_LEN]; + CFE_MSG_CommandHeader_t cmd_header; /**< \brief Command header */ + uint8 cfdp_class; /**< \brief CFDP class: 0=class 1, 1=class 2 */ + uint8 keep; /**< \brief Keep file flag: 1=keep, else delete */ + uint8 chan_num; /**< \brief Channel number */ + uint8 priority; /**< \brief Priority: 0=highest priority */ + CF_EntityId_t dest_id; /**< \brief Destination entity id */ + char src_filename[CF_FILENAME_MAX_LEN]; /**< \brief Source file/directory name */ + char dst_filename[CF_FILENAME_MAX_LEN]; /**< \brief Destination file/directory name */ } CF_TxFileCmd_t; +/** + * \brief Write Queue command structure + * + * For command details see #CF_WRITE_QUEUE_CC + */ typedef struct CF_WriteQueueCmd { - CFE_MSG_CommandHeader_t cmd_header; - uint8 type; /* all=0, up=1, down=2 */ - uint8 chan; - uint8 queue; /* 0=pending, 1=active, 2=history, 3=all */ - uint8 spare; /* why? */ - char filename[CF_FILENAME_MAX_LEN]; + CFE_MSG_CommandHeader_t cmd_header; /**< \brief Command header */ + uint8 type; /**< \brief Transaction direction: all=0, up=1, down=2 */ + uint8 chan; /**< \brief Channel number */ + uint8 queue; /**< \brief Queue type: 0=pending, 1=active, 2=history, 3=all */ + uint8 spare; /**< \brief Alignment spare, puts filename on 32-bit boundary */ + + char filename[CF_FILENAME_MAX_LEN]; /**< \brief Filename written to */ } CF_WriteQueueCmd_t; +/** + * \brief Playback directory command structure + * + * For command details see #CF_PLAYBACK_DIR_CC + */ typedef CF_TxFileCmd_t CF_PlaybackDirCmd_t; +/** + * \brief Transaction command structure + * + * For command details see #CF_SUSPEND_CC, #CF_RESUME_CC, #CF_CANCEL_CC, #CF_ABANDON_CC + */ typedef struct CF_TransactionCmd { - CFE_MSG_CommandHeader_t cmd_header; - CF_TransactionSeq_t ts; - CF_EntityId_t eid; - uint8 chan; /* if 254, use ts. if 255, all channels */ - uint8 spare[3]; /* To make structure a multiple of uint32 */ + CFE_MSG_CommandHeader_t cmd_header; /**< \brief Command header */ + CF_TransactionSeq_t ts; /**< \brief Transaction sequence number */ + CF_EntityId_t eid; /**< \brief Entity id */ + uint8 chan; /**< \brief Channel number: 254=use ts, 255=all channels, else channel */ + uint8 spare[3]; /**< \brief Alignment spare for 32-bit multiple */ } CF_TransactionCmd_t; /**\}*/