Hello!
I want to transfer the data of 4 variables to the rapidM2M portal.
But when i go to the TestBed and insert the #histdata0 in the watches list i get an error.
This is the error:
This is my code:
const
{
INTERVAL_RECORD = 60, // Intervall der Aufzeichnung (en)
INTERVAL_TX = 10 * 60, // Intervall der Übertragung [s]
}
static iTxTimer;
#callback Timer1s()
{
static iLastRecord;
if ( momentElapsed(iLastRecord, INTERVAL_RECORD) )
{
#log("Create Record");
RecordData(iLastRecord); // Calls up the function to record the data
}
iTxTimer--; // Counter counting down the sec. to the next transmission
if(iTxTimer <= 0) // When the counter has expired ->
{
#log("Start Transmission");
catch( rM2M_TxStart()); // Initiates a connection to the server
iTxTimer = INTERVAL_TX; // Resets counter var. to defined transmission interval [sec.]
}
#log("iTxTimer=%d", iTxTimer);
}
main(){
setInterval(Timer1s,1000);
iTxTimer = INTERVAL_TX; // Sets counter variable to defined transmission interval
catch( rM2M_TxStart());
}
RecordData (iTimestamp)
{
new humidity1=60;
new humidity2=50;
new temp1=23;
new temp2=26;
new aRecData[DDE_measurements];
aRecData.temp1 = temp1;
aRecData.temp2 = temp2;
aRecData.humidity1 = humidity1;
aRecData.humidity2 = humidity2;
DDE_measurements_write(iTimestamp, aRecData);
#log("humidity1= %d, humidity2= %d, temp1= %d, temp2= %d",humidity1, humidity2, temp1, temp2);
}
Can somebody help me out?
Greetings
lf