Skip to content

Commit

Permalink
Fix #74, add payload submember for all cmd/tlm
Browse files Browse the repository at this point in the history
Adds a "Payload" submember to all cmd/tlm structs.  The message content
is found in this sub-structure.  This matches the patterns currently
implemented in CFE.
  • Loading branch information
jphickey committed Feb 13, 2023
1 parent 5c9d4e8 commit ecfb051
Show file tree
Hide file tree
Showing 8 changed files with 537 additions and 230 deletions.
235 changes: 190 additions & 45 deletions fsw/inc/fm_msg.h

Large diffs are not rendered by default.

140 changes: 70 additions & 70 deletions fsw/inc/fm_msgdefs.h

Large diffs are not rendered by default.

25 changes: 14 additions & 11 deletions fsw/src/fm_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,9 @@ void FM_ProcessCmd(const CFE_SB_Buffer_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void FM_ReportHK(const CFE_MSG_CommandHeader_t *Msg)
{
const char *CmdText = "HK Request";
bool Result = true;
const char * CmdText = "HK Request";
bool Result = true;
FM_HousekeepingPkt_Payload_t *PayloadPtr;

/* Verify command packet length */
Result = FM_IsValidCmdPktLength(&Msg->Msg, sizeof(FM_HousekeepingCmd_t), FM_HK_REQ_ERR_EID, CmdText);
Expand All @@ -405,22 +406,24 @@ void FM_ReportHK(const CFE_MSG_CommandHeader_t *Msg)
CFE_MSG_Init(&FM_GlobalData.HousekeepingPkt.TlmHeader.Msg, CFE_SB_ValueToMsgId(FM_HK_TLM_MID),
sizeof(FM_HousekeepingPkt_t));

PayloadPtr = &FM_GlobalData.HousekeepingPkt.Payload;

/* Report application command counters */
FM_GlobalData.HousekeepingPkt.CommandCounter = FM_GlobalData.CommandCounter;
FM_GlobalData.HousekeepingPkt.CommandErrCounter = FM_GlobalData.CommandErrCounter;
PayloadPtr->CommandCounter = FM_GlobalData.CommandCounter;
PayloadPtr->CommandErrCounter = FM_GlobalData.CommandErrCounter;

FM_GlobalData.HousekeepingPkt.NumOpenFiles = FM_GetOpenFilesData(NULL);
PayloadPtr->NumOpenFiles = FM_GetOpenFilesData(NULL);

/* Report child task command counters */
FM_GlobalData.HousekeepingPkt.ChildCmdCounter = FM_GlobalData.ChildCmdCounter;
FM_GlobalData.HousekeepingPkt.ChildCmdErrCounter = FM_GlobalData.ChildCmdErrCounter;
FM_GlobalData.HousekeepingPkt.ChildCmdWarnCounter = FM_GlobalData.ChildCmdWarnCounter;
PayloadPtr->ChildCmdCounter = FM_GlobalData.ChildCmdCounter;
PayloadPtr->ChildCmdErrCounter = FM_GlobalData.ChildCmdErrCounter;
PayloadPtr->ChildCmdWarnCounter = FM_GlobalData.ChildCmdWarnCounter;

FM_GlobalData.HousekeepingPkt.ChildQueueCount = FM_GlobalData.ChildQueueCount;
PayloadPtr->ChildQueueCount = FM_GlobalData.ChildQueueCount;

/* Report current and previous commands executed by the child task */
FM_GlobalData.HousekeepingPkt.ChildCurrentCC = FM_GlobalData.ChildCurrentCC;
FM_GlobalData.HousekeepingPkt.ChildPreviousCC = FM_GlobalData.ChildPreviousCC;
PayloadPtr->ChildCurrentCC = FM_GlobalData.ChildCurrentCC;
PayloadPtr->ChildPreviousCC = FM_GlobalData.ChildPreviousCC;

CFE_SB_TimeStampMsg(&FM_GlobalData.HousekeepingPkt.TlmHeader.Msg);
CFE_SB_TransmitMsg(&FM_GlobalData.HousekeepingPkt.TlmHeader.Msg, true);
Expand Down
44 changes: 26 additions & 18 deletions fsw/src/fm_child.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,8 @@ void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs)
osal_id_t FileHandle = OS_OBJECT_ID_UNDEFINED;
int32 Status = 0;

FM_FileInfoPkt_Payload_t *ReportPtr;

/* Report current child task activity */
FM_GlobalData.ChildCurrentCC = CmdArgs->CommandCode;

Expand All @@ -826,14 +828,16 @@ void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs)
CFE_MSG_Init(&FM_GlobalData.FileInfoPkt.TlmHeader.Msg, CFE_SB_ValueToMsgId(FM_FILE_INFO_TLM_MID),
sizeof(FM_FileInfoPkt_t));

ReportPtr = &FM_GlobalData.FileInfoPkt.Payload;

/* Report directory or filename state, name, size and time */
FM_GlobalData.FileInfoPkt.FileStatus = (uint8)CmdArgs->FileInfoState;
strncpy(FM_GlobalData.FileInfoPkt.Filename, CmdArgs->Source1, OS_MAX_PATH_LEN - 1);
FM_GlobalData.FileInfoPkt.Filename[OS_MAX_PATH_LEN - 1] = '\0';
ReportPtr->FileStatus = (uint8)CmdArgs->FileInfoState;
strncpy(ReportPtr->Filename, CmdArgs->Source1, OS_MAX_PATH_LEN - 1);
ReportPtr->Filename[OS_MAX_PATH_LEN - 1] = '\0';

FM_GlobalData.FileInfoPkt.FileSize = CmdArgs->FileInfoSize;
FM_GlobalData.FileInfoPkt.LastModifiedTime = CmdArgs->FileInfoTime;
FM_GlobalData.FileInfoPkt.Mode = CmdArgs->Mode;
ReportPtr->FileSize = CmdArgs->FileInfoSize;
ReportPtr->LastModifiedTime = CmdArgs->FileInfoTime;
ReportPtr->Mode = CmdArgs->Mode;

/* Validate CRC algorithm */
if (CmdArgs->FileInfoCRC != FM_IGNORE_CRC)
Expand Down Expand Up @@ -895,8 +899,8 @@ void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs)
OS_close(FileHandle);

/* Add CRC to telemetry packet */
FM_GlobalData.FileInfoPkt.CRC_Computed = true;
FM_GlobalData.FileInfoPkt.CRC = CurrentCRC;
ReportPtr->CRC_Computed = true;
ReportPtr->CRC = CurrentCRC;
}
else if (BytesRead < 0)
{
Expand Down Expand Up @@ -933,7 +937,7 @@ void FM_ChildFileInfoCmd(FM_ChildQueueEntry_t *CmdArgs)
}
}

FM_GlobalData.FileInfoPkt.CRC = CurrentCRC;
ReportPtr->CRC = CurrentCRC;
}

/* Timestamp and send file info telemetry packet */
Expand Down Expand Up @@ -1148,6 +1152,8 @@ void FM_ChildDirListPktCmd(const FM_ChildQueueEntry_t *CmdArgs)
int32 FilesTillSleep = FM_CHILD_STAT_SLEEP_FILECOUNT;
int32 Status;

FM_DirListPkt_Payload_t *ReportPtr;

memset(&DirEntry, 0, sizeof(DirEntry));

/* Report current child task activity */
Expand Down Expand Up @@ -1180,9 +1186,11 @@ void FM_ChildDirListPktCmd(const FM_ChildQueueEntry_t *CmdArgs)
CFE_MSG_Init(&FM_GlobalData.DirListPkt.TlmHeader.Msg, CFE_SB_ValueToMsgId(FM_DIR_LIST_TLM_MID),
sizeof(FM_DirListPkt_t));

strncpy(FM_GlobalData.DirListPkt.DirName, CmdArgs->Source1, OS_MAX_PATH_LEN - 1);
FM_GlobalData.DirListPkt.DirName[OS_MAX_PATH_LEN - 1] = '\0';
FM_GlobalData.DirListPkt.FirstFile = CmdArgs->DirListOffset;
ReportPtr = &FM_GlobalData.DirListPkt.Payload;

strncpy(ReportPtr->DirName, CmdArgs->Source1, OS_MAX_PATH_LEN - 1);
ReportPtr->DirName[OS_MAX_PATH_LEN - 1] = '\0';
ReportPtr->FirstFile = CmdArgs->DirListOffset;

StillProcessing = true;
while (StillProcessing == true)
Expand All @@ -1199,16 +1207,16 @@ void FM_ChildDirListPktCmd(const FM_ChildQueueEntry_t *CmdArgs)
(strcmp(OS_DIRENTRY_NAME(DirEntry), FM_PARENT_DIRECTORY) != 0))
{
/* Do not count the "." and ".." directory entries */
FM_GlobalData.DirListPkt.TotalFiles++;
ReportPtr->TotalFiles++;

/* Start collecting directory entries at command specified offset */
/* Stop collecting directory entries when telemetry packet is full */
if ((FM_GlobalData.DirListPkt.TotalFiles > FM_GlobalData.DirListPkt.FirstFile) &&
(FM_GlobalData.DirListPkt.PacketFiles < FM_DIR_LIST_PKT_ENTRIES))
if ((ReportPtr->TotalFiles > ReportPtr->FirstFile) &&
(ReportPtr->PacketFiles < FM_DIR_LIST_PKT_ENTRIES))
{
/* Create a shorthand access to the packet list entry */
ListIndex = FM_GlobalData.DirListPkt.PacketFiles;
ListEntry = &FM_GlobalData.DirListPkt.FileList[ListIndex];
ListIndex = ReportPtr->PacketFiles;
ListEntry = &ReportPtr->FileList[ListIndex];

EntryLength = strlen(OS_DIRENTRY_NAME(DirEntry));

Expand All @@ -1227,7 +1235,7 @@ void FM_ChildDirListPktCmd(const FM_ChildQueueEntry_t *CmdArgs)
FM_ChildSleepStat(LogicalName, ListEntry, &FilesTillSleep, CmdArgs->GetSizeTimeMode);

/* Add another entry to the telemetry packet */
FM_GlobalData.DirListPkt.PacketFiles++;
ReportPtr->PacketFiles++;
}
else
{
Expand Down
63 changes: 44 additions & 19 deletions fsw/src/fm_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@

#include <string.h>

/**
* \brief Internal Macro to access the internal payload structure of a message
*
* This is done as a macro so it can be applied consistently to all
* message processing functions, based on the way FM defines its messages.
*/
#define FM_GET_CMD_PAYLOAD(ptr, type) (&((const type *)(ptr))->Payload)

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* FM command handler -- NOOP */
Expand Down Expand Up @@ -102,11 +110,12 @@ bool FM_ResetCountersCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_CopyFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_CopyFileCmd_t * CmdPtr = (FM_CopyFileCmd_t *)BufPtr;
FM_ChildQueueEntry_t *CmdArgs = NULL;
const char * CmdText = "Copy File";
bool CommandResult = false;

const FM_OvwSourceTargetFilename_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_CopyFileCmd_t);

/* Verify command packet length */
CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_CopyFileCmd_t), FM_COPY_PKT_ERR_EID, CmdText);

Expand Down Expand Up @@ -169,11 +178,12 @@ bool FM_CopyFileCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_MoveFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_MoveFileCmd_t * CmdPtr = (FM_MoveFileCmd_t *)BufPtr;
FM_ChildQueueEntry_t *CmdArgs = NULL;
const char * CmdText = "Move File";
bool CommandResult = false;

const FM_OvwSourceTargetFilename_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_MoveFileCmd_t);

/* Verify command packet length */
CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_MoveFileCmd_t), FM_MOVE_PKT_ERR_EID, CmdText);

Expand Down Expand Up @@ -237,11 +247,12 @@ bool FM_MoveFileCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_RenameFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_RenameFileCmd_t * CmdPtr = (FM_RenameFileCmd_t *)BufPtr;
FM_ChildQueueEntry_t *CmdArgs = NULL;
const char * CmdText = "Rename File";
bool CommandResult = false;

const FM_SourceTargetFileName_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_RenameFileCmd_t);

/* Verify command packet length */
CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_RenameFileCmd_t), FM_RENAME_PKT_ERR_EID, CmdText);

Expand Down Expand Up @@ -292,11 +303,12 @@ bool FM_RenameFileCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_DeleteFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_DeleteFileCmd_t * CmdPtr = (FM_DeleteFileCmd_t *)BufPtr;
FM_ChildQueueEntry_t *CmdArgs = NULL;
const char * CmdText = "Delete File";
bool CommandResult = false;

const FM_SingleFilename_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_DeleteFileCmd_t);

/* Verify command packet length */
CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_DeleteFileCmd_t), FM_DELETE_PKT_ERR_EID, CmdText);

Expand Down Expand Up @@ -338,12 +350,13 @@ bool FM_DeleteFileCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_DeleteAllFilesCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_DeleteAllCmd_t * CmdPtr = (FM_DeleteAllCmd_t *)BufPtr;
const char * CmdText = "Delete All Files";
char DirWithSep[OS_MAX_PATH_LEN] = "\0";
FM_ChildQueueEntry_t *CmdArgs = NULL;
bool CommandResult = false;

const FM_DirectoryName_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_DeleteAllCmd_t);

/* Verify message length */
CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_DeleteAllCmd_t), FM_DELETE_ALL_PKT_ERR_EID, CmdText);

Expand Down Expand Up @@ -393,11 +406,12 @@ bool FM_DeleteAllFilesCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_DecompressFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_DecompressCmd_t * CmdPtr = (FM_DecompressCmd_t *)BufPtr;
const char * CmdText = "Decompress File";
FM_ChildQueueEntry_t *CmdArgs = NULL;
bool CommandResult = false;

const FM_SourceTargetFileName_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_DecompressCmd_t);

/* Verify command packet length */
CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_DecompressCmd_t), FM_DECOM_PKT_ERR_EID, CmdText);

Expand Down Expand Up @@ -446,11 +460,12 @@ bool FM_DecompressFileCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_ConcatFilesCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_ConcatCmd_t * CmdPtr = (FM_ConcatCmd_t *)BufPtr;
const char * CmdText = "Concat Files";
FM_ChildQueueEntry_t *CmdArgs = NULL;
bool CommandResult = false;

const FM_TwoSourceOneTarget_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_ConcatCmd_t);

/* Verify command packet length */
CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_ConcatCmd_t), FM_CONCAT_PKT_ERR_EID, CmdText);

Expand Down Expand Up @@ -507,12 +522,13 @@ bool FM_ConcatFilesCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_GetFileInfoCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_GetFileInfoCmd_t * CmdPtr = (FM_GetFileInfoCmd_t *)BufPtr;
const char * CmdText = "Get File Info";
FM_ChildQueueEntry_t *CmdArgs = NULL;
bool CommandResult = false;
uint32 FilenameState = FM_NAME_IS_INVALID;

const FM_FilenameAndCRC_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_GetFileInfoCmd_t);

/* Verify command packet length */
CommandResult =
FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_GetFileInfoCmd_t), FM_GET_FILE_INFO_PKT_ERR_EID, CmdText);
Expand Down Expand Up @@ -572,6 +588,8 @@ bool FM_GetOpenFilesCmd(const CFE_SB_Buffer_t *BufPtr)
bool CommandResult = false;
uint32 NumOpenFiles = 0;

FM_OpenFilesPkt_Payload_t *ReportPtr = &FM_GlobalData.OpenFilesPkt.Payload;

/* Verify command packet length */
CommandResult =
FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_GetOpenFilesCmd_t), FM_GET_OPEN_FILES_PKT_ERR_EID, CmdText);
Expand All @@ -582,8 +600,9 @@ bool FM_GetOpenFilesCmd(const CFE_SB_Buffer_t *BufPtr)
sizeof(FM_OpenFilesPkt_t));

/* Get list of open files and count */
NumOpenFiles = FM_GetOpenFilesData(FM_GlobalData.OpenFilesPkt.OpenFilesList);
FM_GlobalData.OpenFilesPkt.NumOpenFiles = NumOpenFiles;
NumOpenFiles = FM_GetOpenFilesData(ReportPtr->OpenFilesList);

ReportPtr->NumOpenFiles = NumOpenFiles;

/* Timestamp and send open files telemetry packet */
CFE_SB_TimeStampMsg(&FM_GlobalData.OpenFilesPkt.TlmHeader.Msg);
Expand All @@ -604,11 +623,12 @@ bool FM_GetOpenFilesCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_CreateDirectoryCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_CreateDirCmd_t * CmdPtr = (FM_CreateDirCmd_t *)BufPtr;
FM_ChildQueueEntry_t *CmdArgs = NULL;
const char * CmdText = "Create Directory";
bool CommandResult = false;

const FM_DirectoryName_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_CreateDirCmd_t);

/* Verify command packet length */
CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_CreateDirCmd_t), FM_CREATE_DIR_PKT_ERR_EID, CmdText);

Expand Down Expand Up @@ -650,11 +670,12 @@ bool FM_CreateDirectoryCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_DeleteDirectoryCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_DeleteDirCmd_t * CmdPtr = (FM_DeleteDirCmd_t *)BufPtr;
FM_ChildQueueEntry_t *CmdArgs = NULL;
const char * CmdText = "Delete Directory";
bool CommandResult = false;

const FM_DirectoryName_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_DeleteDirCmd_t);

/* Verify command packet length */
CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_DeleteDirCmd_t), FM_DELETE_DIR_PKT_ERR_EID, CmdText);

Expand Down Expand Up @@ -696,13 +717,14 @@ bool FM_DeleteDirectoryCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_GetDirListFileCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_GetDirFileCmd_t * CmdPtr = (FM_GetDirFileCmd_t *)BufPtr;
const char * CmdText = "Directory List to File";
char DirWithSep[OS_MAX_PATH_LEN] = "\0";
char Filename[OS_MAX_PATH_LEN] = "\0";
FM_ChildQueueEntry_t *CmdArgs = NULL;
bool CommandResult = false;

const FM_GetDirectoryToFile_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_GetDirFileCmd_t);

/* Verify command packet length */
CommandResult =
FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_GetDirFileCmd_t), FM_GET_DIR_FILE_PKT_ERR_EID, CmdText);
Expand Down Expand Up @@ -775,12 +797,13 @@ bool FM_GetDirListFileCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_GetDirListPktCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_GetDirPktCmd_t * CmdPtr = (FM_GetDirPktCmd_t *)BufPtr;
const char * CmdText = "Directory List to Packet";
char DirWithSep[OS_MAX_PATH_LEN] = "\0";
FM_ChildQueueEntry_t *CmdArgs = NULL;
bool CommandResult = false;

const FM_GetDirectoryToPkt_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_GetDirPktCmd_t);

/* Verify command packet length */
CommandResult =
FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_GetDirPktCmd_t), FM_GET_DIR_PKT_PKT_ERR_EID, CmdText);
Expand Down Expand Up @@ -862,7 +885,7 @@ bool FM_MonitorFilesystemSpaceCmd(const CFE_SB_Buffer_t *BufPtr)

/* Process enabled file system table entries */
MonitorPtr = FM_GlobalData.MonitorTablePtr->Entries;
ReportPtr = FM_GlobalData.MonitorReportPkt.FileSys;
ReportPtr = FM_GlobalData.MonitorReportPkt.Payload.FileSys;
for (i = 0; i < FM_TABLE_ENTRY_COUNT; i++)
{
if (MonitorPtr->Type != FM_MonitorTableEntry_Type_UNUSED)
Expand Down Expand Up @@ -927,9 +950,10 @@ bool FM_MonitorFilesystemSpaceCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_SetTableStateCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_SetTableStateCmd_t *CmdPtr = (FM_SetTableStateCmd_t *)BufPtr;
const char * CmdText = "Set Table State";
bool CommandResult = false;
const char *CmdText = "Set Table State";
bool CommandResult = false;

const FM_TableIndexAndState_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_SetTableStateCmd_t);

/* Verify command packet length */
CommandResult =
Expand Down Expand Up @@ -997,12 +1021,13 @@ bool FM_SetTableStateCmd(const CFE_SB_Buffer_t *BufPtr)

bool FM_SetPermissionsCmd(const CFE_SB_Buffer_t *BufPtr)
{
FM_SetPermCmd_t * CmdPtr = (FM_SetPermCmd_t *)BufPtr;
FM_ChildQueueEntry_t *CmdArgs = NULL;
const char * CmdText = "Set Permissions";
bool CommandResult = false;
bool FilenameState = FM_NAME_IS_INVALID;

const FM_FilenameAndMode_Payload_t *CmdPtr = FM_GET_CMD_PAYLOAD(BufPtr, FM_SetPermCmd_t);

/* Verify command packet length */
CommandResult = FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_SetPermCmd_t), FM_SET_PERM_ERR_EID, CmdText);

Expand Down
Loading

0 comments on commit ecfb051

Please sign in to comment.