Address * Address::parse (std::string const & str) { try { Address * address; if ("tcp:" == str.substr (0, 4)) { address = parseTcpAddress (str.substr (4)); } else if (("pipe:" == str.substr (0, 5)) or ("unix:" == str.substr (0, 5))) { address = parsePipeAddress (str.substr (5)); } else { throw InvalidAddressError(str); } return address; } catch (std::out_of_range const & exception) { throw; } }
// Convert a uaf::Address to a OpcUa_NodeId // ============================================================================================= Status NamespaceArray::fillOpcUaNodeId( const Address& address, OpcUa_NodeId& opcUaNodeId) const { if (address.isExpandedNodeId()) return fillOpcUaNodeId(address.getExpandedNodeId().nodeId(), opcUaNodeId); else return InvalidAddressError(); }