36 const std::vector<char> expectedData =
42 ASSERT_EQ(expectedData, GetChannel().SerializedData) <<
PrintData(GetChannel().SerializedData) << std::endl <<
PrintData(expectedData);
50 const std::vector<char> expectedData =
55 GetChannel().SetData(expectedData);
72 using namespace OpcUa;
77 const std::vector<char> expectedData =
83 ASSERT_EQ(expectedData, GetChannel().SerializedData) <<
PrintData(GetChannel().SerializedData) << std::endl <<
PrintData(expectedData);
88 using namespace OpcUa;
91 const std::vector<char> expectedData =
96 GetChannel().SetData(expectedData);
99 GetStream() >> stamps;
111 using namespace OpcUa;
124 GetStream() << attr <<
flush;
126 const std::vector<char> expectedData =
130 3, 0, 0, 0,
'1',
',',
'2',
132 4, 0, 0, 0,
't',
'e',
's',
't' 136 ASSERT_EQ(expectedData, GetChannel().SerializedData) <<
PrintData(GetChannel().SerializedData) << std::endl <<
PrintData(expectedData);
141 using namespace OpcUa;
145 const std::vector<char> expectedData =
149 3, 0, 0, 0,
'1',
',',
'2',
151 4, 0, 0, 0,
't',
'e',
's',
't' 154 GetChannel().SetData(expectedData);
172 using namespace OpcUa;
187 using namespace OpcUa;
203 GetStream() << request <<
flush;
205 const std::vector<char> expectedData =
207 1, 0, (char)0x77, 0x2,
211 0, 0, 0, 0, (
char)0x80, (char)0x4f, (
char)0x32, (char)0x41,
217 3, 0, 0, 0,
'1',
',',
'2',
219 4, 0, 0, 0,
't',
'e',
's',
't' 224 ASSERT_EQ(expectedData, GetChannel().SerializedData) <<
PrintData(GetChannel().SerializedData) << std::endl <<
PrintData(expectedData);
230 using namespace OpcUa;
233 const std::vector<char> expectedData =
235 1, 0, (char)0x77, 0x2,
239 0, 0, 0, 0, (
char)0x80, (char)0x4f, (
char)0x32, (char)0x41,
245 3, 0, 0, 0,
'1',
',',
'2',
247 4, 0, 0, 0,
't',
'e',
's',
't' 251 GetChannel().SetData(expectedData);
253 GetStream() >> request;
283 using namespace OpcUa;
300 const std::vector<char> expectedData =
302 1, 0, (char)0x7A, 0x2,
309 4, 0, 0, 0,
'R',
'o',
'o',
't',
310 (
char)0xFF, (char)0xFF, (
char)0xFF, (char)0xFF
313 ASSERT_EQ(expectedData, GetChannel().SerializedData) <<
PrintData(GetChannel().SerializedData) << std::endl <<
PrintData(expectedData);
320 using namespace OpcUa;
326 const std::vector<char> expectedData =
328 1, 0, (char)0x7A, 0x2,
335 4, 0, 0, 0,
'R',
'o',
'o',
't',
339 GetChannel().SetData(expectedData);
355 using namespace OpcUa;
367 const std::vector<char> expectedData =
369 1, 0, (char)0x7A, 0x2,
379 2, 0, 0, 0, 0, 0, 0, 0,
381 4, 0, 0, 0, 0, 0, 0, 0,
387 GetChannel().SetData(expectedData);
405 using namespace OpcUa;
415 GetStream() << value <<
flush;
417 const std::vector<char> expectedData =
425 ASSERT_EQ(expectedData, GetChannel().SerializedData) <<
PrintData(GetChannel().SerializedData) << std::endl <<
PrintData(expectedData);
432 using namespace OpcUa;
435 const std::vector<char> expectedData =
444 GetChannel().SetData(expectedData);
446 GetStream() >> value;
464 using namespace OpcUa;
484 GetStream() << request <<
flush;
486 const std::vector<char> expectedData =
488 1, 0, (char)0xA1, 0x2,
500 ASSERT_EQ(expectedData, GetChannel().SerializedData) <<
PrintData(GetChannel().SerializedData) << std::endl <<
PrintData(expectedData);
507 using namespace OpcUa;
510 const std::vector<char> expectedData =
512 1, 0, (char)0xA1, 0x2,
525 GetChannel().SetData(expectedData);
527 GetStream() >> request;
552 using namespace OpcUa;
563 resp.
Results.push_back(static_cast<StatusCode>(1));
570 GetStream() << resp <<
flush;
572 const std::vector<char> expectedData =
574 1, 0, (char)0xA4, 0x2,
578 1, 0, 0, 0, 1, 0, 0, 0,
582 ASSERT_EQ(expectedData, GetChannel().SerializedData) <<
PrintData(GetChannel().SerializedData) << std::endl <<
PrintData(expectedData);
588 using namespace OpcUa;
591 const std::vector<char> expectedData =
593 1, 0, (char)0xA4, 0x2,
597 1, 0, 0, 0, 1, 0, 0, 0,
601 GetChannel().SetData(expectedData);
std::vector< OpcUa::ReadValueId > AttributesToRead
#define TEST_RESPONSE_HEADER_BINARY_DATA
std::string PrintData(const std::vector< char > &vec)
Test of opc ua binary handshake. GNU LGPL.
const uint8_t DATA_VALUE_STATUS_CODE
std::vector< OpcUa::StatusCode > Results
std::vector< OpcUa::DiagnosticInfo > DiagnosticInfos
OpcUa::TimestampsToReturn TimestampsToReturn
OpcUa::RequestHeader Header
OpcUa::QualifiedName DataEncoding
OpcUa::ReadValueId CreateReadValueId()
#define ASSERT_REQUEST_HEADER_EQ(header)
const uint8_t DATA_VALUE_Server_TIMESTAMP
OStream< ChannelType > & flush(OStream< ChannelType > &os)
OpcUa::ResponseHeader Header
struct OpcUa::NodeId::TwoByteDataType TwoByteData
OpcUa::ReadParameters Parameters
std::vector< OpcUa::DataValue > Results
#define FILL_TEST_RESPONSE_HEADER(header)
const uint8_t DATA_VALUE_SOURCE_PICOSECONDS
#define TEST_REQUEST_HEADER_BINARY_DATA
#define FILL_TEST_REQUEST_HEADER(header)
OpcUa::RequestHeader Header
DiagnosticInfoMask EncodingMask
struct OpcUa::NodeId::FourByteDataType FourByteData
const uint8_t DATA_VALUE_SOURCE_TIMESTAMP
#define ASSERT_NO_THROW(statement)
OPC UA Address space part. GNU LGPL.
const uint8_t DATA_VALUE_Server_PICOSECONDS
#define ASSERT_RESPONSE_HEADER_EQ(header)
std::vector< OpcUa::WriteValue > NodesToWrite
#define ASSERT_EQ(val1, val2)
OpcUa::WriteParameters Parameters
OpcUa::AttributeId AttributeId
TEST_F(OpcUaBinarySerialization, AttributeId)
Test of opc ua binary attributes. GNU LGPL.
OpcUa::ResponseHeader Header
OpcUa::AttributeId AttributeId
std::size_t RawSize(const T &obj)