binary_attribute.cpp
Go to the documentation of this file.
1 // @author Alexander Rykovanov 2012
10 
11 #include "binary_serialization.h"
12 
16 
17 #include <algorithm>
18 #include <memory>
19 #include <string>
20 #include <iostream>
21 
22 
23 namespace OpcUa
24 {
25 
26 namespace Binary
27 {
28 
29 template<>
30 std::size_t RawSize<AttributeId>(const AttributeId &)
31 {
32  return 4;
33 }
34 
35 template<>
36 void DataSerializer::Serialize<AttributeId>(const AttributeId & attr)
37 {
38  *this << static_cast<uint32_t>(attr);
39 }
40 
41 template<>
42 void DataDeserializer::Deserialize<AttributeId>(AttributeId & t)
43 {
44  uint32_t tmp = 0;
45  *this >> tmp;
46  t = static_cast<AttributeId>(tmp);
47 }
48 
49 
50 
51 } // namespace Binary
52 } // namespace OpcUa
53 
OPC UA Address space part. GNU LGPL.
const char * Binary(const char *input, short n)
std::size_t RawSize< AttributeId >(const AttributeId &)


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:06:03