Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 19, 2024
1 parent dfc683f commit 0e230c1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
16 changes: 12 additions & 4 deletions omega/develop/_sources/devGuide/TimeMgr.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,24 @@ is set as the new ring time:
```c++
SingleAlarm.reset(NewAlarmTime);
```
If the Alarm is periodic, the new ring time will be set to the next interval
boundary after the input time:
If the Alarm is periodic, the ringing will be switched off as above and the
new ring time will be set to the next interval boundary after the input time.
The interval boundary is an integer number of intervals after the start time
provided on Alarm creation.
```c++
PeriodicAlarm.reset(CurrentTime);
```
This Alarm will ring next at `CurrentTime + AlarmInterval`. An Alarm can be
permanently stopped using the `stop` method:
An Alarm can be permanently stopped using the `stop` method:
```c++
SingleAlarm.stop();
```
It is sometimes useful to retrieve other aspects of a periodic Alarm, namely
the Alarm interval and the last time the Alarm was ringing. Two retrieval
functions are provided that return const pointers to these values:
```c++
const TimeInterval *AlarmInterval = PeriodicAlarm.getInterval();
const TimeInstant *PriorRingTime = PeriodicAlarm.getRingTimePrev();
```

### 6. Clock

Expand Down
16 changes: 12 additions & 4 deletions omega/develop/devGuide/TimeMgr.html
Original file line number Diff line number Diff line change
Expand Up @@ -327,16 +327,24 @@ <h3>5. Alarm<a class="headerlink" href="#alarm" title="Permalink to this heading
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">SingleAlarm</span><span class="p">.</span><span class="n">reset</span><span class="p">(</span><span class="n">NewAlarmTime</span><span class="p">);</span>
</pre></div>
</div>
<p>If the Alarm is periodic, the new ring time will be set to the next interval
boundary after the input time:</p>
<p>If the Alarm is periodic, the ringing will be switched off as above and the
new ring time will be set to the next interval boundary after the input time.
The interval boundary is an integer number of intervals after the start time
provided on Alarm creation.</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">PeriodicAlarm</span><span class="p">.</span><span class="n">reset</span><span class="p">(</span><span class="n">CurrentTime</span><span class="p">);</span>
</pre></div>
</div>
<p>This Alarm will ring next at <code class="docutils literal notranslate"><span class="pre">CurrentTime</span> <span class="pre">+</span> <span class="pre">AlarmInterval</span></code>. An Alarm can be
permanently stopped using the <code class="docutils literal notranslate"><span class="pre">stop</span></code> method:</p>
<p>An Alarm can be permanently stopped using the <code class="docutils literal notranslate"><span class="pre">stop</span></code> method:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">SingleAlarm</span><span class="p">.</span><span class="n">stop</span><span class="p">();</span>
</pre></div>
</div>
<p>It is sometimes useful to retrieve other aspects of a periodic Alarm, namely
the Alarm interval and the last time the Alarm was ringing. Two retrieval
functions are provided that return const pointers to these values:</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="k">const</span><span class="w"> </span><span class="n">TimeInterval</span><span class="w"> </span><span class="o">*</span><span class="n">AlarmInterval</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PeriodicAlarm</span><span class="p">.</span><span class="n">getInterval</span><span class="p">();</span>
<span class="k">const</span><span class="w"> </span><span class="n">TimeInstant</span><span class="w"> </span><span class="o">*</span><span class="n">PriorRingTime</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PeriodicAlarm</span><span class="p">.</span><span class="n">getRingTimePrev</span><span class="p">();</span>
</pre></div>
</div>
</section>
<section id="clock">
<h3>6. Clock<a class="headerlink" href="#clock" title="Permalink to this heading"></a></h3>
Expand Down
2 changes: 1 addition & 1 deletion omega/develop/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 0e230c1

Please sign in to comment.