BayEOSArduino Library
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SDI12 Class Reference

The main class for SDI 12 instances. More...

#include <SDI12.h>

Inheritance diagram for SDI12:
Inheritance graph
[legend]
Collaboration diagram for SDI12:
Collaboration graph
[legend]

Public Member Functions

int available () override
 Return the number of bytes available in the Rx buffer. More...
 
int peek () override
 Reveal next byte in the Rx buffer without consuming it. More...
 
void clearBuffer ()
 Clear the Rx buffer by setting the head and tail pointers to the same value. More...
 
int read () override
 Return next byte in the Rx buffer, consuming it. More...
 
void flush () override
 Wait for sending to finish - because no TX buffering, does nothing.
 
long parseInt (LookaheadMode lookahead=SKIP_ALL, char ignore=NO_IGNORE_CHAR)
 Return the first valid (long) integer value from the current position. More...
 
float parseFloat (LookaheadMode lookahead=SKIP_ALL, char ignore=NO_IGNORE_CHAR)
 Return the first valid float value from the current position. More...
 
 SDI12 ()
 Construct a new SDI12 instance with no data pin set. More...
 
 SDI12 (int8_t dataPin)
 Construct a new SDI12 with the data pin set. More...
 
 ~SDI12 ()
 Destroy the SDI12 object. More...
 
void begin ()
 Begin the SDI-12 object. More...
 
void begin (int8_t dataPin)
 Set the SDI12::_datapin and begin the SDI-12 object. More...
 
void end ()
 Disable the SDI-12 object (but do not destroy it). More...
 
void setTimeoutValue (int16_t value)
 Set the value to return if a parse int or parse float times out with no return from the sensor. More...
 
int8_t getDataPin ()
 Get the data pin for the current SDI-12 instance. More...
 
void setDataPin (int8_t dataPin)
 Set the data pin for the current SDI-12 instance. More...
 
bool setActive ()
 Set this instance as the active SDI-12 instance. More...
 
bool isActive ()
 Check if this instance is active. More...
 
void forceHold ()
 Set line state to SDI12_HOLDING. More...
 
void forceListen ()
 Set line state to SDI12_LISTENING. More...
 
virtual size_t write (uint8_t byte)
 Write out a byte on the SDI-12 line. More...
 
void sendCommand (String &cmd, int8_t extraWakeTime=0)
 Send a command out on the data line, acting as a datalogger (master) More...
 
void sendCommand (const char *cmd, int8_t extraWakeTime=0)
 
void sendCommand (FlashString cmd, int8_t extraWakeTime=0)
 
void sendResponse (String &resp)
 Send a response out on the data line (for slave use) More...
 
void sendResponse (const char *resp)
 
void sendResponse (FlashString resp)
 

Static Public Member Functions

static void handleInterrupt ()
 Intermediary used by the ISR - passes off responsibility for the interrupt to the active object. More...
 

Public Attributes

int16_t TIMEOUT
 The value to return if a parse or read times out with no return from the sensor. More...
 

Protected Member Functions

int peekNextDigit (LookaheadMode lookahead, bool detectDecimal)
 Return the next numeric digit in the stream or -1 if timeout. More...
 

Detailed Description

The main class for SDI 12 instances.


The documentation for this class was generated from the following files: