You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When discussed at the cFS CCB yesterday, I realized that the CFE_SB_GetLastSenderId() function, as used by SBN, is not correct. The problem is that SBN needs a way to determine whether a message it is reading off the bus is a message that SBN just published to that bus. SBN checks the last sender and ignores the message when the last sender is SBN. This is fine in the case where SBN is reading the last message on the bus, but if there are multiple messages on the bus, the GetLastSenderId() returns the last sender, not the sender of the message currently being read.
For example, if the the pipe had:
1 SCH wakeup
2 SBN CI msg from peer
3 LC result
When SBN reads the pipe, it reads msg 1 and sees that the sender is LC It reads messages 2 and sees that the sender is LC. Only when it reads 3 does it have the right sender.
The CFE_SB_RcvMsg API is being enhanced to address this and GetLastSenderId() being removed. Using either task-based reading of the pipes (which wakes up as soon as a message is published on that pipe, ensuring only one message on the pipe) or using a high read frequency will help reduce the likelihood of a problem.
Soon, I'll be committing a change that uses a new RcvMsg API that will be available in a pull request.
The text was updated successfully, but these errors were encountered:
When discussed at the cFS CCB yesterday, I realized that the CFE_SB_GetLastSenderId() function, as used by SBN, is not correct. The problem is that SBN needs a way to determine whether a message it is reading off the bus is a message that SBN just published to that bus. SBN checks the last sender and ignores the message when the last sender is SBN. This is fine in the case where SBN is reading the last message on the bus, but if there are multiple messages on the bus, the GetLastSenderId() returns the last sender, not the sender of the message currently being read.
For example, if the the pipe had:
1 SCH wakeup
2 SBN CI msg from peer
3 LC result
When SBN reads the pipe, it reads msg 1 and sees that the sender is LC It reads messages 2 and sees that the sender is LC. Only when it reads 3 does it have the right sender.
The CFE_SB_RcvMsg API is being enhanced to address this and GetLastSenderId() being removed. Using either task-based reading of the pipes (which wakes up as soon as a message is published on that pipe, ensuring only one message on the pipe) or using a high read frequency will help reduce the likelihood of a problem.
Soon, I'll be committing a change that uses a new RcvMsg API that will be available in a pull request.
The text was updated successfully, but these errors were encountered: