SoAlarmSensor(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

✨ SoAlarmSensor ✨

okay bestie, gather round β€” this is the manual page for SoAlarmSensor(3) from the Library Functions Manual, and yes it is giving main character energy for a class that just... waits. πŸ•


πŸŽ€ NAME πŸŽ€

SoAlarmSensor β€” the SoAlarmSensor class is a sensor which will trigger once at a specified time. That's it. One shot. No repeats. Periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Inventor/sensors/SoAlarmSensor.h>

Inherits SoTimerQueueSensor. So it's literally part of the family tree, bestie. 🌳

πŸ’œ Public Member Functions πŸ’œ

SoAlarmSensor (void)
SoAlarmSensor (SoSensorCB *func, void *data)
virtual ~SoAlarmSensor (void)
void setTime (const SbTime &abstime)
void setTimeFromNow (const SbTime &reltime)
const SbTime & getTime (void) const
virtual void schedule (void)

🌸 Public Member Functions inherited from SoTimerQueueSensor 🌸

SoTimerQueueSensor (void)
SoTimerQueueSensor (SoSensorCB *func, void *data)
virtual ~SoTimerQueueSensor (void)
const SbTime & getTriggerTime (void) const
virtual void unschedule (void)
virtual SbBool isScheduled (void) const
virtual void trigger (void)

🌈 Public Member Functions inherited from SoSensor 🌈

SoSensor (void)
SoSensor (SoSensorCB *func, void *data)
virtual ~SoSensor (void)
void setFunction (SoSensorCB *callbackfunction)
SoSensorCBPtr getFunction (void) const
void setData (void *callbackdata)
void * getData (void) const
void setNextInQueue (SoSensor *next)
SoSensor * getNextInQueue (void) const

πŸ’« Additional Inherited Members πŸ’«

⭐ Static Public Member Functions inherited from SoSensor ⭐

static void initClass (void)

🧚 Protected Member Functions inherited from SoTimerQueueSensor 🧚

void setTriggerTime (const SbTime &time)

πŸ“ Protected Attributes inherited from SoTimerQueueSensor πŸ“

SbBool scheduled

πŸ’– Protected Attributes inherited from SoSensor πŸ’–

SoSensorCB * func
void * funcData

πŸ‘‘ Detailed Description πŸ‘‘

The SoAlarmSensor class is a sensor which will trigger once at a specified time. (Yes, we're saying it again, because it's the whole personality.)

SoAlarmSensor provides a convenient way of setting up triggers for jobs which should be executed only once when they are scheduled. It's the "set it and forget it" girlie of the sensor world. Not me setting an alarm and then never scheduling it 😭


πŸ”₯ Constructor & Destructor Documentation πŸ”₯

πŸŽ€ SoAlarmSensor::SoAlarmSensor (void )

Default constructor. The blank-slate era. ✨

πŸŽ€ SoAlarmSensor::SoAlarmSensor (SoSensorCB * func, void * data)

Constructor taking as parameters the sensor callback function and the userdata which will be passed the callback. So you hand it a func and some data and it's like, "got it, love that for us." πŸ’…

See also

  • setFunction(), setData()

References SoSensor::func.

πŸŽ€ SoAlarmSensor::~SoAlarmSensor (void ) [virtual]

Destructor. Say bye bestie. πŸ¦‹


πŸ’… Member Function Documentation πŸ’…

🌸 void SoAlarmSensor::setTime (const SbTime & abstime)

Set the time at which the sensor will trigger. You're literally telling it when, in absolute terms.

Note that you must manually schedule() the sensor after calling this method. It is not gonna do that part for you, bestie β€” no cap.

See also

  • setTimeFromNow(), getTime()

🌸 void SoAlarmSensor::setTimeFromNow (const SbTime & reltime)

Set the alarm to be at a specified offset from the current time. Like "wake me up in 20 minutes" energy instead of "wake me up at 7:45". ⏰

Note that you must manually schedule() the sensor after calling this method. Same rule, different day.

See also

  • setTime(), getTime()

References SbTime::setToTimeOfDay().

🌸 const SbTime & SoAlarmSensor::getTime (void ) const

Returns the trigger time for the alarm as an absolute value from 1970-01-01 00:00:00. Yes, the epoch. It's giving very Unix of it. 🧚

See also

  • setTime(), setTimeFromNow()

🌸 void SoAlarmSensor::schedule (void ) [virtual]

Put the sensor in the global timer queue. This is the step everyone forgets and then wonders why nothing triggers πŸ™ˆ (it's me, I forgot).

See also

  • unschedule(), isScheduled()

Reimplemented from SoTimerQueueSensor.

References SoTimerQueueSensor::schedule(), and SoTimerQueueSensor::setTriggerTime().


πŸ’– Author πŸ’–

Generated automatically by Doxygen for Coin from the source code. The robots wrote it, I just made it cute. πŸ€–βœ¨


okay that's the whole page, bestie β€” this was Coin, Version 2.5.0, and the page is SoAlarmSensor(3). Go schedule your sensor. For real this time. πŸ«ΆπŸ’–πŸŽ€

πŸ“¦ where this page comes from