setQueryPeriod
setQueryLimit
setMessageLimit
initialize
getErrMsg
The DasyneClient class handles all client-side data synchronization. Dasyne is built on top of DyConnect, and DyConnect's startup function needs to be called before using it.
DasyneClient initialization functions:
bool setQueryPeriod(uint16_t newPeriod);
Set the minimum time between two consecutive EDC queries. newPeriod is the time in milliseconds. See the Dasyne overview for more. The default value is 500 milliseconds.
void setQueryLimit(uint16_t newLimit);
Set the bandwidth that Dasyne will use for sending EDC queries. newLimit is the maximum number of bytes per second Dasyne will use. Typically this can be quite low. Dasyne only needs to send a 4 byte CRC value to verify each data map segment.
The default value is 256 bytes per second, which means that with a minimum segment size of 1 kilobyte, Dasyne can scan up to 64 kilobytes of data per second. You would increase the queryLimit if you have a very large amount of data to scan for errors. Set the query limit to 0 to disable the EDC algorithm.
void setMessageLimit(uint16_t newLimit);
If you plan on using sendTCP, you can tell Dasyne about it here. newLimit is the number of bytes per second that you think you'll be sending (on average). This doesn't have to be an exact number, it's just a rough estimate that helps the DasyneClient estimate congestion.
sendTCP and DasyneClient share a TCP/IP connection. Dasyne will stop sending data if it notices a lot of unsent bytes in the TCP send buffer. If you set newLimit to 2 kilobytes, the send buffer will be allowed to grow an extra 2 kilobytes before Dasyne stops sending.
Initialize this client. This needs to be called before using the DasyneClient networking functions.
Returns false on errors, and sets errMsg with a description of the problem.
Return a description of the most recent error for this DasyneClient.