14#include <boost/property_tree/ptree.hpp>
32 d_port->getSerialPort()->setCircularBufferParser(parser);
37 d_checksum = checksum;
46 return "GunneboSerialPort";
53 void serialize(boost::property_tree::ptree &parentNode)
override
55 boost::property_tree::ptree node;
56 SerialPortDataTransport::serialize(node);
57 node.put(
"Checksum", d_checksum);
58 parentNode.add_child(getDefaultXmlNodeName(), node);
67 SerialPortDataTransport::unSerialize(
68 node.get_child(SerialPortDataTransport::getDefaultXmlNodeName()));
69 d_checksum = node.get_child(
"Checksum").get_value<
bool>();
71 d_port->getSerialPort()->setCircularBufferParser(parser);
80 return "GunneboDataTransport";
Definition: gunnebobufferparser.hpp:17
Definition: gunneboserialportdatatransport.hpp:20
std::string getDefaultXmlNodeName() const override
Get the default Xml Node name for this object.
Definition: gunneboserialportdatatransport.hpp:78
GunneboSerialPortDataTransport(const std::string &portname="")
Definition: gunneboserialportdatatransport.hpp:22
bool d_checksum
Definition: gunneboserialportdatatransport.hpp:84
void setSerialPort(std::shared_ptr< SerialPortXml > port) override
Definition: gunneboserialportdatatransport.hpp:28
void setChecksum(bool checksum)
Definition: gunneboserialportdatatransport.hpp:35
void serialize(boost::property_tree::ptree &parentNode) override
Serialize the current object to XML.
Definition: gunneboserialportdatatransport.hpp:53
std::string getTransportType() const override
Get the transport type of this instance.
Definition: gunneboserialportdatatransport.hpp:44
void unSerialize(boost::property_tree::ptree &node) override
UnSerialize a XML node to the current object.
Definition: gunneboserialportdatatransport.hpp:65
A serial port data transport class.
Definition: serialportdatatransport.hpp:21
Serial port data transport for reader/card commands.