Intercepting messages #612
Replies: 2 comments 1 reply
-
Brainstormed, "risky" way to do it and untested but should work in theory: Make a fault injection task a higher priority than the task under test. Subscribe to the same messages, and modify the data in those messages (which you should never do in production). By the time the task under test runs it'll end up processing the modified message. |
Beta Was this translation helpful? Give feedback.
-
Thanks. Fault injection will only run during tests, so this could be alright. By modify the messages, do you mean take the message content, cast it to the right struct type, then just modify the struct fields and that should be enough? Or is there a different mechanism to overwrite messages? Does everything run in the same thread? Is there a guarantee that the routine that modifies the messages will finish before any lower-priority task receives the (still unmodified) message? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm trying to implement a fault-injection capability that will intercept and modify cFS messages, for V&V purposes.
Do you know if stopping messages from being sent to other applications is possible? What would be the best way to approach this?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions