Skip to content

Add a section on alarms to the CSP Node docs - #793

Closed
Lotion-3 wants to merge 1 commit into
Point72:mainfrom
Lotion-3:docs/alarms
Closed

Lotion-3 wants to merge 1 commit into
Point72:mainfrom
Lotion-3:docs/alarms

Conversation

@Lotion-3

Copy link
Copy Markdown

Fixes #130.

Alarms are mentioned on several pages, but there was no single place that explains them, and csp.reschedule_alarm and csp.cancel_alarm weren't documented. This adds an "Alarms" section to the CSP Node page that covers:

  • what alarms are for, and how they behave like inputs;
  • csp.schedule_alarm with a timedelta or a datetime, and the handle it returns;
  • how ticks scheduled for the same time are processed;
  • csp.reschedule_alarm and csp.cancel_alarm, including what happens when the tick has already happened;
  • an example node that uses a timeout alarm to detect a stale input.

It also fills in the "Alarm" glossary entry, which was a TODO.

I checked each statement against csp 0.19.1, and ran the example. make lint-docs passes.

Explain what alarms are for and document the full alarm API in one
place: declaring alarms, csp.schedule_alarm with a timedelta or a
datetime, the handle it returns, csp.reschedule_alarm and
csp.cancel_alarm (neither was documented before), how ticks scheduled
for the same time are processed, and the errors raised. Includes an
example node that detects a stale input with a timeout alarm. Also
fill in the Alarm entry in the glossary.

Fixes Point72#130

Signed-off-by: Laksh Agarwal <lakshagarwal65@gmail.com>
@timkpaine

Copy link
Copy Markdown
Member

Thanks for the PR! I've consolidated some docs updates in #795

@timkpaine timkpaine closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: expand explanations about "alarms"

2 participants