Hi!
In my application the C33x is doing measurements every 10 seconds to have a “realtime” time view of the values. The device is online, to see the actual values in a view on the platform.
To see every measurement value on the platform I have to record the data in the 10 seconds intervall, which is producing much data I don’t really need. A record intervall of 1 min would be OK.
So can the values in the view can be updated without performing a data record?
LG Roman
Hi Roman,
There is a live data function that does exactly what you expect.
rM2M_LiveData( const data{}, len)
The function transmits a data record as live data to the server. Calling this function is only permissible if the device is in “online” mode and an active connection to the server is established.
Look into the Studio online help for details.
BR
Franz
Hello,
The bytebuffer transferred by the rM2M_LiveData()
function must match the data area of the used histdata container in your DDE.
For example:
main.dde
#histdata0 measurements up
Value1 u8
Value2 u16
Value3 s32
main.p
new aLiveData{DDE_measurements_sz}; // Bytebuffer for the live data transmission
new iValue1, iValue2, iValue3;
iValue1 = 123;
iValue2 = 1234;
iValue3 = 12345;
aLiveData{0} = 0; // Histdata ID
aLiveData{1} = iValue1; // Value 1, u8
rM2M_Pack(aLiveData, 2, iValue2, RM2M_PACK_U16 | RM2M_PACK_BE); // Value 2, u16
rM2M_Pack(aLiveData, 4, iValue3, RM2M_PACK_S32 | RM2M_PACK_BE); // Value 3, s32
rM2M_LiveData( aLiveData, DDE_measurements_sz);
BR
Franz
Thank you Franz!
This is working great!