Function anjay_next_planned_notify_trigger
Defined in File core.h
Function Documentation
-
avs_time_real_t anjay_next_planned_notify_trigger(anjay_t *anjay, anjay_ssid_t ssid)
Returns the time at which the earliest notification trigger is scheduled if no outside intervention that might reschedule it (e.g. anjay_notify_changed or a Write Attributes request from a server) happens until that time.
Notification trigger checks value of one or more resources and might send a notification (if the resource value actually changed and other criteria specified by the <NOTIFICATION> Class attributes are met), but it might also not cause any action. In this sense, the time point returned by this function is the earliest point in time at which a notification MAY be generated, i.e. the lower bound estimate for time of the nearest notification.
Notification triggers may be scheduled:
by anjay_notify_changed (it might not be scheduled for immediate execution if the Minimum Period attribute is in effect)
by certain requests from a server, including Write, Write Composite, Write Attributes and Bootstrap Finish
after generating every new notification, if Maximum Period is in effect (see anjay_next_planned_pmax_notify_trigger that only reports this case)
The point in time is calculated for one specific server, or for all known servers at once. In versions that include the SMS commercial feature, only the primary connections are included (including the case where SMS transport is the only one in use for a given Server Account), secondary SMS Trigger connections are not.
- Parameters:
anjay – Anjay object to operate on.
ssid – A Short Server ID of a single regular LwM2M Server for which to get the information, or ANJAY_SSID_ANY to get time of the nearest notification trigger scheduled for any known server connection.
- Returns:
Point in time according to the real-time clock at which the earliest notification trigger is scheduled, or
AVS_TIME_REAL_INVALIDif there are none.