|
@@ 5342-5408 (lines=67) @@
|
| 5339 |
|
__repr__ = __str__ |
| 5340 |
|
|
| 5341 |
|
|
| 5342 |
|
class ReferenceDescription(FrozenClass): |
| 5343 |
|
''' |
| 5344 |
|
The description of a reference. |
| 5345 |
|
|
| 5346 |
|
:ivar ReferenceTypeId: |
| 5347 |
|
:vartype ReferenceTypeId: NodeId |
| 5348 |
|
:ivar IsForward: |
| 5349 |
|
:vartype IsForward: Boolean |
| 5350 |
|
:ivar NodeId: |
| 5351 |
|
:vartype NodeId: ExpandedNodeId |
| 5352 |
|
:ivar BrowseName: |
| 5353 |
|
:vartype BrowseName: QualifiedName |
| 5354 |
|
:ivar DisplayName: |
| 5355 |
|
:vartype DisplayName: LocalizedText |
| 5356 |
|
:ivar NodeClass: |
| 5357 |
|
:vartype NodeClass: NodeClass |
| 5358 |
|
:ivar TypeDefinition: |
| 5359 |
|
:vartype TypeDefinition: ExpandedNodeId |
| 5360 |
|
''' |
| 5361 |
|
def __init__(self, binary=None): |
| 5362 |
|
if binary is not None: |
| 5363 |
|
self._binary_init(binary) |
| 5364 |
|
self._freeze = True |
| 5365 |
|
return |
| 5366 |
|
self.ReferenceTypeId = NodeId() |
| 5367 |
|
self.IsForward = True |
| 5368 |
|
self.NodeId = ExpandedNodeId() |
| 5369 |
|
self.BrowseName = QualifiedName() |
| 5370 |
|
self.DisplayName = LocalizedText() |
| 5371 |
|
self.NodeClass = NodeClass(0) |
| 5372 |
|
self.TypeDefinition = ExpandedNodeId() |
| 5373 |
|
self._freeze = True |
| 5374 |
|
|
| 5375 |
|
def to_binary(self): |
| 5376 |
|
packet = [] |
| 5377 |
|
packet.append(self.ReferenceTypeId.to_binary()) |
| 5378 |
|
packet.append(uatype_Boolean.pack(self.IsForward)) |
| 5379 |
|
packet.append(self.NodeId.to_binary()) |
| 5380 |
|
packet.append(self.BrowseName.to_binary()) |
| 5381 |
|
packet.append(self.DisplayName.to_binary()) |
| 5382 |
|
packet.append(uatype_UInt32.pack(self.NodeClass.value)) |
| 5383 |
|
packet.append(self.TypeDefinition.to_binary()) |
| 5384 |
|
return b''.join(packet) |
| 5385 |
|
|
| 5386 |
|
@staticmethod |
| 5387 |
|
def from_binary(data): |
| 5388 |
|
return ReferenceDescription(data) |
| 5389 |
|
|
| 5390 |
|
def _binary_init(self, data): |
| 5391 |
|
self.ReferenceTypeId = NodeId.from_binary(data) |
| 5392 |
|
self.IsForward = uatype_Boolean.unpack(data.read(1))[0] |
| 5393 |
|
self.NodeId = ExpandedNodeId.from_binary(data) |
| 5394 |
|
self.BrowseName = QualifiedName.from_binary(data) |
| 5395 |
|
self.DisplayName = LocalizedText.from_binary(data) |
| 5396 |
|
self.NodeClass = NodeClass(uatype_UInt32.unpack(data.read(4))[0]) |
| 5397 |
|
self.TypeDefinition = ExpandedNodeId.from_binary(data) |
| 5398 |
|
|
| 5399 |
|
def __str__(self): |
| 5400 |
|
return 'ReferenceDescription(' + 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
| 5401 |
|
'IsForward:' + str(self.IsForward) + ', ' + \ |
| 5402 |
|
'NodeId:' + str(self.NodeId) + ', ' + \ |
| 5403 |
|
'BrowseName:' + str(self.BrowseName) + ', ' + \ |
| 5404 |
|
'DisplayName:' + str(self.DisplayName) + ', ' + \ |
| 5405 |
|
'NodeClass:' + str(self.NodeClass) + ', ' + \ |
| 5406 |
|
'TypeDefinition:' + str(self.TypeDefinition) + ')' |
| 5407 |
|
|
| 5408 |
|
__repr__ = __str__ |
| 5409 |
|
|
| 5410 |
|
|
| 5411 |
|
class BrowseResult(FrozenClass): |
|
@@ 4375-4441 (lines=67) @@
|
| 4372 |
|
__repr__ = __str__ |
| 4373 |
|
|
| 4374 |
|
|
| 4375 |
|
class AddNodesItem(FrozenClass): |
| 4376 |
|
''' |
| 4377 |
|
A request to add a node to the server address space. |
| 4378 |
|
|
| 4379 |
|
:ivar ParentNodeId: |
| 4380 |
|
:vartype ParentNodeId: ExpandedNodeId |
| 4381 |
|
:ivar ReferenceTypeId: |
| 4382 |
|
:vartype ReferenceTypeId: NodeId |
| 4383 |
|
:ivar RequestedNewNodeId: |
| 4384 |
|
:vartype RequestedNewNodeId: ExpandedNodeId |
| 4385 |
|
:ivar BrowseName: |
| 4386 |
|
:vartype BrowseName: QualifiedName |
| 4387 |
|
:ivar NodeClass: |
| 4388 |
|
:vartype NodeClass: NodeClass |
| 4389 |
|
:ivar NodeAttributes: |
| 4390 |
|
:vartype NodeAttributes: ExtensionObject |
| 4391 |
|
:ivar TypeDefinition: |
| 4392 |
|
:vartype TypeDefinition: ExpandedNodeId |
| 4393 |
|
''' |
| 4394 |
|
def __init__(self, binary=None): |
| 4395 |
|
if binary is not None: |
| 4396 |
|
self._binary_init(binary) |
| 4397 |
|
self._freeze = True |
| 4398 |
|
return |
| 4399 |
|
self.ParentNodeId = ExpandedNodeId() |
| 4400 |
|
self.ReferenceTypeId = NodeId() |
| 4401 |
|
self.RequestedNewNodeId = ExpandedNodeId() |
| 4402 |
|
self.BrowseName = QualifiedName() |
| 4403 |
|
self.NodeClass = NodeClass(0) |
| 4404 |
|
self.NodeAttributes = None |
| 4405 |
|
self.TypeDefinition = ExpandedNodeId() |
| 4406 |
|
self._freeze = True |
| 4407 |
|
|
| 4408 |
|
def to_binary(self): |
| 4409 |
|
packet = [] |
| 4410 |
|
packet.append(self.ParentNodeId.to_binary()) |
| 4411 |
|
packet.append(self.ReferenceTypeId.to_binary()) |
| 4412 |
|
packet.append(self.RequestedNewNodeId.to_binary()) |
| 4413 |
|
packet.append(self.BrowseName.to_binary()) |
| 4414 |
|
packet.append(uatype_UInt32.pack(self.NodeClass.value)) |
| 4415 |
|
packet.append(extensionobject_to_binary(self.NodeAttributes)) |
| 4416 |
|
packet.append(self.TypeDefinition.to_binary()) |
| 4417 |
|
return b''.join(packet) |
| 4418 |
|
|
| 4419 |
|
@staticmethod |
| 4420 |
|
def from_binary(data): |
| 4421 |
|
return AddNodesItem(data) |
| 4422 |
|
|
| 4423 |
|
def _binary_init(self, data): |
| 4424 |
|
self.ParentNodeId = ExpandedNodeId.from_binary(data) |
| 4425 |
|
self.ReferenceTypeId = NodeId.from_binary(data) |
| 4426 |
|
self.RequestedNewNodeId = ExpandedNodeId.from_binary(data) |
| 4427 |
|
self.BrowseName = QualifiedName.from_binary(data) |
| 4428 |
|
self.NodeClass = NodeClass(uatype_UInt32.unpack(data.read(4))[0]) |
| 4429 |
|
self.NodeAttributes = extensionobject_from_binary(data) |
| 4430 |
|
self.TypeDefinition = ExpandedNodeId.from_binary(data) |
| 4431 |
|
|
| 4432 |
|
def __str__(self): |
| 4433 |
|
return 'AddNodesItem(' + 'ParentNodeId:' + str(self.ParentNodeId) + ', ' + \ |
| 4434 |
|
'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ |
| 4435 |
|
'RequestedNewNodeId:' + str(self.RequestedNewNodeId) + ', ' + \ |
| 4436 |
|
'BrowseName:' + str(self.BrowseName) + ', ' + \ |
| 4437 |
|
'NodeClass:' + str(self.NodeClass) + ', ' + \ |
| 4438 |
|
'NodeAttributes:' + str(self.NodeAttributes) + ', ' + \ |
| 4439 |
|
'TypeDefinition:' + str(self.TypeDefinition) + ')' |
| 4440 |
|
|
| 4441 |
|
__repr__ = __str__ |
| 4442 |
|
|
| 4443 |
|
|
| 4444 |
|
class AddNodesResult(FrozenClass): |