26 #ifndef ODVA_ETHERNETIP_SERIALIZATION_BUFFER_WRITER_H
27 #define ODVA_ETHERNETIP_SERIALIZATION_BUFFER_WRITER_H
30 #include <boost/asio.hpp>
35 using boost::asio::const_buffer;
36 using boost::asio::mutable_buffer;
39 namespace serialization {
76 using boost::asio::buffer_size;
77 if (buffer_size(
buf_) < buffer_size(b))
79 throw std::length_error(
"Buffer to small to serialize value");
81 boost::asio::buffer_copy(
buf_, b);
102 #endif // ODVA_ETHERNETIP_SERIALIZATION_BUFFER_WRITER_H