Automatically generates application code to simplify interchange of DDE containers between the backend's storage and DLO / BLO / POV.
The firmware can only process a limited number of requests to store records into flash memory (using DDE_XXX_write(), rM2M_RecData() or rM2M_WriteLog()) within a period of time.
The "Record Queue" integrated in the DDE library caches the records in RAM when the firmware cannot accept any further requests to store records in the internal flash memory.
If records have been cached in the buffer of the "record queue", cyclical checks are carried out to see if the firmware is ready to accept new requests and the data records are transferred to the firmware if possible.
The define rM2M_RecDataQ_BUFFER_BYTES
can be used to adjust the size of
the RAM buffer of the "Record Queue" or to deactivate the "Record Queue" (not recommended).
The default size of the RAM buffer is 1kBytes (1024 bytes).
Record queue overflows can occur if the DLO is constantly delivering data at a higher rate than the firmware can process. In this case, the library keeps track of the lost data records as well as the lost syslog records. If the queue is able to fit one applog message, there will be an alarm applog entry generated:
Using the following defines is only required if you want to adapt the "Record Queue" to your needs:
Used to adjust the size of the RAM buffer of the "Record Queue" or to deactivate the "Record Queue".
convert s32 value to DDE s64
convert f32 value to DDE f64
begin reading a container
end reading a container
read CP-1252 ANSI string from uplink buffer containing 8bit ANSI.
read CP-1252 ANSI string from uplink buffer containing Unicode utf-8.
read unpacked Unicode utf-32 string from uplink buffer containing Unicode utf-8.
copy Unicode utf-8 string from uplink buffer
read 8bit ANSI string of any custom codepage from uplink buffer
write CP-1252 ANSI string to uplink buffer as 8bit ANSI.
write CP-1252 ANSI string to uplink buffer as Unicode utf-8.
write unpacked Unicode utf-32 string to uplink buffer as Unicode utf-8.
copy Unicode utf-8 string to uplink buffer
write 8bit ANSI string of any custom codepage to uplink buffer
shorthand for DDE_alerts_write( DDE_alerts_OVERFLOW_x,...)
shorthand for DDE_alerts_write( DDE_alerts_UNDERFLOW_x,...)
shorthand for DDE_alerts_write( DDE_alerts_FAULT_x,...)
shorthand for DDE_alerts_write( DDE_alerts_CLEAR,...)
The #applog container provides a standardized mechanism to log major applicative events as a time series and represent them at the backend's administration portal without any further coding.
Add these lines to dde/main.dde
to enable the #applog container:
Trigger an applog from dlo/**
like that:
In certain cases this alternative syntax may be usefull:
#log a copy of every applog() recording to the console
dde/main.dde
:"my.fancy.code"
set it to 1 to enable aloha debug output
start aloha operation
end the current aloha operation as soon as possible, instead of waiting for expiration of hold time set by alohaInit()
translate onAlohaEvent() parameter into readable string
translate alohaLastError() result into readable string
get error information of recent aloha operation
handover aloha data for transmission to backend
get number of seconds the current aloha will last