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

Developer

API Reference

ISENSORUTIL_ITERCREATE()

Brew Release
Brew MP 1.0.2
See Also
ISensorUtil_IterDelete ISensorUtil_IterNumKeys ISensorUtil_IterNextKey ISensorUtil_IterNumValues ISensorUtil_IterNextValue
Description
Creates an iterator object for the given response message.
Params
_me
[in]:
Pointer to ISensorUtil interface
pResponseStr
[in]:
pointer to buffer that has the response message.
pResponseStrLen
[in]:
size of pResultLen buffer
iter
[out]:
Handle to ISensorUtil_iterator type filled in by the API.
Interface
Prototype
  • AEEResult ISensorUtil_IterCreate(ISensorUtil* _me, const char* pResponseStr, int pResponseStrLen, 
                                     ISensorUtil_iterator* iter)
    
Return

  • AEE_SUCCESS: if the iterator is created and initialized. AEE_EINCOMPLETEITEM : if the message could not be copied to the iterator completely. AEE_EBADPARM : pResponseStr is NULL or pResponseStrLen is 0. AEE_EFAILED: Otherwise
Side Effect
  • None
Comments
The app needs to call this API before it can call other iterator based API's. Once an ISensorUtil_iterator object is available to the application, the app can use the handle on behalf of the response message and use API's to parse the response. Example code: { // Assume pResponseStr has the message //"error=0#accelx=-198,accely=1008,accelz=176#get,accelx,accely,accelz" ISensorUtil_iterator myIter; ISensorUtil_IterCreate(me, pResponseStr, STRLEN(pResponseStr)+1, &myIter); }