user_on_demand_response

This routine is only applicable for points with an update criteria of either On Demand On Change or On Demand On Scan. This routine is called whenever the demand status for one of these points is changed. This lets you perform device specific actions for the specified point when its demand status changes.

You can find the template for this subroutine in:

usrtm_dmdres.c

Syntax

void user_on_demand_response (ADDR_DATA *address_struct,  
                              int ptState,
                              int *status)

Input Parameters

address_struct

Is a pointer to the address from which the data was read. ADDR_DATA is a typedef to a structure defined in < inc_path/toolkit.h > .

ptState

Contains the new Demand State of the point.

  • A value of TRUE indicates that the point is going into demand.
  • A value of FALSE indicates that the point is no longer in demand.

Output Parameters

status

Indicates whether the function successfully obtained all of the requested information. Valid values are:

TOOLKIT_SUCCESS Function completed successfully.
TOOLKIT_FAILURE Function did not complete successfully.

Return Value

None.