Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/snapshot-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Snapshot CFS module

on:
workflow_dispatch:
inputs:
base-branch:
description: 'The base branch to merge into'
type: string
required: false
default: 'main'
ic-branch:
description: 'The temporary integration branch to create (ic)'
type: string
required: false
default: 'ic-snapshot-dev'
dev-branch:
description: 'The branch to pull in'
type: string
required: false
default: 'dev'
pr-label:
description: 'The label(s) to apply to the generated PR'
type: string
required: false
default: ''
version-numbers:
description: 'The pending version/tag info, as a JSON object'
type: string
required: false
default: '{}'

jobs:
snapshot-module:
name: Snapshot module
uses: nasa/cFS/.github/workflows/snapshot-module-reusable.yml@dev
with:
base-branch: ${{ inputs.base-branch }}
ic-branch: ${{ inputs.ic-branch }}
dev-branch: ${{ inputs.dev-branch }}
pr-label: ${{ inputs.pr-label }}
version-numbers: ${{ inputs.version-numbers }}
34 changes: 17 additions & 17 deletions fsw/src/md_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ MD_AppData_t MD_AppData;

void MD_AppMain(void)
{
CFE_Status_t Status = CFE_SUCCESS;
uint8 TblIndex = 0;
CFE_SB_Buffer_t *BufPtr = NULL;
CFE_Status_t Status;
uint8 TblIndex;
CFE_SB_Buffer_t *BufPtr = NULL;

MD_AppData.RunStatus = CFE_ES_RunStatus_APP_RUN;

Expand Down Expand Up @@ -118,7 +118,7 @@ CFE_Status_t MD_AppInit(void)
/*
** Locals
*/
CFE_Status_t Status = CFE_SUCCESS;
CFE_Status_t Status;

MD_AppData.CommandCounter = 0;
MD_AppData.CommandErrorCounter = 0;
Expand Down Expand Up @@ -170,7 +170,7 @@ CFE_Status_t MD_AppInit(void)
void MD_InitControlStructures(void)
{
uint16 TblIndex;
MD_DwellPacketControl_t *DwellControlPtr = NULL;
MD_DwellPacketControl_t *DwellControlPtr;

for (TblIndex = 0; TblIndex < MD_INTERFACE_NUM_DWELL_TABLES; TblIndex++)
{
Expand All @@ -192,7 +192,7 @@ void MD_InitControlStructures(void)
/******************************************************************************/
CFE_Status_t MD_InitSoftwareBusServices(void)
{
CFE_Status_t Status = CFE_SUCCESS;
CFE_Status_t Status;
uint16 TblIndex;

/*
Expand Down Expand Up @@ -280,14 +280,14 @@ CFE_Status_t MD_InitSoftwareBusServices(void)

CFE_Status_t MD_InitTableServices(void)
{
CFE_Status_t Status = CFE_SUCCESS;
int32 GetAddressResult = 0;
CFE_Status_t Status = CFE_SUCCESS;
int32 GetAddressResult;
uint8 TblIndex;
bool RecoveredValidTable = true; /* for current table */
bool TableInitValidFlag = true; /* for all tables so far*/
MD_DwellTableLoad_t *MD_LoadTablePtr = NULL;
uint16 TblRecos = 0; /* Number of Tables Recovered */
uint16 TblInits = 0; /* Number of Tables Initialized */
bool RecoveredValidTable; /* for current table */
bool TableInitValidFlag = true; /* for all tables so far*/
MD_DwellTableLoad_t *MD_LoadTablePtr = NULL;
uint16 TblRecos = 0; /* Number of Tables Recovered */
uint16 TblInits = 0; /* Number of Tables Initialized */
char TblFileName[OS_MAX_PATH_LEN];

/*
Expand Down Expand Up @@ -469,8 +469,8 @@ CFE_Status_t MD_InitTableServices(void)
/******************************************************************************/
CFE_Status_t MD_ManageDwellTable(uint8 TblIndex)
{
CFE_Status_t Status = CFE_SUCCESS;
int32 GetAddressResult = 0;
CFE_Status_t Status = CFE_SUCCESS;
int32 GetAddressResult;
bool FinishedManaging = false;
MD_DwellTableLoad_t *MD_LoadTablePtr = NULL;

Expand Down Expand Up @@ -550,8 +550,8 @@ CFE_Status_t MD_SendHkCmd(const MD_SendHkCmd_t *Msg)
{
uint8 TblIndex;
uint16 MemDwellEnableBits = 0;
MD_HkTlm_t *HkPktPtr = NULL;
MD_DwellPacketControl_t *ThisDwellTablePtr = NULL;
MD_HkTlm_t *HkPktPtr;
MD_DwellPacketControl_t *ThisDwellTablePtr;

/* Assign pointer used as shorthand to access Housekeeping Packet fields */
HkPktPtr = &MD_AppData.HkPkt;
Expand Down
10 changes: 5 additions & 5 deletions fsw/src/md_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ CFE_Status_t MD_StartDwellCmd(const MD_StartDwellCmd_t *Msg)
CFE_Status_t Status;
CFE_Status_t TableUpdateStatus;
int32 NumTblInMask = 0; /* Purely as info for event message */
uint16 TableId = 0;
uint16 TableId;
uint16 TableIndex;
bool AnyTablesInMask = false;

Expand Down Expand Up @@ -179,7 +179,7 @@ CFE_Status_t MD_StopDwellCmd(const MD_StopDwellCmd_t *Msg)
CFE_Status_t Status;
CFE_Status_t TableUpdateStatus;
int32 NumTblInMask = 0; /* Purely as info for event message */
uint16 TableId = 0;
uint16 TableId;
uint16 TableIndex;
bool AnyTablesInMask = false;

Expand Down Expand Up @@ -249,8 +249,8 @@ CFE_Status_t MD_JamDwellCmd(const MD_JamDwellCmd_t *Msg)
{
/* Local variables */
CFE_Status_t Status;
bool AllInputsValid = true;
cpuaddr ResolvedAddr = 0;
bool AllInputsValid;
cpuaddr ResolvedAddr = 0;
MD_DwellControlEntry_t *DwellEntryPtr; /* points to local task data */
uint16 EntryIndex;
uint8 TableIndex = 0;
Expand Down Expand Up @@ -492,7 +492,7 @@ CFE_Status_t MD_JamDwellCmd(const MD_JamDwellCmd_t *Msg)
CFE_Status_t MD_SetSignatureCmd(const MD_SetSignatureCmd_t *Msg)
{
CFE_Status_t Status;
uint16 TblId = 0;
uint16 TblId;
uint16 StringLength;

Status = CFE_SUCCESS;
Expand Down
6 changes: 3 additions & 3 deletions fsw/src/md_dwell_pkt.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ CFE_Status_t MD_DwellLoop(const MD_Wakeup_t *Msg)
uint16 TblIndex;
uint16 EntryIndex;
uint16 NumDwellAddresses;
MD_DwellPacketControl_t *TblPtr = NULL;
MD_DwellPacketControl_t *TblPtr;

Status = CFE_SUCCESS;

Expand Down Expand Up @@ -151,7 +151,7 @@ CFE_Status_t MD_DwellLoop(const MD_Wakeup_t *Msg)

int32 MD_GetDwellData(uint16 TblIndex, uint16 EntryIndex)
{
uint8 NumBytes = 0; /* Num of bytes to read */
uint8 NumBytes; /* Num of bytes to read */
uint32 MemReadVal = 0; /* 1-, 2-, or 4-byte value */
MD_DwellPacketControl_t *TblPtr = &MD_AppData.MD_DwellTables[TblIndex];
int32 Status = CFE_SUCCESS;
Expand Down Expand Up @@ -208,7 +208,7 @@ int32 MD_GetDwellData(uint16 TblIndex, uint16 EntryIndex)

void MD_SendDwellPkt(uint16 TableIndex)
{
uint16 DwellPktSize = 0; /* Dwell Packet Size, in bytes */
uint16 DwellPktSize; /* Dwell Packet Size, in bytes */

/* Assign pointers to structures */
MD_DwellPacketControl_t *TblPtr = &MD_AppData.MD_DwellTables[TableIndex];
Expand Down
30 changes: 15 additions & 15 deletions fsw/src/md_dwell_tbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ extern MD_AppData_t MD_AppData;
/******************************************************************************/
int32 MD_TableValidationFunc(void *TblPtr)
{
uint16 ActiveEntryCount = 0;
uint16 Size = 0;
uint32 Rate = 0;
int32 Status = CFE_SUCCESS; /* Initialize to valid table */
uint16 ActiveEntryCount = 0;
uint16 Size = 0;
uint32 Rate = 0;
int32 Status;
MD_DwellTableLoad_t *LocalTblPtr = (MD_DwellTableLoad_t *)TblPtr;
uint16 TblErrorEntryIndex = 0; /* Zero-based entry number for error; */
/* valid if there is an error. */
Expand Down Expand Up @@ -189,9 +189,9 @@ int32 MD_CheckTableEntries(MD_DwellTableLoad_t *TblPtr, uint16 *ErrorEntryArg)
uint16 EntryIndex;
int32 FirstBadIndex = -1;

int32 GoodCount = 0;
int32 BadCount = 0;
int32 UnusedCount = 0;
int32 GoodCount = 0;
int32 BadCount = 0;
int32 UnusedCount;

*ErrorEntryArg = 0;

Expand Down Expand Up @@ -257,8 +257,8 @@ int32 MD_CheckTableEntries(MD_DwellTableLoad_t *TblPtr, uint16 *ErrorEntryArg)
/******************************************************************************/
int32 MD_ValidTableEntry(MD_TableLoadEntry_t *TblEntryPtr)
{
int32 Status = MD_ERROR;
uint16 DwellLength = 0;
int32 Status;
uint16 DwellLength;
cpuaddr ResolvedAddr = 0;

DwellLength = TblEntryPtr->Length;
Expand Down Expand Up @@ -311,8 +311,8 @@ int32 MD_ValidTableEntry(MD_TableLoadEntry_t *TblEntryPtr)
void MD_CopyUpdatedTbl(MD_DwellTableLoad_t *MD_LoadTablePtr, uint8 TblIndex)
{
uint8 EntryIndex;
cpuaddr ResolvedAddr = 0;
MD_TableLoadEntry_t *ThisLoadEntry = NULL;
cpuaddr ResolvedAddr = 0;
MD_TableLoadEntry_t *ThisLoadEntry;
MD_DwellPacketControl_t *LocalControlStruct = &MD_AppData.MD_DwellTables[TblIndex];

/* Null check on MD_LoadTablePtr not necessary - table passed validation */
Expand Down Expand Up @@ -352,7 +352,7 @@ void MD_CopyUpdatedTbl(MD_DwellTableLoad_t *MD_LoadTablePtr, uint8 TblIndex)
/******************************************************************************/
CFE_Status_t MD_UpdateTableEnabledField(uint16 TableIndex, uint16 FieldValue)
{
CFE_Status_t Status = CFE_SUCCESS;
CFE_Status_t Status;
MD_DwellTableLoad_t *MD_LoadTablePtr = NULL;

Status = CFE_TBL_GetAddress((void *)&MD_LoadTablePtr, MD_AppData.MD_TableHandle[TableIndex]);
Expand Down Expand Up @@ -387,9 +387,9 @@ CFE_Status_t MD_UpdateTableDwellEntry(uint16 TableIndex,
uint16 NewDelay,
MD_SymAddr_t NewDwellAddress)
{
CFE_Status_t Status = CFE_SUCCESS;
CFE_Status_t Status;
MD_DwellTableLoad_t *MD_LoadTablePtr = NULL;
MD_TableLoadEntry_t *EntryPtr = NULL;
MD_TableLoadEntry_t *EntryPtr;

/* Get pointer to Table */
Status = CFE_TBL_GetAddress((void *)&MD_LoadTablePtr, MD_AppData.MD_TableHandle[TableIndex]);
Expand Down Expand Up @@ -431,7 +431,7 @@ CFE_Status_t MD_UpdateTableDwellEntry(uint16 TableIndex,

CFE_Status_t MD_UpdateTableSignature(uint16 TableIndex, const char NewSignature[MD_INTERFACE_SIGNATURE_FIELD_LENGTH])
{
CFE_Status_t Status = CFE_SUCCESS;
CFE_Status_t Status;
MD_DwellTableLoad_t *MD_LoadTablePtr = NULL;

/* Get pointer to Table */
Expand Down