00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 #ifndef __OPC_UA_BINARY_VIEW_H__ 00012 #define __OPC_UA_BINARY_VIEW_H__ 00013 00014 #include <opc/ua/protocol/types.h> 00015 00016 namespace OpcUa 00017 { 00018 00019 //--------------------------------------------------- 00020 // Browse 00021 //--------------------------------------------------- 00022 00023 00024 00025 struct ViewDescription 00026 { 00027 NodeId Id; 00028 DateTime Timestamp; 00029 uint32_t Version; 00030 00031 ViewDescription(); 00032 }; 00033 00034 struct BrowseDescription 00035 { 00036 NodeId NodeToBrowse; 00037 BrowseDirection Direction; 00038 NodeId ReferenceTypeId; 00039 bool IncludeSubtypes; // If false will follow strctly ReferenceTypeId. if true will follow subtypes of ReferenceTypeId. 00040 NodeClass NodeClasses; 00041 BrowseResultMask ResultMask; 00042 00043 BrowseDescription(); 00044 }; 00045 00046 struct NodesQuery 00047 { 00048 ViewDescription View; 00049 uint32_t MaxReferenciesPerNode; 00050 std::vector<BrowseDescription> NodesToBrowse; 00051 00052 NodesQuery(); 00053 }; 00054 00055 struct BrowseRequest 00056 { 00057 NodeId TypeId; 00058 RequestHeader Header; 00059 NodesQuery Query; 00060 00061 BrowseRequest(); 00062 }; 00063 00064 00065 struct ReferenceDescription 00066 { 00067 NodeId ReferenceTypeId; 00068 bool IsForward = true; 00069 NodeId TargetNodeId; 00070 QualifiedName BrowseName; 00071 LocalizedText DisplayName; 00072 NodeClass TargetNodeClass; 00073 NodeId TargetNodeTypeDefinition; 00074 00075 ReferenceDescription(); 00076 }; 00077 00078 struct BrowseResult 00079 { 00080 StatusCode Status; 00081 std::vector<uint8_t> ContinuationPoint; 00082 std::vector<ReferenceDescription> Referencies; 00083 00084 BrowseResult(); 00085 }; 00086 00087 struct BrowseResponse 00088 { 00089 NodeId TypeId; 00090 ResponseHeader Header; 00091 00092 std::vector<BrowseResult> Results; 00093 DiagnosticInfoList Diagnostics; 00094 00095 BrowseResponse(); 00096 }; 00097 00098 //--------------------------------------------------- 00099 // BrowseNext 00100 //--------------------------------------------------- 00101 00102 struct BrowseNextRequest 00103 { 00104 NodeId TypeId; 00105 RequestHeader Header; 00106 00107 bool ReleaseContinuationPoints; 00108 std::vector<std::vector<uint8_t>> ContinuationPoints; 00109 00110 BrowseNextRequest(); 00111 }; 00112 00113 struct BrowseNextResponse 00114 { 00115 NodeId TypeId; 00116 ResponseHeader Header; 00117 00118 std::vector<BrowseResult> Results; 00119 DiagnosticInfoList Diagnostics; 00120 00121 BrowseNextResponse(); 00122 }; 00123 00124 //--------------------------------------------------- 00125 // TranslateBrowsePathsToNodeIds 00126 //--------------------------------------------------- 00127 00128 struct BrowsePath 00129 { 00130 NodeId StartingNode; 00131 RelativePath Path; 00132 }; 00133 00134 struct TranslateBrowsePathsParameters 00135 { 00136 std::vector<BrowsePath> BrowsePaths; 00137 }; 00138 00139 struct TranslateBrowsePathsToNodeIdsRequest 00140 { 00141 NodeId TypeId; 00142 RequestHeader Header; 00143 TranslateBrowsePathsParameters Parameters; 00144 00145 TranslateBrowsePathsToNodeIdsRequest(); 00146 }; 00147 00148 //--------------------------------------------------- 00149 // TranslateBrowsePathsToNodeIds 00150 //--------------------------------------------------- 00151 00152 struct BrowsePathTarget 00153 { 00154 NodeId Node; 00155 uint32_t RemainingPathIndex; 00156 00157 BrowsePathTarget(); 00158 }; 00159 00160 struct BrowsePathResult 00161 { 00162 StatusCode Status; 00163 std::vector<BrowsePathTarget> Targets; 00164 00165 BrowsePathResult(); 00166 }; 00167 00168 struct TranslateBrowsePathsResult 00169 { 00170 std::vector<BrowsePathResult> Paths; 00171 DiagnosticInfoList Diagnostics; 00172 }; 00173 00174 struct TranslateBrowsePathsToNodeIdsResponse 00175 { 00176 NodeId TypeId; 00177 ResponseHeader Header; 00178 TranslateBrowsePathsResult Result; 00179 00180 TranslateBrowsePathsToNodeIdsResponse(); 00181 }; 00182 00183 struct RegisterNodesRequest 00184 { 00185 OpcUa::NodeId TypeId; 00186 OpcUa::RequestHeader Header; 00187 std::vector<OpcUa::NodeId> NodesToRegister; 00188 00189 RegisterNodesRequest(); 00190 }; 00191 00192 struct RegisterNodesResponse 00193 { 00194 OpcUa::NodeId TypeId; 00195 OpcUa::ResponseHeader Header; 00196 std::vector<OpcUa::NodeId> Result; 00197 00198 RegisterNodesResponse(); 00199 }; 00200 00201 struct UnregisterNodesRequest 00202 { 00203 OpcUa::NodeId TypeId; 00204 OpcUa::RequestHeader Header; 00205 std::vector<OpcUa::NodeId> NodesToUnregister; 00206 00207 UnregisterNodesRequest(); 00208 }; 00209 00210 struct UnregisterNodesResponse 00211 { 00212 OpcUa::NodeId TypeId; 00213 OpcUa::ResponseHeader Header; 00214 00215 UnregisterNodesResponse(); 00216 }; 00217 00218 } // namespace OpcUa 00219 00220 #endif // __OPC_UA_BINARY_VIEW_H__