Simulink Real-Time TCP Send variable size data input
显示 更早的评论
I am trying to create a communication interface in simulink real-time where i have to send data of variable size (e.g. I have messages like start/stop which are just a header of constant size, but I also have messages with an attached payload of variable size). I cycle through the desired data using multiport-switch blocks which support inputs of variable size. The TCP Send block of the real-time toolbox however, does not support this. This seems counterintuitive, given as it also takes a length input specifying how long the data input is. Am I overlooking some configuration options in the block?
If not, what is the recommended way to send variable size data via TCP in simulink real-time? My current idea is to apply zero-padding to my data vectors to alter them to a constant size for all cases, while relying on the length input to convince the TCP send block to only send the data I want to send. Would this work? If not, what alternatives are there?
Any help would be greatly appreciated!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Development Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!