31 using namespace OpcUa;
52 GetStream() << request <<
flush;
54 const std::vector<char> expectedData =
56 1, 0, (char)0xcd, 0x1,
63 4, 0, 0, 0, 1, 2, 3, 4,
64 4, 0, 0, 0, 5, 6, 7, 8,
65 0, 0, 0, 0, (
char)0x80, (char)0x4f, (
char)0x32, (char)0x41,
69 ASSERT_EQ(expectedData, GetChannel().SerializedData) <<
PrintData(GetChannel().SerializedData) << std::endl <<
PrintData(expectedData);
75 using namespace OpcUa;
78 const std::vector<char> expectedData =
80 1, 0, (char)0xcd, 0x1,
87 4, 0, 0, 0, 1, 2, 3, 4,
88 4, 0, 0, 0, 5, 6, 7, 8,
89 0, 0, 0, 0, (
char)0x80, (char)0x4f, (
char)0x32, (char)0x41,
93 GetChannel().SetData(expectedData);
96 GetStream() >> request;
253 using namespace OpcUa;
265 GetStream() << token <<
flush;
267 const std::vector<char> expectedData =
269 1, 0, (char)0x41, 0x1,
271 0x5, 0, 0, 0, 1, 0, 0, 0,
'0' 274 ASSERT_EQ(expectedData, GetChannel().SerializedData);
280 using namespace OpcUa;
282 const std::vector<char> expectedData =
284 1, 0, (char)0x41, 0x1,
286 0x5, 0, 0, 0, 1, 0, 0, 0,
'0' 289 GetChannel().SetData(expectedData);
292 GetStream() >> token;
298 std::vector<uint8_t> policy_id = {
'0'};
475 using namespace OpcUa;
486 GetStream() << request <<
flush;
488 const std::vector<char> expectedData =
490 1, 0, (char)0xd9, 0x1,
496 ASSERT_EQ(expectedData, GetChannel().SerializedData) <<
PrintData(GetChannel().SerializedData) << std::endl <<
PrintData(expectedData);
503 using namespace OpcUa;
506 const std::vector<char> expectedData =
508 1, 0, (char)0xd9, 0x1,
514 GetChannel().SetData(expectedData);
517 GetStream() >> request;
535 using namespace OpcUa;
546 GetStream() << response <<
flush;
548 const std::vector<char> expectedData =
550 1, 0, (char)0xdc, 0x1,
556 ASSERT_EQ(expectedData, GetChannel().SerializedData) <<
PrintData(GetChannel().SerializedData) << std::endl <<
PrintData(expectedData);
562 using namespace OpcUa;
565 const std::vector<char> expectedData =
567 1, 0, (char)0xdc, 0x1,
573 GetChannel().SetData(expectedData);
576 GetStream() >> response;
#define TEST_RESPONSE_HEADER_BINARY_DATA
OpcUa::CreateSessionParameters Parameters
std::string PrintData(const std::vector< char > &vec)
Test of opc ua binary handshake. GNU LGPL.
TEST_F(OpcUaBinarySerialization, CreateSessionRequest)
Test of opc ua binary handshake. GNU LGPL.
OpcUa::ByteString ClientNonce
#define ASSERT_REQUEST_HEADER_EQ(header)
std::vector< uint8_t > PolicyId
OpcUa::ByteString ClientCertificate
OStream< ChannelType > & flush(OStream< ChannelType > &os)
uint32_t MaxResponseMessageSize
#define FILL_APPLICATION_DESCRIPTION(desc)
OpcUa::RequestHeader Header
#define FILL_TEST_RESPONSE_HEADER(header)
#define TEST_REQUEST_HEADER_BINARY_DATA
#define FILL_TEST_REQUEST_HEADER(header)
double RequestedSessionTimeout
struct OpcUa::NodeId::FourByteDataType FourByteData
OPC UA Address space part. GNU LGPL.
#define ASSERT_RESPONSE_HEADER_EQ(header)
#define ASSERT_EQ(val1, val2)
#define TEST_APPLICATION_DESCRIPTION_BINARY_DATA
OpcUa::ApplicationDescription ClientDescription
#define ASSERT_APPLICATION_DESCRIPTION_EQ(desc)
void setPolicyId(const std::string &id)
std::size_t RawSize(const T &obj)
ExtensionObjectHeader Header