Description:
The GetNotification
method notifies the client
when the value of a system
attribute is changed.
This is an asynchronous method.
Syntax:
result = so.ISysInfo.GetNotification(criteria, callback);
Arguments:
criteria
:
This is an object that specifies the system attribute to monitor for changes. For more information about the object properties and how to define them, see section Criteria for change notifications.
callback
:
The callback
argument is the name of the method
that is executed when a GetNotification
call has results
or status information to return. You must define this method separately. Follow
the instructions in section Defining the callback handler for an asynchronous method to
define the callback
method.
Return value:
The GetNotification
method returns an object that
contains the initial return value for the asynchronous call it started (see
the following table). The actual notification information is returned by the callback
method
in the ReturnValue
property of its result object.
Property |
Description |
Value |
---|---|---|
|
This is a number used as an identification to match transactions started
with the asynchronous |
|
|
This is a number that specifies a predefined error code. |
|
|
This is a text string that describes the error. |
Property |
Description |
Value |
---|---|---|
|
This is an object (a system attribute object) that contains the information for the changed system attribute. This object contains the properties For example, if you request notification for the
|
See System attributes. |
|
This is a number that specifies a predefined error code. |
|
|
This is a text string that describes the error. |
Remarks:
GetNotification
returns notifications
until cancelled with Cancel
.
Only some system attributes can be monitored for changes.
To find out which system attributes support GetNotification
,
see section Supported system attributes (entities and keys).
Example code:
For the complete source of a sample widget that demonstrates how to use this Service API, see the full example.