API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

ISENSORUTIL_ITERNUMKEYS()

Brew Release
Brew MP 1.0.2
See Also
ISensorUtil_IterCreate ISensorUtil_IterDelete ISensorUtil_IterNextKey ISensorUtil_IterNumValues ISensorUtil_IterNextValue ISensorUtil_GetValueByDataType
Description
Returns the number of Data types or Datatype:Attribute pairs in the response command.
Params
_me
[in]:
Pointer to ISensorUtil interface
iter
[in]:
iterator object to be used for this operation.
numKeys
[out]:
Number of data types or
Interface
Prototype
  • AEEResult ISensorUtil_IterNumKeys(ISensorUtil* _me, ISensorUtil_iterator iter, uint32* numKeys)
    
Return

  • AEE_SUCCESS: if the number of keys can be generated. AEE_EINVALIDFORMAT : if the response message in the iterator is invalid. AEE_EFAILED: Otherwise
Side Effect
  • None
Comments
Example code: { // Assume pResponseStr has the message //"error=0#accelx:maxfreq=40,accely=1008,accelz=176#get,accelx,accely,accelz" // myIter is the iterator having the pResponseStr ISensorUtil_iterator myIter; int numKeys; ISensorUtil_IterNumKeys(me, myIter, &numKeys); // NumKeys will return 3 since there are 3 keys in the response message // accelx:maxfreq, accely and accelz }