BACnetScheduleGetNextScheduleEvent (FUN)ΒΆ
FUNCTION BACnetScheduleGetNextScheduleEvent : IEC_BACNET_STATUS
Function calculates the next schedule event from given start time.
This function will calculates the next schedule event from given start time if requested. The implicitly given entries at 00:00:00 for each day which schedule the default value will NOT be returned as a next scheduler event here. Only real schedule entries will be looked at and will be returned. The return value of BACNET_STATUS_ENTRY_NOT_FOUND will be only returned if no other fixed event is found. If the exception schedules contain any wildcards this function will never return this error code. Also if any weekly schedule is present this error code will not be returned because of the weekly schedule event.
Return: IEC_BACNET_STATUS
- InOut:
Scope
Name
Type
Comment
Return
BACnetScheduleGetNextScheduleEvent
Input
deviceInst
The instance number of the local device in which the local schedule object exists.
instNumber
The instance number which specifies the local schedule object to change.
bEvalWeekly
If set to TRUE the weekly schedule is evaluated.
bEvalException
If set to TRUE the exception schedule is evaluated.
pTimeNow
POINTER TO IEC_BACNET_DATE_TIME
Pointer to the start time from which the next schedule event is calculated if it is requested by providing the pTimeNext parameter.
pValueNow
POINTER TO IEC_BACNET_PROPERTY_CONTENTS
An optional pointer to an property contents structure in which the value for the actual schedule event (pTimeNow) will be stored. If buffer.nBufferSize = 0 and buffer.pBuffer = NULL memeory will be allocated and needs to be released by the application.
pValueSourceNow
POINTER TO IEC_BACNET_PROPERTY_ID
An optional pointer to store the source property id of the actual value retrieved (PROP_SCHEDULE_DEFAULT, PROP_WEEKLY_SCHEDULE or PROP_EXCEPTION_SCHEDULE).
pExceptionPriorityNow
POINTER TO IEC_BACNET_PRIORITY_LEVEL
An optional pointer to store the exception priority if the actaul value is sourced from the exception schedule entries.
pTimeNext
POINTER TO IEC_BACNET_DATE_TIME
An optional pointer to store the next schedule event found. If no such event exists an error of BACNET_STATUS_FUNCTION_NOT_SUPPORTED is returned.
pValueNext
POINTER TO IEC_BACNET_PROPERTY_CONTENTS
An optional pointer to an property contents structure in which the value for the next schedule event (pTimeNext) will be stored. If buffer.nBufferSize = 0 and buffer.pBuffer = NULL memeory will be allocated and needs to be released by the application.
pValueSourceNext
POINTER TO IEC_BACNET_PROPERTY_ID
An optional pointer to store the source of the next value retrieved (PROP_SCHEDULE_DEFAULT, PROP_WEEKLY_SCHEDULE or PROP_EXCEPTION_SCHEDULE).
pExceptionPriorityNext
POINTER TO IEC_BACNET_PRIORITY_LEVEL
An optional pointer to store the exception priority if the next value is sourced from the exception schedule entries.