Rust bindings for Simulink C control system
This is an interface to import and to run a controller designed with Simulink inside Rust
Example
A Simulink model named SimControl with 1 input SimIn1 of size 6 and 1 output SimOut1 of size 3 is imported into Rust with:
import_simulink!
build_inputs!
build_inputs!
build_controller!
A more complex example is the mapping of a single input and a single output of a Simulink controller to multiple inputs and outputs in rust.
SimControl has now 1 input SimIn1 of size 14 and 1 output SimOut1of size 20.
SimIn1 is mapped to 3 Rust inputs In1, In2 and In3 of sizes 6, 4 and 4, respectively.
SimOut1 is mapped to 3 Rust outputs Out1, Out2 and Out3 of sizes 12, 4 and 4, respectively.
The rust binding is:
import_simulink!
build_inputs!
build_inputs!
build_controller!
For the inputs, the mapping consists in the size of the Simulink input and the index in the Simulink input where the Rust inputs start. For the outputs, the mapping consists in the size of the Simulink input, the size of the Rust outputs and the index in the Simulink output where the rust outputs start.