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

Developer

API Reference

ISENSORUTIL_ITERNUMMESSAGESINRESPONSE()

Brew Release
Brew MP 1.0.2
See Also
ISensorUtil_IterCreate
Description
Returns the number of response messages present in the iterator object.
Params
_me
[in]:
Pointer to ISensorUtil interface
iter
[in]:
iterator object to be used for this operation.
numResponses
[out]:
Number of response messages present in the iterator object.
Interface
Prototype
  • AEEResult ISensorUtil_IterNumMessagesInResponse(ISensorUtil* _me, ISensorUtil_iterator iter, uint32* numResponses)
    
Return

  • AEE_SUCCESS: if the number of response messages can be determined. AEE_EFAILED: Otherwise
Side Effect
  • None
Comments
Example code: { // Assume pResponseStr has the message // "error=0#accelx=-198,accely=1008,accelz=176#get,accelx,accely,accelz" // myIter is the iterator having the pResponseStr ISensorUtil_iterator myIter; int numResponses; ISensorUtil_IterNumMessagesInResponse( _me, myIter, &numResponses) // When the function returns, the numResponses has the number of response messages, which is 1. } Example code: { // Assume pResponseStr has the message // "error=0#accelx=-198#get,accelxerror=0#accelz=1198#get,accelz" // myIter is the iterator having the pResponseStr ISensorUtil_iterator myIter; int numResponses; ISensorUtil_IterNumMessagesInResponse( _me, myIter, &numResponses) // When the function returns, the numResponses has the number of response messages, which is 2. }