@@ -941,7 +941,23 @@ function discrete_events(sys::AbstractSystem)
941941 cbs
942942end
943943
944+ """
945+ $(TYPEDSIGNATURES)
946+
947+ Returns whether the system `sys` has the internal field `discrete_events`.
948+
949+ See also [`get_discrete_events`](@ref).
950+ """
944951has_discrete_events (sys:: AbstractSystem ) = isdefined (sys, :discrete_events )
952+ """
953+ $(TYPEDSIGNATURES)
954+
955+ Get the internal field `discrete_events` of a system `sys`.
956+ It only includes `discrete_events` local to `sys`; not those of its subsystems,
957+ like `unknowns(sys)`, `parameters(sys)` and `equations(sys)` does.
958+
959+ See also [`has_discrete_events`](@ref).
960+ """
945961function get_discrete_events (sys:: AbstractSystem )
946962 has_discrete_events (sys) || return SymbolicDiscreteCallback[]
947963 getfield (sys, :discrete_events )
@@ -984,7 +1000,23 @@ function continuous_events(sys::AbstractSystem)
9841000 filter (! isempty, cbs)
9851001end
9861002
1003+ """
1004+ $(TYPEDSIGNATURES)
1005+
1006+ Returns whether the system `sys` has the internal field `continuous_events`.
1007+
1008+ See also [`get_continuous_events`](@ref).
1009+ """
9871010has_continuous_events (sys:: AbstractSystem ) = isdefined (sys, :continuous_events )
1011+ """
1012+ $(TYPEDSIGNATURES)
1013+
1014+ Get the internal field `continuous_events` of a system `sys`.
1015+ It only includes `continuous_events` local to `sys`; not those of its subsystems,
1016+ like `unknowns(sys)`, `parameters(sys)` and `equations(sys)` does.
1017+
1018+ See also [`has_continuous_events`](@ref).
1019+ """
9881020function get_continuous_events (sys:: AbstractSystem )
9891021 has_continuous_events (sys) || return SymbolicContinuousCallback[]
9901022 getfield (sys, :continuous_events )
0 commit comments