Simulink split system objects

1 view (last 30 days)
Joel
Joel on 30 Nov 2016
Hello folks,
I have a regular Matlab class named Server that is a convenience class built around webread() and webwrite() that allows communicating with a RESTful webservice. Inside Matlab everything works great. Now I am in the process of creating a Matlab.System class so I can create a Simulink block out of it. I have everything in Simulink as well. My question is the following: I'd like to split the functionallity of that Server Simulink block up into multiple blocks. Ideally I'd like to have one Control block that gives information about the connection status, the number of available measurements and so on, one Input block to GET data from the webservice via the Server class and one Output block to POST data to the webservice via the Server class. Is that possible?
The problem I am facing is that all of these blocks would have to use the same instance of the Server class. In my current Matlab.System class that I use in Simulink I have an instance of that Server class as a private property. Is there any mechanism that allows me to share a property across multiple Matlab.System classes or is there a different mechanism provided by Simulink itself to split functionality of a Matlab.System class up into multiple blocks?
Thank you very much for your help.

Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!