Socket ScanAPI Reference
ScanAPI drops the connection to a CHS if it was connected during the process of
changing the ScanAPI configuration.
Please refer to the ScanAPI object properties paragraph for more information.
4.6 Get or Set a property
The ScanAPI object and the Device object have both properties that can be retrieved
or altered by using the get property or set property API.
The process of getting or setting a property is simple. A ScanObject holds a Property
field. The application must create a ScanObject instance and fill its Property member
according to the property of the object it would like to modify.
A property has an ID, a data type,data value and a context. They must be specified
accordingly to the characteristics of the property that needs to be retrieved or
modified.
The context is a field an application can use for maintaining a context. This context is
returned when a property set or get operation completes.
Once the property member of the ScanObject has been filled correctly, the
application can call the get or set API with the reference of the object to which it
wishes to retrieve or modify the property.
If the API returns success, the application can wait for the completion to be received
through the wait API.
An application cannot send multiple properties to the same object before the
previous set or get property operation has been fully completed. An error is
generated during the Set or Get API call if the previous property of the same object
hasn't been completed yet.
The application receives the complete event through its ScanAPI consumer logic that
uses the wait API with the ScanAPI object reference.
A ScanObject that is received from ScanAPI has always its message field filled out.
The property complete event is received in a ScanObject with a Message ID set to a
Get Complete ID or Set Complete ID.
The Message has a result field that indicates if the completion of the get or set
property has been successful or not. The Property member of the ScanObject
contains the Property ID matching to the one that has been set, and in case of
success, the data type and value are filled as expected.
© 2013 Socket Mobile, Inc.
15/152
Need help?
Do you have a question about the ScanAPI and is the answer not in the manual?