6 #include <Poco/Timespan.h>
8 #include "io/SerialPort.h"
9 #include "util/Loggable.h"
36 void probe(
const Poco::Timespan &timeout);
49 std::string
buildMessage(
const std::vector<uint8_t> payload)
const;
59 void writeAll(
const std::string &s,
const Poco::Timespan &timeout);
60 std::string read(
size_t max,
const Poco::Timespan &timeout);
62 void writeAck(
const Poco::Timespan &timeout);
63 void readAck(
const Poco::Timespan &timeout);
64 size_t decodeHeader(
const std::string &message)
const;
65 void writeRequest(
const char id,
const Poco::Timespan &timeout);
66 std::string readResponse(
const Poco::Timespan &timeout);
68 void nack(
const Poco::Timespan &timeout);
69 std::string version(
const Poco::Timespan &timeout);
static void setupPort(SerialPort &port)
Configure the given serial port to settings typical for Z-Wave controllers.
Definition: ZWaveSerialProber.cpp:249
Definition: Loggable.h:19
Definition: SerialPort.h:9
void probe(const Poco::Timespan &timeout)
Probe the configured serial port and try to find a Z-Wave controller on the other side...
Definition: ZWaveSerialProber.cpp:27
void checkTimeout(const Poco::Timespan &timeout) const
Check whether the given timeout is positive. Otherwise, we treate it as expired.
Definition: ZWaveSerialProber.cpp:96
std::string buildMessage(const std::vector< uint8_t > payload) const
Build a message from the given payload. The header with SOF and size are prepended and the checksum i...
Definition: ZWaveSerialProber.cpp:45
ZWaveSerialProber detects whether the device connected to a serial port is a Z-Wave controller...
Definition: ZWaveSerialProber.h:19