Manual Querying of Sensors NOTE:

By default, sensor or component classes that inherit from QueryableComponentBase class, will be polled at the specified UpdateFrequency. Derived classes will then implement "Process Response()" to save the asynchronus values returned that get returned to local Properties. External classes can then query the Property for the latest value, instead of waiting on the round-trip time.

If, however, you wish to manually send a request down to query a sensor, and wait on the value returned from the Serializer, you can disable polling of the object of interest (e.g. irSensor.Enabled = false;), and invoke the Update() interface. This will query the component, obtain the returned value, and (internally) store the value in the appropriate property, as mentioned above (e.g. irSensor.Update();)

You can then read the value of the updated property and use it as needed (e.g. localValue = irSensor.Distance;)
Each queryable Serializer component inherits this interface, and you can enable/disable each component as needed. You can poll some, you can explicitly query some, or whatever you like.

If you want to reenable polling, then just set the Enabled property to true.



Last Updated: 8/29/2007