I've recently developed a semi-small and semi-simple simulation using only DifferentialEquations.jl, basically just a dynamical system of a rotational motion of a rigid body, but I also interfaced this physical model with a digital subsystem modeling sensors, computation and actuation using the callbacks interface. Now I'm looking into expanding this simulation and it will probably end up being more complex. I think that I should switch to using ModelingToolkit.jl for the dynamical parts, but I'm not finding a suitable solution for the event based part. There are libraries like ConcurentSim.jl (previously JuliaSim.jl) and DiscreteEvents.jl, but it looks to me that they cannot be combined with DifferentialEquations.jl, but I am also not liking the syntax used in them, at least it feels unnatural for my needs. I've heard at a presentation that for ConcurentSim.jl it is planned to interoperate with DifferentialEquations.jl but I do not see any traces of such functionality in it's source code. ModelingToolkit.jl does have some stuff with callbacks generation and maintenance in its source code, but I can not figure out what it is used for and if it would be useful for my needs. So the question is, is there some support for my needs in the ModelingToolkit.jl or is there another library that I would find useful?
If the answer is no, I would like to try to develop one. Or would it be better to extend the ModelingToolkit.jl instead? Or BlockSystems.jl? I imagine a syntax where one could specify inputs and outputs of a digital event based systems similar as with variables and parameters, then using connect function to build up the whole system. There would be a support for simple inputs that just contain a value at the time of the model's functions invocation, in case of periodic execution, but also for inputs that would execute a function when the value is updated. Would something like this be a valuable addition to the ecosystem?