Open neilh10 opened 3 years ago
Investigating, the SDI12, requested data with "1D!" processes characters as a stream (not a buffer).
class SDI12Sensors : public Sensor
SDI12 _SDI12Internal; class SDI12 : public Stream To read buffer and verify a CRC at the end of the stream is going to take reworking SDI12.cpp and also SDI12Sensors.cpp
The partitioning of functions is scattered across two or more classes. Requesting and processing an SDI-12 msg, is split between class SDI12Sensors.cpp and class SDI12 and class String, so introducing a CRC is conceptually rearranging the processing..
Typically its nice to get the whole buffer in, to
Add CRC capability to a command and response. The CRC adds reliability to the message, for the response any corruption is detected, ~ and discarded.
SDI-12_version-1_4-Jan-30-2021.pdf has a section 4.4.12 Requesting a Cyclic Redundancy Check The commands supported are
Start Measurement and RequestCRC* | aMC!
Send Data aD0! (IF aMC! or aCC!)
Additional Measurements and Request CRC
Additional Concurrent Measurements aC1! ... aC9! Start Concurrent Measurement and Request CRC aCC!
Additional ConcurrentMeasurements and Request CRC aCC1! ... aCC9!
Continuous Measurements and Request CRC aRC0! ... aRC9!
Insitu SDI-12_Commands_Tech_Note 2020-05-22.pdf identifies supports v1.3 Command Set
Insitu SDI-12-Commands-and-Level-TROLL-400-500-700-Responses 20140210.pdf
manual identifies it supports V1.3 Command Set, CRC response. aMC1!, aCC!, aRCx! response for ADx!,