@@ -47,25 +47,29 @@ discrete-time systems that assume a fixed sample time, such as PID controllers a
4747filters.
4848""" SolverStepClock
4949
50- isclock (c:: TimeDomain ) = @match c begin
50+ isclock (c:: Clocks.Type ) = @match c begin
5151 PeriodicClock () => true
5252 _ => false
5353end
54+ isclock (:: TimeDomain ) = false
5455
55- issolverstepclock (c:: TimeDomain ) = @match c begin
56+ issolverstepclock (c:: Clocks.Type ) = @match c begin
5657 SolverStepClock () => true
5758 _ => false
5859end
60+ issolverstepclock (:: TimeDomain ) = false
5961
60- iscontinuous (c:: TimeDomain ) = @match c begin
62+ iscontinuous (c:: Clocks.Type ) = @match c begin
6163 ContinuousClock () => true
6264 _ => false
6365end
66+ iscontinuous (:: TimeDomain ) = false
6467
65- iseventclock (c:: TimeDomain ) = @match c begin
68+ iseventclock (c:: Clocks.Type ) = @match c begin
6669 EventClock () => true
6770 _ => false
6871end
72+ iseventclock (:: TimeDomain ) = false
6973
7074is_discrete_time_domain (c:: TimeDomain ) = ! iscontinuous (c)
7175
@@ -77,7 +81,7 @@ iseventclock(::Any) = false
7781is_discrete_time_domain (:: Any ) = false
7882
7983# public
80- function first_clock_tick_time (c, t0)
84+ function first_clock_tick_time (c:: Clocks.Type , t0)
8185 @match c begin
8286 PeriodicClock (dt) => ceil (t0 / dt) * dt
8387 SolverStepClock () => t0
@@ -87,6 +91,10 @@ function first_clock_tick_time(c, t0)
8791 end
8892end
8993
94+ function first_clock_tick_time (c:: TimeDomain , _)
95+ error (" Unimplemented for clock $c " )
96+ end
97+
9098# public
9199"""
92100 $(TYPEDEF)
0 commit comments