@@ -1319,18 +1319,18 @@ SB Messages by allocating sufficient memory, calling the SB API to
13191319initialize the contents of the SB Message and then storing any
13201320appropriate data into the structure.
13211321
1322- The Software Bus API hides the details of the message structure,
1323- providing routines such as CFE_SB_GetMsgTime and CFE_SB_SetMsgTime
1322+ The Message API hides the details of the message structure,
1323+ providing routines such as CFE_MSG_GetMsgTime and CFE_MSG_SetMsgTime
13241324in order to get and set a message time. The current version of the cFE
13251325supports only CCSDS, however, the implementation of the message
13261326structure can be changed without affecting cFS Applications.
13271327
1328- In the CCSDS implementation of the Software Bus, the upper 3 most
1329- significant bits of the 16 bit Message ID Number ** shall be zero
1330- (b'000'). ** The Software Bus ignores the upper 3 most significant bits
1331- defined by CCSDS as the Version Number. A non-zero value in the Version
1332- Number (3 bits) could result in duplicate Message IDs being defined. For
1333- example, x01FF and x81FF are the same Message ID to the Software Bus .
1328+ See the implementation documentation for specific formats,
1329+ fields, and bit values. The message ID (MsgId) is an abstract
1330+ concept that is implementation depended, used for routing messages
1331+ on the Software Bus. Depending on the implementation, different
1332+ ranges and values are supported, and the values effect the message
1333+ header differently .
13341334
13351335##### 6.1.2 Pipes
13361336
@@ -1705,54 +1705,59 @@ It is important to note that some SB API calls assume the presence of a
17051705particular header type and will not work properly if the other header type
17061706is present instead. The following section provides more detail.
17071707
1708- ##### 6.5.2 Modifying Software Bus Message Header Information
1708+ ##### 6.5.2 Setting Message Header Information
17091709
1710- Before sending an SB Message to the SB, the Application can update the
1711- SB Message Header. The following table summarizes the functions that
1712- can be used to modify SB Message Header fields. Note that some of these
1710+ Before sending a Message to the SB, the Application can set fields in the
1711+ Message Header. The following table summarizes the functions that
1712+ can be used to modify Message Header fields. Note that some of these
17131713functions are only applicable to a specific header type. Additional
17141714information on modifying specific header types is provided in the following
17151715subsections.
17161716
1717- | ** SB Message Header Field** | ** SB API for Modifying the Header Field** | ** Applicability** |
1718- | ---------------------------:| -----------------------------------------:| -------------------:|
1719- | Message ID | CFE_SB_SetMsgId | Command & Telemetry |
1720- | Total Message Length | CFE_SB_SetTotalMsgLength | Command & Telemetry |
1721- | User Data Message Length | CFE_SB_SetUserDataLength | Command & Telemetry |
1722- | Command Code | CFE_SB_SetCmdCode | Command Only |
1723- | Checksum | CFE_SB_GenerateChecksum | Command Only |
1724- | Time | CFE_SB_TimeStampMsg | Telemetry Only |
1725- | Time | CFE_SB_SetMsgTime | Telemetry Only |
1726-
1727- Applications shall always use these functions to manipulate the SB
1728- Message Header. The structure of the SB Message Header may change from
1717+ | ** SB Message Header Field** | ** API for Modifying the Header Field** | ** Applicability** |
1718+ | ---------------------------:| --------------------------------------:| -------------------:|
1719+ | Message ID | CFE_MSG_SetMsgId | Command & Telemetry |
1720+ | Total Message Length | CFE_MSG_SetSize | Command & Telemetry |
1721+ | Command Code | CFE_MSG_SetFcnCode | Command Only |
1722+ | Checksum | CFE_MSG_GenerateChecksum | Command Only |
1723+ | Time | CFE_SB_TimeStampMsg | Telemetry Only |
1724+ | Time | CFE_MSG_SetMsgTime | Telemetry Only |
1725+
1726+ Applications shall always use these functions to manipulate the
1727+ Message Header. The structure of the Message Header may change from
17291728one deployment to the next. By using these functions, Applications are
1730- guaranteed to work regardless of the structure of the SB Message Header.
1729+ guaranteed to work regardless of the structure of the Message Header.
17311730
1732- ##### 6.5.2.1 Modifying SB Command Message Header Information
1731+ Although CFE_SB_SetUserDataLength APIs is available,
1732+ it is based on assumptions about the defintion of "User Data" and is
1733+ really just a best guess since the packet structure is dependent on implementation.
1734+ The preference is to use CFE_MSG_SetSize and actual packet structure
1735+ information when available.
1736+
1737+ ##### 6.5.2.1 Modifying Command Message Header Information
17331738The most common update for command messages is to set the command code.
1734- This is done through the CFE_SB_SetCmdCode () API call. This code is used
1739+ This is done through the CFE_MSG_SetFcnCode () API call. This code is used
17351740to distinguish between multiple commands that share a Message ID. It is
17361741common practice for an application to have a single "CMD_MID" to capture
17371742all commands and then to differentiate those commands using a command code.
17381743
1739- ##### 6.5.2.2 Modifying SB Telemetry Message Header Information
1744+ ##### 6.5.2.2 Modifying Telemetry Message Header Information
17401745The most common update for telemetry messages is to put the current time in
1741- the SB Message. This is accomplished with one of two SB API functions. The
1746+ the Message. This is accomplished with one of two API functions. The
17421747most commonly used function would be CFE_SB_TimeStampMsg(). This API would
17431748insert the current time, in the mission defined format with the mission
1744- defined epoch, into the SB Message Header. The other SB API that can modify
1745- the SB Message Header time is CFE_SB_SetMsgTime (). This API call sets the
1746- time in the SB Message Header to the time specified during the call. This is
1747- useful when the Application wishes to time tag a series of SB Messages with
1749+ defined epoch, into the Message Header. The other API that can modify
1750+ the Message Header time is CFE_MSG_SetMsgTime (). This API call sets the
1751+ time in the Message Header to the time specified during the call. This is
1752+ useful when the Application wishes to time tag a series of Messages with
17481753the same time.
17491754
1750- ##### 6.5.3 Reading Software Bus Message Header Information
1755+ ##### 6.5.3 Reading Message Header Information
17511756
1752- There are several SB APIs available for extracting the SB Message Header
1757+ There are several APIs available for extracting the Message Header
17531758Fields. These APIs shall always be used by Applications to ensure the
17541759Applications are portable to future missions. The following table
1755- identifies the fields of the SB Message Header and the appropriate API
1760+ identifies the fields of the Message Header and the appropriate API
17561761for extracting that field from the header:
17571762
17581763| ** SB Message Header Field** | ** API for Reading the Header Field** | ** Applicability** |
@@ -1762,12 +1767,12 @@ for extracting that field from the header:
17621767| Total Message Length | CFE_MSG_GetSize | Command & Telemetry |
17631768| Command Code | CFE_MSG_GetFcnCode | Command Only |
17641769
1765- There are other APIs based on selected implementation, and the full list is
1770+ There are other APIs based on selected implementation. The full list is
17661771available in the user's guide.
17671772
17681773There is another API that automatically calculates the checksum for the packet
17691774and compares it to the checksum in the header. The API is called
1770- CFE_SB_ValidateChecksum () and it simply returns a success or failure
1775+ CFE_MSG_ValidateChecksum () and it simply returns a success or failure
17711776indication.
17721777
17731778Although CFE_SB_GetUserDataLength and CFE_SB_GetUserData APIs are available,
0 commit comments