69 throw std::logic_error(
"Node id is not in String format.");
79 throw std::logic_error(
"Node id is not in String format.");
89 throw std::logic_error(
"Node id is not in String format.");
113 throw std::logic_error(
"Cannot get integer identifier from NodeId - it is not in numeric format.");
227 throw std::logic_error(
"Invalid Node Id encoding value.");
303 return static_cast<MessageId>(
id.GetIntegerIdentifier());
358 return std::lexicographical_compare(l.cbegin(), l.cend(), r.cbegin(), r.cend());
414 throw std::logic_error(
"Invalid Node Id encoding value.");
463 throw std::logic_error(
"Invalid Node Id encoding value.");
494 return !(*
this == node);
499 return !(*
this == messageId);
504 return !(*
this == referenceId);
509 return !(*
this == objectId);
514 return !(*
this == objectId);
521 return *
this ==
NodeId(messageId);
526 return *
this ==
NodeId(referenceId);
531 return *
this ==
NodeId(messageId);
536 return *
this ==
NodeId(messageId);
612 *this << static_cast<uint8_t>(value);
626 std::size_t size = 0;
644 const std::size_t sizeofEncoding = 1;
645 const std::size_t sizeofNamespace = 2;
646 const std::size_t sizeofIdentifier = 4;
647 size = sizeofEncoding + sizeofNamespace + sizeofIdentifier;
653 const std::size_t sizeofEncoding = 1;
654 const std::size_t sizeofSize = 4;
655 const std::size_t sizeofNamespace = 2;
656 size = sizeofEncoding + sizeofNamespace + sizeofSize +
id.StringData.Identifier.size();
662 const std::size_t sizeofEncoding = 1;
663 const std::size_t sizeofSize = 4;
664 const std::size_t sizeofNamespace = 2;
665 size = sizeofEncoding + sizeofNamespace + sizeofSize +
id.BinaryData.Identifier.size();
671 const std::size_t sizeofEncoding = 1;
672 const std::size_t sizeofNamespace = 2;
673 const std::size_t sizeofGuid = 16;
674 size = sizeofEncoding + sizeofNamespace + sizeofGuid;
679 throw std::logic_error(
"Unable serialize NodeId. Unknown encoding type.");
689 uint8_t nodeid_encoding =
id.Encoding;
693 *
this << nodeid_encoding;
699 *
this <<
id.TwoByteData.Identifier;
705 *
this <<
id.FourByteData.NamespaceIndex;
706 *
this <<
id.FourByteData.Identifier;
712 *
this <<
id.NumericData.NamespaceIndex;
713 *
this <<
id.NumericData.Identifier;
719 *
this <<
id.StringData.NamespaceIndex;
720 *
this <<
id.StringData.Identifier;
726 *
this <<
id.BinaryData.NamespaceIndex;
727 *
this <<
id.BinaryData.Identifier;
733 *
this <<
id.GuidData.NamespaceIndex;
734 *
this <<
id.GuidData.Identifier;
739 throw std::logic_error(
"Unable serialize NodeId. Unknown encoding type.");
747 *
this >>
id.Encoding;
753 *
this >>
id.TwoByteData.Identifier;
759 *
this >>
id.FourByteData.NamespaceIndex;
760 *
this >>
id.FourByteData.Identifier;
766 *
this >>
id.NumericData.NamespaceIndex;
767 *
this >>
id.NumericData.Identifier;
773 *
this >>
id.StringData.NamespaceIndex;
774 *
this >>
id.StringData.Identifier;
780 *
this >>
id.BinaryData.NamespaceIndex;
781 *
this >>
id.BinaryData.Identifier;
787 *
this >>
id.GuidData.NamespaceIndex;
788 *
this >>
id.GuidData.Identifier;
794 throw std::logic_error(
"Unable to deserialize NodeId. Unknown encoding type received.");
800 *
this >>
id.NamespaceURI;
805 *
this >>
id.ServerIndex;
816 const std::size_t sizeofSize = 4;
817 size += sizeofSize +
id.NamespaceURI.size();
822 const std::size_t sizeofServerIndex = 4;
823 size += sizeofServerIndex;
832 *
this <<
id.Encoding;
838 *
this <<
id.TwoByteData.Identifier;
844 *
this <<
id.FourByteData.NamespaceIndex;
845 *
this <<
id.FourByteData.Identifier;
851 *
this <<
id.NumericData.NamespaceIndex;
852 *
this <<
id.NumericData.Identifier;
858 *
this <<
id.StringData.NamespaceIndex;
859 *
this <<
id.StringData.Identifier;
865 *
this <<
id.BinaryData.NamespaceIndex;
866 *
this <<
id.BinaryData.Identifier;
872 *
this <<
id.GuidData.NamespaceIndex;
873 *
this <<
id.GuidData.Identifier;
878 throw std::logic_error(
"Unable serialize ExpandedNodeId. Unknown encoding type.");
883 *
this <<
id.NamespaceURI;
888 *
this <<
id.ServerIndex;
bool HasNullIdentifier() const
struct OpcUa::NodeId::NumericDataType NumericData
bool operator==(const NodeId &node) const
uint32_t GetNamespaceIndex() const
std::size_t RawSize< NodeIdEncoding >(const NodeIdEncoding &)
std::size_t RawSize< NodeId >(const NodeId &id)
bool operator<(const NodeId &node) const
std::size_t RawSize< ExpandedNodeId >(const ExpandedNodeId &id)
Guid GetGuidIdentifier() const
bool HasNamespaceURI() const
struct OpcUa::NodeId::GuidDataType GuidData
std::vector< uint8_t > GetBinaryIdentifier() const
struct OpcUa::NodeId::TwoByteDataType TwoByteData
void SetNamespaceURI(const std::string &uri)
uint32_t GetIntegerIdentifier() const
void SetNamespaceIndex(uint32_t ns)
void SetServerIndex(uint32_t index)
struct OpcUa::NodeId::BinaryDataType BinaryData
struct OpcUa::NodeId::FourByteDataType FourByteData
OPC UA Address space part. GNU LGPL.
ExpandedNodeId()
ExpandednNdeId.
const char * Binary(const char *input, short n)
std::vector< uint8_t > Identifier
void CopyNodeId(const NodeId &node)
bool HasServerIndex() const
NodeId & operator=(const NodeId &node)
struct OpcUa::NodeId::StringDataType StringData
bool operator!=(const NodeId &node) const
std::string GetStringIdentifier() const
NodeIdEncoding GetEncodingValue() const
MessageId GetMessageId(const NodeId &id)
std::size_t RawSize(const T &obj)