stateflow

Populate and emit StateFlow List

你。 提交于 2021-01-28 12:13:52
问题 I want to use StateFlow. But for now, I don't find any lecture which could help me. I'm facing an issue : To start, I have a singleton which hold a list of String, I want something "easy" to understand even if it isn't the goal purpose for now. The purpose is to populate and emit the list with strings (it will be a complex object later). class CustomStateFlow() { private val _custom = MutableStateFlow(emptyList<String>()) val custom: StateFlow<List<String>> = _custom fun addString(string:

Unit testing/continuous integration with Simulink/Stateflow

邮差的信 提交于 2019-12-03 04:58:00
问题 How can I perform unit testing in Simulink, or preferably, Stateflow? I'm a fan of agile software methods, including test driven development. I'm responsible for the development of safety critical control software and we're using Matlab/Simulink/Stateflow for the development of it. This toolset is selected because of the link with plant (hardware) models. (model-in-the-loop, hardware-in-the-loop) I have found some links on Stackoverflow: Unit-testing framework for MATLAB: xunit, slunit and