Skip to content

Commit 3a6c802

Browse files
committed
Fix nasa#26, Use CFE_ES_MemAddress_t instead of cpuaddr in tables/tlm/cmd structs
1 parent bd4dd1c commit 3a6c802

File tree

2 files changed

+60
-61
lines changed

2 files changed

+60
-61
lines changed

fsw/inc/cs_msg.h

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -39,34 +39,34 @@ typedef struct
3939
{
4040
CFE_MSG_TelemetryHeader_t TlmHeader; /**< \brief cFE SB Tlm Msg Hdr */
4141

42-
uint8 CmdCounter; /**< \brief CS Application Command Counter */
43-
uint8 CmdErrCounter; /**< \brief CS Application Command Error Counter */
44-
uint8 ChecksumState; /**< \brief CS Application global checksum state */
45-
uint8 EepromCSState; /**< \brief CS EEPROM table checksum state */
46-
uint8 MemoryCSState; /**< \brief CS Memory table checksum state */
47-
uint8 AppCSState; /**< \brief CS App table checksum state */
48-
uint8 TablesCSState; /**< \brief CS Tables table checksum state */
49-
uint8 OSCSState; /**< \brief OS code segment checksum state */
50-
uint8 CfeCoreCSState; /**< \brief cFE Core code segment checksum stat e*/
51-
uint8 RecomputeInProgress; /**< \brief CS "Recompute In Progress" flag */
52-
uint8 OneShotInProgress; /**< \brief CS "OneShot In Progress" flag */
53-
uint8 Filler8; /**< \brief 8 bit padding */
54-
uint16 EepromCSErrCounter; /**< \brief EEPROM miscompare counter */
55-
uint16 MemoryCSErrCounter; /**< \brief Memory miscompare counter */
56-
uint16 AppCSErrCounter; /**< \brief App miscompare counter */
57-
uint16 TablesCSErrCounter; /**< \brief Tables miscompare counter */
58-
uint16 CfeCoreCSErrCounter; /**< \brief cFE core miscompare counter */
59-
uint16 OSCSErrCounter; /**< \brief OS code segment miscopmare counter */
60-
uint16 CurrentCSTable; /**< \brief Current table being checksummed */
61-
uint16 CurrentEntryInTable; /**< \brief Current entry ID in table being checksummed */
62-
uint32 EepromBaseline; /**< \brief Baseline checksum for all of EEPROM */
63-
uint32 OSBaseline; /**< \brief Baseline checksum for the OS code segment */
64-
uint32 CfeCoreBaseline; /**< \brief Basline checksum for the cFE core */
65-
cpuaddr LastOneShotAddress; /**< \brief Address used in last one shot checksum command */
66-
uint32 LastOneShotSize; /**< \brief Size used in the last one shot checksum command */
67-
uint32 LastOneShotMaxBytesPerCycle; /**< \brief Max bytes per cycle for last one shot checksum command */
68-
uint32 LastOneShotChecksum; /**< \brief Checksum of the last one shot checksum command */
69-
uint32 PassCounter; /**< \brief Number of times CS has passed through all of its tables */
42+
uint8 CmdCounter; /**< \brief CS Application Command Counter */
43+
uint8 CmdErrCounter; /**< \brief CS Application Command Error Counter */
44+
uint8 ChecksumState; /**< \brief CS Application global checksum state */
45+
uint8 EepromCSState; /**< \brief CS EEPROM table checksum state */
46+
uint8 MemoryCSState; /**< \brief CS Memory table checksum state */
47+
uint8 AppCSState; /**< \brief CS App table checksum state */
48+
uint8 TablesCSState; /**< \brief CS Tables table checksum state */
49+
uint8 OSCSState; /**< \brief OS code segment checksum state */
50+
uint8 CfeCoreCSState; /**< \brief cFE Core code segment checksum stat e*/
51+
uint8 RecomputeInProgress; /**< \brief CS "Recompute In Progress" flag */
52+
uint8 OneShotInProgress; /**< \brief CS "OneShot In Progress" flag */
53+
uint8 Filler8; /**< \brief 8 bit padding */
54+
uint16 EepromCSErrCounter; /**< \brief EEPROM miscompare counter */
55+
uint16 MemoryCSErrCounter; /**< \brief Memory miscompare counter */
56+
uint16 AppCSErrCounter; /**< \brief App miscompare counter */
57+
uint16 TablesCSErrCounter; /**< \brief Tables miscompare counter */
58+
uint16 CfeCoreCSErrCounter; /**< \brief cFE core miscompare counter */
59+
uint16 OSCSErrCounter; /**< \brief OS code segment miscopmare counter */
60+
uint16 CurrentCSTable; /**< \brief Current table being checksummed */
61+
uint16 CurrentEntryInTable; /**< \brief Current entry ID in table being checksummed */
62+
uint32 EepromBaseline; /**< \brief Baseline checksum for all of EEPROM */
63+
uint32 OSBaseline; /**< \brief Baseline checksum for the OS code segment */
64+
uint32 CfeCoreBaseline; /**< \brief Basline checksum for the cFE core */
65+
CFE_ES_MemAddress_t LastOneShotAddress; /**< \brief Address used in last one shot checksum command */
66+
uint32 LastOneShotSize; /**< \brief Size used in the last one shot checksum command */
67+
uint32 LastOneShotMaxBytesPerCycle; /**< \brief Max bytes per cycle for last one shot checksum command */
68+
uint32 LastOneShotChecksum; /**< \brief Checksum of the last one shot checksum command */
69+
uint32 PassCounter; /**< \brief Number of times CS has passed through all of its tables */
7070
} CS_HkPacket_t;
7171

7272
/**\}*/
@@ -98,7 +98,7 @@ typedef struct
9898
typedef struct
9999
{
100100
CFE_MSG_CommandHeader_t CmdHeader;
101-
cpuaddr Address; /**< \brief Address to get the ID for */
101+
CFE_ES_MemAddress_t Address; /**< \brief Address to get the ID for */
102102
} CS_GetEntryIDCmd_t;
103103

104104
/**
@@ -145,7 +145,7 @@ typedef struct
145145
typedef struct
146146
{
147147
CFE_MSG_CommandHeader_t CmdHeader;
148-
cpuaddr Address; /**< \brief Address to start checksum */
148+
CFE_ES_MemAddress_t Address; /**< \brief Address to start checksum */
149149
uint32 Size; /**< \brief Number of bytes to checksum */
150150
uint32 MaxBytesPerCycle; /**< \brief Max Number of bytes to compute per cycle. Value of Zero to use platform config
151151
value */

fsw/inc/cs_tbldefs.h

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,24 @@
6868
*/
6969
typedef struct
7070
{
71-
cpuaddr StartAddress; /**< \brief The Start address to Checksum */
72-
uint16 State; /**< \brief Uses the CS_STATE_... defines from above */
73-
uint16 Filler16; /** <\brief Padding */
74-
uint32 NumBytesToChecksum; /**< \brief The number of Bytes to Checksum */
71+
CFE_ES_MemAddress_t StartAddress; /**< \brief The Start address to Checksum */
72+
uint16 State; /**< \brief Uses the CS_STATE_... defines from above */
73+
uint16 Filler16; /** <\brief Padding */
74+
uint32 NumBytesToChecksum; /**< \brief The number of Bytes to Checksum */
7575
} CS_Def_EepromMemory_Table_Entry_t;
7676

7777
/**
7878
* \brief Data structure for the Eeporom or Memory results table
7979
*/
8080
typedef struct
8181
{
82-
cpuaddr StartAddress; /**< \brief The Start address to Checksum */
83-
uint16 State; /**< \brief Uses the CS_STATE_... defines from above */
84-
uint16 ComputedYet; /**< \brief Have we computed an Integrity value yet */
85-
uint32 NumBytesToChecksum; /**< \brief The number of Bytes to Checksum */
86-
uint32 ComparisonValue; /**< \brief The Memory Integrity Value */
87-
uint32 ByteOffset; /**< \brief Where a previous unfinished calc left off */
88-
uint32 TempChecksumValue; /**< \brief The unfinished caluculation */
89-
uint32 Filler32; /**< \brief Padding */
82+
CFE_ES_MemAddress_t StartAddress; /**< \brief The Start address to Checksum */
83+
uint16 State; /**< \brief Uses the CS_STATE_... defines from above */
84+
uint16 ComputedYet; /**< \brief Have we computed an Integrity value yet */
85+
uint32 NumBytesToChecksum; /**< \brief The number of Bytes to Checksum */
86+
uint32 ComparisonValue; /**< \brief The Memory Integrity Value */
87+
uint32 ByteOffset; /**< \brief Where a previous unfinished calc left off */
88+
uint32 TempChecksumValue; /**< \brief The unfinished caluculation */
9089
} CS_Res_EepromMemory_Table_Entry_t;
9190

9291
/**
@@ -112,32 +111,32 @@ typedef struct
112111
*/
113112
typedef struct
114113
{
115-
cpuaddr StartAddress; /**< \brief The Start address to Checksum */
116-
uint16 State; /**< \brief Uses the CS_STATE_... defines from above */
117-
uint16 ComputedYet; /**< \brief Have we computed an Integrity value yet */
118-
uint32 NumBytesToChecksum; /**< \brief The number of Bytes to Checksum */
119-
uint32 ComparisonValue; /**< \brief The Memory Integrity Value */
120-
uint32 ByteOffset; /**< \brief Where a previous unfinished calc left off */
121-
uint32 TempChecksumValue; /**< \brief The unfinished caluculation */
122-
CFE_TBL_Handle_t TblHandle; /**< \brief handle recieved from CFE_TBL */
123-
bool IsCSOwner; /**< \brief Is CS the original owner of this table */
124-
bool Filler8; /**< \brief Padding */
125-
char Name[CFE_TBL_MAX_FULL_NAME_LEN]; /**< \brief name of the table */
114+
CFE_ES_MemAddress_t StartAddress; /**< \brief The Start address to Checksum */
115+
uint16 State; /**< \brief Uses the CS_STATE_... defines from above */
116+
uint16 ComputedYet; /**< \brief Have we computed an Integrity value yet */
117+
uint32 NumBytesToChecksum; /**< \brief The number of Bytes to Checksum */
118+
uint32 ComparisonValue; /**< \brief The Memory Integrity Value */
119+
uint32 ByteOffset; /**< \brief Where a previous unfinished calc left off */
120+
uint32 TempChecksumValue; /**< \brief The unfinished caluculation */
121+
CFE_TBL_Handle_t TblHandle; /**< \brief handle recieved from CFE_TBL */
122+
bool IsCSOwner; /**< \brief Is CS the original owner of this table */
123+
bool Filler8; /**< \brief Padding */
124+
char Name[CFE_TBL_MAX_FULL_NAME_LEN]; /**< \brief name of the table */
126125
} CS_Res_Tables_Table_Entry_t;
127126

128127
/**
129128
* \brief Data structure for the app result table
130129
*/
131130
typedef struct
132131
{
133-
cpuaddr StartAddress; /**< \brief The Start address to Checksum */
134-
uint16 State; /**< \brief Uses the CS_STATE_... defines from above */
135-
uint16 ComputedYet; /**< \brief Have we computed an Integrity value yet */
136-
uint32 NumBytesToChecksum; /**< \brief The number of Bytes to Checksum */
137-
uint32 ComparisonValue; /**< \brief The Memory Integrity Value */
138-
uint32 ByteOffset; /**< \brief Where a previous unfinished calc left off */
139-
uint32 TempChecksumValue; /**< \brief The unfinished caluculation */
140-
char Name[OS_MAX_API_NAME]; /**< \brief name of the app */
132+
CFE_ES_MemAddress_t StartAddress; /**< \brief The Start address to Checksum */
133+
uint16 State; /**< \brief Uses the CS_STATE_... defines from above */
134+
uint16 ComputedYet; /**< \brief Have we computed an Integrity value yet */
135+
uint32 NumBytesToChecksum; /**< \brief The number of Bytes to Checksum */
136+
uint32 ComparisonValue; /**< \brief The Memory Integrity Value */
137+
uint32 ByteOffset; /**< \brief Where a previous unfinished calc left off */
138+
uint32 TempChecksumValue; /**< \brief The unfinished caluculation */
139+
char Name[OS_MAX_API_NAME]; /**< \brief name of the app */
141140
} CS_Res_App_Table_Entry_t;
142141

143142
/**************************************************************************

0 commit comments

Comments
 (0)