Skip to content

Commit

Permalink
IC:2021-03-30, Fix ZeroCopy references in docs
Browse files Browse the repository at this point in the history
Updates documentation for ZeroCopy Ptr APIs updated in nasa#1257
  • Loading branch information
astrogeco committed Mar 30, 2021
1 parent 7db7c72 commit 2df12e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions docs/cFE Application Developers Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,12 @@ deciding on whether to create multiple Applications versus a single
Application with multiple Tasks, the Application Developer should keep
in mind these facts:

- When the Application exits it is the responsiabilty of the
- When the Application exits it is the responsiabilty of the
Main Task to safely stop all of its Child Tasks.

- If the Main Task of an Application is stopped, either through
detection of an exception or via command, all Child Tasks are also
forcibly stopped in an unsafe manner.
forcibly stopped in an unsafe manner.

Child Tasks can be useful in both "Software Only" and "Hardware Servicing"
applications.
Expand Down Expand Up @@ -1949,7 +1949,7 @@ copy is too time consuming, the Developer can choose to utilize the
"Zero Copy" protocol.

The application can request a buffer from SB utilizing
CFE_SB_ZeroCopyGetPtr, then write the message data directly to the
`CFE_SB_AllocateMessageBuffer`, then write the message data directly to the
buffer that can be sent directly (without a copy) by SB.

Once an Application has formatted and filled the SB buffer with the
Expand All @@ -1961,14 +1961,14 @@ calls the CFE_SB_TransmitBuffer API.** Applications should not
assume the SB Buffer pointer is accessible once the buffer
has been sent.

If an Application has called the CFE_SB_ZeroCopyGetPtr API call and
If an Application has called the `CFE_SB_AllocateMessageBuffer` API call and
then later determines that it is not going to send the SB Message, it
shall free the allocated buffer by calling the
CFE_SB_ZeroCopyReleasePtr API.
`CFE_SB_ReleaseMessageBuffer` API.

An example of the "Zero Copy" protocol is shown below:

```
```c
FILE: app_msgids.h

...
Expand Down Expand Up @@ -2034,7 +2034,7 @@ SAMPLE_AppData_t SAMPLE_AppData; /* Instantiate Task Data */
/* SAMPLE_AppData.BigPktBuf is no longer a valid pointer */
...
}
```
```c

## 6.9 Best Practices for using Software Bus

Expand Down
4 changes: 2 additions & 2 deletions docs/src/cfe_api.dox
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@
</UL>
<LI> \ref CFEAPISBZeroCopy
<UL>
<LI> #CFE_SB_ZeroCopyGetPtr - \copybrief CFE_SB_ZeroCopyGetPtr
<LI> #CFE_SB_ZeroCopyReleasePtr - \copybrief CFE_SB_ZeroCopyReleasePtr
<LI> #CFE_SB_AllocateMessageBuffer - \copybrief CFE_SB_AllocateMessageBuffer
<LI> #CFE_SB_ReleaseMessageBuffer - \copybrief CFE_SB_ReleaseMessageBuffer
<LI> #CFE_SB_TransmitBuffer - \copybrief CFE_SB_TransmitBuffer
</UL>
<LI> \ref CFEAPISBSetMessage
Expand Down

0 comments on commit 2df12e2

Please sign in to comment.