Change keywords dynamically?

Document created by cdnadmin on Jan 24, 2014
Version 1Show Document
  • View in full screen mode
This document was generated from CDN thread

Created by: Christopher Verges on 18-07-2010 12:07:08 AM
How can keywords be changed dynamically in a reference agent?

Subject: RE: Change keywords dynamically?
Replied by: Christopher Verges on 18-07-2010 02:02:29 AM
You can use energywise_svc_getAttribute() ....

 * Get the current value of a particular attribute.
 * @param *session A handle to the structure holding all information used by
 * the SDK to establish and run its internal processing.
 * @param type An enum value of ew_attribute_type_t specifying the type
 * value requested.
 * @param *length A length variable passed in by the caller.  This will
 * be set to the length in bytes of the returned pointer to data.
 * @return This function returns a const void pointer to the data requested.
 * The length of data is returned back in the length paramater.
 * @usage
 * This is to be used if you would like the retrieve the current value of
 * a given attribute on the running system.  A common example would be to
 * grab the value of all attributes and persist them accross a restart.
const void*
energywise_svc_getAttribute(enw_svc_session_t *session,
                            ew_attribute_type_t type,
                            int *length);