Arduino Function: Ciao.get

Description

The get function returns a string used to extract data from the CiaoData object. CiaoData could contains more than one information and all of these informations are accessible trought the index parameter. Data and informations extracted and the index number depends on how the specified connector is implemented. See Connectors to know the  meaning of each index.

Syntax

data.get(index);

Note

CiaoData for an XMPP connector is usually composed by an id (index "0"), a sender (index "1") and the message (index "2"). To extract this information you can follow the example steps.

Examples

if(data.isError()){

String id = data.get(0);

String error = data.get(2);

 

Serial.println("Error:" + error);

 }

Written by arduino.org