Function anjay_transport_next_planned_lifecycle_operation
Defined in File core.h
Function Documentation
-
avs_time_real_t anjay_transport_next_planned_lifecycle_operation(anjay_t *anjay, anjay_transport_set_t transport_set)
Returns the time at which next outgoing lifecycle message is planned to be sent via any of the given transports if no outside intervention that might reschedule it (e.g. change of Lifetime - either by user code or from a server) happens until that time.
is mostly equivalent toanjay_transport_next_planned_lifecycle_operation(anjay,
ANJAY_TRANSPORT_SET_ALL)
anjay_next_planned_lifecycle_operation(anjay, ANJAY_SSID_ANY)(see below for more details). Different transport sets may be used to filter the set of server connections queried to only those for which the last known transport matches the provided set.Server connection entries which have not yet been matched to any transport are ignored. Such entries may exist for a short time between refreshing the list of known servers (triggered e.g. by adding a new instance to the Security or Server object) and the actual attempt to connect to that server, as those two actions are performed in separate runs of anjay_sched_run. During that brief period when such entries exist,
anjay_next_planned_lifecycle_operation(anjay, ANJAY_SSID_ANY)will return the current time, whilemay return time of some later planned operation oranjay_transport_next_planned_lifecycle_operation(anjay,
ANJAY_TRANSPORT_SET_ALL)
AVS_TIME_REAL_INVALID.- Parameters:
anjay – Anjay object to operate on.
transport_set – Set of transports to include in calculation.
- Returns:
Point in time according to the real-time clock at which some lifecycle operation is scheduled, or
AVS_TIME_REAL_INVALIDif there are none.