Processes response messages and returns only the desired message based on the message type provided.
-
API
-
int Iotc_GetResponseByType ( IotcSession * session, IotcGetResponseMsgType requestedType, int timeout, IotcGetResponse * getResponse )
-
Parameters
-
|
|
|
in |
session |
The current IotcSession to be used. |
in |
requestedType |
The desired type of response message to be obtained. |
in |
timeout |
The duration to wait for a response from the agent, in milliseconds. |
out |
getResponse |
IotcGetResponse pointer for holding the result. |
-
Returns
-
Returns -1 on failure. This value comes from the status of the response message or from a communication error. To handle differences between these failures, check the returned message type.