Skip to content

Commit

Permalink
Merge pull request #433 from jphickey/fix-432-eds-udpates
Browse files Browse the repository at this point in the history
Fix #432, update EDS file
  • Loading branch information
dzbaker authored Jan 25, 2024
2 parents 54ccdf1 + 7947d99 commit 831fb16
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 29 deletions.
61 changes: 34 additions & 27 deletions eds/cf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@
<BooleanDataEncoding sizeInBits="8" />
</BooleanDataType>

<IntegerDataType name="ChannelId" shortDescription="Channel Identifier Value">
<IntegerDataEncoding sizeInBits="8" encoding="unsigned" />
<Range>
<MinMaxRange rangeType="inclusiveMinExclusiveMax" min="0" max="${CF/NUM_CHANNELS}"/>
</Range>
</IntegerDataType>

<!--
<AliasDataType name="PathName" type="BASE_TYPES/PathName" />
<AliasDataType name="FileName" type="BASE_TYPES/FileName" />
Expand Down Expand Up @@ -149,7 +156,7 @@

<ArrayDataType name="ChannelConfigTable" dataTypeRef="ChannelConfig" shortDescription="Channel Config Table">
<DimensionList>
<Dimension size="${CF/NUM_CHANNELS}" />
<Dimension indexTypeRef="ChannelId" />
</DimensionList>
</ArrayDataType>

Expand Down Expand Up @@ -258,7 +265,7 @@

<ArrayDataType name="Channel_Hk" dataTypeRef="HkChannel_Data">
<DimensionList>
<Dimension size="${CF/NUM_CHANNELS}"/>
<Dimension indexTypeRef="ChannelId" />
</DimensionList>
</ArrayDataType>

Expand Down Expand Up @@ -327,25 +334,25 @@
<ContainerDataType name="GetParam_Payload" shortDescription="Get parameter command structure">
<EntryList>
<Entry name="key" type="GetSet_ValueID" shortDescription="Parameter key, see #CF_GetSet_ValueID_t" />
<Entry name="chan_num" type="BASE_TYPES/uint8" shortDescription="Channel number" />
<Entry name="chan_num" type="ChannelId" shortDescription="Channel number" />
</EntryList>
</ContainerDataType>

<ContainerDataType name="SetParam_Payload" shortDescription="Set parameter command structure">
<EntryList>
<Entry name="value" type="BASE_TYPES/uint32" shortDescription="Parameter value to set" />
<Entry name="key" type="GetSet_ValueID" shortDescription="Parameter key, see #CF_GetSet_ValueID_t" />
<Entry name="chan_num" type="BASE_TYPES/uint8" shortDescription="Channel number" />
<Entry name="chan_num" type="ChannelId" shortDescription="Channel number" />
<PaddingEntry sizeInBits="16" shortDescription="Alignment spare, uint32 multiple"/>
</EntryList>
</ContainerDataType>

<ContainerDataType name="TxFile_Payload" shortDescription="Transmit file command structure">
<EntryList>
<Entry name="cfdp_class" type="BASE_TYPES/uint8" shortDescription="CFDP class: 0=class 1, 1=class 2" />
<Entry name="keep" type="BASE_TYPES/uint8" shortDescription="Keep file flag: 1=keep, else delete" />
<Entry name="chan_num" type="BASE_TYPES/uint8" shortDescription="Channel number" />
<Entry name="priority" type="BASE_TYPES/uint32" shortDescription="Priority: 0=highest priority" />
<Entry name="cfdp_class" type="CFDP" shortDescription="CFDP class: 0=class 1, 1=class 2" />
<Entry name="keep" type="EnableFlag" shortDescription="Keep file flag: 1=keep, else delete" />
<Entry name="chan_num" type="ChannelId" shortDescription="Channel number" />
<Entry name="priority" type="BASE_TYPES/uint8" shortDescription="Priority: 0=highest priority" />
<Entry name="dest_id" type="BASE_TYPES/uint32" shortDescription="Destination entity id" />
<Entry name="src_filename" type="BASE_TYPES/PathName" shortDescription="Source filename" />
<Entry name="dst_filename" type="BASE_TYPES/PathName" shortDescription="Destination filename" />
Expand Down Expand Up @@ -375,7 +382,7 @@
<ContainerDataType name="WriteQueue_Payload" shortDescription="Write Queue command structure">
<EntryList>
<Entry name="type" type="Type" shortDescription="Transaction direction: all=0, up=1, down=2" />
<Entry name="chan" type="BASE_TYPES/uint8" shortDescription="Channel number" />
<Entry name="chan" type="ChannelId" shortDescription="Channel number" />
<Entry name="queue" type="Queue" shortDescription="Queue type: 0=pending, 1=active, 2=history, 3=all" />
<PaddingEntry sizeInBits="8" shortDescription="Alignment spare, puts filename on 32-bit boundary"/>
<Entry name="filename" type="BASE_TYPES/PathName" shortDescription="Filename written to" />
Expand All @@ -396,7 +403,7 @@
<ContainerDataType name="CMD" baseType="CFE_HDR/CommandHeader">
</ContainerDataType>

<ContainerDataType name="NoopCmd" baseType="CMD">
<ContainerDataType name="NoopCmd" baseType="CMD" shortDescription="Generate an info event message with app version">
<LongDescription>
\cfcmd No Operation

Expand Down Expand Up @@ -427,7 +434,7 @@
</ConstraintSet>
</ContainerDataType>

<ContainerDataType name="ResetCmd" baseType="CMD">
<ContainerDataType name="ResetCmd" baseType="CMD" shortDescription="Resets HK TLM parent and child task counters">
<LongDescription>
\cfcmd Reset counters

Expand Down Expand Up @@ -467,7 +474,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="TxFileCmd" baseType="CMD">
<ContainerDataType name="TxFileCmd" baseType="CMD" shortDescription="Send file from Spacecraft to Ground">
<LongDescription>
\cfcmd Transmit file

Expand Down Expand Up @@ -505,7 +512,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="PlaybackDirCmd" baseType="CMD">
<ContainerDataType name="PlaybackDirCmd" baseType="CMD" shortDescription="Playback a directory">
<LongDescription>
\cfcmd Playback a directory

Expand Down Expand Up @@ -544,7 +551,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="FreezeCmd" baseType="CMD">
<ContainerDataType name="FreezeCmd" baseType="CMD" shortDescription="Freeze a channel">
<LongDescription>
\cfcmd Freeze a channel

Expand Down Expand Up @@ -586,7 +593,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="ThawCmd" baseType="CMD">
<ContainerDataType name="ThawCmd" baseType="CMD" shortDescription="Thaw a channel">
<LongDescription>
\cfcmd Thaw a channel

Expand Down Expand Up @@ -627,7 +634,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="SuspendCmd" baseType="CMD">
<ContainerDataType name="SuspendCmd" baseType="CMD" shortDescription="Suspend a transaction">
<LongDescription>
\cfcmd Suspend a transaction

Expand Down Expand Up @@ -670,7 +677,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="ResumeCmd" baseType="CMD">
<ContainerDataType name="ResumeCmd" baseType="CMD" shortDescription="Resume a transaction">
<LongDescription>
\cfcmd Resume a transaction

Expand Down Expand Up @@ -713,7 +720,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="CancelCmd" baseType="CMD">
<ContainerDataType name="CancelCmd" baseType="CMD" shortDescription="Cancel a transaction">
<LongDescription>
\cfcmd Cancel a transaction

Expand Down Expand Up @@ -754,7 +761,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="AbandonCmd" baseType="CMD">
<ContainerDataType name="AbandonCmd" baseType="CMD" shortDescription="Abandon a transaction">
<LongDescription>
\cfcmd Abandon a transaction

Expand Down Expand Up @@ -795,7 +802,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="SetParamCmd" baseType="CMD">
<ContainerDataType name="SetParamCmd" baseType="CMD" shortDescription="Set a local parameter">
<LongDescription>
\cfcmd Set parameter

Expand Down Expand Up @@ -834,7 +841,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="GetParamCmd" baseType="CMD">
<ContainerDataType name="GetParamCmd" baseType="CMD" shortDescription="Get a local parameter">
<LongDescription>
\cfcmd Get parameter

Expand Down Expand Up @@ -872,7 +879,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="WriteQueueCmd" baseType="CMD">
<ContainerDataType name="WriteQueueCmd" baseType="CMD" shortDescription="Write a queue to file">
<LongDescription>
\cfcmd Write queue

Expand Down Expand Up @@ -915,7 +922,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="EnableDequeueCmd" baseType="CMD">
<ContainerDataType name="EnableDequeueCmd" baseType="CMD" shortDescription="Enable dequeue (tx file) for a channel">
<LongDescription>
\cfcmd Enable dequeue

Expand Down Expand Up @@ -955,7 +962,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="DisableDequeueCmd" baseType="CMD">
<ContainerDataType name="DisableDequeueCmd" baseType="CMD" shortDescription="Disable dequeue (tx file) for a channel">
<LongDescription>
\cfcmd Disable dequeue

Expand Down Expand Up @@ -995,7 +1002,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="EnableDirPollingCmd" baseType="CMD">
<ContainerDataType name="EnableDirPollingCmd" baseType="CMD" shortDescription="Enable polling directory">
<LongDescription>
\cfcmd Enable directory polling

Expand Down Expand Up @@ -1042,7 +1049,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="DisableDirPollingCmd" baseType="CMD">
<ContainerDataType name="DisableDirPollingCmd" baseType="CMD" shortDescription="Disable polling directory">
<LongDescription>
\cfcmd Disable directory polling

Expand Down Expand Up @@ -1089,7 +1096,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="PurgeQueueCmd" baseType="CMD">
<ContainerDataType name="PurgeQueueCmd" baseType="CMD" shortDescription="Purge queue">
<LongDescription>
\cfcmd Purge queue

Expand Down
4 changes: 2 additions & 2 deletions fsw/src/cf_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ CFE_Status_t CF_TxFileCmd(const CF_TxFileCmd_t *msg)
* For priority and dest_id params, anything is acceptable.
*/
if ((tx->cfdp_class != CF_CFDP_CLASS_1 && tx->cfdp_class != CF_CFDP_CLASS_2) || tx->chan_num >= CF_NUM_CHANNELS ||
tx->keep > 1)
(int)tx->keep > 1)
{
CFE_EVS_SendEvent(CF_EID_ERR_CMD_BAD_PARAM, CFE_EVS_EventType_ERROR,
"CF: bad parameter in CF_TxFileCmd(): chan=%u, class=%u keep=%u", (unsigned int)tx->chan_num,
Expand Down Expand Up @@ -190,7 +190,7 @@ CFE_Status_t CF_PlaybackDirCmd(const CF_PlaybackDirCmd_t *msg)
* For priority and dest_id params, anything is acceptable.
*/
if ((tx->cfdp_class != CF_CFDP_CLASS_1 && tx->cfdp_class != CF_CFDP_CLASS_2) || tx->chan_num >= CF_NUM_CHANNELS ||
tx->keep > 1)
(int)tx->keep > 1)
{
CFE_EVS_SendEvent(CF_EID_ERR_CMD_BAD_PARAM, CFE_EVS_EventType_ERROR,
"CF: bad parameter in CF_PlaybackDirCmd(): chan=%u, class=%u keep=%u",
Expand Down

0 comments on commit 831fb16

Please sign in to comment.