00001 ''' 00002 Autogenerate code from xml spec 00003 ''' 00004 00005 from datetime import datetime 00006 from enum import Enum, IntEnum 00007 00008 from opcua.common.utils import Buffer 00009 from opcua.ua.uaerrors import UaError 00010 from opcua.ua.uatypes import * 00011 from opcua.ua import ua_binary as uabin 00012 from opcua.ua.object_ids import ObjectIds 00013 00014 00015 class NamingRuleType(IntEnum): 00016 ''' 00017 :ivar Mandatory: 00018 :vartype Mandatory: 1 00019 :ivar Optional: 00020 :vartype Optional: 2 00021 :ivar Constraint: 00022 :vartype Constraint: 3 00023 ''' 00024 Mandatory = 1 00025 Optional = 2 00026 Constraint = 3 00027 00028 00029 class OpenFileMode(IntEnum): 00030 ''' 00031 :ivar Read: 00032 :vartype Read: 1 00033 :ivar Write: 00034 :vartype Write: 2 00035 :ivar EraseExisting: 00036 :vartype EraseExisting: 4 00037 :ivar Append: 00038 :vartype Append: 8 00039 ''' 00040 Read = 1 00041 Write = 2 00042 EraseExisting = 4 00043 Append = 8 00044 00045 00046 class TrustListMasks(IntEnum): 00047 ''' 00048 :ivar None_: 00049 :vartype None_: 0 00050 :ivar TrustedCertificates: 00051 :vartype TrustedCertificates: 1 00052 :ivar TrustedCrls: 00053 :vartype TrustedCrls: 2 00054 :ivar IssuerCertificates: 00055 :vartype IssuerCertificates: 4 00056 :ivar IssuerCrls: 00057 :vartype IssuerCrls: 8 00058 :ivar All: 00059 :vartype All: 15 00060 ''' 00061 None_ = 0 00062 TrustedCertificates = 1 00063 TrustedCrls = 2 00064 IssuerCertificates = 4 00065 IssuerCrls = 8 00066 All = 15 00067 00068 00069 class IdType(IntEnum): 00070 ''' 00071 The type of identifier used in a node id. 00072 00073 :ivar Numeric: 00074 :vartype Numeric: 0 00075 :ivar String: 00076 :vartype String: 1 00077 :ivar Guid: 00078 :vartype Guid: 2 00079 :ivar Opaque: 00080 :vartype Opaque: 3 00081 ''' 00082 Numeric = 0 00083 String = 1 00084 Guid = 2 00085 Opaque = 3 00086 00087 00088 class NodeClass(IntEnum): 00089 ''' 00090 A mask specifying the class of the node. 00091 00092 :ivar Unspecified: 00093 :vartype Unspecified: 0 00094 :ivar Object: 00095 :vartype Object: 1 00096 :ivar Variable: 00097 :vartype Variable: 2 00098 :ivar Method: 00099 :vartype Method: 4 00100 :ivar ObjectType: 00101 :vartype ObjectType: 8 00102 :ivar VariableType: 00103 :vartype VariableType: 16 00104 :ivar ReferenceType: 00105 :vartype ReferenceType: 32 00106 :ivar DataType: 00107 :vartype DataType: 64 00108 :ivar View: 00109 :vartype View: 128 00110 ''' 00111 Unspecified = 0 00112 Object = 1 00113 Variable = 2 00114 Method = 4 00115 ObjectType = 8 00116 VariableType = 16 00117 ReferenceType = 32 00118 DataType = 64 00119 View = 128 00120 00121 00122 class ApplicationType(IntEnum): 00123 ''' 00124 The types of applications. 00125 00126 :ivar Server: 00127 :vartype Server: 0 00128 :ivar Client: 00129 :vartype Client: 1 00130 :ivar ClientAndServer: 00131 :vartype ClientAndServer: 2 00132 :ivar DiscoveryServer: 00133 :vartype DiscoveryServer: 3 00134 ''' 00135 Server = 0 00136 Client = 1 00137 ClientAndServer = 2 00138 DiscoveryServer = 3 00139 00140 00141 class MessageSecurityMode(IntEnum): 00142 ''' 00143 The type of security to use on a message. 00144 00145 :ivar Invalid: 00146 :vartype Invalid: 0 00147 :ivar None_: 00148 :vartype None_: 1 00149 :ivar Sign: 00150 :vartype Sign: 2 00151 :ivar SignAndEncrypt: 00152 :vartype SignAndEncrypt: 3 00153 ''' 00154 Invalid = 0 00155 None_ = 1 00156 Sign = 2 00157 SignAndEncrypt = 3 00158 00159 00160 class UserTokenType(IntEnum): 00161 ''' 00162 The possible user token types. 00163 00164 :ivar Anonymous: 00165 :vartype Anonymous: 0 00166 :ivar UserName: 00167 :vartype UserName: 1 00168 :ivar Certificate: 00169 :vartype Certificate: 2 00170 :ivar IssuedToken: 00171 :vartype IssuedToken: 3 00172 :ivar Kerberos: 00173 :vartype Kerberos: 4 00174 ''' 00175 Anonymous = 0 00176 UserName = 1 00177 Certificate = 2 00178 IssuedToken = 3 00179 Kerberos = 4 00180 00181 00182 class SecurityTokenRequestType(IntEnum): 00183 ''' 00184 Indicates whether a token if being created or renewed. 00185 00186 :ivar Issue: 00187 :vartype Issue: 0 00188 :ivar Renew: 00189 :vartype Renew: 1 00190 ''' 00191 Issue = 0 00192 Renew = 1 00193 00194 00195 class NodeAttributesMask(IntEnum): 00196 ''' 00197 The bits used to specify default attributes for a new node. 00198 00199 :ivar None_: 00200 :vartype None_: 0 00201 :ivar AccessLevel: 00202 :vartype AccessLevel: 1 00203 :ivar ArrayDimensions: 00204 :vartype ArrayDimensions: 2 00205 :ivar BrowseName: 00206 :vartype BrowseName: 4 00207 :ivar ContainsNoLoops: 00208 :vartype ContainsNoLoops: 8 00209 :ivar DataType: 00210 :vartype DataType: 16 00211 :ivar Description: 00212 :vartype Description: 32 00213 :ivar DisplayName: 00214 :vartype DisplayName: 64 00215 :ivar EventNotifier: 00216 :vartype EventNotifier: 128 00217 :ivar Executable: 00218 :vartype Executable: 256 00219 :ivar Historizing: 00220 :vartype Historizing: 512 00221 :ivar InverseName: 00222 :vartype InverseName: 1024 00223 :ivar IsAbstract: 00224 :vartype IsAbstract: 2048 00225 :ivar MinimumSamplingInterval: 00226 :vartype MinimumSamplingInterval: 4096 00227 :ivar NodeClass: 00228 :vartype NodeClass: 8192 00229 :ivar NodeId: 00230 :vartype NodeId: 16384 00231 :ivar Symmetric: 00232 :vartype Symmetric: 32768 00233 :ivar UserAccessLevel: 00234 :vartype UserAccessLevel: 65536 00235 :ivar UserExecutable: 00236 :vartype UserExecutable: 131072 00237 :ivar UserWriteMask: 00238 :vartype UserWriteMask: 262144 00239 :ivar ValueRank: 00240 :vartype ValueRank: 524288 00241 :ivar WriteMask: 00242 :vartype WriteMask: 1048576 00243 :ivar Value: 00244 :vartype Value: 2097152 00245 :ivar All: 00246 :vartype All: 4194303 00247 :ivar BaseNode: 00248 :vartype BaseNode: 1335396 00249 :ivar Object: 00250 :vartype Object: 1335524 00251 :ivar ObjectTypeOrDataType: 00252 :vartype ObjectTypeOrDataType: 1337444 00253 :ivar Variable: 00254 :vartype Variable: 4026999 00255 :ivar VariableType: 00256 :vartype VariableType: 3958902 00257 :ivar Method: 00258 :vartype Method: 1466724 00259 :ivar ReferenceType: 00260 :vartype ReferenceType: 1371236 00261 :ivar View: 00262 :vartype View: 1335532 00263 ''' 00264 None_ = 0 00265 AccessLevel = 1 00266 ArrayDimensions = 2 00267 BrowseName = 4 00268 ContainsNoLoops = 8 00269 DataType = 16 00270 Description = 32 00271 DisplayName = 64 00272 EventNotifier = 128 00273 Executable = 256 00274 Historizing = 512 00275 InverseName = 1024 00276 IsAbstract = 2048 00277 MinimumSamplingInterval = 4096 00278 NodeClass = 8192 00279 NodeId = 16384 00280 Symmetric = 32768 00281 UserAccessLevel = 65536 00282 UserExecutable = 131072 00283 UserWriteMask = 262144 00284 ValueRank = 524288 00285 WriteMask = 1048576 00286 Value = 2097152 00287 All = 4194303 00288 BaseNode = 1335396 00289 Object = 1335524 00290 ObjectTypeOrDataType = 1337444 00291 Variable = 4026999 00292 VariableType = 3958902 00293 Method = 1466724 00294 ReferenceType = 1371236 00295 View = 1335532 00296 00297 00298 class AttributeWriteMask(IntEnum): 00299 ''' 00300 Define bits used to indicate which attributes are writable. 00301 00302 :ivar None_: 00303 :vartype None_: 0 00304 :ivar AccessLevel: 00305 :vartype AccessLevel: 1 00306 :ivar ArrayDimensions: 00307 :vartype ArrayDimensions: 2 00308 :ivar BrowseName: 00309 :vartype BrowseName: 4 00310 :ivar ContainsNoLoops: 00311 :vartype ContainsNoLoops: 8 00312 :ivar DataType: 00313 :vartype DataType: 16 00314 :ivar Description: 00315 :vartype Description: 32 00316 :ivar DisplayName: 00317 :vartype DisplayName: 64 00318 :ivar EventNotifier: 00319 :vartype EventNotifier: 128 00320 :ivar Executable: 00321 :vartype Executable: 256 00322 :ivar Historizing: 00323 :vartype Historizing: 512 00324 :ivar InverseName: 00325 :vartype InverseName: 1024 00326 :ivar IsAbstract: 00327 :vartype IsAbstract: 2048 00328 :ivar MinimumSamplingInterval: 00329 :vartype MinimumSamplingInterval: 4096 00330 :ivar NodeClass: 00331 :vartype NodeClass: 8192 00332 :ivar NodeId: 00333 :vartype NodeId: 16384 00334 :ivar Symmetric: 00335 :vartype Symmetric: 32768 00336 :ivar UserAccessLevel: 00337 :vartype UserAccessLevel: 65536 00338 :ivar UserExecutable: 00339 :vartype UserExecutable: 131072 00340 :ivar UserWriteMask: 00341 :vartype UserWriteMask: 262144 00342 :ivar ValueRank: 00343 :vartype ValueRank: 524288 00344 :ivar WriteMask: 00345 :vartype WriteMask: 1048576 00346 :ivar ValueForVariableType: 00347 :vartype ValueForVariableType: 2097152 00348 ''' 00349 None_ = 0 00350 AccessLevel = 1 00351 ArrayDimensions = 2 00352 BrowseName = 4 00353 ContainsNoLoops = 8 00354 DataType = 16 00355 Description = 32 00356 DisplayName = 64 00357 EventNotifier = 128 00358 Executable = 256 00359 Historizing = 512 00360 InverseName = 1024 00361 IsAbstract = 2048 00362 MinimumSamplingInterval = 4096 00363 NodeClass = 8192 00364 NodeId = 16384 00365 Symmetric = 32768 00366 UserAccessLevel = 65536 00367 UserExecutable = 131072 00368 UserWriteMask = 262144 00369 ValueRank = 524288 00370 WriteMask = 1048576 00371 ValueForVariableType = 2097152 00372 00373 00374 class BrowseDirection(IntEnum): 00375 ''' 00376 The directions of the references to return. 00377 00378 :ivar Forward: 00379 :vartype Forward: 0 00380 :ivar Inverse: 00381 :vartype Inverse: 1 00382 :ivar Both: 00383 :vartype Both: 2 00384 ''' 00385 Forward = 0 00386 Inverse = 1 00387 Both = 2 00388 00389 00390 class BrowseResultMask(IntEnum): 00391 ''' 00392 A bit mask which specifies what should be returned in a browse response. 00393 00394 :ivar None_: 00395 :vartype None_: 0 00396 :ivar ReferenceTypeId: 00397 :vartype ReferenceTypeId: 1 00398 :ivar IsForward: 00399 :vartype IsForward: 2 00400 :ivar NodeClass: 00401 :vartype NodeClass: 4 00402 :ivar BrowseName: 00403 :vartype BrowseName: 8 00404 :ivar DisplayName: 00405 :vartype DisplayName: 16 00406 :ivar TypeDefinition: 00407 :vartype TypeDefinition: 32 00408 :ivar All: 00409 :vartype All: 63 00410 :ivar ReferenceTypeInfo: 00411 :vartype ReferenceTypeInfo: 3 00412 :ivar TargetInfo: 00413 :vartype TargetInfo: 60 00414 ''' 00415 None_ = 0 00416 ReferenceTypeId = 1 00417 IsForward = 2 00418 NodeClass = 4 00419 BrowseName = 8 00420 DisplayName = 16 00421 TypeDefinition = 32 00422 All = 63 00423 ReferenceTypeInfo = 3 00424 TargetInfo = 60 00425 00426 00427 class ComplianceLevel(IntEnum): 00428 ''' 00429 :ivar Untested: 00430 :vartype Untested: 0 00431 :ivar Partial: 00432 :vartype Partial: 1 00433 :ivar SelfTested: 00434 :vartype SelfTested: 2 00435 :ivar Certified: 00436 :vartype Certified: 3 00437 ''' 00438 Untested = 0 00439 Partial = 1 00440 SelfTested = 2 00441 Certified = 3 00442 00443 00444 class FilterOperator(IntEnum): 00445 ''' 00446 :ivar Equals: 00447 :vartype Equals: 0 00448 :ivar IsNull: 00449 :vartype IsNull: 1 00450 :ivar GreaterThan: 00451 :vartype GreaterThan: 2 00452 :ivar LessThan: 00453 :vartype LessThan: 3 00454 :ivar GreaterThanOrEqual: 00455 :vartype GreaterThanOrEqual: 4 00456 :ivar LessThanOrEqual: 00457 :vartype LessThanOrEqual: 5 00458 :ivar Like: 00459 :vartype Like: 6 00460 :ivar Not: 00461 :vartype Not: 7 00462 :ivar Between: 00463 :vartype Between: 8 00464 :ivar InList: 00465 :vartype InList: 9 00466 :ivar And: 00467 :vartype And: 10 00468 :ivar Or: 00469 :vartype Or: 11 00470 :ivar Cast: 00471 :vartype Cast: 12 00472 :ivar InView: 00473 :vartype InView: 13 00474 :ivar OfType: 00475 :vartype OfType: 14 00476 :ivar RelatedTo: 00477 :vartype RelatedTo: 15 00478 :ivar BitwiseAnd: 00479 :vartype BitwiseAnd: 16 00480 :ivar BitwiseOr: 00481 :vartype BitwiseOr: 17 00482 ''' 00483 Equals = 0 00484 IsNull = 1 00485 GreaterThan = 2 00486 LessThan = 3 00487 GreaterThanOrEqual = 4 00488 LessThanOrEqual = 5 00489 Like = 6 00490 Not = 7 00491 Between = 8 00492 InList = 9 00493 And = 10 00494 Or = 11 00495 Cast = 12 00496 InView = 13 00497 OfType = 14 00498 RelatedTo = 15 00499 BitwiseAnd = 16 00500 BitwiseOr = 17 00501 00502 00503 class TimestampsToReturn(IntEnum): 00504 ''' 00505 :ivar Source: 00506 :vartype Source: 0 00507 :ivar Server: 00508 :vartype Server: 1 00509 :ivar Both: 00510 :vartype Both: 2 00511 :ivar Neither: 00512 :vartype Neither: 3 00513 ''' 00514 Source = 0 00515 Server = 1 00516 Both = 2 00517 Neither = 3 00518 00519 00520 class HistoryUpdateType(IntEnum): 00521 ''' 00522 :ivar Insert: 00523 :vartype Insert: 1 00524 :ivar Replace: 00525 :vartype Replace: 2 00526 :ivar Update: 00527 :vartype Update: 3 00528 :ivar Delete: 00529 :vartype Delete: 4 00530 ''' 00531 Insert = 1 00532 Replace = 2 00533 Update = 3 00534 Delete = 4 00535 00536 00537 class PerformUpdateType(IntEnum): 00538 ''' 00539 :ivar Insert: 00540 :vartype Insert: 1 00541 :ivar Replace: 00542 :vartype Replace: 2 00543 :ivar Update: 00544 :vartype Update: 3 00545 :ivar Remove: 00546 :vartype Remove: 4 00547 ''' 00548 Insert = 1 00549 Replace = 2 00550 Update = 3 00551 Remove = 4 00552 00553 00554 class MonitoringMode(IntEnum): 00555 ''' 00556 :ivar Disabled: 00557 :vartype Disabled: 0 00558 :ivar Sampling: 00559 :vartype Sampling: 1 00560 :ivar Reporting: 00561 :vartype Reporting: 2 00562 ''' 00563 Disabled = 0 00564 Sampling = 1 00565 Reporting = 2 00566 00567 00568 class DataChangeTrigger(IntEnum): 00569 ''' 00570 :ivar Status: 00571 :vartype Status: 0 00572 :ivar StatusValue: 00573 :vartype StatusValue: 1 00574 :ivar StatusValueTimestamp: 00575 :vartype StatusValueTimestamp: 2 00576 ''' 00577 Status = 0 00578 StatusValue = 1 00579 StatusValueTimestamp = 2 00580 00581 00582 class DeadbandType(IntEnum): 00583 ''' 00584 :ivar None_: 00585 :vartype None_: 0 00586 :ivar Absolute: 00587 :vartype Absolute: 1 00588 :ivar Percent: 00589 :vartype Percent: 2 00590 ''' 00591 None_ = 0 00592 Absolute = 1 00593 Percent = 2 00594 00595 00596 class EnumeratedTestType(IntEnum): 00597 ''' 00598 A simple enumerated type used for testing. 00599 00600 :ivar Red: 00601 :vartype Red: 1 00602 :ivar Yellow: 00603 :vartype Yellow: 4 00604 :ivar Green: 00605 :vartype Green: 5 00606 ''' 00607 Red = 1 00608 Yellow = 4 00609 Green = 5 00610 00611 00612 class RedundancySupport(IntEnum): 00613 ''' 00614 :ivar None_: 00615 :vartype None_: 0 00616 :ivar Cold: 00617 :vartype Cold: 1 00618 :ivar Warm: 00619 :vartype Warm: 2 00620 :ivar Hot: 00621 :vartype Hot: 3 00622 :ivar Transparent: 00623 :vartype Transparent: 4 00624 :ivar HotAndMirrored: 00625 :vartype HotAndMirrored: 5 00626 ''' 00627 None_ = 0 00628 Cold = 1 00629 Warm = 2 00630 Hot = 3 00631 Transparent = 4 00632 HotAndMirrored = 5 00633 00634 00635 class ServerState(IntEnum): 00636 ''' 00637 :ivar Running: 00638 :vartype Running: 0 00639 :ivar Failed: 00640 :vartype Failed: 1 00641 :ivar NoConfiguration: 00642 :vartype NoConfiguration: 2 00643 :ivar Suspended: 00644 :vartype Suspended: 3 00645 :ivar Shutdown: 00646 :vartype Shutdown: 4 00647 :ivar Test: 00648 :vartype Test: 5 00649 :ivar CommunicationFault: 00650 :vartype CommunicationFault: 6 00651 :ivar Unknown: 00652 :vartype Unknown: 7 00653 ''' 00654 Running = 0 00655 Failed = 1 00656 NoConfiguration = 2 00657 Suspended = 3 00658 Shutdown = 4 00659 Test = 5 00660 CommunicationFault = 6 00661 Unknown = 7 00662 00663 00664 class ModelChangeStructureVerbMask(IntEnum): 00665 ''' 00666 :ivar NodeAdded: 00667 :vartype NodeAdded: 1 00668 :ivar NodeDeleted: 00669 :vartype NodeDeleted: 2 00670 :ivar ReferenceAdded: 00671 :vartype ReferenceAdded: 4 00672 :ivar ReferenceDeleted: 00673 :vartype ReferenceDeleted: 8 00674 :ivar DataTypeChanged: 00675 :vartype DataTypeChanged: 16 00676 ''' 00677 NodeAdded = 1 00678 NodeDeleted = 2 00679 ReferenceAdded = 4 00680 ReferenceDeleted = 8 00681 DataTypeChanged = 16 00682 00683 00684 class AxisScaleEnumeration(IntEnum): 00685 ''' 00686 :ivar Linear: 00687 :vartype Linear: 0 00688 :ivar Log: 00689 :vartype Log: 1 00690 :ivar Ln: 00691 :vartype Ln: 2 00692 ''' 00693 Linear = 0 00694 Log = 1 00695 Ln = 2 00696 00697 00698 class ExceptionDeviationFormat(IntEnum): 00699 ''' 00700 :ivar AbsoluteValue: 00701 :vartype AbsoluteValue: 0 00702 :ivar PercentOfValue: 00703 :vartype PercentOfValue: 1 00704 :ivar PercentOfRange: 00705 :vartype PercentOfRange: 2 00706 :ivar PercentOfEURange: 00707 :vartype PercentOfEURange: 3 00708 :ivar Unknown: 00709 :vartype Unknown: 4 00710 ''' 00711 AbsoluteValue = 0 00712 PercentOfValue = 1 00713 PercentOfRange = 2 00714 PercentOfEURange = 3 00715 Unknown = 4 00716 00717 00718 class DiagnosticInfo(FrozenClass): 00719 ''' 00720 A recursive structure containing diagnostic information associated with a status code. 00721 00722 :ivar Encoding: 00723 :vartype Encoding: UInt8 00724 :ivar SymbolicId: 00725 :vartype SymbolicId: Int32 00726 :ivar NamespaceURI: 00727 :vartype NamespaceURI: Int32 00728 :ivar Locale: 00729 :vartype Locale: Int32 00730 :ivar LocalizedText: 00731 :vartype LocalizedText: Int32 00732 :ivar AdditionalInfo: 00733 :vartype AdditionalInfo: CharArray 00734 :ivar InnerStatusCode: 00735 :vartype InnerStatusCode: StatusCode 00736 :ivar InnerDiagnosticInfo: 00737 :vartype InnerDiagnosticInfo: DiagnosticInfo 00738 ''' 00739 00740 ua_types = { 00741 'Encoding': 'UInt8', 00742 'SymbolicId': 'Int32', 00743 'NamespaceURI': 'Int32', 00744 'Locale': 'Int32', 00745 'LocalizedText': 'Int32', 00746 'AdditionalInfo': 'CharArray', 00747 'InnerStatusCode': 'StatusCode', 00748 'InnerDiagnosticInfo': 'DiagnosticInfo', 00749 } 00750 00751 def __init__(self, binary=None): 00752 if binary is not None: 00753 self._binary_init(binary) 00754 self._freeze = True 00755 return 00756 self.Encoding = 0 00757 self.SymbolicId = 0 00758 self.NamespaceURI = 0 00759 self.Locale = 0 00760 self.LocalizedText = 0 00761 self.AdditionalInfo = None 00762 self.InnerStatusCode = StatusCode() 00763 self.InnerDiagnosticInfo = None 00764 self._freeze = True 00765 00766 def to_binary(self): 00767 packet = [] 00768 if self.SymbolicId: self.Encoding |= (1 << 0) 00769 if self.NamespaceURI: self.Encoding |= (1 << 1) 00770 if self.Locale: self.Encoding |= (1 << 2) 00771 if self.LocalizedText: self.Encoding |= (1 << 3) 00772 if self.AdditionalInfo: self.Encoding |= (1 << 4) 00773 if self.InnerStatusCode: self.Encoding |= (1 << 5) 00774 if self.InnerDiagnosticInfo: self.Encoding |= (1 << 6) 00775 packet.append(uabin.Primitives.UInt8.pack(self.Encoding)) 00776 if self.SymbolicId: 00777 packet.append(uabin.Primitives.Int32.pack(self.SymbolicId)) 00778 if self.NamespaceURI: 00779 packet.append(uabin.Primitives.Int32.pack(self.NamespaceURI)) 00780 if self.Locale: 00781 packet.append(uabin.Primitives.Int32.pack(self.Locale)) 00782 if self.LocalizedText: 00783 packet.append(uabin.Primitives.Int32.pack(self.LocalizedText)) 00784 if self.AdditionalInfo: 00785 packet.append(uabin.Primitives.CharArray.pack(self.AdditionalInfo)) 00786 if self.InnerStatusCode: 00787 packet.append(self.InnerStatusCode.to_binary()) 00788 if self.InnerDiagnosticInfo: 00789 packet.append(self.InnerDiagnosticInfo.to_binary()) 00790 return b''.join(packet) 00791 00792 @staticmethod 00793 def from_binary(data): 00794 return DiagnosticInfo(data) 00795 00796 def _binary_init(self, data): 00797 self.Encoding = uabin.Primitives.UInt8.unpack(data) 00798 if self.Encoding & (1 << 0): 00799 self.SymbolicId = uabin.Primitives.Int32.unpack(data) 00800 else: 00801 self.SymbolicId = 0 00802 if self.Encoding & (1 << 1): 00803 self.NamespaceURI = uabin.Primitives.Int32.unpack(data) 00804 else: 00805 self.NamespaceURI = 0 00806 if self.Encoding & (1 << 2): 00807 self.Locale = uabin.Primitives.Int32.unpack(data) 00808 else: 00809 self.Locale = 0 00810 if self.Encoding & (1 << 3): 00811 self.LocalizedText = uabin.Primitives.Int32.unpack(data) 00812 else: 00813 self.LocalizedText = 0 00814 if self.Encoding & (1 << 4): 00815 self.AdditionalInfo = uabin.Primitives.CharArray.unpack(data) 00816 else: 00817 self.AdditionalInfo = None 00818 if self.Encoding & (1 << 5): 00819 self.InnerStatusCode = StatusCode.from_binary(data) 00820 else: 00821 self.InnerStatusCode = StatusCode() 00822 if self.Encoding & (1 << 6): 00823 self.InnerDiagnosticInfo = DiagnosticInfo.from_binary(data) 00824 else: 00825 self.InnerDiagnosticInfo = None 00826 00827 def __str__(self): 00828 return 'DiagnosticInfo(' + 'Encoding:' + str(self.Encoding) + ', ' + \ 00829 'SymbolicId:' + str(self.SymbolicId) + ', ' + \ 00830 'NamespaceURI:' + str(self.NamespaceURI) + ', ' + \ 00831 'Locale:' + str(self.Locale) + ', ' + \ 00832 'LocalizedText:' + str(self.LocalizedText) + ', ' + \ 00833 'AdditionalInfo:' + str(self.AdditionalInfo) + ', ' + \ 00834 'InnerStatusCode:' + str(self.InnerStatusCode) + ', ' + \ 00835 'InnerDiagnosticInfo:' + str(self.InnerDiagnosticInfo) + ')' 00836 00837 __repr__ = __str__ 00838 00839 00840 class TrustListDataType(FrozenClass): 00841 ''' 00842 :ivar SpecifiedLists: 00843 :vartype SpecifiedLists: UInt32 00844 :ivar TrustedCertificates: 00845 :vartype TrustedCertificates: ByteString 00846 :ivar TrustedCrls: 00847 :vartype TrustedCrls: ByteString 00848 :ivar IssuerCertificates: 00849 :vartype IssuerCertificates: ByteString 00850 :ivar IssuerCrls: 00851 :vartype IssuerCrls: ByteString 00852 ''' 00853 00854 ua_types = { 00855 'SpecifiedLists': 'UInt32', 00856 'TrustedCertificates': 'ByteString', 00857 'TrustedCrls': 'ByteString', 00858 'IssuerCertificates': 'ByteString', 00859 'IssuerCrls': 'ByteString', 00860 } 00861 00862 def __init__(self, binary=None): 00863 if binary is not None: 00864 self._binary_init(binary) 00865 self._freeze = True 00866 return 00867 self.SpecifiedLists = 0 00868 self.TrustedCertificates = [] 00869 self.TrustedCrls = [] 00870 self.IssuerCertificates = [] 00871 self.IssuerCrls = [] 00872 self._freeze = True 00873 00874 def to_binary(self): 00875 packet = [] 00876 packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedLists)) 00877 packet.append(uabin.Primitives.Int32.pack(len(self.TrustedCertificates))) 00878 for fieldname in self.TrustedCertificates: 00879 packet.append(uabin.Primitives.ByteString.pack(fieldname)) 00880 packet.append(uabin.Primitives.Int32.pack(len(self.TrustedCrls))) 00881 for fieldname in self.TrustedCrls: 00882 packet.append(uabin.Primitives.ByteString.pack(fieldname)) 00883 packet.append(uabin.Primitives.Int32.pack(len(self.IssuerCertificates))) 00884 for fieldname in self.IssuerCertificates: 00885 packet.append(uabin.Primitives.ByteString.pack(fieldname)) 00886 packet.append(uabin.Primitives.Int32.pack(len(self.IssuerCrls))) 00887 for fieldname in self.IssuerCrls: 00888 packet.append(uabin.Primitives.ByteString.pack(fieldname)) 00889 return b''.join(packet) 00890 00891 @staticmethod 00892 def from_binary(data): 00893 return TrustListDataType(data) 00894 00895 def _binary_init(self, data): 00896 self.SpecifiedLists = uabin.Primitives.UInt32.unpack(data) 00897 self.TrustedCertificates = uabin.Primitives.ByteString.unpack_array(data) 00898 self.TrustedCrls = uabin.Primitives.ByteString.unpack_array(data) 00899 self.IssuerCertificates = uabin.Primitives.ByteString.unpack_array(data) 00900 self.IssuerCrls = uabin.Primitives.ByteString.unpack_array(data) 00901 00902 def __str__(self): 00903 return 'TrustListDataType(' + 'SpecifiedLists:' + str(self.SpecifiedLists) + ', ' + \ 00904 'TrustedCertificates:' + str(self.TrustedCertificates) + ', ' + \ 00905 'TrustedCrls:' + str(self.TrustedCrls) + ', ' + \ 00906 'IssuerCertificates:' + str(self.IssuerCertificates) + ', ' + \ 00907 'IssuerCrls:' + str(self.IssuerCrls) + ')' 00908 00909 __repr__ = __str__ 00910 00911 00912 class Argument(FrozenClass): 00913 ''' 00914 An argument for a method. 00915 00916 :ivar Name: 00917 :vartype Name: String 00918 :ivar DataType: 00919 :vartype DataType: NodeId 00920 :ivar ValueRank: 00921 :vartype ValueRank: Int32 00922 :ivar ArrayDimensions: 00923 :vartype ArrayDimensions: UInt32 00924 :ivar Description: 00925 :vartype Description: LocalizedText 00926 ''' 00927 00928 ua_types = { 00929 'Name': 'String', 00930 'DataType': 'NodeId', 00931 'ValueRank': 'Int32', 00932 'ArrayDimensions': 'UInt32', 00933 'Description': 'LocalizedText', 00934 } 00935 00936 def __init__(self, binary=None): 00937 if binary is not None: 00938 self._binary_init(binary) 00939 self._freeze = True 00940 return 00941 self.Name = None 00942 self.DataType = NodeId() 00943 self.ValueRank = 0 00944 self.ArrayDimensions = [] 00945 self.Description = LocalizedText() 00946 self._freeze = True 00947 00948 def to_binary(self): 00949 packet = [] 00950 packet.append(uabin.Primitives.String.pack(self.Name)) 00951 packet.append(self.DataType.to_binary()) 00952 packet.append(uabin.Primitives.Int32.pack(self.ValueRank)) 00953 packet.append(uabin.Primitives.Int32.pack(len(self.ArrayDimensions))) 00954 for fieldname in self.ArrayDimensions: 00955 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 00956 packet.append(self.Description.to_binary()) 00957 return b''.join(packet) 00958 00959 @staticmethod 00960 def from_binary(data): 00961 return Argument(data) 00962 00963 def _binary_init(self, data): 00964 self.Name = uabin.Primitives.String.unpack(data) 00965 self.DataType = NodeId.from_binary(data) 00966 self.ValueRank = uabin.Primitives.Int32.unpack(data) 00967 self.ArrayDimensions = uabin.Primitives.UInt32.unpack_array(data) 00968 self.Description = LocalizedText.from_binary(data) 00969 00970 def __str__(self): 00971 return 'Argument(' + 'Name:' + str(self.Name) + ', ' + \ 00972 'DataType:' + str(self.DataType) + ', ' + \ 00973 'ValueRank:' + str(self.ValueRank) + ', ' + \ 00974 'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \ 00975 'Description:' + str(self.Description) + ')' 00976 00977 __repr__ = __str__ 00978 00979 00980 class EnumValueType(FrozenClass): 00981 ''' 00982 A mapping between a value of an enumerated type and a name and description. 00983 00984 :ivar Value: 00985 :vartype Value: Int64 00986 :ivar DisplayName: 00987 :vartype DisplayName: LocalizedText 00988 :ivar Description: 00989 :vartype Description: LocalizedText 00990 ''' 00991 00992 ua_types = { 00993 'Value': 'Int64', 00994 'DisplayName': 'LocalizedText', 00995 'Description': 'LocalizedText', 00996 } 00997 00998 def __init__(self, binary=None): 00999 if binary is not None: 01000 self._binary_init(binary) 01001 self._freeze = True 01002 return 01003 self.Value = 0 01004 self.DisplayName = LocalizedText() 01005 self.Description = LocalizedText() 01006 self._freeze = True 01007 01008 def to_binary(self): 01009 packet = [] 01010 packet.append(uabin.Primitives.Int64.pack(self.Value)) 01011 packet.append(self.DisplayName.to_binary()) 01012 packet.append(self.Description.to_binary()) 01013 return b''.join(packet) 01014 01015 @staticmethod 01016 def from_binary(data): 01017 return EnumValueType(data) 01018 01019 def _binary_init(self, data): 01020 self.Value = uabin.Primitives.Int64.unpack(data) 01021 self.DisplayName = LocalizedText.from_binary(data) 01022 self.Description = LocalizedText.from_binary(data) 01023 01024 def __str__(self): 01025 return 'EnumValueType(' + 'Value:' + str(self.Value) + ', ' + \ 01026 'DisplayName:' + str(self.DisplayName) + ', ' + \ 01027 'Description:' + str(self.Description) + ')' 01028 01029 __repr__ = __str__ 01030 01031 01032 class OptionSet(FrozenClass): 01033 ''' 01034 This abstract Structured DataType is the base DataType for all DataTypes representing a bit mask. 01035 01036 :ivar Value: 01037 :vartype Value: ByteString 01038 :ivar ValidBits: 01039 :vartype ValidBits: ByteString 01040 ''' 01041 01042 ua_types = { 01043 'Value': 'ByteString', 01044 'ValidBits': 'ByteString', 01045 } 01046 01047 def __init__(self, binary=None): 01048 if binary is not None: 01049 self._binary_init(binary) 01050 self._freeze = True 01051 return 01052 self.Value = None 01053 self.ValidBits = None 01054 self._freeze = True 01055 01056 def to_binary(self): 01057 packet = [] 01058 packet.append(uabin.Primitives.ByteString.pack(self.Value)) 01059 packet.append(uabin.Primitives.ByteString.pack(self.ValidBits)) 01060 return b''.join(packet) 01061 01062 @staticmethod 01063 def from_binary(data): 01064 return OptionSet(data) 01065 01066 def _binary_init(self, data): 01067 self.Value = uabin.Primitives.ByteString.unpack(data) 01068 self.ValidBits = uabin.Primitives.ByteString.unpack(data) 01069 01070 def __str__(self): 01071 return 'OptionSet(' + 'Value:' + str(self.Value) + ', ' + \ 01072 'ValidBits:' + str(self.ValidBits) + ')' 01073 01074 __repr__ = __str__ 01075 01076 01077 class Union(FrozenClass): 01078 ''' 01079 This abstract DataType is the base DataType for all union DataTypes. 01080 01081 ''' 01082 01083 ua_types = { 01084 } 01085 01086 def __init__(self, binary=None): 01087 if binary is not None: 01088 self._binary_init(binary) 01089 self._freeze = True 01090 return 01091 self._freeze = True 01092 01093 def to_binary(self): 01094 packet = [] 01095 return b''.join(packet) 01096 01097 @staticmethod 01098 def from_binary(data): 01099 return Union(data) 01100 01101 def _binary_init(self, data): 01102 pass 01103 01104 def __str__(self): 01105 return 'Union(' + + ')' 01106 01107 __repr__ = __str__ 01108 01109 01110 class TimeZoneDataType(FrozenClass): 01111 ''' 01112 :ivar Offset: 01113 :vartype Offset: Int16 01114 :ivar DaylightSavingInOffset: 01115 :vartype DaylightSavingInOffset: Boolean 01116 ''' 01117 01118 ua_types = { 01119 'Offset': 'Int16', 01120 'DaylightSavingInOffset': 'Boolean', 01121 } 01122 01123 def __init__(self, binary=None): 01124 if binary is not None: 01125 self._binary_init(binary) 01126 self._freeze = True 01127 return 01128 self.Offset = 0 01129 self.DaylightSavingInOffset = True 01130 self._freeze = True 01131 01132 def to_binary(self): 01133 packet = [] 01134 packet.append(uabin.Primitives.Int16.pack(self.Offset)) 01135 packet.append(uabin.Primitives.Boolean.pack(self.DaylightSavingInOffset)) 01136 return b''.join(packet) 01137 01138 @staticmethod 01139 def from_binary(data): 01140 return TimeZoneDataType(data) 01141 01142 def _binary_init(self, data): 01143 self.Offset = uabin.Primitives.Int16.unpack(data) 01144 self.DaylightSavingInOffset = uabin.Primitives.Boolean.unpack(data) 01145 01146 def __str__(self): 01147 return 'TimeZoneDataType(' + 'Offset:' + str(self.Offset) + ', ' + \ 01148 'DaylightSavingInOffset:' + str(self.DaylightSavingInOffset) + ')' 01149 01150 __repr__ = __str__ 01151 01152 01153 class ApplicationDescription(FrozenClass): 01154 ''' 01155 Describes an application and how to find it. 01156 01157 :ivar ApplicationUri: 01158 :vartype ApplicationUri: String 01159 :ivar ProductUri: 01160 :vartype ProductUri: String 01161 :ivar ApplicationName: 01162 :vartype ApplicationName: LocalizedText 01163 :ivar ApplicationType: 01164 :vartype ApplicationType: ApplicationType 01165 :ivar GatewayServerUri: 01166 :vartype GatewayServerUri: String 01167 :ivar DiscoveryProfileUri: 01168 :vartype DiscoveryProfileUri: String 01169 :ivar DiscoveryUrls: 01170 :vartype DiscoveryUrls: String 01171 ''' 01172 01173 ua_types = { 01174 'ApplicationUri': 'String', 01175 'ProductUri': 'String', 01176 'ApplicationName': 'LocalizedText', 01177 'ApplicationType': 'ApplicationType', 01178 'GatewayServerUri': 'String', 01179 'DiscoveryProfileUri': 'String', 01180 'DiscoveryUrls': 'String', 01181 } 01182 01183 def __init__(self, binary=None): 01184 if binary is not None: 01185 self._binary_init(binary) 01186 self._freeze = True 01187 return 01188 self.ApplicationUri = None 01189 self.ProductUri = None 01190 self.ApplicationName = LocalizedText() 01191 self.ApplicationType = ApplicationType(0) 01192 self.GatewayServerUri = None 01193 self.DiscoveryProfileUri = None 01194 self.DiscoveryUrls = [] 01195 self._freeze = True 01196 01197 def to_binary(self): 01198 packet = [] 01199 packet.append(uabin.Primitives.String.pack(self.ApplicationUri)) 01200 packet.append(uabin.Primitives.String.pack(self.ProductUri)) 01201 packet.append(self.ApplicationName.to_binary()) 01202 packet.append(uabin.Primitives.UInt32.pack(self.ApplicationType.value)) 01203 packet.append(uabin.Primitives.String.pack(self.GatewayServerUri)) 01204 packet.append(uabin.Primitives.String.pack(self.DiscoveryProfileUri)) 01205 packet.append(uabin.Primitives.Int32.pack(len(self.DiscoveryUrls))) 01206 for fieldname in self.DiscoveryUrls: 01207 packet.append(uabin.Primitives.String.pack(fieldname)) 01208 return b''.join(packet) 01209 01210 @staticmethod 01211 def from_binary(data): 01212 return ApplicationDescription(data) 01213 01214 def _binary_init(self, data): 01215 self.ApplicationUri = uabin.Primitives.String.unpack(data) 01216 self.ProductUri = uabin.Primitives.String.unpack(data) 01217 self.ApplicationName = LocalizedText.from_binary(data) 01218 self.ApplicationType = ApplicationType(uabin.Primitives.UInt32.unpack(data)) 01219 self.GatewayServerUri = uabin.Primitives.String.unpack(data) 01220 self.DiscoveryProfileUri = uabin.Primitives.String.unpack(data) 01221 self.DiscoveryUrls = uabin.Primitives.String.unpack_array(data) 01222 01223 def __str__(self): 01224 return 'ApplicationDescription(' + 'ApplicationUri:' + str(self.ApplicationUri) + ', ' + \ 01225 'ProductUri:' + str(self.ProductUri) + ', ' + \ 01226 'ApplicationName:' + str(self.ApplicationName) + ', ' + \ 01227 'ApplicationType:' + str(self.ApplicationType) + ', ' + \ 01228 'GatewayServerUri:' + str(self.GatewayServerUri) + ', ' + \ 01229 'DiscoveryProfileUri:' + str(self.DiscoveryProfileUri) + ', ' + \ 01230 'DiscoveryUrls:' + str(self.DiscoveryUrls) + ')' 01231 01232 __repr__ = __str__ 01233 01234 01235 class RequestHeader(FrozenClass): 01236 ''' 01237 The header passed with every server request. 01238 01239 :ivar AuthenticationToken: 01240 :vartype AuthenticationToken: NodeId 01241 :ivar Timestamp: 01242 :vartype Timestamp: DateTime 01243 :ivar RequestHandle: 01244 :vartype RequestHandle: UInt32 01245 :ivar ReturnDiagnostics: 01246 :vartype ReturnDiagnostics: UInt32 01247 :ivar AuditEntryId: 01248 :vartype AuditEntryId: String 01249 :ivar TimeoutHint: 01250 :vartype TimeoutHint: UInt32 01251 :ivar AdditionalHeader: 01252 :vartype AdditionalHeader: ExtensionObject 01253 ''' 01254 01255 ua_types = { 01256 'AuthenticationToken': 'NodeId', 01257 'Timestamp': 'DateTime', 01258 'RequestHandle': 'UInt32', 01259 'ReturnDiagnostics': 'UInt32', 01260 'AuditEntryId': 'String', 01261 'TimeoutHint': 'UInt32', 01262 'AdditionalHeader': 'ExtensionObject', 01263 } 01264 01265 def __init__(self, binary=None): 01266 if binary is not None: 01267 self._binary_init(binary) 01268 self._freeze = True 01269 return 01270 self.AuthenticationToken = NodeId() 01271 self.Timestamp = datetime.now() 01272 self.RequestHandle = 0 01273 self.ReturnDiagnostics = 0 01274 self.AuditEntryId = None 01275 self.TimeoutHint = 0 01276 self.AdditionalHeader = None 01277 self._freeze = True 01278 01279 def to_binary(self): 01280 packet = [] 01281 packet.append(self.AuthenticationToken.to_binary()) 01282 packet.append(uabin.Primitives.DateTime.pack(self.Timestamp)) 01283 packet.append(uabin.Primitives.UInt32.pack(self.RequestHandle)) 01284 packet.append(uabin.Primitives.UInt32.pack(self.ReturnDiagnostics)) 01285 packet.append(uabin.Primitives.String.pack(self.AuditEntryId)) 01286 packet.append(uabin.Primitives.UInt32.pack(self.TimeoutHint)) 01287 packet.append(extensionobject_to_binary(self.AdditionalHeader)) 01288 return b''.join(packet) 01289 01290 @staticmethod 01291 def from_binary(data): 01292 return RequestHeader(data) 01293 01294 def _binary_init(self, data): 01295 self.AuthenticationToken = NodeId.from_binary(data) 01296 self.Timestamp = uabin.Primitives.DateTime.unpack(data) 01297 self.RequestHandle = uabin.Primitives.UInt32.unpack(data) 01298 self.ReturnDiagnostics = uabin.Primitives.UInt32.unpack(data) 01299 self.AuditEntryId = uabin.Primitives.String.unpack(data) 01300 self.TimeoutHint = uabin.Primitives.UInt32.unpack(data) 01301 self.AdditionalHeader = extensionobject_from_binary(data) 01302 01303 def __str__(self): 01304 return 'RequestHeader(' + 'AuthenticationToken:' + str(self.AuthenticationToken) + ', ' + \ 01305 'Timestamp:' + str(self.Timestamp) + ', ' + \ 01306 'RequestHandle:' + str(self.RequestHandle) + ', ' + \ 01307 'ReturnDiagnostics:' + str(self.ReturnDiagnostics) + ', ' + \ 01308 'AuditEntryId:' + str(self.AuditEntryId) + ', ' + \ 01309 'TimeoutHint:' + str(self.TimeoutHint) + ', ' + \ 01310 'AdditionalHeader:' + str(self.AdditionalHeader) + ')' 01311 01312 __repr__ = __str__ 01313 01314 01315 class ResponseHeader(FrozenClass): 01316 ''' 01317 The header passed with every server response. 01318 01319 :ivar Timestamp: 01320 :vartype Timestamp: DateTime 01321 :ivar RequestHandle: 01322 :vartype RequestHandle: UInt32 01323 :ivar ServiceResult: 01324 :vartype ServiceResult: StatusCode 01325 :ivar ServiceDiagnostics: 01326 :vartype ServiceDiagnostics: DiagnosticInfo 01327 :ivar StringTable: 01328 :vartype StringTable: String 01329 :ivar AdditionalHeader: 01330 :vartype AdditionalHeader: ExtensionObject 01331 ''' 01332 01333 ua_types = { 01334 'Timestamp': 'DateTime', 01335 'RequestHandle': 'UInt32', 01336 'ServiceResult': 'StatusCode', 01337 'ServiceDiagnostics': 'DiagnosticInfo', 01338 'StringTable': 'String', 01339 'AdditionalHeader': 'ExtensionObject', 01340 } 01341 01342 def __init__(self, binary=None): 01343 if binary is not None: 01344 self._binary_init(binary) 01345 self._freeze = True 01346 return 01347 self.Timestamp = datetime.now() 01348 self.RequestHandle = 0 01349 self.ServiceResult = StatusCode() 01350 self.ServiceDiagnostics = DiagnosticInfo() 01351 self.StringTable = [] 01352 self.AdditionalHeader = None 01353 self._freeze = True 01354 01355 def to_binary(self): 01356 packet = [] 01357 packet.append(uabin.Primitives.DateTime.pack(self.Timestamp)) 01358 packet.append(uabin.Primitives.UInt32.pack(self.RequestHandle)) 01359 packet.append(self.ServiceResult.to_binary()) 01360 packet.append(self.ServiceDiagnostics.to_binary()) 01361 packet.append(uabin.Primitives.Int32.pack(len(self.StringTable))) 01362 for fieldname in self.StringTable: 01363 packet.append(uabin.Primitives.String.pack(fieldname)) 01364 packet.append(extensionobject_to_binary(self.AdditionalHeader)) 01365 return b''.join(packet) 01366 01367 @staticmethod 01368 def from_binary(data): 01369 return ResponseHeader(data) 01370 01371 def _binary_init(self, data): 01372 self.Timestamp = uabin.Primitives.DateTime.unpack(data) 01373 self.RequestHandle = uabin.Primitives.UInt32.unpack(data) 01374 self.ServiceResult = StatusCode.from_binary(data) 01375 self.ServiceDiagnostics = DiagnosticInfo.from_binary(data) 01376 self.StringTable = uabin.Primitives.String.unpack_array(data) 01377 self.AdditionalHeader = extensionobject_from_binary(data) 01378 01379 def __str__(self): 01380 return 'ResponseHeader(' + 'Timestamp:' + str(self.Timestamp) + ', ' + \ 01381 'RequestHandle:' + str(self.RequestHandle) + ', ' + \ 01382 'ServiceResult:' + str(self.ServiceResult) + ', ' + \ 01383 'ServiceDiagnostics:' + str(self.ServiceDiagnostics) + ', ' + \ 01384 'StringTable:' + str(self.StringTable) + ', ' + \ 01385 'AdditionalHeader:' + str(self.AdditionalHeader) + ')' 01386 01387 __repr__ = __str__ 01388 01389 01390 class ServiceFault(FrozenClass): 01391 ''' 01392 The response returned by all services when there is a service level error. 01393 01394 :ivar TypeId: 01395 :vartype TypeId: NodeId 01396 :ivar ResponseHeader: 01397 :vartype ResponseHeader: ResponseHeader 01398 ''' 01399 01400 ua_types = { 01401 'TypeId': 'NodeId', 01402 'ResponseHeader': 'ResponseHeader', 01403 } 01404 01405 def __init__(self, binary=None): 01406 if binary is not None: 01407 self._binary_init(binary) 01408 self._freeze = True 01409 return 01410 self.TypeId = FourByteNodeId(ObjectIds.ServiceFault_Encoding_DefaultBinary) 01411 self.ResponseHeader = ResponseHeader() 01412 self._freeze = True 01413 01414 def to_binary(self): 01415 packet = [] 01416 packet.append(self.TypeId.to_binary()) 01417 packet.append(self.ResponseHeader.to_binary()) 01418 return b''.join(packet) 01419 01420 @staticmethod 01421 def from_binary(data): 01422 return ServiceFault(data) 01423 01424 def _binary_init(self, data): 01425 self.TypeId = NodeId.from_binary(data) 01426 self.ResponseHeader = ResponseHeader.from_binary(data) 01427 01428 def __str__(self): 01429 return 'ServiceFault(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 01430 'ResponseHeader:' + str(self.ResponseHeader) + ')' 01431 01432 __repr__ = __str__ 01433 01434 01435 class FindServersParameters(FrozenClass): 01436 ''' 01437 :ivar EndpointUrl: 01438 :vartype EndpointUrl: String 01439 :ivar LocaleIds: 01440 :vartype LocaleIds: String 01441 :ivar ServerUris: 01442 :vartype ServerUris: String 01443 ''' 01444 01445 ua_types = { 01446 'EndpointUrl': 'String', 01447 'LocaleIds': 'String', 01448 'ServerUris': 'String', 01449 } 01450 01451 def __init__(self, binary=None): 01452 if binary is not None: 01453 self._binary_init(binary) 01454 self._freeze = True 01455 return 01456 self.EndpointUrl = None 01457 self.LocaleIds = [] 01458 self.ServerUris = [] 01459 self._freeze = True 01460 01461 def to_binary(self): 01462 packet = [] 01463 packet.append(uabin.Primitives.String.pack(self.EndpointUrl)) 01464 packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds))) 01465 for fieldname in self.LocaleIds: 01466 packet.append(uabin.Primitives.String.pack(fieldname)) 01467 packet.append(uabin.Primitives.Int32.pack(len(self.ServerUris))) 01468 for fieldname in self.ServerUris: 01469 packet.append(uabin.Primitives.String.pack(fieldname)) 01470 return b''.join(packet) 01471 01472 @staticmethod 01473 def from_binary(data): 01474 return FindServersParameters(data) 01475 01476 def _binary_init(self, data): 01477 self.EndpointUrl = uabin.Primitives.String.unpack(data) 01478 self.LocaleIds = uabin.Primitives.String.unpack_array(data) 01479 self.ServerUris = uabin.Primitives.String.unpack_array(data) 01480 01481 def __str__(self): 01482 return 'FindServersParameters(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \ 01483 'LocaleIds:' + str(self.LocaleIds) + ', ' + \ 01484 'ServerUris:' + str(self.ServerUris) + ')' 01485 01486 __repr__ = __str__ 01487 01488 01489 class FindServersRequest(FrozenClass): 01490 ''' 01491 Finds the servers known to the discovery server. 01492 01493 :ivar TypeId: 01494 :vartype TypeId: NodeId 01495 :ivar RequestHeader: 01496 :vartype RequestHeader: RequestHeader 01497 :ivar Parameters: 01498 :vartype Parameters: FindServersParameters 01499 ''' 01500 01501 ua_types = { 01502 'TypeId': 'NodeId', 01503 'RequestHeader': 'RequestHeader', 01504 'Parameters': 'FindServersParameters', 01505 } 01506 01507 def __init__(self, binary=None): 01508 if binary is not None: 01509 self._binary_init(binary) 01510 self._freeze = True 01511 return 01512 self.TypeId = FourByteNodeId(ObjectIds.FindServersRequest_Encoding_DefaultBinary) 01513 self.RequestHeader = RequestHeader() 01514 self.Parameters = FindServersParameters() 01515 self._freeze = True 01516 01517 def to_binary(self): 01518 packet = [] 01519 packet.append(self.TypeId.to_binary()) 01520 packet.append(self.RequestHeader.to_binary()) 01521 packet.append(self.Parameters.to_binary()) 01522 return b''.join(packet) 01523 01524 @staticmethod 01525 def from_binary(data): 01526 return FindServersRequest(data) 01527 01528 def _binary_init(self, data): 01529 self.TypeId = NodeId.from_binary(data) 01530 self.RequestHeader = RequestHeader.from_binary(data) 01531 self.Parameters = FindServersParameters.from_binary(data) 01532 01533 def __str__(self): 01534 return 'FindServersRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 01535 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 01536 'Parameters:' + str(self.Parameters) + ')' 01537 01538 __repr__ = __str__ 01539 01540 01541 class FindServersResponse(FrozenClass): 01542 ''' 01543 Finds the servers known to the discovery server. 01544 01545 :ivar TypeId: 01546 :vartype TypeId: NodeId 01547 :ivar ResponseHeader: 01548 :vartype ResponseHeader: ResponseHeader 01549 :ivar Servers: 01550 :vartype Servers: ApplicationDescription 01551 ''' 01552 01553 ua_types = { 01554 'TypeId': 'NodeId', 01555 'ResponseHeader': 'ResponseHeader', 01556 'Servers': 'ApplicationDescription', 01557 } 01558 01559 def __init__(self, binary=None): 01560 if binary is not None: 01561 self._binary_init(binary) 01562 self._freeze = True 01563 return 01564 self.TypeId = FourByteNodeId(ObjectIds.FindServersResponse_Encoding_DefaultBinary) 01565 self.ResponseHeader = ResponseHeader() 01566 self.Servers = [] 01567 self._freeze = True 01568 01569 def to_binary(self): 01570 packet = [] 01571 packet.append(self.TypeId.to_binary()) 01572 packet.append(self.ResponseHeader.to_binary()) 01573 packet.append(uabin.Primitives.Int32.pack(len(self.Servers))) 01574 for fieldname in self.Servers: 01575 packet.append(fieldname.to_binary()) 01576 return b''.join(packet) 01577 01578 @staticmethod 01579 def from_binary(data): 01580 return FindServersResponse(data) 01581 01582 def _binary_init(self, data): 01583 self.TypeId = NodeId.from_binary(data) 01584 self.ResponseHeader = ResponseHeader.from_binary(data) 01585 length = uabin.Primitives.Int32.unpack(data) 01586 array = [] 01587 if length != -1: 01588 for _ in range(0, length): 01589 array.append(ApplicationDescription.from_binary(data)) 01590 self.Servers = array 01591 01592 def __str__(self): 01593 return 'FindServersResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 01594 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 01595 'Servers:' + str(self.Servers) + ')' 01596 01597 __repr__ = __str__ 01598 01599 01600 class ServerOnNetwork(FrozenClass): 01601 ''' 01602 :ivar RecordId: 01603 :vartype RecordId: UInt32 01604 :ivar ServerName: 01605 :vartype ServerName: String 01606 :ivar DiscoveryUrl: 01607 :vartype DiscoveryUrl: String 01608 :ivar ServerCapabilities: 01609 :vartype ServerCapabilities: String 01610 ''' 01611 01612 ua_types = { 01613 'RecordId': 'UInt32', 01614 'ServerName': 'String', 01615 'DiscoveryUrl': 'String', 01616 'ServerCapabilities': 'String', 01617 } 01618 01619 def __init__(self, binary=None): 01620 if binary is not None: 01621 self._binary_init(binary) 01622 self._freeze = True 01623 return 01624 self.RecordId = 0 01625 self.ServerName = None 01626 self.DiscoveryUrl = None 01627 self.ServerCapabilities = [] 01628 self._freeze = True 01629 01630 def to_binary(self): 01631 packet = [] 01632 packet.append(uabin.Primitives.UInt32.pack(self.RecordId)) 01633 packet.append(uabin.Primitives.String.pack(self.ServerName)) 01634 packet.append(uabin.Primitives.String.pack(self.DiscoveryUrl)) 01635 packet.append(uabin.Primitives.Int32.pack(len(self.ServerCapabilities))) 01636 for fieldname in self.ServerCapabilities: 01637 packet.append(uabin.Primitives.String.pack(fieldname)) 01638 return b''.join(packet) 01639 01640 @staticmethod 01641 def from_binary(data): 01642 return ServerOnNetwork(data) 01643 01644 def _binary_init(self, data): 01645 self.RecordId = uabin.Primitives.UInt32.unpack(data) 01646 self.ServerName = uabin.Primitives.String.unpack(data) 01647 self.DiscoveryUrl = uabin.Primitives.String.unpack(data) 01648 self.ServerCapabilities = uabin.Primitives.String.unpack_array(data) 01649 01650 def __str__(self): 01651 return 'ServerOnNetwork(' + 'RecordId:' + str(self.RecordId) + ', ' + \ 01652 'ServerName:' + str(self.ServerName) + ', ' + \ 01653 'DiscoveryUrl:' + str(self.DiscoveryUrl) + ', ' + \ 01654 'ServerCapabilities:' + str(self.ServerCapabilities) + ')' 01655 01656 __repr__ = __str__ 01657 01658 01659 class FindServersOnNetworkParameters(FrozenClass): 01660 ''' 01661 :ivar StartingRecordId: 01662 :vartype StartingRecordId: UInt32 01663 :ivar MaxRecordsToReturn: 01664 :vartype MaxRecordsToReturn: UInt32 01665 :ivar ServerCapabilityFilter: 01666 :vartype ServerCapabilityFilter: String 01667 ''' 01668 01669 ua_types = { 01670 'StartingRecordId': 'UInt32', 01671 'MaxRecordsToReturn': 'UInt32', 01672 'ServerCapabilityFilter': 'String', 01673 } 01674 01675 def __init__(self, binary=None): 01676 if binary is not None: 01677 self._binary_init(binary) 01678 self._freeze = True 01679 return 01680 self.StartingRecordId = 0 01681 self.MaxRecordsToReturn = 0 01682 self.ServerCapabilityFilter = [] 01683 self._freeze = True 01684 01685 def to_binary(self): 01686 packet = [] 01687 packet.append(uabin.Primitives.UInt32.pack(self.StartingRecordId)) 01688 packet.append(uabin.Primitives.UInt32.pack(self.MaxRecordsToReturn)) 01689 packet.append(uabin.Primitives.Int32.pack(len(self.ServerCapabilityFilter))) 01690 for fieldname in self.ServerCapabilityFilter: 01691 packet.append(uabin.Primitives.String.pack(fieldname)) 01692 return b''.join(packet) 01693 01694 @staticmethod 01695 def from_binary(data): 01696 return FindServersOnNetworkParameters(data) 01697 01698 def _binary_init(self, data): 01699 self.StartingRecordId = uabin.Primitives.UInt32.unpack(data) 01700 self.MaxRecordsToReturn = uabin.Primitives.UInt32.unpack(data) 01701 self.ServerCapabilityFilter = uabin.Primitives.String.unpack_array(data) 01702 01703 def __str__(self): 01704 return 'FindServersOnNetworkParameters(' + 'StartingRecordId:' + str(self.StartingRecordId) + ', ' + \ 01705 'MaxRecordsToReturn:' + str(self.MaxRecordsToReturn) + ', ' + \ 01706 'ServerCapabilityFilter:' + str(self.ServerCapabilityFilter) + ')' 01707 01708 __repr__ = __str__ 01709 01710 01711 class FindServersOnNetworkRequest(FrozenClass): 01712 ''' 01713 :ivar TypeId: 01714 :vartype TypeId: NodeId 01715 :ivar RequestHeader: 01716 :vartype RequestHeader: RequestHeader 01717 :ivar Parameters: 01718 :vartype Parameters: FindServersOnNetworkParameters 01719 ''' 01720 01721 ua_types = { 01722 'TypeId': 'NodeId', 01723 'RequestHeader': 'RequestHeader', 01724 'Parameters': 'FindServersOnNetworkParameters', 01725 } 01726 01727 def __init__(self, binary=None): 01728 if binary is not None: 01729 self._binary_init(binary) 01730 self._freeze = True 01731 return 01732 self.TypeId = FourByteNodeId(ObjectIds.FindServersOnNetworkRequest_Encoding_DefaultBinary) 01733 self.RequestHeader = RequestHeader() 01734 self.Parameters = FindServersOnNetworkParameters() 01735 self._freeze = True 01736 01737 def to_binary(self): 01738 packet = [] 01739 packet.append(self.TypeId.to_binary()) 01740 packet.append(self.RequestHeader.to_binary()) 01741 packet.append(self.Parameters.to_binary()) 01742 return b''.join(packet) 01743 01744 @staticmethod 01745 def from_binary(data): 01746 return FindServersOnNetworkRequest(data) 01747 01748 def _binary_init(self, data): 01749 self.TypeId = NodeId.from_binary(data) 01750 self.RequestHeader = RequestHeader.from_binary(data) 01751 self.Parameters = FindServersOnNetworkParameters.from_binary(data) 01752 01753 def __str__(self): 01754 return 'FindServersOnNetworkRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 01755 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 01756 'Parameters:' + str(self.Parameters) + ')' 01757 01758 __repr__ = __str__ 01759 01760 01761 class FindServersOnNetworkResult(FrozenClass): 01762 ''' 01763 :ivar LastCounterResetTime: 01764 :vartype LastCounterResetTime: DateTime 01765 :ivar Servers: 01766 :vartype Servers: ServerOnNetwork 01767 ''' 01768 01769 ua_types = { 01770 'LastCounterResetTime': 'DateTime', 01771 'Servers': 'ServerOnNetwork', 01772 } 01773 01774 def __init__(self, binary=None): 01775 if binary is not None: 01776 self._binary_init(binary) 01777 self._freeze = True 01778 return 01779 self.LastCounterResetTime = datetime.now() 01780 self.Servers = [] 01781 self._freeze = True 01782 01783 def to_binary(self): 01784 packet = [] 01785 packet.append(uabin.Primitives.DateTime.pack(self.LastCounterResetTime)) 01786 packet.append(uabin.Primitives.Int32.pack(len(self.Servers))) 01787 for fieldname in self.Servers: 01788 packet.append(fieldname.to_binary()) 01789 return b''.join(packet) 01790 01791 @staticmethod 01792 def from_binary(data): 01793 return FindServersOnNetworkResult(data) 01794 01795 def _binary_init(self, data): 01796 self.LastCounterResetTime = uabin.Primitives.DateTime.unpack(data) 01797 length = uabin.Primitives.Int32.unpack(data) 01798 array = [] 01799 if length != -1: 01800 for _ in range(0, length): 01801 array.append(ServerOnNetwork.from_binary(data)) 01802 self.Servers = array 01803 01804 def __str__(self): 01805 return 'FindServersOnNetworkResult(' + 'LastCounterResetTime:' + str(self.LastCounterResetTime) + ', ' + \ 01806 'Servers:' + str(self.Servers) + ')' 01807 01808 __repr__ = __str__ 01809 01810 01811 class FindServersOnNetworkResponse(FrozenClass): 01812 ''' 01813 :ivar TypeId: 01814 :vartype TypeId: NodeId 01815 :ivar ResponseHeader: 01816 :vartype ResponseHeader: ResponseHeader 01817 :ivar Parameters: 01818 :vartype Parameters: FindServersOnNetworkResult 01819 ''' 01820 01821 ua_types = { 01822 'TypeId': 'NodeId', 01823 'ResponseHeader': 'ResponseHeader', 01824 'Parameters': 'FindServersOnNetworkResult', 01825 } 01826 01827 def __init__(self, binary=None): 01828 if binary is not None: 01829 self._binary_init(binary) 01830 self._freeze = True 01831 return 01832 self.TypeId = FourByteNodeId(ObjectIds.FindServersOnNetworkResponse_Encoding_DefaultBinary) 01833 self.ResponseHeader = ResponseHeader() 01834 self.Parameters = FindServersOnNetworkResult() 01835 self._freeze = True 01836 01837 def to_binary(self): 01838 packet = [] 01839 packet.append(self.TypeId.to_binary()) 01840 packet.append(self.ResponseHeader.to_binary()) 01841 packet.append(self.Parameters.to_binary()) 01842 return b''.join(packet) 01843 01844 @staticmethod 01845 def from_binary(data): 01846 return FindServersOnNetworkResponse(data) 01847 01848 def _binary_init(self, data): 01849 self.TypeId = NodeId.from_binary(data) 01850 self.ResponseHeader = ResponseHeader.from_binary(data) 01851 self.Parameters = FindServersOnNetworkResult.from_binary(data) 01852 01853 def __str__(self): 01854 return 'FindServersOnNetworkResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 01855 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 01856 'Parameters:' + str(self.Parameters) + ')' 01857 01858 __repr__ = __str__ 01859 01860 01861 class UserTokenPolicy(FrozenClass): 01862 ''' 01863 Describes a user token that can be used with a server. 01864 01865 :ivar PolicyId: 01866 :vartype PolicyId: String 01867 :ivar TokenType: 01868 :vartype TokenType: UserTokenType 01869 :ivar IssuedTokenType: 01870 :vartype IssuedTokenType: String 01871 :ivar IssuerEndpointUrl: 01872 :vartype IssuerEndpointUrl: String 01873 :ivar SecurityPolicyUri: 01874 :vartype SecurityPolicyUri: String 01875 ''' 01876 01877 ua_types = { 01878 'PolicyId': 'String', 01879 'TokenType': 'UserTokenType', 01880 'IssuedTokenType': 'String', 01881 'IssuerEndpointUrl': 'String', 01882 'SecurityPolicyUri': 'String', 01883 } 01884 01885 def __init__(self, binary=None): 01886 if binary is not None: 01887 self._binary_init(binary) 01888 self._freeze = True 01889 return 01890 self.PolicyId = None 01891 self.TokenType = UserTokenType(0) 01892 self.IssuedTokenType = None 01893 self.IssuerEndpointUrl = None 01894 self.SecurityPolicyUri = None 01895 self._freeze = True 01896 01897 def to_binary(self): 01898 packet = [] 01899 packet.append(uabin.Primitives.String.pack(self.PolicyId)) 01900 packet.append(uabin.Primitives.UInt32.pack(self.TokenType.value)) 01901 packet.append(uabin.Primitives.String.pack(self.IssuedTokenType)) 01902 packet.append(uabin.Primitives.String.pack(self.IssuerEndpointUrl)) 01903 packet.append(uabin.Primitives.String.pack(self.SecurityPolicyUri)) 01904 return b''.join(packet) 01905 01906 @staticmethod 01907 def from_binary(data): 01908 return UserTokenPolicy(data) 01909 01910 def _binary_init(self, data): 01911 self.PolicyId = uabin.Primitives.String.unpack(data) 01912 self.TokenType = UserTokenType(uabin.Primitives.UInt32.unpack(data)) 01913 self.IssuedTokenType = uabin.Primitives.String.unpack(data) 01914 self.IssuerEndpointUrl = uabin.Primitives.String.unpack(data) 01915 self.SecurityPolicyUri = uabin.Primitives.String.unpack(data) 01916 01917 def __str__(self): 01918 return 'UserTokenPolicy(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \ 01919 'TokenType:' + str(self.TokenType) + ', ' + \ 01920 'IssuedTokenType:' + str(self.IssuedTokenType) + ', ' + \ 01921 'IssuerEndpointUrl:' + str(self.IssuerEndpointUrl) + ', ' + \ 01922 'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ')' 01923 01924 __repr__ = __str__ 01925 01926 01927 class EndpointDescription(FrozenClass): 01928 ''' 01929 The description of a endpoint that can be used to access a server. 01930 01931 :ivar EndpointUrl: 01932 :vartype EndpointUrl: String 01933 :ivar Server: 01934 :vartype Server: ApplicationDescription 01935 :ivar ServerCertificate: 01936 :vartype ServerCertificate: ByteString 01937 :ivar SecurityMode: 01938 :vartype SecurityMode: MessageSecurityMode 01939 :ivar SecurityPolicyUri: 01940 :vartype SecurityPolicyUri: String 01941 :ivar UserIdentityTokens: 01942 :vartype UserIdentityTokens: UserTokenPolicy 01943 :ivar TransportProfileUri: 01944 :vartype TransportProfileUri: String 01945 :ivar SecurityLevel: 01946 :vartype SecurityLevel: Byte 01947 ''' 01948 01949 ua_types = { 01950 'EndpointUrl': 'String', 01951 'Server': 'ApplicationDescription', 01952 'ServerCertificate': 'ByteString', 01953 'SecurityMode': 'MessageSecurityMode', 01954 'SecurityPolicyUri': 'String', 01955 'UserIdentityTokens': 'UserTokenPolicy', 01956 'TransportProfileUri': 'String', 01957 'SecurityLevel': 'Byte', 01958 } 01959 01960 def __init__(self, binary=None): 01961 if binary is not None: 01962 self._binary_init(binary) 01963 self._freeze = True 01964 return 01965 self.EndpointUrl = None 01966 self.Server = ApplicationDescription() 01967 self.ServerCertificate = None 01968 self.SecurityMode = MessageSecurityMode(0) 01969 self.SecurityPolicyUri = None 01970 self.UserIdentityTokens = [] 01971 self.TransportProfileUri = None 01972 self.SecurityLevel = 0 01973 self._freeze = True 01974 01975 def to_binary(self): 01976 packet = [] 01977 packet.append(uabin.Primitives.String.pack(self.EndpointUrl)) 01978 packet.append(self.Server.to_binary()) 01979 packet.append(uabin.Primitives.ByteString.pack(self.ServerCertificate)) 01980 packet.append(uabin.Primitives.UInt32.pack(self.SecurityMode.value)) 01981 packet.append(uabin.Primitives.String.pack(self.SecurityPolicyUri)) 01982 packet.append(uabin.Primitives.Int32.pack(len(self.UserIdentityTokens))) 01983 for fieldname in self.UserIdentityTokens: 01984 packet.append(fieldname.to_binary()) 01985 packet.append(uabin.Primitives.String.pack(self.TransportProfileUri)) 01986 packet.append(uabin.Primitives.Byte.pack(self.SecurityLevel)) 01987 return b''.join(packet) 01988 01989 @staticmethod 01990 def from_binary(data): 01991 return EndpointDescription(data) 01992 01993 def _binary_init(self, data): 01994 self.EndpointUrl = uabin.Primitives.String.unpack(data) 01995 self.Server = ApplicationDescription.from_binary(data) 01996 self.ServerCertificate = uabin.Primitives.ByteString.unpack(data) 01997 self.SecurityMode = MessageSecurityMode(uabin.Primitives.UInt32.unpack(data)) 01998 self.SecurityPolicyUri = uabin.Primitives.String.unpack(data) 01999 length = uabin.Primitives.Int32.unpack(data) 02000 array = [] 02001 if length != -1: 02002 for _ in range(0, length): 02003 array.append(UserTokenPolicy.from_binary(data)) 02004 self.UserIdentityTokens = array 02005 self.TransportProfileUri = uabin.Primitives.String.unpack(data) 02006 self.SecurityLevel = uabin.Primitives.Byte.unpack(data) 02007 02008 def __str__(self): 02009 return 'EndpointDescription(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \ 02010 'Server:' + str(self.Server) + ', ' + \ 02011 'ServerCertificate:' + str(self.ServerCertificate) + ', ' + \ 02012 'SecurityMode:' + str(self.SecurityMode) + ', ' + \ 02013 'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ', ' + \ 02014 'UserIdentityTokens:' + str(self.UserIdentityTokens) + ', ' + \ 02015 'TransportProfileUri:' + str(self.TransportProfileUri) + ', ' + \ 02016 'SecurityLevel:' + str(self.SecurityLevel) + ')' 02017 02018 __repr__ = __str__ 02019 02020 02021 class GetEndpointsParameters(FrozenClass): 02022 ''' 02023 :ivar EndpointUrl: 02024 :vartype EndpointUrl: String 02025 :ivar LocaleIds: 02026 :vartype LocaleIds: String 02027 :ivar ProfileUris: 02028 :vartype ProfileUris: String 02029 ''' 02030 02031 ua_types = { 02032 'EndpointUrl': 'String', 02033 'LocaleIds': 'String', 02034 'ProfileUris': 'String', 02035 } 02036 02037 def __init__(self, binary=None): 02038 if binary is not None: 02039 self._binary_init(binary) 02040 self._freeze = True 02041 return 02042 self.EndpointUrl = None 02043 self.LocaleIds = [] 02044 self.ProfileUris = [] 02045 self._freeze = True 02046 02047 def to_binary(self): 02048 packet = [] 02049 packet.append(uabin.Primitives.String.pack(self.EndpointUrl)) 02050 packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds))) 02051 for fieldname in self.LocaleIds: 02052 packet.append(uabin.Primitives.String.pack(fieldname)) 02053 packet.append(uabin.Primitives.Int32.pack(len(self.ProfileUris))) 02054 for fieldname in self.ProfileUris: 02055 packet.append(uabin.Primitives.String.pack(fieldname)) 02056 return b''.join(packet) 02057 02058 @staticmethod 02059 def from_binary(data): 02060 return GetEndpointsParameters(data) 02061 02062 def _binary_init(self, data): 02063 self.EndpointUrl = uabin.Primitives.String.unpack(data) 02064 self.LocaleIds = uabin.Primitives.String.unpack_array(data) 02065 self.ProfileUris = uabin.Primitives.String.unpack_array(data) 02066 02067 def __str__(self): 02068 return 'GetEndpointsParameters(' + 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \ 02069 'LocaleIds:' + str(self.LocaleIds) + ', ' + \ 02070 'ProfileUris:' + str(self.ProfileUris) + ')' 02071 02072 __repr__ = __str__ 02073 02074 02075 class GetEndpointsRequest(FrozenClass): 02076 ''' 02077 Gets the endpoints used by the server. 02078 02079 :ivar TypeId: 02080 :vartype TypeId: NodeId 02081 :ivar RequestHeader: 02082 :vartype RequestHeader: RequestHeader 02083 :ivar Parameters: 02084 :vartype Parameters: GetEndpointsParameters 02085 ''' 02086 02087 ua_types = { 02088 'TypeId': 'NodeId', 02089 'RequestHeader': 'RequestHeader', 02090 'Parameters': 'GetEndpointsParameters', 02091 } 02092 02093 def __init__(self, binary=None): 02094 if binary is not None: 02095 self._binary_init(binary) 02096 self._freeze = True 02097 return 02098 self.TypeId = FourByteNodeId(ObjectIds.GetEndpointsRequest_Encoding_DefaultBinary) 02099 self.RequestHeader = RequestHeader() 02100 self.Parameters = GetEndpointsParameters() 02101 self._freeze = True 02102 02103 def to_binary(self): 02104 packet = [] 02105 packet.append(self.TypeId.to_binary()) 02106 packet.append(self.RequestHeader.to_binary()) 02107 packet.append(self.Parameters.to_binary()) 02108 return b''.join(packet) 02109 02110 @staticmethod 02111 def from_binary(data): 02112 return GetEndpointsRequest(data) 02113 02114 def _binary_init(self, data): 02115 self.TypeId = NodeId.from_binary(data) 02116 self.RequestHeader = RequestHeader.from_binary(data) 02117 self.Parameters = GetEndpointsParameters.from_binary(data) 02118 02119 def __str__(self): 02120 return 'GetEndpointsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 02121 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 02122 'Parameters:' + str(self.Parameters) + ')' 02123 02124 __repr__ = __str__ 02125 02126 02127 class GetEndpointsResponse(FrozenClass): 02128 ''' 02129 Gets the endpoints used by the server. 02130 02131 :ivar TypeId: 02132 :vartype TypeId: NodeId 02133 :ivar ResponseHeader: 02134 :vartype ResponseHeader: ResponseHeader 02135 :ivar Endpoints: 02136 :vartype Endpoints: EndpointDescription 02137 ''' 02138 02139 ua_types = { 02140 'TypeId': 'NodeId', 02141 'ResponseHeader': 'ResponseHeader', 02142 'Endpoints': 'EndpointDescription', 02143 } 02144 02145 def __init__(self, binary=None): 02146 if binary is not None: 02147 self._binary_init(binary) 02148 self._freeze = True 02149 return 02150 self.TypeId = FourByteNodeId(ObjectIds.GetEndpointsResponse_Encoding_DefaultBinary) 02151 self.ResponseHeader = ResponseHeader() 02152 self.Endpoints = [] 02153 self._freeze = True 02154 02155 def to_binary(self): 02156 packet = [] 02157 packet.append(self.TypeId.to_binary()) 02158 packet.append(self.ResponseHeader.to_binary()) 02159 packet.append(uabin.Primitives.Int32.pack(len(self.Endpoints))) 02160 for fieldname in self.Endpoints: 02161 packet.append(fieldname.to_binary()) 02162 return b''.join(packet) 02163 02164 @staticmethod 02165 def from_binary(data): 02166 return GetEndpointsResponse(data) 02167 02168 def _binary_init(self, data): 02169 self.TypeId = NodeId.from_binary(data) 02170 self.ResponseHeader = ResponseHeader.from_binary(data) 02171 length = uabin.Primitives.Int32.unpack(data) 02172 array = [] 02173 if length != -1: 02174 for _ in range(0, length): 02175 array.append(EndpointDescription.from_binary(data)) 02176 self.Endpoints = array 02177 02178 def __str__(self): 02179 return 'GetEndpointsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 02180 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 02181 'Endpoints:' + str(self.Endpoints) + ')' 02182 02183 __repr__ = __str__ 02184 02185 02186 class RegisteredServer(FrozenClass): 02187 ''' 02188 The information required to register a server with a discovery server. 02189 02190 :ivar ServerUri: 02191 :vartype ServerUri: String 02192 :ivar ProductUri: 02193 :vartype ProductUri: String 02194 :ivar ServerNames: 02195 :vartype ServerNames: LocalizedText 02196 :ivar ServerType: 02197 :vartype ServerType: ApplicationType 02198 :ivar GatewayServerUri: 02199 :vartype GatewayServerUri: String 02200 :ivar DiscoveryUrls: 02201 :vartype DiscoveryUrls: String 02202 :ivar SemaphoreFilePath: 02203 :vartype SemaphoreFilePath: String 02204 :ivar IsOnline: 02205 :vartype IsOnline: Boolean 02206 ''' 02207 02208 ua_types = { 02209 'ServerUri': 'String', 02210 'ProductUri': 'String', 02211 'ServerNames': 'LocalizedText', 02212 'ServerType': 'ApplicationType', 02213 'GatewayServerUri': 'String', 02214 'DiscoveryUrls': 'String', 02215 'SemaphoreFilePath': 'String', 02216 'IsOnline': 'Boolean', 02217 } 02218 02219 def __init__(self, binary=None): 02220 if binary is not None: 02221 self._binary_init(binary) 02222 self._freeze = True 02223 return 02224 self.ServerUri = None 02225 self.ProductUri = None 02226 self.ServerNames = [] 02227 self.ServerType = ApplicationType(0) 02228 self.GatewayServerUri = None 02229 self.DiscoveryUrls = [] 02230 self.SemaphoreFilePath = None 02231 self.IsOnline = True 02232 self._freeze = True 02233 02234 def to_binary(self): 02235 packet = [] 02236 packet.append(uabin.Primitives.String.pack(self.ServerUri)) 02237 packet.append(uabin.Primitives.String.pack(self.ProductUri)) 02238 packet.append(uabin.Primitives.Int32.pack(len(self.ServerNames))) 02239 for fieldname in self.ServerNames: 02240 packet.append(fieldname.to_binary()) 02241 packet.append(uabin.Primitives.UInt32.pack(self.ServerType.value)) 02242 packet.append(uabin.Primitives.String.pack(self.GatewayServerUri)) 02243 packet.append(uabin.Primitives.Int32.pack(len(self.DiscoveryUrls))) 02244 for fieldname in self.DiscoveryUrls: 02245 packet.append(uabin.Primitives.String.pack(fieldname)) 02246 packet.append(uabin.Primitives.String.pack(self.SemaphoreFilePath)) 02247 packet.append(uabin.Primitives.Boolean.pack(self.IsOnline)) 02248 return b''.join(packet) 02249 02250 @staticmethod 02251 def from_binary(data): 02252 return RegisteredServer(data) 02253 02254 def _binary_init(self, data): 02255 self.ServerUri = uabin.Primitives.String.unpack(data) 02256 self.ProductUri = uabin.Primitives.String.unpack(data) 02257 length = uabin.Primitives.Int32.unpack(data) 02258 array = [] 02259 if length != -1: 02260 for _ in range(0, length): 02261 array.append(LocalizedText.from_binary(data)) 02262 self.ServerNames = array 02263 self.ServerType = ApplicationType(uabin.Primitives.UInt32.unpack(data)) 02264 self.GatewayServerUri = uabin.Primitives.String.unpack(data) 02265 self.DiscoveryUrls = uabin.Primitives.String.unpack_array(data) 02266 self.SemaphoreFilePath = uabin.Primitives.String.unpack(data) 02267 self.IsOnline = uabin.Primitives.Boolean.unpack(data) 02268 02269 def __str__(self): 02270 return 'RegisteredServer(' + 'ServerUri:' + str(self.ServerUri) + ', ' + \ 02271 'ProductUri:' + str(self.ProductUri) + ', ' + \ 02272 'ServerNames:' + str(self.ServerNames) + ', ' + \ 02273 'ServerType:' + str(self.ServerType) + ', ' + \ 02274 'GatewayServerUri:' + str(self.GatewayServerUri) + ', ' + \ 02275 'DiscoveryUrls:' + str(self.DiscoveryUrls) + ', ' + \ 02276 'SemaphoreFilePath:' + str(self.SemaphoreFilePath) + ', ' + \ 02277 'IsOnline:' + str(self.IsOnline) + ')' 02278 02279 __repr__ = __str__ 02280 02281 02282 class RegisterServerRequest(FrozenClass): 02283 ''' 02284 Registers a server with the discovery server. 02285 02286 :ivar TypeId: 02287 :vartype TypeId: NodeId 02288 :ivar RequestHeader: 02289 :vartype RequestHeader: RequestHeader 02290 :ivar Server: 02291 :vartype Server: RegisteredServer 02292 ''' 02293 02294 ua_types = { 02295 'TypeId': 'NodeId', 02296 'RequestHeader': 'RequestHeader', 02297 'Server': 'RegisteredServer', 02298 } 02299 02300 def __init__(self, binary=None): 02301 if binary is not None: 02302 self._binary_init(binary) 02303 self._freeze = True 02304 return 02305 self.TypeId = FourByteNodeId(ObjectIds.RegisterServerRequest_Encoding_DefaultBinary) 02306 self.RequestHeader = RequestHeader() 02307 self.Server = RegisteredServer() 02308 self._freeze = True 02309 02310 def to_binary(self): 02311 packet = [] 02312 packet.append(self.TypeId.to_binary()) 02313 packet.append(self.RequestHeader.to_binary()) 02314 packet.append(self.Server.to_binary()) 02315 return b''.join(packet) 02316 02317 @staticmethod 02318 def from_binary(data): 02319 return RegisterServerRequest(data) 02320 02321 def _binary_init(self, data): 02322 self.TypeId = NodeId.from_binary(data) 02323 self.RequestHeader = RequestHeader.from_binary(data) 02324 self.Server = RegisteredServer.from_binary(data) 02325 02326 def __str__(self): 02327 return 'RegisterServerRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 02328 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 02329 'Server:' + str(self.Server) + ')' 02330 02331 __repr__ = __str__ 02332 02333 02334 class RegisterServerResponse(FrozenClass): 02335 ''' 02336 Registers a server with the discovery server. 02337 02338 :ivar TypeId: 02339 :vartype TypeId: NodeId 02340 :ivar ResponseHeader: 02341 :vartype ResponseHeader: ResponseHeader 02342 ''' 02343 02344 ua_types = { 02345 'TypeId': 'NodeId', 02346 'ResponseHeader': 'ResponseHeader', 02347 } 02348 02349 def __init__(self, binary=None): 02350 if binary is not None: 02351 self._binary_init(binary) 02352 self._freeze = True 02353 return 02354 self.TypeId = FourByteNodeId(ObjectIds.RegisterServerResponse_Encoding_DefaultBinary) 02355 self.ResponseHeader = ResponseHeader() 02356 self._freeze = True 02357 02358 def to_binary(self): 02359 packet = [] 02360 packet.append(self.TypeId.to_binary()) 02361 packet.append(self.ResponseHeader.to_binary()) 02362 return b''.join(packet) 02363 02364 @staticmethod 02365 def from_binary(data): 02366 return RegisterServerResponse(data) 02367 02368 def _binary_init(self, data): 02369 self.TypeId = NodeId.from_binary(data) 02370 self.ResponseHeader = ResponseHeader.from_binary(data) 02371 02372 def __str__(self): 02373 return 'RegisterServerResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 02374 'ResponseHeader:' + str(self.ResponseHeader) + ')' 02375 02376 __repr__ = __str__ 02377 02378 02379 class DiscoveryConfiguration(FrozenClass): 02380 ''' 02381 A base type for discovery configuration information. 02382 02383 ''' 02384 02385 ua_types = { 02386 } 02387 02388 def __init__(self, binary=None): 02389 if binary is not None: 02390 self._binary_init(binary) 02391 self._freeze = True 02392 return 02393 self._freeze = True 02394 02395 def to_binary(self): 02396 packet = [] 02397 return b''.join(packet) 02398 02399 @staticmethod 02400 def from_binary(data): 02401 return DiscoveryConfiguration(data) 02402 02403 def _binary_init(self, data): 02404 pass 02405 02406 def __str__(self): 02407 return 'DiscoveryConfiguration(' + + ')' 02408 02409 __repr__ = __str__ 02410 02411 02412 class MdnsDiscoveryConfiguration(FrozenClass): 02413 ''' 02414 The discovery information needed for mDNS registration. 02415 02416 :ivar MdnsServerName: 02417 :vartype MdnsServerName: String 02418 :ivar ServerCapabilities: 02419 :vartype ServerCapabilities: String 02420 ''' 02421 02422 ua_types = { 02423 'MdnsServerName': 'String', 02424 'ServerCapabilities': 'String', 02425 } 02426 02427 def __init__(self, binary=None): 02428 if binary is not None: 02429 self._binary_init(binary) 02430 self._freeze = True 02431 return 02432 self.MdnsServerName = None 02433 self.ServerCapabilities = [] 02434 self._freeze = True 02435 02436 def to_binary(self): 02437 packet = [] 02438 packet.append(uabin.Primitives.String.pack(self.MdnsServerName)) 02439 packet.append(uabin.Primitives.Int32.pack(len(self.ServerCapabilities))) 02440 for fieldname in self.ServerCapabilities: 02441 packet.append(uabin.Primitives.String.pack(fieldname)) 02442 return b''.join(packet) 02443 02444 @staticmethod 02445 def from_binary(data): 02446 return MdnsDiscoveryConfiguration(data) 02447 02448 def _binary_init(self, data): 02449 self.MdnsServerName = uabin.Primitives.String.unpack(data) 02450 self.ServerCapabilities = uabin.Primitives.String.unpack_array(data) 02451 02452 def __str__(self): 02453 return 'MdnsDiscoveryConfiguration(' + 'MdnsServerName:' + str(self.MdnsServerName) + ', ' + \ 02454 'ServerCapabilities:' + str(self.ServerCapabilities) + ')' 02455 02456 __repr__ = __str__ 02457 02458 02459 class RegisterServer2Parameters(FrozenClass): 02460 ''' 02461 :ivar Server: 02462 :vartype Server: RegisteredServer 02463 :ivar DiscoveryConfiguration: 02464 :vartype DiscoveryConfiguration: ExtensionObject 02465 ''' 02466 02467 ua_types = { 02468 'Server': 'RegisteredServer', 02469 'DiscoveryConfiguration': 'ExtensionObject', 02470 } 02471 02472 def __init__(self, binary=None): 02473 if binary is not None: 02474 self._binary_init(binary) 02475 self._freeze = True 02476 return 02477 self.Server = RegisteredServer() 02478 self.DiscoveryConfiguration = [] 02479 self._freeze = True 02480 02481 def to_binary(self): 02482 packet = [] 02483 packet.append(self.Server.to_binary()) 02484 packet.append(uabin.Primitives.Int32.pack(len(self.DiscoveryConfiguration))) 02485 for fieldname in self.DiscoveryConfiguration: 02486 packet.append(extensionobject_to_binary(fieldname)) 02487 return b''.join(packet) 02488 02489 @staticmethod 02490 def from_binary(data): 02491 return RegisterServer2Parameters(data) 02492 02493 def _binary_init(self, data): 02494 self.Server = RegisteredServer.from_binary(data) 02495 length = uabin.Primitives.Int32.unpack(data) 02496 array = [] 02497 if length != -1: 02498 for _ in range(0, length): 02499 array.append(extensionobject_from_binary(data)) 02500 self.DiscoveryConfiguration = array 02501 02502 def __str__(self): 02503 return 'RegisterServer2Parameters(' + 'Server:' + str(self.Server) + ', ' + \ 02504 'DiscoveryConfiguration:' + str(self.DiscoveryConfiguration) + ')' 02505 02506 __repr__ = __str__ 02507 02508 02509 class RegisterServer2Request(FrozenClass): 02510 ''' 02511 :ivar TypeId: 02512 :vartype TypeId: NodeId 02513 :ivar RequestHeader: 02514 :vartype RequestHeader: RequestHeader 02515 :ivar Parameters: 02516 :vartype Parameters: RegisterServer2Parameters 02517 ''' 02518 02519 ua_types = { 02520 'TypeId': 'NodeId', 02521 'RequestHeader': 'RequestHeader', 02522 'Parameters': 'RegisterServer2Parameters', 02523 } 02524 02525 def __init__(self, binary=None): 02526 if binary is not None: 02527 self._binary_init(binary) 02528 self._freeze = True 02529 return 02530 self.TypeId = FourByteNodeId(ObjectIds.RegisterServer2Request_Encoding_DefaultBinary) 02531 self.RequestHeader = RequestHeader() 02532 self.Parameters = RegisterServer2Parameters() 02533 self._freeze = True 02534 02535 def to_binary(self): 02536 packet = [] 02537 packet.append(self.TypeId.to_binary()) 02538 packet.append(self.RequestHeader.to_binary()) 02539 packet.append(self.Parameters.to_binary()) 02540 return b''.join(packet) 02541 02542 @staticmethod 02543 def from_binary(data): 02544 return RegisterServer2Request(data) 02545 02546 def _binary_init(self, data): 02547 self.TypeId = NodeId.from_binary(data) 02548 self.RequestHeader = RequestHeader.from_binary(data) 02549 self.Parameters = RegisterServer2Parameters.from_binary(data) 02550 02551 def __str__(self): 02552 return 'RegisterServer2Request(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 02553 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 02554 'Parameters:' + str(self.Parameters) + ')' 02555 02556 __repr__ = __str__ 02557 02558 02559 class RegisterServer2Response(FrozenClass): 02560 ''' 02561 :ivar TypeId: 02562 :vartype TypeId: NodeId 02563 :ivar ResponseHeader: 02564 :vartype ResponseHeader: ResponseHeader 02565 :ivar ConfigurationResults: 02566 :vartype ConfigurationResults: StatusCode 02567 :ivar DiagnosticInfos: 02568 :vartype DiagnosticInfos: DiagnosticInfo 02569 ''' 02570 02571 ua_types = { 02572 'TypeId': 'NodeId', 02573 'ResponseHeader': 'ResponseHeader', 02574 'ConfigurationResults': 'StatusCode', 02575 'DiagnosticInfos': 'DiagnosticInfo', 02576 } 02577 02578 def __init__(self, binary=None): 02579 if binary is not None: 02580 self._binary_init(binary) 02581 self._freeze = True 02582 return 02583 self.TypeId = FourByteNodeId(ObjectIds.RegisterServer2Response_Encoding_DefaultBinary) 02584 self.ResponseHeader = ResponseHeader() 02585 self.ConfigurationResults = [] 02586 self.DiagnosticInfos = [] 02587 self._freeze = True 02588 02589 def to_binary(self): 02590 packet = [] 02591 packet.append(self.TypeId.to_binary()) 02592 packet.append(self.ResponseHeader.to_binary()) 02593 packet.append(uabin.Primitives.Int32.pack(len(self.ConfigurationResults))) 02594 for fieldname in self.ConfigurationResults: 02595 packet.append(fieldname.to_binary()) 02596 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 02597 for fieldname in self.DiagnosticInfos: 02598 packet.append(fieldname.to_binary()) 02599 return b''.join(packet) 02600 02601 @staticmethod 02602 def from_binary(data): 02603 return RegisterServer2Response(data) 02604 02605 def _binary_init(self, data): 02606 self.TypeId = NodeId.from_binary(data) 02607 self.ResponseHeader = ResponseHeader.from_binary(data) 02608 length = uabin.Primitives.Int32.unpack(data) 02609 array = [] 02610 if length != -1: 02611 for _ in range(0, length): 02612 array.append(StatusCode.from_binary(data)) 02613 self.ConfigurationResults = array 02614 length = uabin.Primitives.Int32.unpack(data) 02615 array = [] 02616 if length != -1: 02617 for _ in range(0, length): 02618 array.append(DiagnosticInfo.from_binary(data)) 02619 self.DiagnosticInfos = array 02620 02621 def __str__(self): 02622 return 'RegisterServer2Response(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 02623 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 02624 'ConfigurationResults:' + str(self.ConfigurationResults) + ', ' + \ 02625 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 02626 02627 __repr__ = __str__ 02628 02629 02630 class ChannelSecurityToken(FrozenClass): 02631 ''' 02632 The token that identifies a set of keys for an active secure channel. 02633 02634 :ivar ChannelId: 02635 :vartype ChannelId: UInt32 02636 :ivar TokenId: 02637 :vartype TokenId: UInt32 02638 :ivar CreatedAt: 02639 :vartype CreatedAt: DateTime 02640 :ivar RevisedLifetime: 02641 :vartype RevisedLifetime: UInt32 02642 ''' 02643 02644 ua_types = { 02645 'ChannelId': 'UInt32', 02646 'TokenId': 'UInt32', 02647 'CreatedAt': 'DateTime', 02648 'RevisedLifetime': 'UInt32', 02649 } 02650 02651 def __init__(self, binary=None): 02652 if binary is not None: 02653 self._binary_init(binary) 02654 self._freeze = True 02655 return 02656 self.ChannelId = 0 02657 self.TokenId = 0 02658 self.CreatedAt = datetime.now() 02659 self.RevisedLifetime = 0 02660 self._freeze = True 02661 02662 def to_binary(self): 02663 packet = [] 02664 packet.append(uabin.Primitives.UInt32.pack(self.ChannelId)) 02665 packet.append(uabin.Primitives.UInt32.pack(self.TokenId)) 02666 packet.append(uabin.Primitives.DateTime.pack(self.CreatedAt)) 02667 packet.append(uabin.Primitives.UInt32.pack(self.RevisedLifetime)) 02668 return b''.join(packet) 02669 02670 @staticmethod 02671 def from_binary(data): 02672 return ChannelSecurityToken(data) 02673 02674 def _binary_init(self, data): 02675 self.ChannelId = uabin.Primitives.UInt32.unpack(data) 02676 self.TokenId = uabin.Primitives.UInt32.unpack(data) 02677 self.CreatedAt = uabin.Primitives.DateTime.unpack(data) 02678 self.RevisedLifetime = uabin.Primitives.UInt32.unpack(data) 02679 02680 def __str__(self): 02681 return 'ChannelSecurityToken(' + 'ChannelId:' + str(self.ChannelId) + ', ' + \ 02682 'TokenId:' + str(self.TokenId) + ', ' + \ 02683 'CreatedAt:' + str(self.CreatedAt) + ', ' + \ 02684 'RevisedLifetime:' + str(self.RevisedLifetime) + ')' 02685 02686 __repr__ = __str__ 02687 02688 02689 class OpenSecureChannelParameters(FrozenClass): 02690 ''' 02691 :ivar ClientProtocolVersion: 02692 :vartype ClientProtocolVersion: UInt32 02693 :ivar RequestType: 02694 :vartype RequestType: SecurityTokenRequestType 02695 :ivar SecurityMode: 02696 :vartype SecurityMode: MessageSecurityMode 02697 :ivar ClientNonce: 02698 :vartype ClientNonce: ByteString 02699 :ivar RequestedLifetime: 02700 :vartype RequestedLifetime: UInt32 02701 ''' 02702 02703 ua_types = { 02704 'ClientProtocolVersion': 'UInt32', 02705 'RequestType': 'SecurityTokenRequestType', 02706 'SecurityMode': 'MessageSecurityMode', 02707 'ClientNonce': 'ByteString', 02708 'RequestedLifetime': 'UInt32', 02709 } 02710 02711 def __init__(self, binary=None): 02712 if binary is not None: 02713 self._binary_init(binary) 02714 self._freeze = True 02715 return 02716 self.ClientProtocolVersion = 0 02717 self.RequestType = SecurityTokenRequestType(0) 02718 self.SecurityMode = MessageSecurityMode(0) 02719 self.ClientNonce = None 02720 self.RequestedLifetime = 0 02721 self._freeze = True 02722 02723 def to_binary(self): 02724 packet = [] 02725 packet.append(uabin.Primitives.UInt32.pack(self.ClientProtocolVersion)) 02726 packet.append(uabin.Primitives.UInt32.pack(self.RequestType.value)) 02727 packet.append(uabin.Primitives.UInt32.pack(self.SecurityMode.value)) 02728 packet.append(uabin.Primitives.ByteString.pack(self.ClientNonce)) 02729 packet.append(uabin.Primitives.UInt32.pack(self.RequestedLifetime)) 02730 return b''.join(packet) 02731 02732 @staticmethod 02733 def from_binary(data): 02734 return OpenSecureChannelParameters(data) 02735 02736 def _binary_init(self, data): 02737 self.ClientProtocolVersion = uabin.Primitives.UInt32.unpack(data) 02738 self.RequestType = SecurityTokenRequestType(uabin.Primitives.UInt32.unpack(data)) 02739 self.SecurityMode = MessageSecurityMode(uabin.Primitives.UInt32.unpack(data)) 02740 self.ClientNonce = uabin.Primitives.ByteString.unpack(data) 02741 self.RequestedLifetime = uabin.Primitives.UInt32.unpack(data) 02742 02743 def __str__(self): 02744 return 'OpenSecureChannelParameters(' + 'ClientProtocolVersion:' + str(self.ClientProtocolVersion) + ', ' + \ 02745 'RequestType:' + str(self.RequestType) + ', ' + \ 02746 'SecurityMode:' + str(self.SecurityMode) + ', ' + \ 02747 'ClientNonce:' + str(self.ClientNonce) + ', ' + \ 02748 'RequestedLifetime:' + str(self.RequestedLifetime) + ')' 02749 02750 __repr__ = __str__ 02751 02752 02753 class OpenSecureChannelRequest(FrozenClass): 02754 ''' 02755 Creates a secure channel with a server. 02756 02757 :ivar TypeId: 02758 :vartype TypeId: NodeId 02759 :ivar RequestHeader: 02760 :vartype RequestHeader: RequestHeader 02761 :ivar Parameters: 02762 :vartype Parameters: OpenSecureChannelParameters 02763 ''' 02764 02765 ua_types = { 02766 'TypeId': 'NodeId', 02767 'RequestHeader': 'RequestHeader', 02768 'Parameters': 'OpenSecureChannelParameters', 02769 } 02770 02771 def __init__(self, binary=None): 02772 if binary is not None: 02773 self._binary_init(binary) 02774 self._freeze = True 02775 return 02776 self.TypeId = FourByteNodeId(ObjectIds.OpenSecureChannelRequest_Encoding_DefaultBinary) 02777 self.RequestHeader = RequestHeader() 02778 self.Parameters = OpenSecureChannelParameters() 02779 self._freeze = True 02780 02781 def to_binary(self): 02782 packet = [] 02783 packet.append(self.TypeId.to_binary()) 02784 packet.append(self.RequestHeader.to_binary()) 02785 packet.append(self.Parameters.to_binary()) 02786 return b''.join(packet) 02787 02788 @staticmethod 02789 def from_binary(data): 02790 return OpenSecureChannelRequest(data) 02791 02792 def _binary_init(self, data): 02793 self.TypeId = NodeId.from_binary(data) 02794 self.RequestHeader = RequestHeader.from_binary(data) 02795 self.Parameters = OpenSecureChannelParameters.from_binary(data) 02796 02797 def __str__(self): 02798 return 'OpenSecureChannelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 02799 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 02800 'Parameters:' + str(self.Parameters) + ')' 02801 02802 __repr__ = __str__ 02803 02804 02805 class OpenSecureChannelResult(FrozenClass): 02806 ''' 02807 :ivar ServerProtocolVersion: 02808 :vartype ServerProtocolVersion: UInt32 02809 :ivar SecurityToken: 02810 :vartype SecurityToken: ChannelSecurityToken 02811 :ivar ServerNonce: 02812 :vartype ServerNonce: ByteString 02813 ''' 02814 02815 ua_types = { 02816 'ServerProtocolVersion': 'UInt32', 02817 'SecurityToken': 'ChannelSecurityToken', 02818 'ServerNonce': 'ByteString', 02819 } 02820 02821 def __init__(self, binary=None): 02822 if binary is not None: 02823 self._binary_init(binary) 02824 self._freeze = True 02825 return 02826 self.ServerProtocolVersion = 0 02827 self.SecurityToken = ChannelSecurityToken() 02828 self.ServerNonce = None 02829 self._freeze = True 02830 02831 def to_binary(self): 02832 packet = [] 02833 packet.append(uabin.Primitives.UInt32.pack(self.ServerProtocolVersion)) 02834 packet.append(self.SecurityToken.to_binary()) 02835 packet.append(uabin.Primitives.ByteString.pack(self.ServerNonce)) 02836 return b''.join(packet) 02837 02838 @staticmethod 02839 def from_binary(data): 02840 return OpenSecureChannelResult(data) 02841 02842 def _binary_init(self, data): 02843 self.ServerProtocolVersion = uabin.Primitives.UInt32.unpack(data) 02844 self.SecurityToken = ChannelSecurityToken.from_binary(data) 02845 self.ServerNonce = uabin.Primitives.ByteString.unpack(data) 02846 02847 def __str__(self): 02848 return 'OpenSecureChannelResult(' + 'ServerProtocolVersion:' + str(self.ServerProtocolVersion) + ', ' + \ 02849 'SecurityToken:' + str(self.SecurityToken) + ', ' + \ 02850 'ServerNonce:' + str(self.ServerNonce) + ')' 02851 02852 __repr__ = __str__ 02853 02854 02855 class OpenSecureChannelResponse(FrozenClass): 02856 ''' 02857 Creates a secure channel with a server. 02858 02859 :ivar TypeId: 02860 :vartype TypeId: NodeId 02861 :ivar ResponseHeader: 02862 :vartype ResponseHeader: ResponseHeader 02863 :ivar Parameters: 02864 :vartype Parameters: OpenSecureChannelResult 02865 ''' 02866 02867 ua_types = { 02868 'TypeId': 'NodeId', 02869 'ResponseHeader': 'ResponseHeader', 02870 'Parameters': 'OpenSecureChannelResult', 02871 } 02872 02873 def __init__(self, binary=None): 02874 if binary is not None: 02875 self._binary_init(binary) 02876 self._freeze = True 02877 return 02878 self.TypeId = FourByteNodeId(ObjectIds.OpenSecureChannelResponse_Encoding_DefaultBinary) 02879 self.ResponseHeader = ResponseHeader() 02880 self.Parameters = OpenSecureChannelResult() 02881 self._freeze = True 02882 02883 def to_binary(self): 02884 packet = [] 02885 packet.append(self.TypeId.to_binary()) 02886 packet.append(self.ResponseHeader.to_binary()) 02887 packet.append(self.Parameters.to_binary()) 02888 return b''.join(packet) 02889 02890 @staticmethod 02891 def from_binary(data): 02892 return OpenSecureChannelResponse(data) 02893 02894 def _binary_init(self, data): 02895 self.TypeId = NodeId.from_binary(data) 02896 self.ResponseHeader = ResponseHeader.from_binary(data) 02897 self.Parameters = OpenSecureChannelResult.from_binary(data) 02898 02899 def __str__(self): 02900 return 'OpenSecureChannelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 02901 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 02902 'Parameters:' + str(self.Parameters) + ')' 02903 02904 __repr__ = __str__ 02905 02906 02907 class CloseSecureChannelRequest(FrozenClass): 02908 ''' 02909 Closes a secure channel. 02910 02911 :ivar TypeId: 02912 :vartype TypeId: NodeId 02913 :ivar RequestHeader: 02914 :vartype RequestHeader: RequestHeader 02915 ''' 02916 02917 ua_types = { 02918 'TypeId': 'NodeId', 02919 'RequestHeader': 'RequestHeader', 02920 } 02921 02922 def __init__(self, binary=None): 02923 if binary is not None: 02924 self._binary_init(binary) 02925 self._freeze = True 02926 return 02927 self.TypeId = FourByteNodeId(ObjectIds.CloseSecureChannelRequest_Encoding_DefaultBinary) 02928 self.RequestHeader = RequestHeader() 02929 self._freeze = True 02930 02931 def to_binary(self): 02932 packet = [] 02933 packet.append(self.TypeId.to_binary()) 02934 packet.append(self.RequestHeader.to_binary()) 02935 return b''.join(packet) 02936 02937 @staticmethod 02938 def from_binary(data): 02939 return CloseSecureChannelRequest(data) 02940 02941 def _binary_init(self, data): 02942 self.TypeId = NodeId.from_binary(data) 02943 self.RequestHeader = RequestHeader.from_binary(data) 02944 02945 def __str__(self): 02946 return 'CloseSecureChannelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 02947 'RequestHeader:' + str(self.RequestHeader) + ')' 02948 02949 __repr__ = __str__ 02950 02951 02952 class CloseSecureChannelResponse(FrozenClass): 02953 ''' 02954 Closes a secure channel. 02955 02956 :ivar TypeId: 02957 :vartype TypeId: NodeId 02958 :ivar ResponseHeader: 02959 :vartype ResponseHeader: ResponseHeader 02960 ''' 02961 02962 ua_types = { 02963 'TypeId': 'NodeId', 02964 'ResponseHeader': 'ResponseHeader', 02965 } 02966 02967 def __init__(self, binary=None): 02968 if binary is not None: 02969 self._binary_init(binary) 02970 self._freeze = True 02971 return 02972 self.TypeId = FourByteNodeId(ObjectIds.CloseSecureChannelResponse_Encoding_DefaultBinary) 02973 self.ResponseHeader = ResponseHeader() 02974 self._freeze = True 02975 02976 def to_binary(self): 02977 packet = [] 02978 packet.append(self.TypeId.to_binary()) 02979 packet.append(self.ResponseHeader.to_binary()) 02980 return b''.join(packet) 02981 02982 @staticmethod 02983 def from_binary(data): 02984 return CloseSecureChannelResponse(data) 02985 02986 def _binary_init(self, data): 02987 self.TypeId = NodeId.from_binary(data) 02988 self.ResponseHeader = ResponseHeader.from_binary(data) 02989 02990 def __str__(self): 02991 return 'CloseSecureChannelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 02992 'ResponseHeader:' + str(self.ResponseHeader) + ')' 02993 02994 __repr__ = __str__ 02995 02996 02997 class SignedSoftwareCertificate(FrozenClass): 02998 ''' 02999 A software certificate with a digital signature. 03000 03001 :ivar CertificateData: 03002 :vartype CertificateData: ByteString 03003 :ivar Signature: 03004 :vartype Signature: ByteString 03005 ''' 03006 03007 ua_types = { 03008 'CertificateData': 'ByteString', 03009 'Signature': 'ByteString', 03010 } 03011 03012 def __init__(self, binary=None): 03013 if binary is not None: 03014 self._binary_init(binary) 03015 self._freeze = True 03016 return 03017 self.CertificateData = None 03018 self.Signature = None 03019 self._freeze = True 03020 03021 def to_binary(self): 03022 packet = [] 03023 packet.append(uabin.Primitives.ByteString.pack(self.CertificateData)) 03024 packet.append(uabin.Primitives.ByteString.pack(self.Signature)) 03025 return b''.join(packet) 03026 03027 @staticmethod 03028 def from_binary(data): 03029 return SignedSoftwareCertificate(data) 03030 03031 def _binary_init(self, data): 03032 self.CertificateData = uabin.Primitives.ByteString.unpack(data) 03033 self.Signature = uabin.Primitives.ByteString.unpack(data) 03034 03035 def __str__(self): 03036 return 'SignedSoftwareCertificate(' + 'CertificateData:' + str(self.CertificateData) + ', ' + \ 03037 'Signature:' + str(self.Signature) + ')' 03038 03039 __repr__ = __str__ 03040 03041 03042 class SignatureData(FrozenClass): 03043 ''' 03044 A digital signature. 03045 03046 :ivar Algorithm: 03047 :vartype Algorithm: String 03048 :ivar Signature: 03049 :vartype Signature: ByteString 03050 ''' 03051 03052 ua_types = { 03053 'Algorithm': 'String', 03054 'Signature': 'ByteString', 03055 } 03056 03057 def __init__(self, binary=None): 03058 if binary is not None: 03059 self._binary_init(binary) 03060 self._freeze = True 03061 return 03062 self.Algorithm = None 03063 self.Signature = None 03064 self._freeze = True 03065 03066 def to_binary(self): 03067 packet = [] 03068 packet.append(uabin.Primitives.String.pack(self.Algorithm)) 03069 packet.append(uabin.Primitives.ByteString.pack(self.Signature)) 03070 return b''.join(packet) 03071 03072 @staticmethod 03073 def from_binary(data): 03074 return SignatureData(data) 03075 03076 def _binary_init(self, data): 03077 self.Algorithm = uabin.Primitives.String.unpack(data) 03078 self.Signature = uabin.Primitives.ByteString.unpack(data) 03079 03080 def __str__(self): 03081 return 'SignatureData(' + 'Algorithm:' + str(self.Algorithm) + ', ' + \ 03082 'Signature:' + str(self.Signature) + ')' 03083 03084 __repr__ = __str__ 03085 03086 03087 class CreateSessionParameters(FrozenClass): 03088 ''' 03089 :ivar ClientDescription: 03090 :vartype ClientDescription: ApplicationDescription 03091 :ivar ServerUri: 03092 :vartype ServerUri: String 03093 :ivar EndpointUrl: 03094 :vartype EndpointUrl: String 03095 :ivar SessionName: 03096 :vartype SessionName: String 03097 :ivar ClientNonce: 03098 :vartype ClientNonce: ByteString 03099 :ivar ClientCertificate: 03100 :vartype ClientCertificate: ByteString 03101 :ivar RequestedSessionTimeout: 03102 :vartype RequestedSessionTimeout: Double 03103 :ivar MaxResponseMessageSize: 03104 :vartype MaxResponseMessageSize: UInt32 03105 ''' 03106 03107 ua_types = { 03108 'ClientDescription': 'ApplicationDescription', 03109 'ServerUri': 'String', 03110 'EndpointUrl': 'String', 03111 'SessionName': 'String', 03112 'ClientNonce': 'ByteString', 03113 'ClientCertificate': 'ByteString', 03114 'RequestedSessionTimeout': 'Double', 03115 'MaxResponseMessageSize': 'UInt32', 03116 } 03117 03118 def __init__(self, binary=None): 03119 if binary is not None: 03120 self._binary_init(binary) 03121 self._freeze = True 03122 return 03123 self.ClientDescription = ApplicationDescription() 03124 self.ServerUri = None 03125 self.EndpointUrl = None 03126 self.SessionName = None 03127 self.ClientNonce = None 03128 self.ClientCertificate = None 03129 self.RequestedSessionTimeout = 0 03130 self.MaxResponseMessageSize = 0 03131 self._freeze = True 03132 03133 def to_binary(self): 03134 packet = [] 03135 packet.append(self.ClientDescription.to_binary()) 03136 packet.append(uabin.Primitives.String.pack(self.ServerUri)) 03137 packet.append(uabin.Primitives.String.pack(self.EndpointUrl)) 03138 packet.append(uabin.Primitives.String.pack(self.SessionName)) 03139 packet.append(uabin.Primitives.ByteString.pack(self.ClientNonce)) 03140 packet.append(uabin.Primitives.ByteString.pack(self.ClientCertificate)) 03141 packet.append(uabin.Primitives.Double.pack(self.RequestedSessionTimeout)) 03142 packet.append(uabin.Primitives.UInt32.pack(self.MaxResponseMessageSize)) 03143 return b''.join(packet) 03144 03145 @staticmethod 03146 def from_binary(data): 03147 return CreateSessionParameters(data) 03148 03149 def _binary_init(self, data): 03150 self.ClientDescription = ApplicationDescription.from_binary(data) 03151 self.ServerUri = uabin.Primitives.String.unpack(data) 03152 self.EndpointUrl = uabin.Primitives.String.unpack(data) 03153 self.SessionName = uabin.Primitives.String.unpack(data) 03154 self.ClientNonce = uabin.Primitives.ByteString.unpack(data) 03155 self.ClientCertificate = uabin.Primitives.ByteString.unpack(data) 03156 self.RequestedSessionTimeout = uabin.Primitives.Double.unpack(data) 03157 self.MaxResponseMessageSize = uabin.Primitives.UInt32.unpack(data) 03158 03159 def __str__(self): 03160 return 'CreateSessionParameters(' + 'ClientDescription:' + str(self.ClientDescription) + ', ' + \ 03161 'ServerUri:' + str(self.ServerUri) + ', ' + \ 03162 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \ 03163 'SessionName:' + str(self.SessionName) + ', ' + \ 03164 'ClientNonce:' + str(self.ClientNonce) + ', ' + \ 03165 'ClientCertificate:' + str(self.ClientCertificate) + ', ' + \ 03166 'RequestedSessionTimeout:' + str(self.RequestedSessionTimeout) + ', ' + \ 03167 'MaxResponseMessageSize:' + str(self.MaxResponseMessageSize) + ')' 03168 03169 __repr__ = __str__ 03170 03171 03172 class CreateSessionRequest(FrozenClass): 03173 ''' 03174 Creates a new session with the server. 03175 03176 :ivar TypeId: 03177 :vartype TypeId: NodeId 03178 :ivar RequestHeader: 03179 :vartype RequestHeader: RequestHeader 03180 :ivar Parameters: 03181 :vartype Parameters: CreateSessionParameters 03182 ''' 03183 03184 ua_types = { 03185 'TypeId': 'NodeId', 03186 'RequestHeader': 'RequestHeader', 03187 'Parameters': 'CreateSessionParameters', 03188 } 03189 03190 def __init__(self, binary=None): 03191 if binary is not None: 03192 self._binary_init(binary) 03193 self._freeze = True 03194 return 03195 self.TypeId = FourByteNodeId(ObjectIds.CreateSessionRequest_Encoding_DefaultBinary) 03196 self.RequestHeader = RequestHeader() 03197 self.Parameters = CreateSessionParameters() 03198 self._freeze = True 03199 03200 def to_binary(self): 03201 packet = [] 03202 packet.append(self.TypeId.to_binary()) 03203 packet.append(self.RequestHeader.to_binary()) 03204 packet.append(self.Parameters.to_binary()) 03205 return b''.join(packet) 03206 03207 @staticmethod 03208 def from_binary(data): 03209 return CreateSessionRequest(data) 03210 03211 def _binary_init(self, data): 03212 self.TypeId = NodeId.from_binary(data) 03213 self.RequestHeader = RequestHeader.from_binary(data) 03214 self.Parameters = CreateSessionParameters.from_binary(data) 03215 03216 def __str__(self): 03217 return 'CreateSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 03218 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 03219 'Parameters:' + str(self.Parameters) + ')' 03220 03221 __repr__ = __str__ 03222 03223 03224 class CreateSessionResult(FrozenClass): 03225 ''' 03226 :ivar SessionId: 03227 :vartype SessionId: NodeId 03228 :ivar AuthenticationToken: 03229 :vartype AuthenticationToken: NodeId 03230 :ivar RevisedSessionTimeout: 03231 :vartype RevisedSessionTimeout: Double 03232 :ivar ServerNonce: 03233 :vartype ServerNonce: ByteString 03234 :ivar ServerCertificate: 03235 :vartype ServerCertificate: ByteString 03236 :ivar ServerEndpoints: 03237 :vartype ServerEndpoints: EndpointDescription 03238 :ivar ServerSoftwareCertificates: 03239 :vartype ServerSoftwareCertificates: SignedSoftwareCertificate 03240 :ivar ServerSignature: 03241 :vartype ServerSignature: SignatureData 03242 :ivar MaxRequestMessageSize: 03243 :vartype MaxRequestMessageSize: UInt32 03244 ''' 03245 03246 ua_types = { 03247 'SessionId': 'NodeId', 03248 'AuthenticationToken': 'NodeId', 03249 'RevisedSessionTimeout': 'Double', 03250 'ServerNonce': 'ByteString', 03251 'ServerCertificate': 'ByteString', 03252 'ServerEndpoints': 'EndpointDescription', 03253 'ServerSoftwareCertificates': 'SignedSoftwareCertificate', 03254 'ServerSignature': 'SignatureData', 03255 'MaxRequestMessageSize': 'UInt32', 03256 } 03257 03258 def __init__(self, binary=None): 03259 if binary is not None: 03260 self._binary_init(binary) 03261 self._freeze = True 03262 return 03263 self.SessionId = NodeId() 03264 self.AuthenticationToken = NodeId() 03265 self.RevisedSessionTimeout = 0 03266 self.ServerNonce = None 03267 self.ServerCertificate = None 03268 self.ServerEndpoints = [] 03269 self.ServerSoftwareCertificates = [] 03270 self.ServerSignature = SignatureData() 03271 self.MaxRequestMessageSize = 0 03272 self._freeze = True 03273 03274 def to_binary(self): 03275 packet = [] 03276 packet.append(self.SessionId.to_binary()) 03277 packet.append(self.AuthenticationToken.to_binary()) 03278 packet.append(uabin.Primitives.Double.pack(self.RevisedSessionTimeout)) 03279 packet.append(uabin.Primitives.ByteString.pack(self.ServerNonce)) 03280 packet.append(uabin.Primitives.ByteString.pack(self.ServerCertificate)) 03281 packet.append(uabin.Primitives.Int32.pack(len(self.ServerEndpoints))) 03282 for fieldname in self.ServerEndpoints: 03283 packet.append(fieldname.to_binary()) 03284 packet.append(uabin.Primitives.Int32.pack(len(self.ServerSoftwareCertificates))) 03285 for fieldname in self.ServerSoftwareCertificates: 03286 packet.append(fieldname.to_binary()) 03287 packet.append(self.ServerSignature.to_binary()) 03288 packet.append(uabin.Primitives.UInt32.pack(self.MaxRequestMessageSize)) 03289 return b''.join(packet) 03290 03291 @staticmethod 03292 def from_binary(data): 03293 return CreateSessionResult(data) 03294 03295 def _binary_init(self, data): 03296 self.SessionId = NodeId.from_binary(data) 03297 self.AuthenticationToken = NodeId.from_binary(data) 03298 self.RevisedSessionTimeout = uabin.Primitives.Double.unpack(data) 03299 self.ServerNonce = uabin.Primitives.ByteString.unpack(data) 03300 self.ServerCertificate = uabin.Primitives.ByteString.unpack(data) 03301 length = uabin.Primitives.Int32.unpack(data) 03302 array = [] 03303 if length != -1: 03304 for _ in range(0, length): 03305 array.append(EndpointDescription.from_binary(data)) 03306 self.ServerEndpoints = array 03307 length = uabin.Primitives.Int32.unpack(data) 03308 array = [] 03309 if length != -1: 03310 for _ in range(0, length): 03311 array.append(SignedSoftwareCertificate.from_binary(data)) 03312 self.ServerSoftwareCertificates = array 03313 self.ServerSignature = SignatureData.from_binary(data) 03314 self.MaxRequestMessageSize = uabin.Primitives.UInt32.unpack(data) 03315 03316 def __str__(self): 03317 return 'CreateSessionResult(' + 'SessionId:' + str(self.SessionId) + ', ' + \ 03318 'AuthenticationToken:' + str(self.AuthenticationToken) + ', ' + \ 03319 'RevisedSessionTimeout:' + str(self.RevisedSessionTimeout) + ', ' + \ 03320 'ServerNonce:' + str(self.ServerNonce) + ', ' + \ 03321 'ServerCertificate:' + str(self.ServerCertificate) + ', ' + \ 03322 'ServerEndpoints:' + str(self.ServerEndpoints) + ', ' + \ 03323 'ServerSoftwareCertificates:' + str(self.ServerSoftwareCertificates) + ', ' + \ 03324 'ServerSignature:' + str(self.ServerSignature) + ', ' + \ 03325 'MaxRequestMessageSize:' + str(self.MaxRequestMessageSize) + ')' 03326 03327 __repr__ = __str__ 03328 03329 03330 class CreateSessionResponse(FrozenClass): 03331 ''' 03332 Creates a new session with the server. 03333 03334 :ivar TypeId: 03335 :vartype TypeId: NodeId 03336 :ivar ResponseHeader: 03337 :vartype ResponseHeader: ResponseHeader 03338 :ivar Parameters: 03339 :vartype Parameters: CreateSessionResult 03340 ''' 03341 03342 ua_types = { 03343 'TypeId': 'NodeId', 03344 'ResponseHeader': 'ResponseHeader', 03345 'Parameters': 'CreateSessionResult', 03346 } 03347 03348 def __init__(self, binary=None): 03349 if binary is not None: 03350 self._binary_init(binary) 03351 self._freeze = True 03352 return 03353 self.TypeId = FourByteNodeId(ObjectIds.CreateSessionResponse_Encoding_DefaultBinary) 03354 self.ResponseHeader = ResponseHeader() 03355 self.Parameters = CreateSessionResult() 03356 self._freeze = True 03357 03358 def to_binary(self): 03359 packet = [] 03360 packet.append(self.TypeId.to_binary()) 03361 packet.append(self.ResponseHeader.to_binary()) 03362 packet.append(self.Parameters.to_binary()) 03363 return b''.join(packet) 03364 03365 @staticmethod 03366 def from_binary(data): 03367 return CreateSessionResponse(data) 03368 03369 def _binary_init(self, data): 03370 self.TypeId = NodeId.from_binary(data) 03371 self.ResponseHeader = ResponseHeader.from_binary(data) 03372 self.Parameters = CreateSessionResult.from_binary(data) 03373 03374 def __str__(self): 03375 return 'CreateSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 03376 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 03377 'Parameters:' + str(self.Parameters) + ')' 03378 03379 __repr__ = __str__ 03380 03381 03382 class UserIdentityToken(FrozenClass): 03383 ''' 03384 A base type for a user identity token. 03385 03386 :ivar PolicyId: 03387 :vartype PolicyId: String 03388 ''' 03389 03390 ua_types = { 03391 'PolicyId': 'String', 03392 } 03393 03394 def __init__(self, binary=None): 03395 if binary is not None: 03396 self._binary_init(binary) 03397 self._freeze = True 03398 return 03399 self.PolicyId = None 03400 self._freeze = True 03401 03402 def to_binary(self): 03403 packet = [] 03404 packet.append(uabin.Primitives.String.pack(self.PolicyId)) 03405 return b''.join(packet) 03406 03407 @staticmethod 03408 def from_binary(data): 03409 return UserIdentityToken(data) 03410 03411 def _binary_init(self, data): 03412 self.PolicyId = uabin.Primitives.String.unpack(data) 03413 03414 def __str__(self): 03415 return 'UserIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ')' 03416 03417 __repr__ = __str__ 03418 03419 03420 class AnonymousIdentityToken(FrozenClass): 03421 ''' 03422 A token representing an anonymous user. 03423 03424 :ivar PolicyId: 03425 :vartype PolicyId: String 03426 ''' 03427 03428 ua_types = { 03429 'PolicyId': 'String', 03430 } 03431 03432 def __init__(self, binary=None): 03433 if binary is not None: 03434 self._binary_init(binary) 03435 self._freeze = True 03436 return 03437 self.PolicyId = None 03438 self._freeze = True 03439 03440 def to_binary(self): 03441 packet = [] 03442 packet.append(uabin.Primitives.String.pack(self.PolicyId)) 03443 return b''.join(packet) 03444 03445 @staticmethod 03446 def from_binary(data): 03447 return AnonymousIdentityToken(data) 03448 03449 def _binary_init(self, data): 03450 self.PolicyId = uabin.Primitives.String.unpack(data) 03451 03452 def __str__(self): 03453 return 'AnonymousIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ')' 03454 03455 __repr__ = __str__ 03456 03457 03458 class UserNameIdentityToken(FrozenClass): 03459 ''' 03460 A token representing a user identified by a user name and password. 03461 03462 :ivar PolicyId: 03463 :vartype PolicyId: String 03464 :ivar UserName: 03465 :vartype UserName: String 03466 :ivar Password: 03467 :vartype Password: ByteString 03468 :ivar EncryptionAlgorithm: 03469 :vartype EncryptionAlgorithm: String 03470 ''' 03471 03472 ua_types = { 03473 'PolicyId': 'String', 03474 'UserName': 'String', 03475 'Password': 'ByteString', 03476 'EncryptionAlgorithm': 'String', 03477 } 03478 03479 def __init__(self, binary=None): 03480 if binary is not None: 03481 self._binary_init(binary) 03482 self._freeze = True 03483 return 03484 self.PolicyId = None 03485 self.UserName = None 03486 self.Password = None 03487 self.EncryptionAlgorithm = None 03488 self._freeze = True 03489 03490 def to_binary(self): 03491 packet = [] 03492 packet.append(uabin.Primitives.String.pack(self.PolicyId)) 03493 packet.append(uabin.Primitives.String.pack(self.UserName)) 03494 packet.append(uabin.Primitives.ByteString.pack(self.Password)) 03495 packet.append(uabin.Primitives.String.pack(self.EncryptionAlgorithm)) 03496 return b''.join(packet) 03497 03498 @staticmethod 03499 def from_binary(data): 03500 return UserNameIdentityToken(data) 03501 03502 def _binary_init(self, data): 03503 self.PolicyId = uabin.Primitives.String.unpack(data) 03504 self.UserName = uabin.Primitives.String.unpack(data) 03505 self.Password = uabin.Primitives.ByteString.unpack(data) 03506 self.EncryptionAlgorithm = uabin.Primitives.String.unpack(data) 03507 03508 def __str__(self): 03509 return 'UserNameIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \ 03510 'UserName:' + str(self.UserName) + ', ' + \ 03511 'Password:' + str(self.Password) + ', ' + \ 03512 'EncryptionAlgorithm:' + str(self.EncryptionAlgorithm) + ')' 03513 03514 __repr__ = __str__ 03515 03516 03517 class X509IdentityToken(FrozenClass): 03518 ''' 03519 A token representing a user identified by an X509 certificate. 03520 03521 :ivar PolicyId: 03522 :vartype PolicyId: String 03523 :ivar CertificateData: 03524 :vartype CertificateData: ByteString 03525 ''' 03526 03527 ua_types = { 03528 'PolicyId': 'String', 03529 'CertificateData': 'ByteString', 03530 } 03531 03532 def __init__(self, binary=None): 03533 if binary is not None: 03534 self._binary_init(binary) 03535 self._freeze = True 03536 return 03537 self.PolicyId = None 03538 self.CertificateData = None 03539 self._freeze = True 03540 03541 def to_binary(self): 03542 packet = [] 03543 packet.append(uabin.Primitives.String.pack(self.PolicyId)) 03544 packet.append(uabin.Primitives.ByteString.pack(self.CertificateData)) 03545 return b''.join(packet) 03546 03547 @staticmethod 03548 def from_binary(data): 03549 return X509IdentityToken(data) 03550 03551 def _binary_init(self, data): 03552 self.PolicyId = uabin.Primitives.String.unpack(data) 03553 self.CertificateData = uabin.Primitives.ByteString.unpack(data) 03554 03555 def __str__(self): 03556 return 'X509IdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \ 03557 'CertificateData:' + str(self.CertificateData) + ')' 03558 03559 __repr__ = __str__ 03560 03561 03562 class KerberosIdentityToken(FrozenClass): 03563 ''' 03564 :ivar PolicyId: 03565 :vartype PolicyId: String 03566 :ivar TicketData: 03567 :vartype TicketData: ByteString 03568 ''' 03569 03570 ua_types = { 03571 'PolicyId': 'String', 03572 'TicketData': 'ByteString', 03573 } 03574 03575 def __init__(self, binary=None): 03576 if binary is not None: 03577 self._binary_init(binary) 03578 self._freeze = True 03579 return 03580 self.PolicyId = None 03581 self.TicketData = None 03582 self._freeze = True 03583 03584 def to_binary(self): 03585 packet = [] 03586 packet.append(uabin.Primitives.String.pack(self.PolicyId)) 03587 packet.append(uabin.Primitives.ByteString.pack(self.TicketData)) 03588 return b''.join(packet) 03589 03590 @staticmethod 03591 def from_binary(data): 03592 return KerberosIdentityToken(data) 03593 03594 def _binary_init(self, data): 03595 self.PolicyId = uabin.Primitives.String.unpack(data) 03596 self.TicketData = uabin.Primitives.ByteString.unpack(data) 03597 03598 def __str__(self): 03599 return 'KerberosIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \ 03600 'TicketData:' + str(self.TicketData) + ')' 03601 03602 __repr__ = __str__ 03603 03604 03605 class IssuedIdentityToken(FrozenClass): 03606 ''' 03607 A token representing a user identified by a WS-Security XML token. 03608 03609 :ivar PolicyId: 03610 :vartype PolicyId: String 03611 :ivar TokenData: 03612 :vartype TokenData: ByteString 03613 :ivar EncryptionAlgorithm: 03614 :vartype EncryptionAlgorithm: String 03615 ''' 03616 03617 ua_types = { 03618 'PolicyId': 'String', 03619 'TokenData': 'ByteString', 03620 'EncryptionAlgorithm': 'String', 03621 } 03622 03623 def __init__(self, binary=None): 03624 if binary is not None: 03625 self._binary_init(binary) 03626 self._freeze = True 03627 return 03628 self.PolicyId = None 03629 self.TokenData = None 03630 self.EncryptionAlgorithm = None 03631 self._freeze = True 03632 03633 def to_binary(self): 03634 packet = [] 03635 packet.append(uabin.Primitives.String.pack(self.PolicyId)) 03636 packet.append(uabin.Primitives.ByteString.pack(self.TokenData)) 03637 packet.append(uabin.Primitives.String.pack(self.EncryptionAlgorithm)) 03638 return b''.join(packet) 03639 03640 @staticmethod 03641 def from_binary(data): 03642 return IssuedIdentityToken(data) 03643 03644 def _binary_init(self, data): 03645 self.PolicyId = uabin.Primitives.String.unpack(data) 03646 self.TokenData = uabin.Primitives.ByteString.unpack(data) 03647 self.EncryptionAlgorithm = uabin.Primitives.String.unpack(data) 03648 03649 def __str__(self): 03650 return 'IssuedIdentityToken(' + 'PolicyId:' + str(self.PolicyId) + ', ' + \ 03651 'TokenData:' + str(self.TokenData) + ', ' + \ 03652 'EncryptionAlgorithm:' + str(self.EncryptionAlgorithm) + ')' 03653 03654 __repr__ = __str__ 03655 03656 03657 class ActivateSessionParameters(FrozenClass): 03658 ''' 03659 :ivar ClientSignature: 03660 :vartype ClientSignature: SignatureData 03661 :ivar ClientSoftwareCertificates: 03662 :vartype ClientSoftwareCertificates: SignedSoftwareCertificate 03663 :ivar LocaleIds: 03664 :vartype LocaleIds: String 03665 :ivar UserIdentityToken: 03666 :vartype UserIdentityToken: ExtensionObject 03667 :ivar UserTokenSignature: 03668 :vartype UserTokenSignature: SignatureData 03669 ''' 03670 03671 ua_types = { 03672 'ClientSignature': 'SignatureData', 03673 'ClientSoftwareCertificates': 'SignedSoftwareCertificate', 03674 'LocaleIds': 'String', 03675 'UserIdentityToken': 'ExtensionObject', 03676 'UserTokenSignature': 'SignatureData', 03677 } 03678 03679 def __init__(self, binary=None): 03680 if binary is not None: 03681 self._binary_init(binary) 03682 self._freeze = True 03683 return 03684 self.ClientSignature = SignatureData() 03685 self.ClientSoftwareCertificates = [] 03686 self.LocaleIds = [] 03687 self.UserIdentityToken = None 03688 self.UserTokenSignature = SignatureData() 03689 self._freeze = True 03690 03691 def to_binary(self): 03692 packet = [] 03693 packet.append(self.ClientSignature.to_binary()) 03694 packet.append(uabin.Primitives.Int32.pack(len(self.ClientSoftwareCertificates))) 03695 for fieldname in self.ClientSoftwareCertificates: 03696 packet.append(fieldname.to_binary()) 03697 packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds))) 03698 for fieldname in self.LocaleIds: 03699 packet.append(uabin.Primitives.String.pack(fieldname)) 03700 packet.append(extensionobject_to_binary(self.UserIdentityToken)) 03701 packet.append(self.UserTokenSignature.to_binary()) 03702 return b''.join(packet) 03703 03704 @staticmethod 03705 def from_binary(data): 03706 return ActivateSessionParameters(data) 03707 03708 def _binary_init(self, data): 03709 self.ClientSignature = SignatureData.from_binary(data) 03710 length = uabin.Primitives.Int32.unpack(data) 03711 array = [] 03712 if length != -1: 03713 for _ in range(0, length): 03714 array.append(SignedSoftwareCertificate.from_binary(data)) 03715 self.ClientSoftwareCertificates = array 03716 self.LocaleIds = uabin.Primitives.String.unpack_array(data) 03717 self.UserIdentityToken = extensionobject_from_binary(data) 03718 self.UserTokenSignature = SignatureData.from_binary(data) 03719 03720 def __str__(self): 03721 return 'ActivateSessionParameters(' + 'ClientSignature:' + str(self.ClientSignature) + ', ' + \ 03722 'ClientSoftwareCertificates:' + str(self.ClientSoftwareCertificates) + ', ' + \ 03723 'LocaleIds:' + str(self.LocaleIds) + ', ' + \ 03724 'UserIdentityToken:' + str(self.UserIdentityToken) + ', ' + \ 03725 'UserTokenSignature:' + str(self.UserTokenSignature) + ')' 03726 03727 __repr__ = __str__ 03728 03729 03730 class ActivateSessionRequest(FrozenClass): 03731 ''' 03732 Activates a session with the server. 03733 03734 :ivar TypeId: 03735 :vartype TypeId: NodeId 03736 :ivar RequestHeader: 03737 :vartype RequestHeader: RequestHeader 03738 :ivar Parameters: 03739 :vartype Parameters: ActivateSessionParameters 03740 ''' 03741 03742 ua_types = { 03743 'TypeId': 'NodeId', 03744 'RequestHeader': 'RequestHeader', 03745 'Parameters': 'ActivateSessionParameters', 03746 } 03747 03748 def __init__(self, binary=None): 03749 if binary is not None: 03750 self._binary_init(binary) 03751 self._freeze = True 03752 return 03753 self.TypeId = FourByteNodeId(ObjectIds.ActivateSessionRequest_Encoding_DefaultBinary) 03754 self.RequestHeader = RequestHeader() 03755 self.Parameters = ActivateSessionParameters() 03756 self._freeze = True 03757 03758 def to_binary(self): 03759 packet = [] 03760 packet.append(self.TypeId.to_binary()) 03761 packet.append(self.RequestHeader.to_binary()) 03762 packet.append(self.Parameters.to_binary()) 03763 return b''.join(packet) 03764 03765 @staticmethod 03766 def from_binary(data): 03767 return ActivateSessionRequest(data) 03768 03769 def _binary_init(self, data): 03770 self.TypeId = NodeId.from_binary(data) 03771 self.RequestHeader = RequestHeader.from_binary(data) 03772 self.Parameters = ActivateSessionParameters.from_binary(data) 03773 03774 def __str__(self): 03775 return 'ActivateSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 03776 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 03777 'Parameters:' + str(self.Parameters) + ')' 03778 03779 __repr__ = __str__ 03780 03781 03782 class ActivateSessionResult(FrozenClass): 03783 ''' 03784 :ivar ServerNonce: 03785 :vartype ServerNonce: ByteString 03786 :ivar Results: 03787 :vartype Results: StatusCode 03788 :ivar DiagnosticInfos: 03789 :vartype DiagnosticInfos: DiagnosticInfo 03790 ''' 03791 03792 ua_types = { 03793 'ServerNonce': 'ByteString', 03794 'Results': 'StatusCode', 03795 'DiagnosticInfos': 'DiagnosticInfo', 03796 } 03797 03798 def __init__(self, binary=None): 03799 if binary is not None: 03800 self._binary_init(binary) 03801 self._freeze = True 03802 return 03803 self.ServerNonce = None 03804 self.Results = [] 03805 self.DiagnosticInfos = [] 03806 self._freeze = True 03807 03808 def to_binary(self): 03809 packet = [] 03810 packet.append(uabin.Primitives.ByteString.pack(self.ServerNonce)) 03811 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 03812 for fieldname in self.Results: 03813 packet.append(fieldname.to_binary()) 03814 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 03815 for fieldname in self.DiagnosticInfos: 03816 packet.append(fieldname.to_binary()) 03817 return b''.join(packet) 03818 03819 @staticmethod 03820 def from_binary(data): 03821 return ActivateSessionResult(data) 03822 03823 def _binary_init(self, data): 03824 self.ServerNonce = uabin.Primitives.ByteString.unpack(data) 03825 length = uabin.Primitives.Int32.unpack(data) 03826 array = [] 03827 if length != -1: 03828 for _ in range(0, length): 03829 array.append(StatusCode.from_binary(data)) 03830 self.Results = array 03831 length = uabin.Primitives.Int32.unpack(data) 03832 array = [] 03833 if length != -1: 03834 for _ in range(0, length): 03835 array.append(DiagnosticInfo.from_binary(data)) 03836 self.DiagnosticInfos = array 03837 03838 def __str__(self): 03839 return 'ActivateSessionResult(' + 'ServerNonce:' + str(self.ServerNonce) + ', ' + \ 03840 'Results:' + str(self.Results) + ', ' + \ 03841 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 03842 03843 __repr__ = __str__ 03844 03845 03846 class ActivateSessionResponse(FrozenClass): 03847 ''' 03848 Activates a session with the server. 03849 03850 :ivar TypeId: 03851 :vartype TypeId: NodeId 03852 :ivar ResponseHeader: 03853 :vartype ResponseHeader: ResponseHeader 03854 :ivar Parameters: 03855 :vartype Parameters: ActivateSessionResult 03856 ''' 03857 03858 ua_types = { 03859 'TypeId': 'NodeId', 03860 'ResponseHeader': 'ResponseHeader', 03861 'Parameters': 'ActivateSessionResult', 03862 } 03863 03864 def __init__(self, binary=None): 03865 if binary is not None: 03866 self._binary_init(binary) 03867 self._freeze = True 03868 return 03869 self.TypeId = FourByteNodeId(ObjectIds.ActivateSessionResponse_Encoding_DefaultBinary) 03870 self.ResponseHeader = ResponseHeader() 03871 self.Parameters = ActivateSessionResult() 03872 self._freeze = True 03873 03874 def to_binary(self): 03875 packet = [] 03876 packet.append(self.TypeId.to_binary()) 03877 packet.append(self.ResponseHeader.to_binary()) 03878 packet.append(self.Parameters.to_binary()) 03879 return b''.join(packet) 03880 03881 @staticmethod 03882 def from_binary(data): 03883 return ActivateSessionResponse(data) 03884 03885 def _binary_init(self, data): 03886 self.TypeId = NodeId.from_binary(data) 03887 self.ResponseHeader = ResponseHeader.from_binary(data) 03888 self.Parameters = ActivateSessionResult.from_binary(data) 03889 03890 def __str__(self): 03891 return 'ActivateSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 03892 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 03893 'Parameters:' + str(self.Parameters) + ')' 03894 03895 __repr__ = __str__ 03896 03897 03898 class CloseSessionRequest(FrozenClass): 03899 ''' 03900 Closes a session with the server. 03901 03902 :ivar TypeId: 03903 :vartype TypeId: NodeId 03904 :ivar RequestHeader: 03905 :vartype RequestHeader: RequestHeader 03906 :ivar DeleteSubscriptions: 03907 :vartype DeleteSubscriptions: Boolean 03908 ''' 03909 03910 ua_types = { 03911 'TypeId': 'NodeId', 03912 'RequestHeader': 'RequestHeader', 03913 'DeleteSubscriptions': 'Boolean', 03914 } 03915 03916 def __init__(self, binary=None): 03917 if binary is not None: 03918 self._binary_init(binary) 03919 self._freeze = True 03920 return 03921 self.TypeId = FourByteNodeId(ObjectIds.CloseSessionRequest_Encoding_DefaultBinary) 03922 self.RequestHeader = RequestHeader() 03923 self.DeleteSubscriptions = True 03924 self._freeze = True 03925 03926 def to_binary(self): 03927 packet = [] 03928 packet.append(self.TypeId.to_binary()) 03929 packet.append(self.RequestHeader.to_binary()) 03930 packet.append(uabin.Primitives.Boolean.pack(self.DeleteSubscriptions)) 03931 return b''.join(packet) 03932 03933 @staticmethod 03934 def from_binary(data): 03935 return CloseSessionRequest(data) 03936 03937 def _binary_init(self, data): 03938 self.TypeId = NodeId.from_binary(data) 03939 self.RequestHeader = RequestHeader.from_binary(data) 03940 self.DeleteSubscriptions = uabin.Primitives.Boolean.unpack(data) 03941 03942 def __str__(self): 03943 return 'CloseSessionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 03944 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 03945 'DeleteSubscriptions:' + str(self.DeleteSubscriptions) + ')' 03946 03947 __repr__ = __str__ 03948 03949 03950 class CloseSessionResponse(FrozenClass): 03951 ''' 03952 Closes a session with the server. 03953 03954 :ivar TypeId: 03955 :vartype TypeId: NodeId 03956 :ivar ResponseHeader: 03957 :vartype ResponseHeader: ResponseHeader 03958 ''' 03959 03960 ua_types = { 03961 'TypeId': 'NodeId', 03962 'ResponseHeader': 'ResponseHeader', 03963 } 03964 03965 def __init__(self, binary=None): 03966 if binary is not None: 03967 self._binary_init(binary) 03968 self._freeze = True 03969 return 03970 self.TypeId = FourByteNodeId(ObjectIds.CloseSessionResponse_Encoding_DefaultBinary) 03971 self.ResponseHeader = ResponseHeader() 03972 self._freeze = True 03973 03974 def to_binary(self): 03975 packet = [] 03976 packet.append(self.TypeId.to_binary()) 03977 packet.append(self.ResponseHeader.to_binary()) 03978 return b''.join(packet) 03979 03980 @staticmethod 03981 def from_binary(data): 03982 return CloseSessionResponse(data) 03983 03984 def _binary_init(self, data): 03985 self.TypeId = NodeId.from_binary(data) 03986 self.ResponseHeader = ResponseHeader.from_binary(data) 03987 03988 def __str__(self): 03989 return 'CloseSessionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 03990 'ResponseHeader:' + str(self.ResponseHeader) + ')' 03991 03992 __repr__ = __str__ 03993 03994 03995 class CancelParameters(FrozenClass): 03996 ''' 03997 :ivar RequestHandle: 03998 :vartype RequestHandle: UInt32 03999 ''' 04000 04001 ua_types = { 04002 'RequestHandle': 'UInt32', 04003 } 04004 04005 def __init__(self, binary=None): 04006 if binary is not None: 04007 self._binary_init(binary) 04008 self._freeze = True 04009 return 04010 self.RequestHandle = 0 04011 self._freeze = True 04012 04013 def to_binary(self): 04014 packet = [] 04015 packet.append(uabin.Primitives.UInt32.pack(self.RequestHandle)) 04016 return b''.join(packet) 04017 04018 @staticmethod 04019 def from_binary(data): 04020 return CancelParameters(data) 04021 04022 def _binary_init(self, data): 04023 self.RequestHandle = uabin.Primitives.UInt32.unpack(data) 04024 04025 def __str__(self): 04026 return 'CancelParameters(' + 'RequestHandle:' + str(self.RequestHandle) + ')' 04027 04028 __repr__ = __str__ 04029 04030 04031 class CancelRequest(FrozenClass): 04032 ''' 04033 Cancels an outstanding request. 04034 04035 :ivar TypeId: 04036 :vartype TypeId: NodeId 04037 :ivar RequestHeader: 04038 :vartype RequestHeader: RequestHeader 04039 :ivar Parameters: 04040 :vartype Parameters: CancelParameters 04041 ''' 04042 04043 ua_types = { 04044 'TypeId': 'NodeId', 04045 'RequestHeader': 'RequestHeader', 04046 'Parameters': 'CancelParameters', 04047 } 04048 04049 def __init__(self, binary=None): 04050 if binary is not None: 04051 self._binary_init(binary) 04052 self._freeze = True 04053 return 04054 self.TypeId = FourByteNodeId(ObjectIds.CancelRequest_Encoding_DefaultBinary) 04055 self.RequestHeader = RequestHeader() 04056 self.Parameters = CancelParameters() 04057 self._freeze = True 04058 04059 def to_binary(self): 04060 packet = [] 04061 packet.append(self.TypeId.to_binary()) 04062 packet.append(self.RequestHeader.to_binary()) 04063 packet.append(self.Parameters.to_binary()) 04064 return b''.join(packet) 04065 04066 @staticmethod 04067 def from_binary(data): 04068 return CancelRequest(data) 04069 04070 def _binary_init(self, data): 04071 self.TypeId = NodeId.from_binary(data) 04072 self.RequestHeader = RequestHeader.from_binary(data) 04073 self.Parameters = CancelParameters.from_binary(data) 04074 04075 def __str__(self): 04076 return 'CancelRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 04077 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 04078 'Parameters:' + str(self.Parameters) + ')' 04079 04080 __repr__ = __str__ 04081 04082 04083 class CancelResult(FrozenClass): 04084 ''' 04085 :ivar CancelCount: 04086 :vartype CancelCount: UInt32 04087 ''' 04088 04089 ua_types = { 04090 'CancelCount': 'UInt32', 04091 } 04092 04093 def __init__(self, binary=None): 04094 if binary is not None: 04095 self._binary_init(binary) 04096 self._freeze = True 04097 return 04098 self.CancelCount = 0 04099 self._freeze = True 04100 04101 def to_binary(self): 04102 packet = [] 04103 packet.append(uabin.Primitives.UInt32.pack(self.CancelCount)) 04104 return b''.join(packet) 04105 04106 @staticmethod 04107 def from_binary(data): 04108 return CancelResult(data) 04109 04110 def _binary_init(self, data): 04111 self.CancelCount = uabin.Primitives.UInt32.unpack(data) 04112 04113 def __str__(self): 04114 return 'CancelResult(' + 'CancelCount:' + str(self.CancelCount) + ')' 04115 04116 __repr__ = __str__ 04117 04118 04119 class CancelResponse(FrozenClass): 04120 ''' 04121 Cancels an outstanding request. 04122 04123 :ivar TypeId: 04124 :vartype TypeId: NodeId 04125 :ivar ResponseHeader: 04126 :vartype ResponseHeader: ResponseHeader 04127 :ivar Parameters: 04128 :vartype Parameters: CancelResult 04129 ''' 04130 04131 ua_types = { 04132 'TypeId': 'NodeId', 04133 'ResponseHeader': 'ResponseHeader', 04134 'Parameters': 'CancelResult', 04135 } 04136 04137 def __init__(self, binary=None): 04138 if binary is not None: 04139 self._binary_init(binary) 04140 self._freeze = True 04141 return 04142 self.TypeId = FourByteNodeId(ObjectIds.CancelResponse_Encoding_DefaultBinary) 04143 self.ResponseHeader = ResponseHeader() 04144 self.Parameters = CancelResult() 04145 self._freeze = True 04146 04147 def to_binary(self): 04148 packet = [] 04149 packet.append(self.TypeId.to_binary()) 04150 packet.append(self.ResponseHeader.to_binary()) 04151 packet.append(self.Parameters.to_binary()) 04152 return b''.join(packet) 04153 04154 @staticmethod 04155 def from_binary(data): 04156 return CancelResponse(data) 04157 04158 def _binary_init(self, data): 04159 self.TypeId = NodeId.from_binary(data) 04160 self.ResponseHeader = ResponseHeader.from_binary(data) 04161 self.Parameters = CancelResult.from_binary(data) 04162 04163 def __str__(self): 04164 return 'CancelResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 04165 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 04166 'Parameters:' + str(self.Parameters) + ')' 04167 04168 __repr__ = __str__ 04169 04170 04171 class NodeAttributes(FrozenClass): 04172 ''' 04173 The base attributes for all nodes. 04174 04175 :ivar SpecifiedAttributes: 04176 :vartype SpecifiedAttributes: UInt32 04177 :ivar DisplayName: 04178 :vartype DisplayName: LocalizedText 04179 :ivar Description: 04180 :vartype Description: LocalizedText 04181 :ivar WriteMask: 04182 :vartype WriteMask: UInt32 04183 :ivar UserWriteMask: 04184 :vartype UserWriteMask: UInt32 04185 ''' 04186 04187 ua_types = { 04188 'SpecifiedAttributes': 'UInt32', 04189 'DisplayName': 'LocalizedText', 04190 'Description': 'LocalizedText', 04191 'WriteMask': 'UInt32', 04192 'UserWriteMask': 'UInt32', 04193 } 04194 04195 def __init__(self, binary=None): 04196 if binary is not None: 04197 self._binary_init(binary) 04198 self._freeze = True 04199 return 04200 self.SpecifiedAttributes = 0 04201 self.DisplayName = LocalizedText() 04202 self.Description = LocalizedText() 04203 self.WriteMask = 0 04204 self.UserWriteMask = 0 04205 self._freeze = True 04206 04207 def to_binary(self): 04208 packet = [] 04209 packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) 04210 packet.append(self.DisplayName.to_binary()) 04211 packet.append(self.Description.to_binary()) 04212 packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) 04213 packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) 04214 return b''.join(packet) 04215 04216 @staticmethod 04217 def from_binary(data): 04218 return NodeAttributes(data) 04219 04220 def _binary_init(self, data): 04221 self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) 04222 self.DisplayName = LocalizedText.from_binary(data) 04223 self.Description = LocalizedText.from_binary(data) 04224 self.WriteMask = uabin.Primitives.UInt32.unpack(data) 04225 self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) 04226 04227 def __str__(self): 04228 return 'NodeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ 04229 'DisplayName:' + str(self.DisplayName) + ', ' + \ 04230 'Description:' + str(self.Description) + ', ' + \ 04231 'WriteMask:' + str(self.WriteMask) + ', ' + \ 04232 'UserWriteMask:' + str(self.UserWriteMask) + ')' 04233 04234 __repr__ = __str__ 04235 04236 04237 class ObjectAttributes(FrozenClass): 04238 ''' 04239 The attributes for an object node. 04240 04241 :ivar SpecifiedAttributes: 04242 :vartype SpecifiedAttributes: UInt32 04243 :ivar DisplayName: 04244 :vartype DisplayName: LocalizedText 04245 :ivar Description: 04246 :vartype Description: LocalizedText 04247 :ivar WriteMask: 04248 :vartype WriteMask: UInt32 04249 :ivar UserWriteMask: 04250 :vartype UserWriteMask: UInt32 04251 :ivar EventNotifier: 04252 :vartype EventNotifier: Byte 04253 ''' 04254 04255 ua_types = { 04256 'SpecifiedAttributes': 'UInt32', 04257 'DisplayName': 'LocalizedText', 04258 'Description': 'LocalizedText', 04259 'WriteMask': 'UInt32', 04260 'UserWriteMask': 'UInt32', 04261 'EventNotifier': 'Byte', 04262 } 04263 04264 def __init__(self, binary=None): 04265 if binary is not None: 04266 self._binary_init(binary) 04267 self._freeze = True 04268 return 04269 self.SpecifiedAttributes = 0 04270 self.DisplayName = LocalizedText() 04271 self.Description = LocalizedText() 04272 self.WriteMask = 0 04273 self.UserWriteMask = 0 04274 self.EventNotifier = 0 04275 self._freeze = True 04276 04277 def to_binary(self): 04278 packet = [] 04279 packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) 04280 packet.append(self.DisplayName.to_binary()) 04281 packet.append(self.Description.to_binary()) 04282 packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) 04283 packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) 04284 packet.append(uabin.Primitives.Byte.pack(self.EventNotifier)) 04285 return b''.join(packet) 04286 04287 @staticmethod 04288 def from_binary(data): 04289 return ObjectAttributes(data) 04290 04291 def _binary_init(self, data): 04292 self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) 04293 self.DisplayName = LocalizedText.from_binary(data) 04294 self.Description = LocalizedText.from_binary(data) 04295 self.WriteMask = uabin.Primitives.UInt32.unpack(data) 04296 self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) 04297 self.EventNotifier = uabin.Primitives.Byte.unpack(data) 04298 04299 def __str__(self): 04300 return 'ObjectAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ 04301 'DisplayName:' + str(self.DisplayName) + ', ' + \ 04302 'Description:' + str(self.Description) + ', ' + \ 04303 'WriteMask:' + str(self.WriteMask) + ', ' + \ 04304 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ 04305 'EventNotifier:' + str(self.EventNotifier) + ')' 04306 04307 __repr__ = __str__ 04308 04309 04310 class VariableAttributes(FrozenClass): 04311 ''' 04312 The attributes for a variable node. 04313 04314 :ivar SpecifiedAttributes: 04315 :vartype SpecifiedAttributes: UInt32 04316 :ivar DisplayName: 04317 :vartype DisplayName: LocalizedText 04318 :ivar Description: 04319 :vartype Description: LocalizedText 04320 :ivar WriteMask: 04321 :vartype WriteMask: UInt32 04322 :ivar UserWriteMask: 04323 :vartype UserWriteMask: UInt32 04324 :ivar Value: 04325 :vartype Value: Variant 04326 :ivar DataType: 04327 :vartype DataType: NodeId 04328 :ivar ValueRank: 04329 :vartype ValueRank: Int32 04330 :ivar ArrayDimensions: 04331 :vartype ArrayDimensions: UInt32 04332 :ivar AccessLevel: 04333 :vartype AccessLevel: Byte 04334 :ivar UserAccessLevel: 04335 :vartype UserAccessLevel: Byte 04336 :ivar MinimumSamplingInterval: 04337 :vartype MinimumSamplingInterval: Double 04338 :ivar Historizing: 04339 :vartype Historizing: Boolean 04340 ''' 04341 04342 ua_types = { 04343 'SpecifiedAttributes': 'UInt32', 04344 'DisplayName': 'LocalizedText', 04345 'Description': 'LocalizedText', 04346 'WriteMask': 'UInt32', 04347 'UserWriteMask': 'UInt32', 04348 'Value': 'Variant', 04349 'DataType': 'NodeId', 04350 'ValueRank': 'Int32', 04351 'ArrayDimensions': 'UInt32', 04352 'AccessLevel': 'Byte', 04353 'UserAccessLevel': 'Byte', 04354 'MinimumSamplingInterval': 'Double', 04355 'Historizing': 'Boolean', 04356 } 04357 04358 def __init__(self, binary=None): 04359 if binary is not None: 04360 self._binary_init(binary) 04361 self._freeze = True 04362 return 04363 self.SpecifiedAttributes = 0 04364 self.DisplayName = LocalizedText() 04365 self.Description = LocalizedText() 04366 self.WriteMask = 0 04367 self.UserWriteMask = 0 04368 self.Value = Variant() 04369 self.DataType = NodeId() 04370 self.ValueRank = 0 04371 self.ArrayDimensions = [] 04372 self.AccessLevel = 0 04373 self.UserAccessLevel = 0 04374 self.MinimumSamplingInterval = 0 04375 self.Historizing = True 04376 self._freeze = True 04377 04378 def to_binary(self): 04379 packet = [] 04380 packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) 04381 packet.append(self.DisplayName.to_binary()) 04382 packet.append(self.Description.to_binary()) 04383 packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) 04384 packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) 04385 packet.append(self.Value.to_binary()) 04386 packet.append(self.DataType.to_binary()) 04387 packet.append(uabin.Primitives.Int32.pack(self.ValueRank)) 04388 packet.append(uabin.Primitives.Int32.pack(len(self.ArrayDimensions))) 04389 for fieldname in self.ArrayDimensions: 04390 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 04391 packet.append(uabin.Primitives.Byte.pack(self.AccessLevel)) 04392 packet.append(uabin.Primitives.Byte.pack(self.UserAccessLevel)) 04393 packet.append(uabin.Primitives.Double.pack(self.MinimumSamplingInterval)) 04394 packet.append(uabin.Primitives.Boolean.pack(self.Historizing)) 04395 return b''.join(packet) 04396 04397 @staticmethod 04398 def from_binary(data): 04399 return VariableAttributes(data) 04400 04401 def _binary_init(self, data): 04402 self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) 04403 self.DisplayName = LocalizedText.from_binary(data) 04404 self.Description = LocalizedText.from_binary(data) 04405 self.WriteMask = uabin.Primitives.UInt32.unpack(data) 04406 self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) 04407 self.Value = Variant.from_binary(data) 04408 self.DataType = NodeId.from_binary(data) 04409 self.ValueRank = uabin.Primitives.Int32.unpack(data) 04410 self.ArrayDimensions = uabin.Primitives.UInt32.unpack_array(data) 04411 self.AccessLevel = uabin.Primitives.Byte.unpack(data) 04412 self.UserAccessLevel = uabin.Primitives.Byte.unpack(data) 04413 self.MinimumSamplingInterval = uabin.Primitives.Double.unpack(data) 04414 self.Historizing = uabin.Primitives.Boolean.unpack(data) 04415 04416 def __str__(self): 04417 return 'VariableAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ 04418 'DisplayName:' + str(self.DisplayName) + ', ' + \ 04419 'Description:' + str(self.Description) + ', ' + \ 04420 'WriteMask:' + str(self.WriteMask) + ', ' + \ 04421 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ 04422 'Value:' + str(self.Value) + ', ' + \ 04423 'DataType:' + str(self.DataType) + ', ' + \ 04424 'ValueRank:' + str(self.ValueRank) + ', ' + \ 04425 'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \ 04426 'AccessLevel:' + str(self.AccessLevel) + ', ' + \ 04427 'UserAccessLevel:' + str(self.UserAccessLevel) + ', ' + \ 04428 'MinimumSamplingInterval:' + str(self.MinimumSamplingInterval) + ', ' + \ 04429 'Historizing:' + str(self.Historizing) + ')' 04430 04431 __repr__ = __str__ 04432 04433 04434 class MethodAttributes(FrozenClass): 04435 ''' 04436 The attributes for a method node. 04437 04438 :ivar SpecifiedAttributes: 04439 :vartype SpecifiedAttributes: UInt32 04440 :ivar DisplayName: 04441 :vartype DisplayName: LocalizedText 04442 :ivar Description: 04443 :vartype Description: LocalizedText 04444 :ivar WriteMask: 04445 :vartype WriteMask: UInt32 04446 :ivar UserWriteMask: 04447 :vartype UserWriteMask: UInt32 04448 :ivar Executable: 04449 :vartype Executable: Boolean 04450 :ivar UserExecutable: 04451 :vartype UserExecutable: Boolean 04452 ''' 04453 04454 ua_types = { 04455 'SpecifiedAttributes': 'UInt32', 04456 'DisplayName': 'LocalizedText', 04457 'Description': 'LocalizedText', 04458 'WriteMask': 'UInt32', 04459 'UserWriteMask': 'UInt32', 04460 'Executable': 'Boolean', 04461 'UserExecutable': 'Boolean', 04462 } 04463 04464 def __init__(self, binary=None): 04465 if binary is not None: 04466 self._binary_init(binary) 04467 self._freeze = True 04468 return 04469 self.SpecifiedAttributes = 0 04470 self.DisplayName = LocalizedText() 04471 self.Description = LocalizedText() 04472 self.WriteMask = 0 04473 self.UserWriteMask = 0 04474 self.Executable = True 04475 self.UserExecutable = True 04476 self._freeze = True 04477 04478 def to_binary(self): 04479 packet = [] 04480 packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) 04481 packet.append(self.DisplayName.to_binary()) 04482 packet.append(self.Description.to_binary()) 04483 packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) 04484 packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) 04485 packet.append(uabin.Primitives.Boolean.pack(self.Executable)) 04486 packet.append(uabin.Primitives.Boolean.pack(self.UserExecutable)) 04487 return b''.join(packet) 04488 04489 @staticmethod 04490 def from_binary(data): 04491 return MethodAttributes(data) 04492 04493 def _binary_init(self, data): 04494 self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) 04495 self.DisplayName = LocalizedText.from_binary(data) 04496 self.Description = LocalizedText.from_binary(data) 04497 self.WriteMask = uabin.Primitives.UInt32.unpack(data) 04498 self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) 04499 self.Executable = uabin.Primitives.Boolean.unpack(data) 04500 self.UserExecutable = uabin.Primitives.Boolean.unpack(data) 04501 04502 def __str__(self): 04503 return 'MethodAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ 04504 'DisplayName:' + str(self.DisplayName) + ', ' + \ 04505 'Description:' + str(self.Description) + ', ' + \ 04506 'WriteMask:' + str(self.WriteMask) + ', ' + \ 04507 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ 04508 'Executable:' + str(self.Executable) + ', ' + \ 04509 'UserExecutable:' + str(self.UserExecutable) + ')' 04510 04511 __repr__ = __str__ 04512 04513 04514 class ObjectTypeAttributes(FrozenClass): 04515 ''' 04516 The attributes for an object type node. 04517 04518 :ivar SpecifiedAttributes: 04519 :vartype SpecifiedAttributes: UInt32 04520 :ivar DisplayName: 04521 :vartype DisplayName: LocalizedText 04522 :ivar Description: 04523 :vartype Description: LocalizedText 04524 :ivar WriteMask: 04525 :vartype WriteMask: UInt32 04526 :ivar UserWriteMask: 04527 :vartype UserWriteMask: UInt32 04528 :ivar IsAbstract: 04529 :vartype IsAbstract: Boolean 04530 ''' 04531 04532 ua_types = { 04533 'SpecifiedAttributes': 'UInt32', 04534 'DisplayName': 'LocalizedText', 04535 'Description': 'LocalizedText', 04536 'WriteMask': 'UInt32', 04537 'UserWriteMask': 'UInt32', 04538 'IsAbstract': 'Boolean', 04539 } 04540 04541 def __init__(self, binary=None): 04542 if binary is not None: 04543 self._binary_init(binary) 04544 self._freeze = True 04545 return 04546 self.SpecifiedAttributes = 0 04547 self.DisplayName = LocalizedText() 04548 self.Description = LocalizedText() 04549 self.WriteMask = 0 04550 self.UserWriteMask = 0 04551 self.IsAbstract = True 04552 self._freeze = True 04553 04554 def to_binary(self): 04555 packet = [] 04556 packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) 04557 packet.append(self.DisplayName.to_binary()) 04558 packet.append(self.Description.to_binary()) 04559 packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) 04560 packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) 04561 packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract)) 04562 return b''.join(packet) 04563 04564 @staticmethod 04565 def from_binary(data): 04566 return ObjectTypeAttributes(data) 04567 04568 def _binary_init(self, data): 04569 self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) 04570 self.DisplayName = LocalizedText.from_binary(data) 04571 self.Description = LocalizedText.from_binary(data) 04572 self.WriteMask = uabin.Primitives.UInt32.unpack(data) 04573 self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) 04574 self.IsAbstract = uabin.Primitives.Boolean.unpack(data) 04575 04576 def __str__(self): 04577 return 'ObjectTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ 04578 'DisplayName:' + str(self.DisplayName) + ', ' + \ 04579 'Description:' + str(self.Description) + ', ' + \ 04580 'WriteMask:' + str(self.WriteMask) + ', ' + \ 04581 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ 04582 'IsAbstract:' + str(self.IsAbstract) + ')' 04583 04584 __repr__ = __str__ 04585 04586 04587 class VariableTypeAttributes(FrozenClass): 04588 ''' 04589 The attributes for a variable type node. 04590 04591 :ivar SpecifiedAttributes: 04592 :vartype SpecifiedAttributes: UInt32 04593 :ivar DisplayName: 04594 :vartype DisplayName: LocalizedText 04595 :ivar Description: 04596 :vartype Description: LocalizedText 04597 :ivar WriteMask: 04598 :vartype WriteMask: UInt32 04599 :ivar UserWriteMask: 04600 :vartype UserWriteMask: UInt32 04601 :ivar Value: 04602 :vartype Value: Variant 04603 :ivar DataType: 04604 :vartype DataType: NodeId 04605 :ivar ValueRank: 04606 :vartype ValueRank: Int32 04607 :ivar ArrayDimensions: 04608 :vartype ArrayDimensions: UInt32 04609 :ivar IsAbstract: 04610 :vartype IsAbstract: Boolean 04611 ''' 04612 04613 ua_types = { 04614 'SpecifiedAttributes': 'UInt32', 04615 'DisplayName': 'LocalizedText', 04616 'Description': 'LocalizedText', 04617 'WriteMask': 'UInt32', 04618 'UserWriteMask': 'UInt32', 04619 'Value': 'Variant', 04620 'DataType': 'NodeId', 04621 'ValueRank': 'Int32', 04622 'ArrayDimensions': 'UInt32', 04623 'IsAbstract': 'Boolean', 04624 } 04625 04626 def __init__(self, binary=None): 04627 if binary is not None: 04628 self._binary_init(binary) 04629 self._freeze = True 04630 return 04631 self.SpecifiedAttributes = 0 04632 self.DisplayName = LocalizedText() 04633 self.Description = LocalizedText() 04634 self.WriteMask = 0 04635 self.UserWriteMask = 0 04636 self.Value = Variant() 04637 self.DataType = NodeId() 04638 self.ValueRank = 0 04639 self.ArrayDimensions = [] 04640 self.IsAbstract = True 04641 self._freeze = True 04642 04643 def to_binary(self): 04644 packet = [] 04645 packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) 04646 packet.append(self.DisplayName.to_binary()) 04647 packet.append(self.Description.to_binary()) 04648 packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) 04649 packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) 04650 packet.append(self.Value.to_binary()) 04651 packet.append(self.DataType.to_binary()) 04652 packet.append(uabin.Primitives.Int32.pack(self.ValueRank)) 04653 packet.append(uabin.Primitives.Int32.pack(len(self.ArrayDimensions))) 04654 for fieldname in self.ArrayDimensions: 04655 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 04656 packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract)) 04657 return b''.join(packet) 04658 04659 @staticmethod 04660 def from_binary(data): 04661 return VariableTypeAttributes(data) 04662 04663 def _binary_init(self, data): 04664 self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) 04665 self.DisplayName = LocalizedText.from_binary(data) 04666 self.Description = LocalizedText.from_binary(data) 04667 self.WriteMask = uabin.Primitives.UInt32.unpack(data) 04668 self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) 04669 self.Value = Variant.from_binary(data) 04670 self.DataType = NodeId.from_binary(data) 04671 self.ValueRank = uabin.Primitives.Int32.unpack(data) 04672 self.ArrayDimensions = uabin.Primitives.UInt32.unpack_array(data) 04673 self.IsAbstract = uabin.Primitives.Boolean.unpack(data) 04674 04675 def __str__(self): 04676 return 'VariableTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ 04677 'DisplayName:' + str(self.DisplayName) + ', ' + \ 04678 'Description:' + str(self.Description) + ', ' + \ 04679 'WriteMask:' + str(self.WriteMask) + ', ' + \ 04680 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ 04681 'Value:' + str(self.Value) + ', ' + \ 04682 'DataType:' + str(self.DataType) + ', ' + \ 04683 'ValueRank:' + str(self.ValueRank) + ', ' + \ 04684 'ArrayDimensions:' + str(self.ArrayDimensions) + ', ' + \ 04685 'IsAbstract:' + str(self.IsAbstract) + ')' 04686 04687 __repr__ = __str__ 04688 04689 04690 class ReferenceTypeAttributes(FrozenClass): 04691 ''' 04692 The attributes for a reference type node. 04693 04694 :ivar SpecifiedAttributes: 04695 :vartype SpecifiedAttributes: UInt32 04696 :ivar DisplayName: 04697 :vartype DisplayName: LocalizedText 04698 :ivar Description: 04699 :vartype Description: LocalizedText 04700 :ivar WriteMask: 04701 :vartype WriteMask: UInt32 04702 :ivar UserWriteMask: 04703 :vartype UserWriteMask: UInt32 04704 :ivar IsAbstract: 04705 :vartype IsAbstract: Boolean 04706 :ivar Symmetric: 04707 :vartype Symmetric: Boolean 04708 :ivar InverseName: 04709 :vartype InverseName: LocalizedText 04710 ''' 04711 04712 ua_types = { 04713 'SpecifiedAttributes': 'UInt32', 04714 'DisplayName': 'LocalizedText', 04715 'Description': 'LocalizedText', 04716 'WriteMask': 'UInt32', 04717 'UserWriteMask': 'UInt32', 04718 'IsAbstract': 'Boolean', 04719 'Symmetric': 'Boolean', 04720 'InverseName': 'LocalizedText', 04721 } 04722 04723 def __init__(self, binary=None): 04724 if binary is not None: 04725 self._binary_init(binary) 04726 self._freeze = True 04727 return 04728 self.SpecifiedAttributes = 0 04729 self.DisplayName = LocalizedText() 04730 self.Description = LocalizedText() 04731 self.WriteMask = 0 04732 self.UserWriteMask = 0 04733 self.IsAbstract = True 04734 self.Symmetric = True 04735 self.InverseName = LocalizedText() 04736 self._freeze = True 04737 04738 def to_binary(self): 04739 packet = [] 04740 packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) 04741 packet.append(self.DisplayName.to_binary()) 04742 packet.append(self.Description.to_binary()) 04743 packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) 04744 packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) 04745 packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract)) 04746 packet.append(uabin.Primitives.Boolean.pack(self.Symmetric)) 04747 packet.append(self.InverseName.to_binary()) 04748 return b''.join(packet) 04749 04750 @staticmethod 04751 def from_binary(data): 04752 return ReferenceTypeAttributes(data) 04753 04754 def _binary_init(self, data): 04755 self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) 04756 self.DisplayName = LocalizedText.from_binary(data) 04757 self.Description = LocalizedText.from_binary(data) 04758 self.WriteMask = uabin.Primitives.UInt32.unpack(data) 04759 self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) 04760 self.IsAbstract = uabin.Primitives.Boolean.unpack(data) 04761 self.Symmetric = uabin.Primitives.Boolean.unpack(data) 04762 self.InverseName = LocalizedText.from_binary(data) 04763 04764 def __str__(self): 04765 return 'ReferenceTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ 04766 'DisplayName:' + str(self.DisplayName) + ', ' + \ 04767 'Description:' + str(self.Description) + ', ' + \ 04768 'WriteMask:' + str(self.WriteMask) + ', ' + \ 04769 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ 04770 'IsAbstract:' + str(self.IsAbstract) + ', ' + \ 04771 'Symmetric:' + str(self.Symmetric) + ', ' + \ 04772 'InverseName:' + str(self.InverseName) + ')' 04773 04774 __repr__ = __str__ 04775 04776 04777 class DataTypeAttributes(FrozenClass): 04778 ''' 04779 The attributes for a data type node. 04780 04781 :ivar SpecifiedAttributes: 04782 :vartype SpecifiedAttributes: UInt32 04783 :ivar DisplayName: 04784 :vartype DisplayName: LocalizedText 04785 :ivar Description: 04786 :vartype Description: LocalizedText 04787 :ivar WriteMask: 04788 :vartype WriteMask: UInt32 04789 :ivar UserWriteMask: 04790 :vartype UserWriteMask: UInt32 04791 :ivar IsAbstract: 04792 :vartype IsAbstract: Boolean 04793 ''' 04794 04795 ua_types = { 04796 'SpecifiedAttributes': 'UInt32', 04797 'DisplayName': 'LocalizedText', 04798 'Description': 'LocalizedText', 04799 'WriteMask': 'UInt32', 04800 'UserWriteMask': 'UInt32', 04801 'IsAbstract': 'Boolean', 04802 } 04803 04804 def __init__(self, binary=None): 04805 if binary is not None: 04806 self._binary_init(binary) 04807 self._freeze = True 04808 return 04809 self.SpecifiedAttributes = 0 04810 self.DisplayName = LocalizedText() 04811 self.Description = LocalizedText() 04812 self.WriteMask = 0 04813 self.UserWriteMask = 0 04814 self.IsAbstract = True 04815 self._freeze = True 04816 04817 def to_binary(self): 04818 packet = [] 04819 packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) 04820 packet.append(self.DisplayName.to_binary()) 04821 packet.append(self.Description.to_binary()) 04822 packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) 04823 packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) 04824 packet.append(uabin.Primitives.Boolean.pack(self.IsAbstract)) 04825 return b''.join(packet) 04826 04827 @staticmethod 04828 def from_binary(data): 04829 return DataTypeAttributes(data) 04830 04831 def _binary_init(self, data): 04832 self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) 04833 self.DisplayName = LocalizedText.from_binary(data) 04834 self.Description = LocalizedText.from_binary(data) 04835 self.WriteMask = uabin.Primitives.UInt32.unpack(data) 04836 self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) 04837 self.IsAbstract = uabin.Primitives.Boolean.unpack(data) 04838 04839 def __str__(self): 04840 return 'DataTypeAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ 04841 'DisplayName:' + str(self.DisplayName) + ', ' + \ 04842 'Description:' + str(self.Description) + ', ' + \ 04843 'WriteMask:' + str(self.WriteMask) + ', ' + \ 04844 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ 04845 'IsAbstract:' + str(self.IsAbstract) + ')' 04846 04847 __repr__ = __str__ 04848 04849 04850 class ViewAttributes(FrozenClass): 04851 ''' 04852 The attributes for a view node. 04853 04854 :ivar SpecifiedAttributes: 04855 :vartype SpecifiedAttributes: UInt32 04856 :ivar DisplayName: 04857 :vartype DisplayName: LocalizedText 04858 :ivar Description: 04859 :vartype Description: LocalizedText 04860 :ivar WriteMask: 04861 :vartype WriteMask: UInt32 04862 :ivar UserWriteMask: 04863 :vartype UserWriteMask: UInt32 04864 :ivar ContainsNoLoops: 04865 :vartype ContainsNoLoops: Boolean 04866 :ivar EventNotifier: 04867 :vartype EventNotifier: Byte 04868 ''' 04869 04870 ua_types = { 04871 'SpecifiedAttributes': 'UInt32', 04872 'DisplayName': 'LocalizedText', 04873 'Description': 'LocalizedText', 04874 'WriteMask': 'UInt32', 04875 'UserWriteMask': 'UInt32', 04876 'ContainsNoLoops': 'Boolean', 04877 'EventNotifier': 'Byte', 04878 } 04879 04880 def __init__(self, binary=None): 04881 if binary is not None: 04882 self._binary_init(binary) 04883 self._freeze = True 04884 return 04885 self.SpecifiedAttributes = 0 04886 self.DisplayName = LocalizedText() 04887 self.Description = LocalizedText() 04888 self.WriteMask = 0 04889 self.UserWriteMask = 0 04890 self.ContainsNoLoops = True 04891 self.EventNotifier = 0 04892 self._freeze = True 04893 04894 def to_binary(self): 04895 packet = [] 04896 packet.append(uabin.Primitives.UInt32.pack(self.SpecifiedAttributes)) 04897 packet.append(self.DisplayName.to_binary()) 04898 packet.append(self.Description.to_binary()) 04899 packet.append(uabin.Primitives.UInt32.pack(self.WriteMask)) 04900 packet.append(uabin.Primitives.UInt32.pack(self.UserWriteMask)) 04901 packet.append(uabin.Primitives.Boolean.pack(self.ContainsNoLoops)) 04902 packet.append(uabin.Primitives.Byte.pack(self.EventNotifier)) 04903 return b''.join(packet) 04904 04905 @staticmethod 04906 def from_binary(data): 04907 return ViewAttributes(data) 04908 04909 def _binary_init(self, data): 04910 self.SpecifiedAttributes = uabin.Primitives.UInt32.unpack(data) 04911 self.DisplayName = LocalizedText.from_binary(data) 04912 self.Description = LocalizedText.from_binary(data) 04913 self.WriteMask = uabin.Primitives.UInt32.unpack(data) 04914 self.UserWriteMask = uabin.Primitives.UInt32.unpack(data) 04915 self.ContainsNoLoops = uabin.Primitives.Boolean.unpack(data) 04916 self.EventNotifier = uabin.Primitives.Byte.unpack(data) 04917 04918 def __str__(self): 04919 return 'ViewAttributes(' + 'SpecifiedAttributes:' + str(self.SpecifiedAttributes) + ', ' + \ 04920 'DisplayName:' + str(self.DisplayName) + ', ' + \ 04921 'Description:' + str(self.Description) + ', ' + \ 04922 'WriteMask:' + str(self.WriteMask) + ', ' + \ 04923 'UserWriteMask:' + str(self.UserWriteMask) + ', ' + \ 04924 'ContainsNoLoops:' + str(self.ContainsNoLoops) + ', ' + \ 04925 'EventNotifier:' + str(self.EventNotifier) + ')' 04926 04927 __repr__ = __str__ 04928 04929 04930 class AddNodesItem(FrozenClass): 04931 ''' 04932 A request to add a node to the server address space. 04933 04934 :ivar ParentNodeId: 04935 :vartype ParentNodeId: ExpandedNodeId 04936 :ivar ReferenceTypeId: 04937 :vartype ReferenceTypeId: NodeId 04938 :ivar RequestedNewNodeId: 04939 :vartype RequestedNewNodeId: ExpandedNodeId 04940 :ivar BrowseName: 04941 :vartype BrowseName: QualifiedName 04942 :ivar NodeClass: 04943 :vartype NodeClass: NodeClass 04944 :ivar NodeAttributes: 04945 :vartype NodeAttributes: ExtensionObject 04946 :ivar TypeDefinition: 04947 :vartype TypeDefinition: ExpandedNodeId 04948 ''' 04949 04950 ua_types = { 04951 'ParentNodeId': 'ExpandedNodeId', 04952 'ReferenceTypeId': 'NodeId', 04953 'RequestedNewNodeId': 'ExpandedNodeId', 04954 'BrowseName': 'QualifiedName', 04955 'NodeClass': 'NodeClass', 04956 'NodeAttributes': 'ExtensionObject', 04957 'TypeDefinition': 'ExpandedNodeId', 04958 } 04959 04960 def __init__(self, binary=None): 04961 if binary is not None: 04962 self._binary_init(binary) 04963 self._freeze = True 04964 return 04965 self.ParentNodeId = ExpandedNodeId() 04966 self.ReferenceTypeId = NodeId() 04967 self.RequestedNewNodeId = ExpandedNodeId() 04968 self.BrowseName = QualifiedName() 04969 self.NodeClass = NodeClass(0) 04970 self.NodeAttributes = None 04971 self.TypeDefinition = ExpandedNodeId() 04972 self._freeze = True 04973 04974 def to_binary(self): 04975 packet = [] 04976 packet.append(self.ParentNodeId.to_binary()) 04977 packet.append(self.ReferenceTypeId.to_binary()) 04978 packet.append(self.RequestedNewNodeId.to_binary()) 04979 packet.append(self.BrowseName.to_binary()) 04980 packet.append(uabin.Primitives.UInt32.pack(self.NodeClass.value)) 04981 packet.append(extensionobject_to_binary(self.NodeAttributes)) 04982 packet.append(self.TypeDefinition.to_binary()) 04983 return b''.join(packet) 04984 04985 @staticmethod 04986 def from_binary(data): 04987 return AddNodesItem(data) 04988 04989 def _binary_init(self, data): 04990 self.ParentNodeId = ExpandedNodeId.from_binary(data) 04991 self.ReferenceTypeId = NodeId.from_binary(data) 04992 self.RequestedNewNodeId = ExpandedNodeId.from_binary(data) 04993 self.BrowseName = QualifiedName.from_binary(data) 04994 self.NodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data)) 04995 self.NodeAttributes = extensionobject_from_binary(data) 04996 self.TypeDefinition = ExpandedNodeId.from_binary(data) 04997 04998 def __str__(self): 04999 return 'AddNodesItem(' + 'ParentNodeId:' + str(self.ParentNodeId) + ', ' + \ 05000 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ 05001 'RequestedNewNodeId:' + str(self.RequestedNewNodeId) + ', ' + \ 05002 'BrowseName:' + str(self.BrowseName) + ', ' + \ 05003 'NodeClass:' + str(self.NodeClass) + ', ' + \ 05004 'NodeAttributes:' + str(self.NodeAttributes) + ', ' + \ 05005 'TypeDefinition:' + str(self.TypeDefinition) + ')' 05006 05007 __repr__ = __str__ 05008 05009 05010 class AddNodesResult(FrozenClass): 05011 ''' 05012 A result of an add node operation. 05013 05014 :ivar StatusCode: 05015 :vartype StatusCode: StatusCode 05016 :ivar AddedNodeId: 05017 :vartype AddedNodeId: NodeId 05018 ''' 05019 05020 ua_types = { 05021 'StatusCode': 'StatusCode', 05022 'AddedNodeId': 'NodeId', 05023 } 05024 05025 def __init__(self, binary=None): 05026 if binary is not None: 05027 self._binary_init(binary) 05028 self._freeze = True 05029 return 05030 self.StatusCode = StatusCode() 05031 self.AddedNodeId = NodeId() 05032 self._freeze = True 05033 05034 def to_binary(self): 05035 packet = [] 05036 packet.append(self.StatusCode.to_binary()) 05037 packet.append(self.AddedNodeId.to_binary()) 05038 return b''.join(packet) 05039 05040 @staticmethod 05041 def from_binary(data): 05042 return AddNodesResult(data) 05043 05044 def _binary_init(self, data): 05045 self.StatusCode = StatusCode.from_binary(data) 05046 self.AddedNodeId = NodeId.from_binary(data) 05047 05048 def __str__(self): 05049 return 'AddNodesResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 05050 'AddedNodeId:' + str(self.AddedNodeId) + ')' 05051 05052 __repr__ = __str__ 05053 05054 05055 class AddNodesParameters(FrozenClass): 05056 ''' 05057 :ivar NodesToAdd: 05058 :vartype NodesToAdd: AddNodesItem 05059 ''' 05060 05061 ua_types = { 05062 'NodesToAdd': 'AddNodesItem', 05063 } 05064 05065 def __init__(self, binary=None): 05066 if binary is not None: 05067 self._binary_init(binary) 05068 self._freeze = True 05069 return 05070 self.NodesToAdd = [] 05071 self._freeze = True 05072 05073 def to_binary(self): 05074 packet = [] 05075 packet.append(uabin.Primitives.Int32.pack(len(self.NodesToAdd))) 05076 for fieldname in self.NodesToAdd: 05077 packet.append(fieldname.to_binary()) 05078 return b''.join(packet) 05079 05080 @staticmethod 05081 def from_binary(data): 05082 return AddNodesParameters(data) 05083 05084 def _binary_init(self, data): 05085 length = uabin.Primitives.Int32.unpack(data) 05086 array = [] 05087 if length != -1: 05088 for _ in range(0, length): 05089 array.append(AddNodesItem.from_binary(data)) 05090 self.NodesToAdd = array 05091 05092 def __str__(self): 05093 return 'AddNodesParameters(' + 'NodesToAdd:' + str(self.NodesToAdd) + ')' 05094 05095 __repr__ = __str__ 05096 05097 05098 class AddNodesRequest(FrozenClass): 05099 ''' 05100 Adds one or more nodes to the server address space. 05101 05102 :ivar TypeId: 05103 :vartype TypeId: NodeId 05104 :ivar RequestHeader: 05105 :vartype RequestHeader: RequestHeader 05106 :ivar Parameters: 05107 :vartype Parameters: AddNodesParameters 05108 ''' 05109 05110 ua_types = { 05111 'TypeId': 'NodeId', 05112 'RequestHeader': 'RequestHeader', 05113 'Parameters': 'AddNodesParameters', 05114 } 05115 05116 def __init__(self, binary=None): 05117 if binary is not None: 05118 self._binary_init(binary) 05119 self._freeze = True 05120 return 05121 self.TypeId = FourByteNodeId(ObjectIds.AddNodesRequest_Encoding_DefaultBinary) 05122 self.RequestHeader = RequestHeader() 05123 self.Parameters = AddNodesParameters() 05124 self._freeze = True 05125 05126 def to_binary(self): 05127 packet = [] 05128 packet.append(self.TypeId.to_binary()) 05129 packet.append(self.RequestHeader.to_binary()) 05130 packet.append(self.Parameters.to_binary()) 05131 return b''.join(packet) 05132 05133 @staticmethod 05134 def from_binary(data): 05135 return AddNodesRequest(data) 05136 05137 def _binary_init(self, data): 05138 self.TypeId = NodeId.from_binary(data) 05139 self.RequestHeader = RequestHeader.from_binary(data) 05140 self.Parameters = AddNodesParameters.from_binary(data) 05141 05142 def __str__(self): 05143 return 'AddNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 05144 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 05145 'Parameters:' + str(self.Parameters) + ')' 05146 05147 __repr__ = __str__ 05148 05149 05150 class AddNodesResponse(FrozenClass): 05151 ''' 05152 Adds one or more nodes to the server address space. 05153 05154 :ivar TypeId: 05155 :vartype TypeId: NodeId 05156 :ivar ResponseHeader: 05157 :vartype ResponseHeader: ResponseHeader 05158 :ivar Results: 05159 :vartype Results: AddNodesResult 05160 :ivar DiagnosticInfos: 05161 :vartype DiagnosticInfos: DiagnosticInfo 05162 ''' 05163 05164 ua_types = { 05165 'TypeId': 'NodeId', 05166 'ResponseHeader': 'ResponseHeader', 05167 'Results': 'AddNodesResult', 05168 'DiagnosticInfos': 'DiagnosticInfo', 05169 } 05170 05171 def __init__(self, binary=None): 05172 if binary is not None: 05173 self._binary_init(binary) 05174 self._freeze = True 05175 return 05176 self.TypeId = FourByteNodeId(ObjectIds.AddNodesResponse_Encoding_DefaultBinary) 05177 self.ResponseHeader = ResponseHeader() 05178 self.Results = [] 05179 self.DiagnosticInfos = [] 05180 self._freeze = True 05181 05182 def to_binary(self): 05183 packet = [] 05184 packet.append(self.TypeId.to_binary()) 05185 packet.append(self.ResponseHeader.to_binary()) 05186 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 05187 for fieldname in self.Results: 05188 packet.append(fieldname.to_binary()) 05189 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 05190 for fieldname in self.DiagnosticInfos: 05191 packet.append(fieldname.to_binary()) 05192 return b''.join(packet) 05193 05194 @staticmethod 05195 def from_binary(data): 05196 return AddNodesResponse(data) 05197 05198 def _binary_init(self, data): 05199 self.TypeId = NodeId.from_binary(data) 05200 self.ResponseHeader = ResponseHeader.from_binary(data) 05201 length = uabin.Primitives.Int32.unpack(data) 05202 array = [] 05203 if length != -1: 05204 for _ in range(0, length): 05205 array.append(AddNodesResult.from_binary(data)) 05206 self.Results = array 05207 length = uabin.Primitives.Int32.unpack(data) 05208 array = [] 05209 if length != -1: 05210 for _ in range(0, length): 05211 array.append(DiagnosticInfo.from_binary(data)) 05212 self.DiagnosticInfos = array 05213 05214 def __str__(self): 05215 return 'AddNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 05216 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 05217 'Results:' + str(self.Results) + ', ' + \ 05218 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 05219 05220 __repr__ = __str__ 05221 05222 05223 class AddReferencesItem(FrozenClass): 05224 ''' 05225 A request to add a reference to the server address space. 05226 05227 :ivar SourceNodeId: 05228 :vartype SourceNodeId: NodeId 05229 :ivar ReferenceTypeId: 05230 :vartype ReferenceTypeId: NodeId 05231 :ivar IsForward: 05232 :vartype IsForward: Boolean 05233 :ivar TargetServerUri: 05234 :vartype TargetServerUri: String 05235 :ivar TargetNodeId: 05236 :vartype TargetNodeId: ExpandedNodeId 05237 :ivar TargetNodeClass: 05238 :vartype TargetNodeClass: NodeClass 05239 ''' 05240 05241 ua_types = { 05242 'SourceNodeId': 'NodeId', 05243 'ReferenceTypeId': 'NodeId', 05244 'IsForward': 'Boolean', 05245 'TargetServerUri': 'String', 05246 'TargetNodeId': 'ExpandedNodeId', 05247 'TargetNodeClass': 'NodeClass', 05248 } 05249 05250 def __init__(self, binary=None): 05251 if binary is not None: 05252 self._binary_init(binary) 05253 self._freeze = True 05254 return 05255 self.SourceNodeId = NodeId() 05256 self.ReferenceTypeId = NodeId() 05257 self.IsForward = True 05258 self.TargetServerUri = None 05259 self.TargetNodeId = ExpandedNodeId() 05260 self.TargetNodeClass = NodeClass(0) 05261 self._freeze = True 05262 05263 def to_binary(self): 05264 packet = [] 05265 packet.append(self.SourceNodeId.to_binary()) 05266 packet.append(self.ReferenceTypeId.to_binary()) 05267 packet.append(uabin.Primitives.Boolean.pack(self.IsForward)) 05268 packet.append(uabin.Primitives.String.pack(self.TargetServerUri)) 05269 packet.append(self.TargetNodeId.to_binary()) 05270 packet.append(uabin.Primitives.UInt32.pack(self.TargetNodeClass.value)) 05271 return b''.join(packet) 05272 05273 @staticmethod 05274 def from_binary(data): 05275 return AddReferencesItem(data) 05276 05277 def _binary_init(self, data): 05278 self.SourceNodeId = NodeId.from_binary(data) 05279 self.ReferenceTypeId = NodeId.from_binary(data) 05280 self.IsForward = uabin.Primitives.Boolean.unpack(data) 05281 self.TargetServerUri = uabin.Primitives.String.unpack(data) 05282 self.TargetNodeId = ExpandedNodeId.from_binary(data) 05283 self.TargetNodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data)) 05284 05285 def __str__(self): 05286 return 'AddReferencesItem(' + 'SourceNodeId:' + str(self.SourceNodeId) + ', ' + \ 05287 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ 05288 'IsForward:' + str(self.IsForward) + ', ' + \ 05289 'TargetServerUri:' + str(self.TargetServerUri) + ', ' + \ 05290 'TargetNodeId:' + str(self.TargetNodeId) + ', ' + \ 05291 'TargetNodeClass:' + str(self.TargetNodeClass) + ')' 05292 05293 __repr__ = __str__ 05294 05295 05296 class AddReferencesRequest(FrozenClass): 05297 ''' 05298 Adds one or more references to the server address space. 05299 05300 :ivar TypeId: 05301 :vartype TypeId: NodeId 05302 :ivar RequestHeader: 05303 :vartype RequestHeader: RequestHeader 05304 :ivar ReferencesToAdd: 05305 :vartype ReferencesToAdd: AddReferencesItem 05306 ''' 05307 05308 ua_types = { 05309 'TypeId': 'NodeId', 05310 'RequestHeader': 'RequestHeader', 05311 'ReferencesToAdd': 'AddReferencesItem', 05312 } 05313 05314 def __init__(self, binary=None): 05315 if binary is not None: 05316 self._binary_init(binary) 05317 self._freeze = True 05318 return 05319 self.TypeId = FourByteNodeId(ObjectIds.AddReferencesRequest_Encoding_DefaultBinary) 05320 self.RequestHeader = RequestHeader() 05321 self.ReferencesToAdd = [] 05322 self._freeze = True 05323 05324 def to_binary(self): 05325 packet = [] 05326 packet.append(self.TypeId.to_binary()) 05327 packet.append(self.RequestHeader.to_binary()) 05328 packet.append(uabin.Primitives.Int32.pack(len(self.ReferencesToAdd))) 05329 for fieldname in self.ReferencesToAdd: 05330 packet.append(fieldname.to_binary()) 05331 return b''.join(packet) 05332 05333 @staticmethod 05334 def from_binary(data): 05335 return AddReferencesRequest(data) 05336 05337 def _binary_init(self, data): 05338 self.TypeId = NodeId.from_binary(data) 05339 self.RequestHeader = RequestHeader.from_binary(data) 05340 length = uabin.Primitives.Int32.unpack(data) 05341 array = [] 05342 if length != -1: 05343 for _ in range(0, length): 05344 array.append(AddReferencesItem.from_binary(data)) 05345 self.ReferencesToAdd = array 05346 05347 def __str__(self): 05348 return 'AddReferencesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 05349 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 05350 'ReferencesToAdd:' + str(self.ReferencesToAdd) + ')' 05351 05352 __repr__ = __str__ 05353 05354 05355 class AddReferencesResponse(FrozenClass): 05356 ''' 05357 Adds one or more references to the server address space. 05358 05359 :ivar TypeId: 05360 :vartype TypeId: NodeId 05361 :ivar ResponseHeader: 05362 :vartype ResponseHeader: ResponseHeader 05363 :ivar Results: 05364 :vartype Results: StatusCode 05365 :ivar DiagnosticInfos: 05366 :vartype DiagnosticInfos: DiagnosticInfo 05367 ''' 05368 05369 ua_types = { 05370 'TypeId': 'NodeId', 05371 'ResponseHeader': 'ResponseHeader', 05372 'Results': 'StatusCode', 05373 'DiagnosticInfos': 'DiagnosticInfo', 05374 } 05375 05376 def __init__(self, binary=None): 05377 if binary is not None: 05378 self._binary_init(binary) 05379 self._freeze = True 05380 return 05381 self.TypeId = FourByteNodeId(ObjectIds.AddReferencesResponse_Encoding_DefaultBinary) 05382 self.ResponseHeader = ResponseHeader() 05383 self.Results = [] 05384 self.DiagnosticInfos = [] 05385 self._freeze = True 05386 05387 def to_binary(self): 05388 packet = [] 05389 packet.append(self.TypeId.to_binary()) 05390 packet.append(self.ResponseHeader.to_binary()) 05391 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 05392 for fieldname in self.Results: 05393 packet.append(fieldname.to_binary()) 05394 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 05395 for fieldname in self.DiagnosticInfos: 05396 packet.append(fieldname.to_binary()) 05397 return b''.join(packet) 05398 05399 @staticmethod 05400 def from_binary(data): 05401 return AddReferencesResponse(data) 05402 05403 def _binary_init(self, data): 05404 self.TypeId = NodeId.from_binary(data) 05405 self.ResponseHeader = ResponseHeader.from_binary(data) 05406 length = uabin.Primitives.Int32.unpack(data) 05407 array = [] 05408 if length != -1: 05409 for _ in range(0, length): 05410 array.append(StatusCode.from_binary(data)) 05411 self.Results = array 05412 length = uabin.Primitives.Int32.unpack(data) 05413 array = [] 05414 if length != -1: 05415 for _ in range(0, length): 05416 array.append(DiagnosticInfo.from_binary(data)) 05417 self.DiagnosticInfos = array 05418 05419 def __str__(self): 05420 return 'AddReferencesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 05421 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 05422 'Results:' + str(self.Results) + ', ' + \ 05423 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 05424 05425 __repr__ = __str__ 05426 05427 05428 class DeleteNodesItem(FrozenClass): 05429 ''' 05430 A request to delete a node to the server address space. 05431 05432 :ivar NodeId: 05433 :vartype NodeId: NodeId 05434 :ivar DeleteTargetReferences: 05435 :vartype DeleteTargetReferences: Boolean 05436 ''' 05437 05438 ua_types = { 05439 'NodeId': 'NodeId', 05440 'DeleteTargetReferences': 'Boolean', 05441 } 05442 05443 def __init__(self, binary=None): 05444 if binary is not None: 05445 self._binary_init(binary) 05446 self._freeze = True 05447 return 05448 self.NodeId = NodeId() 05449 self.DeleteTargetReferences = True 05450 self._freeze = True 05451 05452 def to_binary(self): 05453 packet = [] 05454 packet.append(self.NodeId.to_binary()) 05455 packet.append(uabin.Primitives.Boolean.pack(self.DeleteTargetReferences)) 05456 return b''.join(packet) 05457 05458 @staticmethod 05459 def from_binary(data): 05460 return DeleteNodesItem(data) 05461 05462 def _binary_init(self, data): 05463 self.NodeId = NodeId.from_binary(data) 05464 self.DeleteTargetReferences = uabin.Primitives.Boolean.unpack(data) 05465 05466 def __str__(self): 05467 return 'DeleteNodesItem(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 05468 'DeleteTargetReferences:' + str(self.DeleteTargetReferences) + ')' 05469 05470 __repr__ = __str__ 05471 05472 05473 class DeleteNodesParameters(FrozenClass): 05474 ''' 05475 :ivar NodesToDelete: 05476 :vartype NodesToDelete: DeleteNodesItem 05477 ''' 05478 05479 ua_types = { 05480 'NodesToDelete': 'DeleteNodesItem', 05481 } 05482 05483 def __init__(self, binary=None): 05484 if binary is not None: 05485 self._binary_init(binary) 05486 self._freeze = True 05487 return 05488 self.NodesToDelete = [] 05489 self._freeze = True 05490 05491 def to_binary(self): 05492 packet = [] 05493 packet.append(uabin.Primitives.Int32.pack(len(self.NodesToDelete))) 05494 for fieldname in self.NodesToDelete: 05495 packet.append(fieldname.to_binary()) 05496 return b''.join(packet) 05497 05498 @staticmethod 05499 def from_binary(data): 05500 return DeleteNodesParameters(data) 05501 05502 def _binary_init(self, data): 05503 length = uabin.Primitives.Int32.unpack(data) 05504 array = [] 05505 if length != -1: 05506 for _ in range(0, length): 05507 array.append(DeleteNodesItem.from_binary(data)) 05508 self.NodesToDelete = array 05509 05510 def __str__(self): 05511 return 'DeleteNodesParameters(' + 'NodesToDelete:' + str(self.NodesToDelete) + ')' 05512 05513 __repr__ = __str__ 05514 05515 05516 class DeleteNodesRequest(FrozenClass): 05517 ''' 05518 Delete one or more nodes from the server address space. 05519 05520 :ivar TypeId: 05521 :vartype TypeId: NodeId 05522 :ivar RequestHeader: 05523 :vartype RequestHeader: RequestHeader 05524 :ivar Parameters: 05525 :vartype Parameters: DeleteNodesParameters 05526 ''' 05527 05528 ua_types = { 05529 'TypeId': 'NodeId', 05530 'RequestHeader': 'RequestHeader', 05531 'Parameters': 'DeleteNodesParameters', 05532 } 05533 05534 def __init__(self, binary=None): 05535 if binary is not None: 05536 self._binary_init(binary) 05537 self._freeze = True 05538 return 05539 self.TypeId = FourByteNodeId(ObjectIds.DeleteNodesRequest_Encoding_DefaultBinary) 05540 self.RequestHeader = RequestHeader() 05541 self.Parameters = DeleteNodesParameters() 05542 self._freeze = True 05543 05544 def to_binary(self): 05545 packet = [] 05546 packet.append(self.TypeId.to_binary()) 05547 packet.append(self.RequestHeader.to_binary()) 05548 packet.append(self.Parameters.to_binary()) 05549 return b''.join(packet) 05550 05551 @staticmethod 05552 def from_binary(data): 05553 return DeleteNodesRequest(data) 05554 05555 def _binary_init(self, data): 05556 self.TypeId = NodeId.from_binary(data) 05557 self.RequestHeader = RequestHeader.from_binary(data) 05558 self.Parameters = DeleteNodesParameters.from_binary(data) 05559 05560 def __str__(self): 05561 return 'DeleteNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 05562 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 05563 'Parameters:' + str(self.Parameters) + ')' 05564 05565 __repr__ = __str__ 05566 05567 05568 class DeleteNodesResponse(FrozenClass): 05569 ''' 05570 Delete one or more nodes from the server address space. 05571 05572 :ivar TypeId: 05573 :vartype TypeId: NodeId 05574 :ivar ResponseHeader: 05575 :vartype ResponseHeader: ResponseHeader 05576 :ivar Results: 05577 :vartype Results: StatusCode 05578 :ivar DiagnosticInfos: 05579 :vartype DiagnosticInfos: DiagnosticInfo 05580 ''' 05581 05582 ua_types = { 05583 'TypeId': 'NodeId', 05584 'ResponseHeader': 'ResponseHeader', 05585 'Results': 'StatusCode', 05586 'DiagnosticInfos': 'DiagnosticInfo', 05587 } 05588 05589 def __init__(self, binary=None): 05590 if binary is not None: 05591 self._binary_init(binary) 05592 self._freeze = True 05593 return 05594 self.TypeId = FourByteNodeId(ObjectIds.DeleteNodesResponse_Encoding_DefaultBinary) 05595 self.ResponseHeader = ResponseHeader() 05596 self.Results = [] 05597 self.DiagnosticInfos = [] 05598 self._freeze = True 05599 05600 def to_binary(self): 05601 packet = [] 05602 packet.append(self.TypeId.to_binary()) 05603 packet.append(self.ResponseHeader.to_binary()) 05604 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 05605 for fieldname in self.Results: 05606 packet.append(fieldname.to_binary()) 05607 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 05608 for fieldname in self.DiagnosticInfos: 05609 packet.append(fieldname.to_binary()) 05610 return b''.join(packet) 05611 05612 @staticmethod 05613 def from_binary(data): 05614 return DeleteNodesResponse(data) 05615 05616 def _binary_init(self, data): 05617 self.TypeId = NodeId.from_binary(data) 05618 self.ResponseHeader = ResponseHeader.from_binary(data) 05619 length = uabin.Primitives.Int32.unpack(data) 05620 array = [] 05621 if length != -1: 05622 for _ in range(0, length): 05623 array.append(StatusCode.from_binary(data)) 05624 self.Results = array 05625 length = uabin.Primitives.Int32.unpack(data) 05626 array = [] 05627 if length != -1: 05628 for _ in range(0, length): 05629 array.append(DiagnosticInfo.from_binary(data)) 05630 self.DiagnosticInfos = array 05631 05632 def __str__(self): 05633 return 'DeleteNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 05634 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 05635 'Results:' + str(self.Results) + ', ' + \ 05636 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 05637 05638 __repr__ = __str__ 05639 05640 05641 class DeleteReferencesItem(FrozenClass): 05642 ''' 05643 A request to delete a node from the server address space. 05644 05645 :ivar SourceNodeId: 05646 :vartype SourceNodeId: NodeId 05647 :ivar ReferenceTypeId: 05648 :vartype ReferenceTypeId: NodeId 05649 :ivar IsForward: 05650 :vartype IsForward: Boolean 05651 :ivar TargetNodeId: 05652 :vartype TargetNodeId: ExpandedNodeId 05653 :ivar DeleteBidirectional: 05654 :vartype DeleteBidirectional: Boolean 05655 ''' 05656 05657 ua_types = { 05658 'SourceNodeId': 'NodeId', 05659 'ReferenceTypeId': 'NodeId', 05660 'IsForward': 'Boolean', 05661 'TargetNodeId': 'ExpandedNodeId', 05662 'DeleteBidirectional': 'Boolean', 05663 } 05664 05665 def __init__(self, binary=None): 05666 if binary is not None: 05667 self._binary_init(binary) 05668 self._freeze = True 05669 return 05670 self.SourceNodeId = NodeId() 05671 self.ReferenceTypeId = NodeId() 05672 self.IsForward = True 05673 self.TargetNodeId = ExpandedNodeId() 05674 self.DeleteBidirectional = True 05675 self._freeze = True 05676 05677 def to_binary(self): 05678 packet = [] 05679 packet.append(self.SourceNodeId.to_binary()) 05680 packet.append(self.ReferenceTypeId.to_binary()) 05681 packet.append(uabin.Primitives.Boolean.pack(self.IsForward)) 05682 packet.append(self.TargetNodeId.to_binary()) 05683 packet.append(uabin.Primitives.Boolean.pack(self.DeleteBidirectional)) 05684 return b''.join(packet) 05685 05686 @staticmethod 05687 def from_binary(data): 05688 return DeleteReferencesItem(data) 05689 05690 def _binary_init(self, data): 05691 self.SourceNodeId = NodeId.from_binary(data) 05692 self.ReferenceTypeId = NodeId.from_binary(data) 05693 self.IsForward = uabin.Primitives.Boolean.unpack(data) 05694 self.TargetNodeId = ExpandedNodeId.from_binary(data) 05695 self.DeleteBidirectional = uabin.Primitives.Boolean.unpack(data) 05696 05697 def __str__(self): 05698 return 'DeleteReferencesItem(' + 'SourceNodeId:' + str(self.SourceNodeId) + ', ' + \ 05699 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ 05700 'IsForward:' + str(self.IsForward) + ', ' + \ 05701 'TargetNodeId:' + str(self.TargetNodeId) + ', ' + \ 05702 'DeleteBidirectional:' + str(self.DeleteBidirectional) + ')' 05703 05704 __repr__ = __str__ 05705 05706 05707 class DeleteReferencesParameters(FrozenClass): 05708 ''' 05709 :ivar ReferencesToDelete: 05710 :vartype ReferencesToDelete: DeleteReferencesItem 05711 ''' 05712 05713 ua_types = { 05714 'ReferencesToDelete': 'DeleteReferencesItem', 05715 } 05716 05717 def __init__(self, binary=None): 05718 if binary is not None: 05719 self._binary_init(binary) 05720 self._freeze = True 05721 return 05722 self.ReferencesToDelete = [] 05723 self._freeze = True 05724 05725 def to_binary(self): 05726 packet = [] 05727 packet.append(uabin.Primitives.Int32.pack(len(self.ReferencesToDelete))) 05728 for fieldname in self.ReferencesToDelete: 05729 packet.append(fieldname.to_binary()) 05730 return b''.join(packet) 05731 05732 @staticmethod 05733 def from_binary(data): 05734 return DeleteReferencesParameters(data) 05735 05736 def _binary_init(self, data): 05737 length = uabin.Primitives.Int32.unpack(data) 05738 array = [] 05739 if length != -1: 05740 for _ in range(0, length): 05741 array.append(DeleteReferencesItem.from_binary(data)) 05742 self.ReferencesToDelete = array 05743 05744 def __str__(self): 05745 return 'DeleteReferencesParameters(' + 'ReferencesToDelete:' + str(self.ReferencesToDelete) + ')' 05746 05747 __repr__ = __str__ 05748 05749 05750 class DeleteReferencesRequest(FrozenClass): 05751 ''' 05752 Delete one or more references from the server address space. 05753 05754 :ivar TypeId: 05755 :vartype TypeId: NodeId 05756 :ivar RequestHeader: 05757 :vartype RequestHeader: RequestHeader 05758 :ivar Parameters: 05759 :vartype Parameters: DeleteReferencesParameters 05760 ''' 05761 05762 ua_types = { 05763 'TypeId': 'NodeId', 05764 'RequestHeader': 'RequestHeader', 05765 'Parameters': 'DeleteReferencesParameters', 05766 } 05767 05768 def __init__(self, binary=None): 05769 if binary is not None: 05770 self._binary_init(binary) 05771 self._freeze = True 05772 return 05773 self.TypeId = FourByteNodeId(ObjectIds.DeleteReferencesRequest_Encoding_DefaultBinary) 05774 self.RequestHeader = RequestHeader() 05775 self.Parameters = DeleteReferencesParameters() 05776 self._freeze = True 05777 05778 def to_binary(self): 05779 packet = [] 05780 packet.append(self.TypeId.to_binary()) 05781 packet.append(self.RequestHeader.to_binary()) 05782 packet.append(self.Parameters.to_binary()) 05783 return b''.join(packet) 05784 05785 @staticmethod 05786 def from_binary(data): 05787 return DeleteReferencesRequest(data) 05788 05789 def _binary_init(self, data): 05790 self.TypeId = NodeId.from_binary(data) 05791 self.RequestHeader = RequestHeader.from_binary(data) 05792 self.Parameters = DeleteReferencesParameters.from_binary(data) 05793 05794 def __str__(self): 05795 return 'DeleteReferencesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 05796 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 05797 'Parameters:' + str(self.Parameters) + ')' 05798 05799 __repr__ = __str__ 05800 05801 05802 class DeleteReferencesResult(FrozenClass): 05803 ''' 05804 :ivar Results: 05805 :vartype Results: StatusCode 05806 :ivar DiagnosticInfos: 05807 :vartype DiagnosticInfos: DiagnosticInfo 05808 ''' 05809 05810 ua_types = { 05811 'Results': 'StatusCode', 05812 'DiagnosticInfos': 'DiagnosticInfo', 05813 } 05814 05815 def __init__(self, binary=None): 05816 if binary is not None: 05817 self._binary_init(binary) 05818 self._freeze = True 05819 return 05820 self.Results = [] 05821 self.DiagnosticInfos = [] 05822 self._freeze = True 05823 05824 def to_binary(self): 05825 packet = [] 05826 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 05827 for fieldname in self.Results: 05828 packet.append(fieldname.to_binary()) 05829 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 05830 for fieldname in self.DiagnosticInfos: 05831 packet.append(fieldname.to_binary()) 05832 return b''.join(packet) 05833 05834 @staticmethod 05835 def from_binary(data): 05836 return DeleteReferencesResult(data) 05837 05838 def _binary_init(self, data): 05839 length = uabin.Primitives.Int32.unpack(data) 05840 array = [] 05841 if length != -1: 05842 for _ in range(0, length): 05843 array.append(StatusCode.from_binary(data)) 05844 self.Results = array 05845 length = uabin.Primitives.Int32.unpack(data) 05846 array = [] 05847 if length != -1: 05848 for _ in range(0, length): 05849 array.append(DiagnosticInfo.from_binary(data)) 05850 self.DiagnosticInfos = array 05851 05852 def __str__(self): 05853 return 'DeleteReferencesResult(' + 'Results:' + str(self.Results) + ', ' + \ 05854 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 05855 05856 __repr__ = __str__ 05857 05858 05859 class DeleteReferencesResponse(FrozenClass): 05860 ''' 05861 Delete one or more references from the server address space. 05862 05863 :ivar TypeId: 05864 :vartype TypeId: NodeId 05865 :ivar ResponseHeader: 05866 :vartype ResponseHeader: ResponseHeader 05867 :ivar Parameters: 05868 :vartype Parameters: DeleteReferencesResult 05869 ''' 05870 05871 ua_types = { 05872 'TypeId': 'NodeId', 05873 'ResponseHeader': 'ResponseHeader', 05874 'Parameters': 'DeleteReferencesResult', 05875 } 05876 05877 def __init__(self, binary=None): 05878 if binary is not None: 05879 self._binary_init(binary) 05880 self._freeze = True 05881 return 05882 self.TypeId = FourByteNodeId(ObjectIds.DeleteReferencesResponse_Encoding_DefaultBinary) 05883 self.ResponseHeader = ResponseHeader() 05884 self.Parameters = DeleteReferencesResult() 05885 self._freeze = True 05886 05887 def to_binary(self): 05888 packet = [] 05889 packet.append(self.TypeId.to_binary()) 05890 packet.append(self.ResponseHeader.to_binary()) 05891 packet.append(self.Parameters.to_binary()) 05892 return b''.join(packet) 05893 05894 @staticmethod 05895 def from_binary(data): 05896 return DeleteReferencesResponse(data) 05897 05898 def _binary_init(self, data): 05899 self.TypeId = NodeId.from_binary(data) 05900 self.ResponseHeader = ResponseHeader.from_binary(data) 05901 self.Parameters = DeleteReferencesResult.from_binary(data) 05902 05903 def __str__(self): 05904 return 'DeleteReferencesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 05905 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 05906 'Parameters:' + str(self.Parameters) + ')' 05907 05908 __repr__ = __str__ 05909 05910 05911 class ViewDescription(FrozenClass): 05912 ''' 05913 The view to browse. 05914 05915 :ivar ViewId: 05916 :vartype ViewId: NodeId 05917 :ivar Timestamp: 05918 :vartype Timestamp: DateTime 05919 :ivar ViewVersion: 05920 :vartype ViewVersion: UInt32 05921 ''' 05922 05923 ua_types = { 05924 'ViewId': 'NodeId', 05925 'Timestamp': 'DateTime', 05926 'ViewVersion': 'UInt32', 05927 } 05928 05929 def __init__(self, binary=None): 05930 if binary is not None: 05931 self._binary_init(binary) 05932 self._freeze = True 05933 return 05934 self.ViewId = NodeId() 05935 self.Timestamp = datetime.now() 05936 self.ViewVersion = 0 05937 self._freeze = True 05938 05939 def to_binary(self): 05940 packet = [] 05941 packet.append(self.ViewId.to_binary()) 05942 packet.append(uabin.Primitives.DateTime.pack(self.Timestamp)) 05943 packet.append(uabin.Primitives.UInt32.pack(self.ViewVersion)) 05944 return b''.join(packet) 05945 05946 @staticmethod 05947 def from_binary(data): 05948 return ViewDescription(data) 05949 05950 def _binary_init(self, data): 05951 self.ViewId = NodeId.from_binary(data) 05952 self.Timestamp = uabin.Primitives.DateTime.unpack(data) 05953 self.ViewVersion = uabin.Primitives.UInt32.unpack(data) 05954 05955 def __str__(self): 05956 return 'ViewDescription(' + 'ViewId:' + str(self.ViewId) + ', ' + \ 05957 'Timestamp:' + str(self.Timestamp) + ', ' + \ 05958 'ViewVersion:' + str(self.ViewVersion) + ')' 05959 05960 __repr__ = __str__ 05961 05962 05963 class BrowseDescription(FrozenClass): 05964 ''' 05965 A request to browse the the references from a node. 05966 05967 :ivar NodeId: 05968 :vartype NodeId: NodeId 05969 :ivar BrowseDirection: 05970 :vartype BrowseDirection: BrowseDirection 05971 :ivar ReferenceTypeId: 05972 :vartype ReferenceTypeId: NodeId 05973 :ivar IncludeSubtypes: 05974 :vartype IncludeSubtypes: Boolean 05975 :ivar NodeClassMask: 05976 :vartype NodeClassMask: UInt32 05977 :ivar ResultMask: 05978 :vartype ResultMask: UInt32 05979 ''' 05980 05981 ua_types = { 05982 'NodeId': 'NodeId', 05983 'BrowseDirection': 'BrowseDirection', 05984 'ReferenceTypeId': 'NodeId', 05985 'IncludeSubtypes': 'Boolean', 05986 'NodeClassMask': 'UInt32', 05987 'ResultMask': 'UInt32', 05988 } 05989 05990 def __init__(self, binary=None): 05991 if binary is not None: 05992 self._binary_init(binary) 05993 self._freeze = True 05994 return 05995 self.NodeId = NodeId() 05996 self.BrowseDirection = BrowseDirection(0) 05997 self.ReferenceTypeId = NodeId() 05998 self.IncludeSubtypes = True 05999 self.NodeClassMask = 0 06000 self.ResultMask = 0 06001 self._freeze = True 06002 06003 def to_binary(self): 06004 packet = [] 06005 packet.append(self.NodeId.to_binary()) 06006 packet.append(uabin.Primitives.UInt32.pack(self.BrowseDirection.value)) 06007 packet.append(self.ReferenceTypeId.to_binary()) 06008 packet.append(uabin.Primitives.Boolean.pack(self.IncludeSubtypes)) 06009 packet.append(uabin.Primitives.UInt32.pack(self.NodeClassMask)) 06010 packet.append(uabin.Primitives.UInt32.pack(self.ResultMask)) 06011 return b''.join(packet) 06012 06013 @staticmethod 06014 def from_binary(data): 06015 return BrowseDescription(data) 06016 06017 def _binary_init(self, data): 06018 self.NodeId = NodeId.from_binary(data) 06019 self.BrowseDirection = BrowseDirection(uabin.Primitives.UInt32.unpack(data)) 06020 self.ReferenceTypeId = NodeId.from_binary(data) 06021 self.IncludeSubtypes = uabin.Primitives.Boolean.unpack(data) 06022 self.NodeClassMask = uabin.Primitives.UInt32.unpack(data) 06023 self.ResultMask = uabin.Primitives.UInt32.unpack(data) 06024 06025 def __str__(self): 06026 return 'BrowseDescription(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 06027 'BrowseDirection:' + str(self.BrowseDirection) + ', ' + \ 06028 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ 06029 'IncludeSubtypes:' + str(self.IncludeSubtypes) + ', ' + \ 06030 'NodeClassMask:' + str(self.NodeClassMask) + ', ' + \ 06031 'ResultMask:' + str(self.ResultMask) + ')' 06032 06033 __repr__ = __str__ 06034 06035 06036 class ReferenceDescription(FrozenClass): 06037 ''' 06038 The description of a reference. 06039 06040 :ivar ReferenceTypeId: 06041 :vartype ReferenceTypeId: NodeId 06042 :ivar IsForward: 06043 :vartype IsForward: Boolean 06044 :ivar NodeId: 06045 :vartype NodeId: ExpandedNodeId 06046 :ivar BrowseName: 06047 :vartype BrowseName: QualifiedName 06048 :ivar DisplayName: 06049 :vartype DisplayName: LocalizedText 06050 :ivar NodeClass: 06051 :vartype NodeClass: NodeClass 06052 :ivar TypeDefinition: 06053 :vartype TypeDefinition: ExpandedNodeId 06054 ''' 06055 06056 ua_types = { 06057 'ReferenceTypeId': 'NodeId', 06058 'IsForward': 'Boolean', 06059 'NodeId': 'ExpandedNodeId', 06060 'BrowseName': 'QualifiedName', 06061 'DisplayName': 'LocalizedText', 06062 'NodeClass': 'NodeClass', 06063 'TypeDefinition': 'ExpandedNodeId', 06064 } 06065 06066 def __init__(self, binary=None): 06067 if binary is not None: 06068 self._binary_init(binary) 06069 self._freeze = True 06070 return 06071 self.ReferenceTypeId = NodeId() 06072 self.IsForward = True 06073 self.NodeId = ExpandedNodeId() 06074 self.BrowseName = QualifiedName() 06075 self.DisplayName = LocalizedText() 06076 self.NodeClass = NodeClass(0) 06077 self.TypeDefinition = ExpandedNodeId() 06078 self._freeze = True 06079 06080 def to_binary(self): 06081 packet = [] 06082 packet.append(self.ReferenceTypeId.to_binary()) 06083 packet.append(uabin.Primitives.Boolean.pack(self.IsForward)) 06084 packet.append(self.NodeId.to_binary()) 06085 packet.append(self.BrowseName.to_binary()) 06086 packet.append(self.DisplayName.to_binary()) 06087 packet.append(uabin.Primitives.UInt32.pack(self.NodeClass.value)) 06088 packet.append(self.TypeDefinition.to_binary()) 06089 return b''.join(packet) 06090 06091 @staticmethod 06092 def from_binary(data): 06093 return ReferenceDescription(data) 06094 06095 def _binary_init(self, data): 06096 self.ReferenceTypeId = NodeId.from_binary(data) 06097 self.IsForward = uabin.Primitives.Boolean.unpack(data) 06098 self.NodeId = ExpandedNodeId.from_binary(data) 06099 self.BrowseName = QualifiedName.from_binary(data) 06100 self.DisplayName = LocalizedText.from_binary(data) 06101 self.NodeClass = NodeClass(uabin.Primitives.UInt32.unpack(data)) 06102 self.TypeDefinition = ExpandedNodeId.from_binary(data) 06103 06104 def __str__(self): 06105 return 'ReferenceDescription(' + 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ 06106 'IsForward:' + str(self.IsForward) + ', ' + \ 06107 'NodeId:' + str(self.NodeId) + ', ' + \ 06108 'BrowseName:' + str(self.BrowseName) + ', ' + \ 06109 'DisplayName:' + str(self.DisplayName) + ', ' + \ 06110 'NodeClass:' + str(self.NodeClass) + ', ' + \ 06111 'TypeDefinition:' + str(self.TypeDefinition) + ')' 06112 06113 __repr__ = __str__ 06114 06115 06116 class BrowseResult(FrozenClass): 06117 ''' 06118 The result of a browse operation. 06119 06120 :ivar StatusCode: 06121 :vartype StatusCode: StatusCode 06122 :ivar ContinuationPoint: 06123 :vartype ContinuationPoint: ByteString 06124 :ivar References: 06125 :vartype References: ReferenceDescription 06126 ''' 06127 06128 ua_types = { 06129 'StatusCode': 'StatusCode', 06130 'ContinuationPoint': 'ByteString', 06131 'References': 'ReferenceDescription', 06132 } 06133 06134 def __init__(self, binary=None): 06135 if binary is not None: 06136 self._binary_init(binary) 06137 self._freeze = True 06138 return 06139 self.StatusCode = StatusCode() 06140 self.ContinuationPoint = None 06141 self.References = [] 06142 self._freeze = True 06143 06144 def to_binary(self): 06145 packet = [] 06146 packet.append(self.StatusCode.to_binary()) 06147 packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint)) 06148 packet.append(uabin.Primitives.Int32.pack(len(self.References))) 06149 for fieldname in self.References: 06150 packet.append(fieldname.to_binary()) 06151 return b''.join(packet) 06152 06153 @staticmethod 06154 def from_binary(data): 06155 return BrowseResult(data) 06156 06157 def _binary_init(self, data): 06158 self.StatusCode = StatusCode.from_binary(data) 06159 self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data) 06160 length = uabin.Primitives.Int32.unpack(data) 06161 array = [] 06162 if length != -1: 06163 for _ in range(0, length): 06164 array.append(ReferenceDescription.from_binary(data)) 06165 self.References = array 06166 06167 def __str__(self): 06168 return 'BrowseResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 06169 'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \ 06170 'References:' + str(self.References) + ')' 06171 06172 __repr__ = __str__ 06173 06174 06175 class BrowseParameters(FrozenClass): 06176 ''' 06177 :ivar View: 06178 :vartype View: ViewDescription 06179 :ivar RequestedMaxReferencesPerNode: 06180 :vartype RequestedMaxReferencesPerNode: UInt32 06181 :ivar NodesToBrowse: 06182 :vartype NodesToBrowse: BrowseDescription 06183 ''' 06184 06185 ua_types = { 06186 'View': 'ViewDescription', 06187 'RequestedMaxReferencesPerNode': 'UInt32', 06188 'NodesToBrowse': 'BrowseDescription', 06189 } 06190 06191 def __init__(self, binary=None): 06192 if binary is not None: 06193 self._binary_init(binary) 06194 self._freeze = True 06195 return 06196 self.View = ViewDescription() 06197 self.RequestedMaxReferencesPerNode = 0 06198 self.NodesToBrowse = [] 06199 self._freeze = True 06200 06201 def to_binary(self): 06202 packet = [] 06203 packet.append(self.View.to_binary()) 06204 packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxReferencesPerNode)) 06205 packet.append(uabin.Primitives.Int32.pack(len(self.NodesToBrowse))) 06206 for fieldname in self.NodesToBrowse: 06207 packet.append(fieldname.to_binary()) 06208 return b''.join(packet) 06209 06210 @staticmethod 06211 def from_binary(data): 06212 return BrowseParameters(data) 06213 06214 def _binary_init(self, data): 06215 self.View = ViewDescription.from_binary(data) 06216 self.RequestedMaxReferencesPerNode = uabin.Primitives.UInt32.unpack(data) 06217 length = uabin.Primitives.Int32.unpack(data) 06218 array = [] 06219 if length != -1: 06220 for _ in range(0, length): 06221 array.append(BrowseDescription.from_binary(data)) 06222 self.NodesToBrowse = array 06223 06224 def __str__(self): 06225 return 'BrowseParameters(' + 'View:' + str(self.View) + ', ' + \ 06226 'RequestedMaxReferencesPerNode:' + str(self.RequestedMaxReferencesPerNode) + ', ' + \ 06227 'NodesToBrowse:' + str(self.NodesToBrowse) + ')' 06228 06229 __repr__ = __str__ 06230 06231 06232 class BrowseRequest(FrozenClass): 06233 ''' 06234 Browse the references for one or more nodes from the server address space. 06235 06236 :ivar TypeId: 06237 :vartype TypeId: NodeId 06238 :ivar RequestHeader: 06239 :vartype RequestHeader: RequestHeader 06240 :ivar Parameters: 06241 :vartype Parameters: BrowseParameters 06242 ''' 06243 06244 ua_types = { 06245 'TypeId': 'NodeId', 06246 'RequestHeader': 'RequestHeader', 06247 'Parameters': 'BrowseParameters', 06248 } 06249 06250 def __init__(self, binary=None): 06251 if binary is not None: 06252 self._binary_init(binary) 06253 self._freeze = True 06254 return 06255 self.TypeId = FourByteNodeId(ObjectIds.BrowseRequest_Encoding_DefaultBinary) 06256 self.RequestHeader = RequestHeader() 06257 self.Parameters = BrowseParameters() 06258 self._freeze = True 06259 06260 def to_binary(self): 06261 packet = [] 06262 packet.append(self.TypeId.to_binary()) 06263 packet.append(self.RequestHeader.to_binary()) 06264 packet.append(self.Parameters.to_binary()) 06265 return b''.join(packet) 06266 06267 @staticmethod 06268 def from_binary(data): 06269 return BrowseRequest(data) 06270 06271 def _binary_init(self, data): 06272 self.TypeId = NodeId.from_binary(data) 06273 self.RequestHeader = RequestHeader.from_binary(data) 06274 self.Parameters = BrowseParameters.from_binary(data) 06275 06276 def __str__(self): 06277 return 'BrowseRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 06278 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 06279 'Parameters:' + str(self.Parameters) + ')' 06280 06281 __repr__ = __str__ 06282 06283 06284 class BrowseResponse(FrozenClass): 06285 ''' 06286 Browse the references for one or more nodes from the server address space. 06287 06288 :ivar TypeId: 06289 :vartype TypeId: NodeId 06290 :ivar ResponseHeader: 06291 :vartype ResponseHeader: ResponseHeader 06292 :ivar Results: 06293 :vartype Results: BrowseResult 06294 :ivar DiagnosticInfos: 06295 :vartype DiagnosticInfos: DiagnosticInfo 06296 ''' 06297 06298 ua_types = { 06299 'TypeId': 'NodeId', 06300 'ResponseHeader': 'ResponseHeader', 06301 'Results': 'BrowseResult', 06302 'DiagnosticInfos': 'DiagnosticInfo', 06303 } 06304 06305 def __init__(self, binary=None): 06306 if binary is not None: 06307 self._binary_init(binary) 06308 self._freeze = True 06309 return 06310 self.TypeId = FourByteNodeId(ObjectIds.BrowseResponse_Encoding_DefaultBinary) 06311 self.ResponseHeader = ResponseHeader() 06312 self.Results = [] 06313 self.DiagnosticInfos = [] 06314 self._freeze = True 06315 06316 def to_binary(self): 06317 packet = [] 06318 packet.append(self.TypeId.to_binary()) 06319 packet.append(self.ResponseHeader.to_binary()) 06320 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 06321 for fieldname in self.Results: 06322 packet.append(fieldname.to_binary()) 06323 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 06324 for fieldname in self.DiagnosticInfos: 06325 packet.append(fieldname.to_binary()) 06326 return b''.join(packet) 06327 06328 @staticmethod 06329 def from_binary(data): 06330 return BrowseResponse(data) 06331 06332 def _binary_init(self, data): 06333 self.TypeId = NodeId.from_binary(data) 06334 self.ResponseHeader = ResponseHeader.from_binary(data) 06335 length = uabin.Primitives.Int32.unpack(data) 06336 array = [] 06337 if length != -1: 06338 for _ in range(0, length): 06339 array.append(BrowseResult.from_binary(data)) 06340 self.Results = array 06341 length = uabin.Primitives.Int32.unpack(data) 06342 array = [] 06343 if length != -1: 06344 for _ in range(0, length): 06345 array.append(DiagnosticInfo.from_binary(data)) 06346 self.DiagnosticInfos = array 06347 06348 def __str__(self): 06349 return 'BrowseResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 06350 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 06351 'Results:' + str(self.Results) + ', ' + \ 06352 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 06353 06354 __repr__ = __str__ 06355 06356 06357 class BrowseNextParameters(FrozenClass): 06358 ''' 06359 :ivar ReleaseContinuationPoints: 06360 :vartype ReleaseContinuationPoints: Boolean 06361 :ivar ContinuationPoints: 06362 :vartype ContinuationPoints: ByteString 06363 ''' 06364 06365 ua_types = { 06366 'ReleaseContinuationPoints': 'Boolean', 06367 'ContinuationPoints': 'ByteString', 06368 } 06369 06370 def __init__(self, binary=None): 06371 if binary is not None: 06372 self._binary_init(binary) 06373 self._freeze = True 06374 return 06375 self.ReleaseContinuationPoints = True 06376 self.ContinuationPoints = [] 06377 self._freeze = True 06378 06379 def to_binary(self): 06380 packet = [] 06381 packet.append(uabin.Primitives.Boolean.pack(self.ReleaseContinuationPoints)) 06382 packet.append(uabin.Primitives.Int32.pack(len(self.ContinuationPoints))) 06383 for fieldname in self.ContinuationPoints: 06384 packet.append(uabin.Primitives.ByteString.pack(fieldname)) 06385 return b''.join(packet) 06386 06387 @staticmethod 06388 def from_binary(data): 06389 return BrowseNextParameters(data) 06390 06391 def _binary_init(self, data): 06392 self.ReleaseContinuationPoints = uabin.Primitives.Boolean.unpack(data) 06393 self.ContinuationPoints = uabin.Primitives.ByteString.unpack_array(data) 06394 06395 def __str__(self): 06396 return 'BrowseNextParameters(' + 'ReleaseContinuationPoints:' + str(self.ReleaseContinuationPoints) + ', ' + \ 06397 'ContinuationPoints:' + str(self.ContinuationPoints) + ')' 06398 06399 __repr__ = __str__ 06400 06401 06402 class BrowseNextRequest(FrozenClass): 06403 ''' 06404 Continues one or more browse operations. 06405 06406 :ivar TypeId: 06407 :vartype TypeId: NodeId 06408 :ivar RequestHeader: 06409 :vartype RequestHeader: RequestHeader 06410 :ivar Parameters: 06411 :vartype Parameters: BrowseNextParameters 06412 ''' 06413 06414 ua_types = { 06415 'TypeId': 'NodeId', 06416 'RequestHeader': 'RequestHeader', 06417 'Parameters': 'BrowseNextParameters', 06418 } 06419 06420 def __init__(self, binary=None): 06421 if binary is not None: 06422 self._binary_init(binary) 06423 self._freeze = True 06424 return 06425 self.TypeId = FourByteNodeId(ObjectIds.BrowseNextRequest_Encoding_DefaultBinary) 06426 self.RequestHeader = RequestHeader() 06427 self.Parameters = BrowseNextParameters() 06428 self._freeze = True 06429 06430 def to_binary(self): 06431 packet = [] 06432 packet.append(self.TypeId.to_binary()) 06433 packet.append(self.RequestHeader.to_binary()) 06434 packet.append(self.Parameters.to_binary()) 06435 return b''.join(packet) 06436 06437 @staticmethod 06438 def from_binary(data): 06439 return BrowseNextRequest(data) 06440 06441 def _binary_init(self, data): 06442 self.TypeId = NodeId.from_binary(data) 06443 self.RequestHeader = RequestHeader.from_binary(data) 06444 self.Parameters = BrowseNextParameters.from_binary(data) 06445 06446 def __str__(self): 06447 return 'BrowseNextRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 06448 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 06449 'Parameters:' + str(self.Parameters) + ')' 06450 06451 __repr__ = __str__ 06452 06453 06454 class BrowseNextResult(FrozenClass): 06455 ''' 06456 :ivar Results: 06457 :vartype Results: BrowseResult 06458 :ivar DiagnosticInfos: 06459 :vartype DiagnosticInfos: DiagnosticInfo 06460 ''' 06461 06462 ua_types = { 06463 'Results': 'BrowseResult', 06464 'DiagnosticInfos': 'DiagnosticInfo', 06465 } 06466 06467 def __init__(self, binary=None): 06468 if binary is not None: 06469 self._binary_init(binary) 06470 self._freeze = True 06471 return 06472 self.Results = [] 06473 self.DiagnosticInfos = [] 06474 self._freeze = True 06475 06476 def to_binary(self): 06477 packet = [] 06478 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 06479 for fieldname in self.Results: 06480 packet.append(fieldname.to_binary()) 06481 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 06482 for fieldname in self.DiagnosticInfos: 06483 packet.append(fieldname.to_binary()) 06484 return b''.join(packet) 06485 06486 @staticmethod 06487 def from_binary(data): 06488 return BrowseNextResult(data) 06489 06490 def _binary_init(self, data): 06491 length = uabin.Primitives.Int32.unpack(data) 06492 array = [] 06493 if length != -1: 06494 for _ in range(0, length): 06495 array.append(BrowseResult.from_binary(data)) 06496 self.Results = array 06497 length = uabin.Primitives.Int32.unpack(data) 06498 array = [] 06499 if length != -1: 06500 for _ in range(0, length): 06501 array.append(DiagnosticInfo.from_binary(data)) 06502 self.DiagnosticInfos = array 06503 06504 def __str__(self): 06505 return 'BrowseNextResult(' + 'Results:' + str(self.Results) + ', ' + \ 06506 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 06507 06508 __repr__ = __str__ 06509 06510 06511 class BrowseNextResponse(FrozenClass): 06512 ''' 06513 Continues one or more browse operations. 06514 06515 :ivar TypeId: 06516 :vartype TypeId: NodeId 06517 :ivar ResponseHeader: 06518 :vartype ResponseHeader: ResponseHeader 06519 :ivar Parameters: 06520 :vartype Parameters: BrowseNextResult 06521 ''' 06522 06523 ua_types = { 06524 'TypeId': 'NodeId', 06525 'ResponseHeader': 'ResponseHeader', 06526 'Parameters': 'BrowseNextResult', 06527 } 06528 06529 def __init__(self, binary=None): 06530 if binary is not None: 06531 self._binary_init(binary) 06532 self._freeze = True 06533 return 06534 self.TypeId = FourByteNodeId(ObjectIds.BrowseNextResponse_Encoding_DefaultBinary) 06535 self.ResponseHeader = ResponseHeader() 06536 self.Parameters = BrowseNextResult() 06537 self._freeze = True 06538 06539 def to_binary(self): 06540 packet = [] 06541 packet.append(self.TypeId.to_binary()) 06542 packet.append(self.ResponseHeader.to_binary()) 06543 packet.append(self.Parameters.to_binary()) 06544 return b''.join(packet) 06545 06546 @staticmethod 06547 def from_binary(data): 06548 return BrowseNextResponse(data) 06549 06550 def _binary_init(self, data): 06551 self.TypeId = NodeId.from_binary(data) 06552 self.ResponseHeader = ResponseHeader.from_binary(data) 06553 self.Parameters = BrowseNextResult.from_binary(data) 06554 06555 def __str__(self): 06556 return 'BrowseNextResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 06557 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 06558 'Parameters:' + str(self.Parameters) + ')' 06559 06560 __repr__ = __str__ 06561 06562 06563 class RelativePathElement(FrozenClass): 06564 ''' 06565 An element in a relative path. 06566 06567 :ivar ReferenceTypeId: 06568 :vartype ReferenceTypeId: NodeId 06569 :ivar IsInverse: 06570 :vartype IsInverse: Boolean 06571 :ivar IncludeSubtypes: 06572 :vartype IncludeSubtypes: Boolean 06573 :ivar TargetName: 06574 :vartype TargetName: QualifiedName 06575 ''' 06576 06577 ua_types = { 06578 'ReferenceTypeId': 'NodeId', 06579 'IsInverse': 'Boolean', 06580 'IncludeSubtypes': 'Boolean', 06581 'TargetName': 'QualifiedName', 06582 } 06583 06584 def __init__(self, binary=None): 06585 if binary is not None: 06586 self._binary_init(binary) 06587 self._freeze = True 06588 return 06589 self.ReferenceTypeId = NodeId() 06590 self.IsInverse = True 06591 self.IncludeSubtypes = True 06592 self.TargetName = QualifiedName() 06593 self._freeze = True 06594 06595 def to_binary(self): 06596 packet = [] 06597 packet.append(self.ReferenceTypeId.to_binary()) 06598 packet.append(uabin.Primitives.Boolean.pack(self.IsInverse)) 06599 packet.append(uabin.Primitives.Boolean.pack(self.IncludeSubtypes)) 06600 packet.append(self.TargetName.to_binary()) 06601 return b''.join(packet) 06602 06603 @staticmethod 06604 def from_binary(data): 06605 return RelativePathElement(data) 06606 06607 def _binary_init(self, data): 06608 self.ReferenceTypeId = NodeId.from_binary(data) 06609 self.IsInverse = uabin.Primitives.Boolean.unpack(data) 06610 self.IncludeSubtypes = uabin.Primitives.Boolean.unpack(data) 06611 self.TargetName = QualifiedName.from_binary(data) 06612 06613 def __str__(self): 06614 return 'RelativePathElement(' + 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ 06615 'IsInverse:' + str(self.IsInverse) + ', ' + \ 06616 'IncludeSubtypes:' + str(self.IncludeSubtypes) + ', ' + \ 06617 'TargetName:' + str(self.TargetName) + ')' 06618 06619 __repr__ = __str__ 06620 06621 06622 class RelativePath(FrozenClass): 06623 ''' 06624 A relative path constructed from reference types and browse names. 06625 06626 :ivar Elements: 06627 :vartype Elements: RelativePathElement 06628 ''' 06629 06630 ua_types = { 06631 'Elements': 'RelativePathElement', 06632 } 06633 06634 def __init__(self, binary=None): 06635 if binary is not None: 06636 self._binary_init(binary) 06637 self._freeze = True 06638 return 06639 self.Elements = [] 06640 self._freeze = True 06641 06642 def to_binary(self): 06643 packet = [] 06644 packet.append(uabin.Primitives.Int32.pack(len(self.Elements))) 06645 for fieldname in self.Elements: 06646 packet.append(fieldname.to_binary()) 06647 return b''.join(packet) 06648 06649 @staticmethod 06650 def from_binary(data): 06651 return RelativePath(data) 06652 06653 def _binary_init(self, data): 06654 length = uabin.Primitives.Int32.unpack(data) 06655 array = [] 06656 if length != -1: 06657 for _ in range(0, length): 06658 array.append(RelativePathElement.from_binary(data)) 06659 self.Elements = array 06660 06661 def __str__(self): 06662 return 'RelativePath(' + 'Elements:' + str(self.Elements) + ')' 06663 06664 __repr__ = __str__ 06665 06666 06667 class BrowsePath(FrozenClass): 06668 ''' 06669 A request to translate a path into a node id. 06670 06671 :ivar StartingNode: 06672 :vartype StartingNode: NodeId 06673 :ivar RelativePath: 06674 :vartype RelativePath: RelativePath 06675 ''' 06676 06677 ua_types = { 06678 'StartingNode': 'NodeId', 06679 'RelativePath': 'RelativePath', 06680 } 06681 06682 def __init__(self, binary=None): 06683 if binary is not None: 06684 self._binary_init(binary) 06685 self._freeze = True 06686 return 06687 self.StartingNode = NodeId() 06688 self.RelativePath = RelativePath() 06689 self._freeze = True 06690 06691 def to_binary(self): 06692 packet = [] 06693 packet.append(self.StartingNode.to_binary()) 06694 packet.append(self.RelativePath.to_binary()) 06695 return b''.join(packet) 06696 06697 @staticmethod 06698 def from_binary(data): 06699 return BrowsePath(data) 06700 06701 def _binary_init(self, data): 06702 self.StartingNode = NodeId.from_binary(data) 06703 self.RelativePath = RelativePath.from_binary(data) 06704 06705 def __str__(self): 06706 return 'BrowsePath(' + 'StartingNode:' + str(self.StartingNode) + ', ' + \ 06707 'RelativePath:' + str(self.RelativePath) + ')' 06708 06709 __repr__ = __str__ 06710 06711 06712 class BrowsePathTarget(FrozenClass): 06713 ''' 06714 The target of the translated path. 06715 06716 :ivar TargetId: 06717 :vartype TargetId: ExpandedNodeId 06718 :ivar RemainingPathIndex: 06719 :vartype RemainingPathIndex: UInt32 06720 ''' 06721 06722 ua_types = { 06723 'TargetId': 'ExpandedNodeId', 06724 'RemainingPathIndex': 'UInt32', 06725 } 06726 06727 def __init__(self, binary=None): 06728 if binary is not None: 06729 self._binary_init(binary) 06730 self._freeze = True 06731 return 06732 self.TargetId = ExpandedNodeId() 06733 self.RemainingPathIndex = 0 06734 self._freeze = True 06735 06736 def to_binary(self): 06737 packet = [] 06738 packet.append(self.TargetId.to_binary()) 06739 packet.append(uabin.Primitives.UInt32.pack(self.RemainingPathIndex)) 06740 return b''.join(packet) 06741 06742 @staticmethod 06743 def from_binary(data): 06744 return BrowsePathTarget(data) 06745 06746 def _binary_init(self, data): 06747 self.TargetId = ExpandedNodeId.from_binary(data) 06748 self.RemainingPathIndex = uabin.Primitives.UInt32.unpack(data) 06749 06750 def __str__(self): 06751 return 'BrowsePathTarget(' + 'TargetId:' + str(self.TargetId) + ', ' + \ 06752 'RemainingPathIndex:' + str(self.RemainingPathIndex) + ')' 06753 06754 __repr__ = __str__ 06755 06756 06757 class BrowsePathResult(FrozenClass): 06758 ''' 06759 The result of a translate opearation. 06760 06761 :ivar StatusCode: 06762 :vartype StatusCode: StatusCode 06763 :ivar Targets: 06764 :vartype Targets: BrowsePathTarget 06765 ''' 06766 06767 ua_types = { 06768 'StatusCode': 'StatusCode', 06769 'Targets': 'BrowsePathTarget', 06770 } 06771 06772 def __init__(self, binary=None): 06773 if binary is not None: 06774 self._binary_init(binary) 06775 self._freeze = True 06776 return 06777 self.StatusCode = StatusCode() 06778 self.Targets = [] 06779 self._freeze = True 06780 06781 def to_binary(self): 06782 packet = [] 06783 packet.append(self.StatusCode.to_binary()) 06784 packet.append(uabin.Primitives.Int32.pack(len(self.Targets))) 06785 for fieldname in self.Targets: 06786 packet.append(fieldname.to_binary()) 06787 return b''.join(packet) 06788 06789 @staticmethod 06790 def from_binary(data): 06791 return BrowsePathResult(data) 06792 06793 def _binary_init(self, data): 06794 self.StatusCode = StatusCode.from_binary(data) 06795 length = uabin.Primitives.Int32.unpack(data) 06796 array = [] 06797 if length != -1: 06798 for _ in range(0, length): 06799 array.append(BrowsePathTarget.from_binary(data)) 06800 self.Targets = array 06801 06802 def __str__(self): 06803 return 'BrowsePathResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 06804 'Targets:' + str(self.Targets) + ')' 06805 06806 __repr__ = __str__ 06807 06808 06809 class TranslateBrowsePathsToNodeIdsParameters(FrozenClass): 06810 ''' 06811 :ivar BrowsePaths: 06812 :vartype BrowsePaths: BrowsePath 06813 ''' 06814 06815 ua_types = { 06816 'BrowsePaths': 'BrowsePath', 06817 } 06818 06819 def __init__(self, binary=None): 06820 if binary is not None: 06821 self._binary_init(binary) 06822 self._freeze = True 06823 return 06824 self.BrowsePaths = [] 06825 self._freeze = True 06826 06827 def to_binary(self): 06828 packet = [] 06829 packet.append(uabin.Primitives.Int32.pack(len(self.BrowsePaths))) 06830 for fieldname in self.BrowsePaths: 06831 packet.append(fieldname.to_binary()) 06832 return b''.join(packet) 06833 06834 @staticmethod 06835 def from_binary(data): 06836 return TranslateBrowsePathsToNodeIdsParameters(data) 06837 06838 def _binary_init(self, data): 06839 length = uabin.Primitives.Int32.unpack(data) 06840 array = [] 06841 if length != -1: 06842 for _ in range(0, length): 06843 array.append(BrowsePath.from_binary(data)) 06844 self.BrowsePaths = array 06845 06846 def __str__(self): 06847 return 'TranslateBrowsePathsToNodeIdsParameters(' + 'BrowsePaths:' + str(self.BrowsePaths) + ')' 06848 06849 __repr__ = __str__ 06850 06851 06852 class TranslateBrowsePathsToNodeIdsRequest(FrozenClass): 06853 ''' 06854 Translates one or more paths in the server address space. 06855 06856 :ivar TypeId: 06857 :vartype TypeId: NodeId 06858 :ivar RequestHeader: 06859 :vartype RequestHeader: RequestHeader 06860 :ivar Parameters: 06861 :vartype Parameters: TranslateBrowsePathsToNodeIdsParameters 06862 ''' 06863 06864 ua_types = { 06865 'TypeId': 'NodeId', 06866 'RequestHeader': 'RequestHeader', 06867 'Parameters': 'TranslateBrowsePathsToNodeIdsParameters', 06868 } 06869 06870 def __init__(self, binary=None): 06871 if binary is not None: 06872 self._binary_init(binary) 06873 self._freeze = True 06874 return 06875 self.TypeId = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultBinary) 06876 self.RequestHeader = RequestHeader() 06877 self.Parameters = TranslateBrowsePathsToNodeIdsParameters() 06878 self._freeze = True 06879 06880 def to_binary(self): 06881 packet = [] 06882 packet.append(self.TypeId.to_binary()) 06883 packet.append(self.RequestHeader.to_binary()) 06884 packet.append(self.Parameters.to_binary()) 06885 return b''.join(packet) 06886 06887 @staticmethod 06888 def from_binary(data): 06889 return TranslateBrowsePathsToNodeIdsRequest(data) 06890 06891 def _binary_init(self, data): 06892 self.TypeId = NodeId.from_binary(data) 06893 self.RequestHeader = RequestHeader.from_binary(data) 06894 self.Parameters = TranslateBrowsePathsToNodeIdsParameters.from_binary(data) 06895 06896 def __str__(self): 06897 return 'TranslateBrowsePathsToNodeIdsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 06898 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 06899 'Parameters:' + str(self.Parameters) + ')' 06900 06901 __repr__ = __str__ 06902 06903 06904 class TranslateBrowsePathsToNodeIdsResponse(FrozenClass): 06905 ''' 06906 Translates one or more paths in the server address space. 06907 06908 :ivar TypeId: 06909 :vartype TypeId: NodeId 06910 :ivar ResponseHeader: 06911 :vartype ResponseHeader: ResponseHeader 06912 :ivar Results: 06913 :vartype Results: BrowsePathResult 06914 :ivar DiagnosticInfos: 06915 :vartype DiagnosticInfos: DiagnosticInfo 06916 ''' 06917 06918 ua_types = { 06919 'TypeId': 'NodeId', 06920 'ResponseHeader': 'ResponseHeader', 06921 'Results': 'BrowsePathResult', 06922 'DiagnosticInfos': 'DiagnosticInfo', 06923 } 06924 06925 def __init__(self, binary=None): 06926 if binary is not None: 06927 self._binary_init(binary) 06928 self._freeze = True 06929 return 06930 self.TypeId = FourByteNodeId(ObjectIds.TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultBinary) 06931 self.ResponseHeader = ResponseHeader() 06932 self.Results = [] 06933 self.DiagnosticInfos = [] 06934 self._freeze = True 06935 06936 def to_binary(self): 06937 packet = [] 06938 packet.append(self.TypeId.to_binary()) 06939 packet.append(self.ResponseHeader.to_binary()) 06940 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 06941 for fieldname in self.Results: 06942 packet.append(fieldname.to_binary()) 06943 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 06944 for fieldname in self.DiagnosticInfos: 06945 packet.append(fieldname.to_binary()) 06946 return b''.join(packet) 06947 06948 @staticmethod 06949 def from_binary(data): 06950 return TranslateBrowsePathsToNodeIdsResponse(data) 06951 06952 def _binary_init(self, data): 06953 self.TypeId = NodeId.from_binary(data) 06954 self.ResponseHeader = ResponseHeader.from_binary(data) 06955 length = uabin.Primitives.Int32.unpack(data) 06956 array = [] 06957 if length != -1: 06958 for _ in range(0, length): 06959 array.append(BrowsePathResult.from_binary(data)) 06960 self.Results = array 06961 length = uabin.Primitives.Int32.unpack(data) 06962 array = [] 06963 if length != -1: 06964 for _ in range(0, length): 06965 array.append(DiagnosticInfo.from_binary(data)) 06966 self.DiagnosticInfos = array 06967 06968 def __str__(self): 06969 return 'TranslateBrowsePathsToNodeIdsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 06970 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 06971 'Results:' + str(self.Results) + ', ' + \ 06972 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 06973 06974 __repr__ = __str__ 06975 06976 06977 class RegisterNodesParameters(FrozenClass): 06978 ''' 06979 :ivar NodesToRegister: 06980 :vartype NodesToRegister: NodeId 06981 ''' 06982 06983 ua_types = { 06984 'NodesToRegister': 'NodeId', 06985 } 06986 06987 def __init__(self, binary=None): 06988 if binary is not None: 06989 self._binary_init(binary) 06990 self._freeze = True 06991 return 06992 self.NodesToRegister = [] 06993 self._freeze = True 06994 06995 def to_binary(self): 06996 packet = [] 06997 packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRegister))) 06998 for fieldname in self.NodesToRegister: 06999 packet.append(fieldname.to_binary()) 07000 return b''.join(packet) 07001 07002 @staticmethod 07003 def from_binary(data): 07004 return RegisterNodesParameters(data) 07005 07006 def _binary_init(self, data): 07007 length = uabin.Primitives.Int32.unpack(data) 07008 array = [] 07009 if length != -1: 07010 for _ in range(0, length): 07011 array.append(NodeId.from_binary(data)) 07012 self.NodesToRegister = array 07013 07014 def __str__(self): 07015 return 'RegisterNodesParameters(' + 'NodesToRegister:' + str(self.NodesToRegister) + ')' 07016 07017 __repr__ = __str__ 07018 07019 07020 class RegisterNodesRequest(FrozenClass): 07021 ''' 07022 Registers one or more nodes for repeated use within a session. 07023 07024 :ivar TypeId: 07025 :vartype TypeId: NodeId 07026 :ivar RequestHeader: 07027 :vartype RequestHeader: RequestHeader 07028 :ivar Parameters: 07029 :vartype Parameters: RegisterNodesParameters 07030 ''' 07031 07032 ua_types = { 07033 'TypeId': 'NodeId', 07034 'RequestHeader': 'RequestHeader', 07035 'Parameters': 'RegisterNodesParameters', 07036 } 07037 07038 def __init__(self, binary=None): 07039 if binary is not None: 07040 self._binary_init(binary) 07041 self._freeze = True 07042 return 07043 self.TypeId = FourByteNodeId(ObjectIds.RegisterNodesRequest_Encoding_DefaultBinary) 07044 self.RequestHeader = RequestHeader() 07045 self.Parameters = RegisterNodesParameters() 07046 self._freeze = True 07047 07048 def to_binary(self): 07049 packet = [] 07050 packet.append(self.TypeId.to_binary()) 07051 packet.append(self.RequestHeader.to_binary()) 07052 packet.append(self.Parameters.to_binary()) 07053 return b''.join(packet) 07054 07055 @staticmethod 07056 def from_binary(data): 07057 return RegisterNodesRequest(data) 07058 07059 def _binary_init(self, data): 07060 self.TypeId = NodeId.from_binary(data) 07061 self.RequestHeader = RequestHeader.from_binary(data) 07062 self.Parameters = RegisterNodesParameters.from_binary(data) 07063 07064 def __str__(self): 07065 return 'RegisterNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 07066 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 07067 'Parameters:' + str(self.Parameters) + ')' 07068 07069 __repr__ = __str__ 07070 07071 07072 class RegisterNodesResult(FrozenClass): 07073 ''' 07074 :ivar RegisteredNodeIds: 07075 :vartype RegisteredNodeIds: NodeId 07076 ''' 07077 07078 ua_types = { 07079 'RegisteredNodeIds': 'NodeId', 07080 } 07081 07082 def __init__(self, binary=None): 07083 if binary is not None: 07084 self._binary_init(binary) 07085 self._freeze = True 07086 return 07087 self.RegisteredNodeIds = [] 07088 self._freeze = True 07089 07090 def to_binary(self): 07091 packet = [] 07092 packet.append(uabin.Primitives.Int32.pack(len(self.RegisteredNodeIds))) 07093 for fieldname in self.RegisteredNodeIds: 07094 packet.append(fieldname.to_binary()) 07095 return b''.join(packet) 07096 07097 @staticmethod 07098 def from_binary(data): 07099 return RegisterNodesResult(data) 07100 07101 def _binary_init(self, data): 07102 length = uabin.Primitives.Int32.unpack(data) 07103 array = [] 07104 if length != -1: 07105 for _ in range(0, length): 07106 array.append(NodeId.from_binary(data)) 07107 self.RegisteredNodeIds = array 07108 07109 def __str__(self): 07110 return 'RegisterNodesResult(' + 'RegisteredNodeIds:' + str(self.RegisteredNodeIds) + ')' 07111 07112 __repr__ = __str__ 07113 07114 07115 class RegisterNodesResponse(FrozenClass): 07116 ''' 07117 Registers one or more nodes for repeated use within a session. 07118 07119 :ivar TypeId: 07120 :vartype TypeId: NodeId 07121 :ivar ResponseHeader: 07122 :vartype ResponseHeader: ResponseHeader 07123 :ivar Parameters: 07124 :vartype Parameters: RegisterNodesResult 07125 ''' 07126 07127 ua_types = { 07128 'TypeId': 'NodeId', 07129 'ResponseHeader': 'ResponseHeader', 07130 'Parameters': 'RegisterNodesResult', 07131 } 07132 07133 def __init__(self, binary=None): 07134 if binary is not None: 07135 self._binary_init(binary) 07136 self._freeze = True 07137 return 07138 self.TypeId = FourByteNodeId(ObjectIds.RegisterNodesResponse_Encoding_DefaultBinary) 07139 self.ResponseHeader = ResponseHeader() 07140 self.Parameters = RegisterNodesResult() 07141 self._freeze = True 07142 07143 def to_binary(self): 07144 packet = [] 07145 packet.append(self.TypeId.to_binary()) 07146 packet.append(self.ResponseHeader.to_binary()) 07147 packet.append(self.Parameters.to_binary()) 07148 return b''.join(packet) 07149 07150 @staticmethod 07151 def from_binary(data): 07152 return RegisterNodesResponse(data) 07153 07154 def _binary_init(self, data): 07155 self.TypeId = NodeId.from_binary(data) 07156 self.ResponseHeader = ResponseHeader.from_binary(data) 07157 self.Parameters = RegisterNodesResult.from_binary(data) 07158 07159 def __str__(self): 07160 return 'RegisterNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 07161 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 07162 'Parameters:' + str(self.Parameters) + ')' 07163 07164 __repr__ = __str__ 07165 07166 07167 class UnregisterNodesParameters(FrozenClass): 07168 ''' 07169 :ivar NodesToUnregister: 07170 :vartype NodesToUnregister: NodeId 07171 ''' 07172 07173 ua_types = { 07174 'NodesToUnregister': 'NodeId', 07175 } 07176 07177 def __init__(self, binary=None): 07178 if binary is not None: 07179 self._binary_init(binary) 07180 self._freeze = True 07181 return 07182 self.NodesToUnregister = [] 07183 self._freeze = True 07184 07185 def to_binary(self): 07186 packet = [] 07187 packet.append(uabin.Primitives.Int32.pack(len(self.NodesToUnregister))) 07188 for fieldname in self.NodesToUnregister: 07189 packet.append(fieldname.to_binary()) 07190 return b''.join(packet) 07191 07192 @staticmethod 07193 def from_binary(data): 07194 return UnregisterNodesParameters(data) 07195 07196 def _binary_init(self, data): 07197 length = uabin.Primitives.Int32.unpack(data) 07198 array = [] 07199 if length != -1: 07200 for _ in range(0, length): 07201 array.append(NodeId.from_binary(data)) 07202 self.NodesToUnregister = array 07203 07204 def __str__(self): 07205 return 'UnregisterNodesParameters(' + 'NodesToUnregister:' + str(self.NodesToUnregister) + ')' 07206 07207 __repr__ = __str__ 07208 07209 07210 class UnregisterNodesRequest(FrozenClass): 07211 ''' 07212 Unregisters one or more previously registered nodes. 07213 07214 :ivar TypeId: 07215 :vartype TypeId: NodeId 07216 :ivar RequestHeader: 07217 :vartype RequestHeader: RequestHeader 07218 :ivar Parameters: 07219 :vartype Parameters: UnregisterNodesParameters 07220 ''' 07221 07222 ua_types = { 07223 'TypeId': 'NodeId', 07224 'RequestHeader': 'RequestHeader', 07225 'Parameters': 'UnregisterNodesParameters', 07226 } 07227 07228 def __init__(self, binary=None): 07229 if binary is not None: 07230 self._binary_init(binary) 07231 self._freeze = True 07232 return 07233 self.TypeId = FourByteNodeId(ObjectIds.UnregisterNodesRequest_Encoding_DefaultBinary) 07234 self.RequestHeader = RequestHeader() 07235 self.Parameters = UnregisterNodesParameters() 07236 self._freeze = True 07237 07238 def to_binary(self): 07239 packet = [] 07240 packet.append(self.TypeId.to_binary()) 07241 packet.append(self.RequestHeader.to_binary()) 07242 packet.append(self.Parameters.to_binary()) 07243 return b''.join(packet) 07244 07245 @staticmethod 07246 def from_binary(data): 07247 return UnregisterNodesRequest(data) 07248 07249 def _binary_init(self, data): 07250 self.TypeId = NodeId.from_binary(data) 07251 self.RequestHeader = RequestHeader.from_binary(data) 07252 self.Parameters = UnregisterNodesParameters.from_binary(data) 07253 07254 def __str__(self): 07255 return 'UnregisterNodesRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 07256 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 07257 'Parameters:' + str(self.Parameters) + ')' 07258 07259 __repr__ = __str__ 07260 07261 07262 class UnregisterNodesResponse(FrozenClass): 07263 ''' 07264 Unregisters one or more previously registered nodes. 07265 07266 :ivar TypeId: 07267 :vartype TypeId: NodeId 07268 :ivar ResponseHeader: 07269 :vartype ResponseHeader: ResponseHeader 07270 ''' 07271 07272 ua_types = { 07273 'TypeId': 'NodeId', 07274 'ResponseHeader': 'ResponseHeader', 07275 } 07276 07277 def __init__(self, binary=None): 07278 if binary is not None: 07279 self._binary_init(binary) 07280 self._freeze = True 07281 return 07282 self.TypeId = FourByteNodeId(ObjectIds.UnregisterNodesResponse_Encoding_DefaultBinary) 07283 self.ResponseHeader = ResponseHeader() 07284 self._freeze = True 07285 07286 def to_binary(self): 07287 packet = [] 07288 packet.append(self.TypeId.to_binary()) 07289 packet.append(self.ResponseHeader.to_binary()) 07290 return b''.join(packet) 07291 07292 @staticmethod 07293 def from_binary(data): 07294 return UnregisterNodesResponse(data) 07295 07296 def _binary_init(self, data): 07297 self.TypeId = NodeId.from_binary(data) 07298 self.ResponseHeader = ResponseHeader.from_binary(data) 07299 07300 def __str__(self): 07301 return 'UnregisterNodesResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 07302 'ResponseHeader:' + str(self.ResponseHeader) + ')' 07303 07304 __repr__ = __str__ 07305 07306 07307 class EndpointConfiguration(FrozenClass): 07308 ''' 07309 :ivar OperationTimeout: 07310 :vartype OperationTimeout: Int32 07311 :ivar UseBinaryEncoding: 07312 :vartype UseBinaryEncoding: Boolean 07313 :ivar MaxStringLength: 07314 :vartype MaxStringLength: Int32 07315 :ivar MaxByteStringLength: 07316 :vartype MaxByteStringLength: Int32 07317 :ivar MaxArrayLength: 07318 :vartype MaxArrayLength: Int32 07319 :ivar MaxMessageSize: 07320 :vartype MaxMessageSize: Int32 07321 :ivar MaxBufferSize: 07322 :vartype MaxBufferSize: Int32 07323 :ivar ChannelLifetime: 07324 :vartype ChannelLifetime: Int32 07325 :ivar SecurityTokenLifetime: 07326 :vartype SecurityTokenLifetime: Int32 07327 ''' 07328 07329 ua_types = { 07330 'OperationTimeout': 'Int32', 07331 'UseBinaryEncoding': 'Boolean', 07332 'MaxStringLength': 'Int32', 07333 'MaxByteStringLength': 'Int32', 07334 'MaxArrayLength': 'Int32', 07335 'MaxMessageSize': 'Int32', 07336 'MaxBufferSize': 'Int32', 07337 'ChannelLifetime': 'Int32', 07338 'SecurityTokenLifetime': 'Int32', 07339 } 07340 07341 def __init__(self, binary=None): 07342 if binary is not None: 07343 self._binary_init(binary) 07344 self._freeze = True 07345 return 07346 self.OperationTimeout = 0 07347 self.UseBinaryEncoding = True 07348 self.MaxStringLength = 0 07349 self.MaxByteStringLength = 0 07350 self.MaxArrayLength = 0 07351 self.MaxMessageSize = 0 07352 self.MaxBufferSize = 0 07353 self.ChannelLifetime = 0 07354 self.SecurityTokenLifetime = 0 07355 self._freeze = True 07356 07357 def to_binary(self): 07358 packet = [] 07359 packet.append(uabin.Primitives.Int32.pack(self.OperationTimeout)) 07360 packet.append(uabin.Primitives.Boolean.pack(self.UseBinaryEncoding)) 07361 packet.append(uabin.Primitives.Int32.pack(self.MaxStringLength)) 07362 packet.append(uabin.Primitives.Int32.pack(self.MaxByteStringLength)) 07363 packet.append(uabin.Primitives.Int32.pack(self.MaxArrayLength)) 07364 packet.append(uabin.Primitives.Int32.pack(self.MaxMessageSize)) 07365 packet.append(uabin.Primitives.Int32.pack(self.MaxBufferSize)) 07366 packet.append(uabin.Primitives.Int32.pack(self.ChannelLifetime)) 07367 packet.append(uabin.Primitives.Int32.pack(self.SecurityTokenLifetime)) 07368 return b''.join(packet) 07369 07370 @staticmethod 07371 def from_binary(data): 07372 return EndpointConfiguration(data) 07373 07374 def _binary_init(self, data): 07375 self.OperationTimeout = uabin.Primitives.Int32.unpack(data) 07376 self.UseBinaryEncoding = uabin.Primitives.Boolean.unpack(data) 07377 self.MaxStringLength = uabin.Primitives.Int32.unpack(data) 07378 self.MaxByteStringLength = uabin.Primitives.Int32.unpack(data) 07379 self.MaxArrayLength = uabin.Primitives.Int32.unpack(data) 07380 self.MaxMessageSize = uabin.Primitives.Int32.unpack(data) 07381 self.MaxBufferSize = uabin.Primitives.Int32.unpack(data) 07382 self.ChannelLifetime = uabin.Primitives.Int32.unpack(data) 07383 self.SecurityTokenLifetime = uabin.Primitives.Int32.unpack(data) 07384 07385 def __str__(self): 07386 return 'EndpointConfiguration(' + 'OperationTimeout:' + str(self.OperationTimeout) + ', ' + \ 07387 'UseBinaryEncoding:' + str(self.UseBinaryEncoding) + ', ' + \ 07388 'MaxStringLength:' + str(self.MaxStringLength) + ', ' + \ 07389 'MaxByteStringLength:' + str(self.MaxByteStringLength) + ', ' + \ 07390 'MaxArrayLength:' + str(self.MaxArrayLength) + ', ' + \ 07391 'MaxMessageSize:' + str(self.MaxMessageSize) + ', ' + \ 07392 'MaxBufferSize:' + str(self.MaxBufferSize) + ', ' + \ 07393 'ChannelLifetime:' + str(self.ChannelLifetime) + ', ' + \ 07394 'SecurityTokenLifetime:' + str(self.SecurityTokenLifetime) + ')' 07395 07396 __repr__ = __str__ 07397 07398 07399 class SupportedProfile(FrozenClass): 07400 ''' 07401 :ivar OrganizationUri: 07402 :vartype OrganizationUri: String 07403 :ivar ProfileId: 07404 :vartype ProfileId: String 07405 :ivar ComplianceTool: 07406 :vartype ComplianceTool: String 07407 :ivar ComplianceDate: 07408 :vartype ComplianceDate: DateTime 07409 :ivar ComplianceLevel: 07410 :vartype ComplianceLevel: ComplianceLevel 07411 :ivar UnsupportedUnitIds: 07412 :vartype UnsupportedUnitIds: String 07413 ''' 07414 07415 ua_types = { 07416 'OrganizationUri': 'String', 07417 'ProfileId': 'String', 07418 'ComplianceTool': 'String', 07419 'ComplianceDate': 'DateTime', 07420 'ComplianceLevel': 'ComplianceLevel', 07421 'UnsupportedUnitIds': 'String', 07422 } 07423 07424 def __init__(self, binary=None): 07425 if binary is not None: 07426 self._binary_init(binary) 07427 self._freeze = True 07428 return 07429 self.OrganizationUri = None 07430 self.ProfileId = None 07431 self.ComplianceTool = None 07432 self.ComplianceDate = datetime.now() 07433 self.ComplianceLevel = ComplianceLevel(0) 07434 self.UnsupportedUnitIds = [] 07435 self._freeze = True 07436 07437 def to_binary(self): 07438 packet = [] 07439 packet.append(uabin.Primitives.String.pack(self.OrganizationUri)) 07440 packet.append(uabin.Primitives.String.pack(self.ProfileId)) 07441 packet.append(uabin.Primitives.String.pack(self.ComplianceTool)) 07442 packet.append(uabin.Primitives.DateTime.pack(self.ComplianceDate)) 07443 packet.append(uabin.Primitives.UInt32.pack(self.ComplianceLevel.value)) 07444 packet.append(uabin.Primitives.Int32.pack(len(self.UnsupportedUnitIds))) 07445 for fieldname in self.UnsupportedUnitIds: 07446 packet.append(uabin.Primitives.String.pack(fieldname)) 07447 return b''.join(packet) 07448 07449 @staticmethod 07450 def from_binary(data): 07451 return SupportedProfile(data) 07452 07453 def _binary_init(self, data): 07454 self.OrganizationUri = uabin.Primitives.String.unpack(data) 07455 self.ProfileId = uabin.Primitives.String.unpack(data) 07456 self.ComplianceTool = uabin.Primitives.String.unpack(data) 07457 self.ComplianceDate = uabin.Primitives.DateTime.unpack(data) 07458 self.ComplianceLevel = ComplianceLevel(uabin.Primitives.UInt32.unpack(data)) 07459 self.UnsupportedUnitIds = uabin.Primitives.String.unpack_array(data) 07460 07461 def __str__(self): 07462 return 'SupportedProfile(' + 'OrganizationUri:' + str(self.OrganizationUri) + ', ' + \ 07463 'ProfileId:' + str(self.ProfileId) + ', ' + \ 07464 'ComplianceTool:' + str(self.ComplianceTool) + ', ' + \ 07465 'ComplianceDate:' + str(self.ComplianceDate) + ', ' + \ 07466 'ComplianceLevel:' + str(self.ComplianceLevel) + ', ' + \ 07467 'UnsupportedUnitIds:' + str(self.UnsupportedUnitIds) + ')' 07468 07469 __repr__ = __str__ 07470 07471 07472 class SoftwareCertificate(FrozenClass): 07473 ''' 07474 :ivar ProductName: 07475 :vartype ProductName: String 07476 :ivar ProductUri: 07477 :vartype ProductUri: String 07478 :ivar VendorName: 07479 :vartype VendorName: String 07480 :ivar VendorProductCertificate: 07481 :vartype VendorProductCertificate: ByteString 07482 :ivar SoftwareVersion: 07483 :vartype SoftwareVersion: String 07484 :ivar BuildNumber: 07485 :vartype BuildNumber: String 07486 :ivar BuildDate: 07487 :vartype BuildDate: DateTime 07488 :ivar IssuedBy: 07489 :vartype IssuedBy: String 07490 :ivar IssueDate: 07491 :vartype IssueDate: DateTime 07492 :ivar SupportedProfiles: 07493 :vartype SupportedProfiles: SupportedProfile 07494 ''' 07495 07496 ua_types = { 07497 'ProductName': 'String', 07498 'ProductUri': 'String', 07499 'VendorName': 'String', 07500 'VendorProductCertificate': 'ByteString', 07501 'SoftwareVersion': 'String', 07502 'BuildNumber': 'String', 07503 'BuildDate': 'DateTime', 07504 'IssuedBy': 'String', 07505 'IssueDate': 'DateTime', 07506 'SupportedProfiles': 'SupportedProfile', 07507 } 07508 07509 def __init__(self, binary=None): 07510 if binary is not None: 07511 self._binary_init(binary) 07512 self._freeze = True 07513 return 07514 self.ProductName = None 07515 self.ProductUri = None 07516 self.VendorName = None 07517 self.VendorProductCertificate = None 07518 self.SoftwareVersion = None 07519 self.BuildNumber = None 07520 self.BuildDate = datetime.now() 07521 self.IssuedBy = None 07522 self.IssueDate = datetime.now() 07523 self.SupportedProfiles = [] 07524 self._freeze = True 07525 07526 def to_binary(self): 07527 packet = [] 07528 packet.append(uabin.Primitives.String.pack(self.ProductName)) 07529 packet.append(uabin.Primitives.String.pack(self.ProductUri)) 07530 packet.append(uabin.Primitives.String.pack(self.VendorName)) 07531 packet.append(uabin.Primitives.ByteString.pack(self.VendorProductCertificate)) 07532 packet.append(uabin.Primitives.String.pack(self.SoftwareVersion)) 07533 packet.append(uabin.Primitives.String.pack(self.BuildNumber)) 07534 packet.append(uabin.Primitives.DateTime.pack(self.BuildDate)) 07535 packet.append(uabin.Primitives.String.pack(self.IssuedBy)) 07536 packet.append(uabin.Primitives.DateTime.pack(self.IssueDate)) 07537 packet.append(uabin.Primitives.Int32.pack(len(self.SupportedProfiles))) 07538 for fieldname in self.SupportedProfiles: 07539 packet.append(fieldname.to_binary()) 07540 return b''.join(packet) 07541 07542 @staticmethod 07543 def from_binary(data): 07544 return SoftwareCertificate(data) 07545 07546 def _binary_init(self, data): 07547 self.ProductName = uabin.Primitives.String.unpack(data) 07548 self.ProductUri = uabin.Primitives.String.unpack(data) 07549 self.VendorName = uabin.Primitives.String.unpack(data) 07550 self.VendorProductCertificate = uabin.Primitives.ByteString.unpack(data) 07551 self.SoftwareVersion = uabin.Primitives.String.unpack(data) 07552 self.BuildNumber = uabin.Primitives.String.unpack(data) 07553 self.BuildDate = uabin.Primitives.DateTime.unpack(data) 07554 self.IssuedBy = uabin.Primitives.String.unpack(data) 07555 self.IssueDate = uabin.Primitives.DateTime.unpack(data) 07556 length = uabin.Primitives.Int32.unpack(data) 07557 array = [] 07558 if length != -1: 07559 for _ in range(0, length): 07560 array.append(SupportedProfile.from_binary(data)) 07561 self.SupportedProfiles = array 07562 07563 def __str__(self): 07564 return 'SoftwareCertificate(' + 'ProductName:' + str(self.ProductName) + ', ' + \ 07565 'ProductUri:' + str(self.ProductUri) + ', ' + \ 07566 'VendorName:' + str(self.VendorName) + ', ' + \ 07567 'VendorProductCertificate:' + str(self.VendorProductCertificate) + ', ' + \ 07568 'SoftwareVersion:' + str(self.SoftwareVersion) + ', ' + \ 07569 'BuildNumber:' + str(self.BuildNumber) + ', ' + \ 07570 'BuildDate:' + str(self.BuildDate) + ', ' + \ 07571 'IssuedBy:' + str(self.IssuedBy) + ', ' + \ 07572 'IssueDate:' + str(self.IssueDate) + ', ' + \ 07573 'SupportedProfiles:' + str(self.SupportedProfiles) + ')' 07574 07575 __repr__ = __str__ 07576 07577 07578 class QueryDataDescription(FrozenClass): 07579 ''' 07580 :ivar RelativePath: 07581 :vartype RelativePath: RelativePath 07582 :ivar AttributeId: 07583 :vartype AttributeId: UInt32 07584 :ivar IndexRange: 07585 :vartype IndexRange: String 07586 ''' 07587 07588 ua_types = { 07589 'RelativePath': 'RelativePath', 07590 'AttributeId': 'UInt32', 07591 'IndexRange': 'String', 07592 } 07593 07594 def __init__(self, binary=None): 07595 if binary is not None: 07596 self._binary_init(binary) 07597 self._freeze = True 07598 return 07599 self.RelativePath = RelativePath() 07600 self.AttributeId = 0 07601 self.IndexRange = None 07602 self._freeze = True 07603 07604 def to_binary(self): 07605 packet = [] 07606 packet.append(self.RelativePath.to_binary()) 07607 packet.append(uabin.Primitives.UInt32.pack(self.AttributeId)) 07608 packet.append(uabin.Primitives.String.pack(self.IndexRange)) 07609 return b''.join(packet) 07610 07611 @staticmethod 07612 def from_binary(data): 07613 return QueryDataDescription(data) 07614 07615 def _binary_init(self, data): 07616 self.RelativePath = RelativePath.from_binary(data) 07617 self.AttributeId = uabin.Primitives.UInt32.unpack(data) 07618 self.IndexRange = uabin.Primitives.String.unpack(data) 07619 07620 def __str__(self): 07621 return 'QueryDataDescription(' + 'RelativePath:' + str(self.RelativePath) + ', ' + \ 07622 'AttributeId:' + str(self.AttributeId) + ', ' + \ 07623 'IndexRange:' + str(self.IndexRange) + ')' 07624 07625 __repr__ = __str__ 07626 07627 07628 class NodeTypeDescription(FrozenClass): 07629 ''' 07630 :ivar TypeDefinitionNode: 07631 :vartype TypeDefinitionNode: ExpandedNodeId 07632 :ivar IncludeSubTypes: 07633 :vartype IncludeSubTypes: Boolean 07634 :ivar DataToReturn: 07635 :vartype DataToReturn: QueryDataDescription 07636 ''' 07637 07638 ua_types = { 07639 'TypeDefinitionNode': 'ExpandedNodeId', 07640 'IncludeSubTypes': 'Boolean', 07641 'DataToReturn': 'QueryDataDescription', 07642 } 07643 07644 def __init__(self, binary=None): 07645 if binary is not None: 07646 self._binary_init(binary) 07647 self._freeze = True 07648 return 07649 self.TypeDefinitionNode = ExpandedNodeId() 07650 self.IncludeSubTypes = True 07651 self.DataToReturn = [] 07652 self._freeze = True 07653 07654 def to_binary(self): 07655 packet = [] 07656 packet.append(self.TypeDefinitionNode.to_binary()) 07657 packet.append(uabin.Primitives.Boolean.pack(self.IncludeSubTypes)) 07658 packet.append(uabin.Primitives.Int32.pack(len(self.DataToReturn))) 07659 for fieldname in self.DataToReturn: 07660 packet.append(fieldname.to_binary()) 07661 return b''.join(packet) 07662 07663 @staticmethod 07664 def from_binary(data): 07665 return NodeTypeDescription(data) 07666 07667 def _binary_init(self, data): 07668 self.TypeDefinitionNode = ExpandedNodeId.from_binary(data) 07669 self.IncludeSubTypes = uabin.Primitives.Boolean.unpack(data) 07670 length = uabin.Primitives.Int32.unpack(data) 07671 array = [] 07672 if length != -1: 07673 for _ in range(0, length): 07674 array.append(QueryDataDescription.from_binary(data)) 07675 self.DataToReturn = array 07676 07677 def __str__(self): 07678 return 'NodeTypeDescription(' + 'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \ 07679 'IncludeSubTypes:' + str(self.IncludeSubTypes) + ', ' + \ 07680 'DataToReturn:' + str(self.DataToReturn) + ')' 07681 07682 __repr__ = __str__ 07683 07684 07685 class QueryDataSet(FrozenClass): 07686 ''' 07687 :ivar NodeId: 07688 :vartype NodeId: ExpandedNodeId 07689 :ivar TypeDefinitionNode: 07690 :vartype TypeDefinitionNode: ExpandedNodeId 07691 :ivar Values: 07692 :vartype Values: Variant 07693 ''' 07694 07695 ua_types = { 07696 'NodeId': 'ExpandedNodeId', 07697 'TypeDefinitionNode': 'ExpandedNodeId', 07698 'Values': 'Variant', 07699 } 07700 07701 def __init__(self, binary=None): 07702 if binary is not None: 07703 self._binary_init(binary) 07704 self._freeze = True 07705 return 07706 self.NodeId = ExpandedNodeId() 07707 self.TypeDefinitionNode = ExpandedNodeId() 07708 self.Values = [] 07709 self._freeze = True 07710 07711 def to_binary(self): 07712 packet = [] 07713 packet.append(self.NodeId.to_binary()) 07714 packet.append(self.TypeDefinitionNode.to_binary()) 07715 packet.append(uabin.Primitives.Int32.pack(len(self.Values))) 07716 for fieldname in self.Values: 07717 packet.append(fieldname.to_binary()) 07718 return b''.join(packet) 07719 07720 @staticmethod 07721 def from_binary(data): 07722 return QueryDataSet(data) 07723 07724 def _binary_init(self, data): 07725 self.NodeId = ExpandedNodeId.from_binary(data) 07726 self.TypeDefinitionNode = ExpandedNodeId.from_binary(data) 07727 length = uabin.Primitives.Int32.unpack(data) 07728 array = [] 07729 if length != -1: 07730 for _ in range(0, length): 07731 array.append(Variant.from_binary(data)) 07732 self.Values = array 07733 07734 def __str__(self): 07735 return 'QueryDataSet(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 07736 'TypeDefinitionNode:' + str(self.TypeDefinitionNode) + ', ' + \ 07737 'Values:' + str(self.Values) + ')' 07738 07739 __repr__ = __str__ 07740 07741 07742 class NodeReference(FrozenClass): 07743 ''' 07744 :ivar NodeId: 07745 :vartype NodeId: NodeId 07746 :ivar ReferenceTypeId: 07747 :vartype ReferenceTypeId: NodeId 07748 :ivar IsForward: 07749 :vartype IsForward: Boolean 07750 :ivar ReferencedNodeIds: 07751 :vartype ReferencedNodeIds: NodeId 07752 ''' 07753 07754 ua_types = { 07755 'NodeId': 'NodeId', 07756 'ReferenceTypeId': 'NodeId', 07757 'IsForward': 'Boolean', 07758 'ReferencedNodeIds': 'NodeId', 07759 } 07760 07761 def __init__(self, binary=None): 07762 if binary is not None: 07763 self._binary_init(binary) 07764 self._freeze = True 07765 return 07766 self.NodeId = NodeId() 07767 self.ReferenceTypeId = NodeId() 07768 self.IsForward = True 07769 self.ReferencedNodeIds = [] 07770 self._freeze = True 07771 07772 def to_binary(self): 07773 packet = [] 07774 packet.append(self.NodeId.to_binary()) 07775 packet.append(self.ReferenceTypeId.to_binary()) 07776 packet.append(uabin.Primitives.Boolean.pack(self.IsForward)) 07777 packet.append(uabin.Primitives.Int32.pack(len(self.ReferencedNodeIds))) 07778 for fieldname in self.ReferencedNodeIds: 07779 packet.append(fieldname.to_binary()) 07780 return b''.join(packet) 07781 07782 @staticmethod 07783 def from_binary(data): 07784 return NodeReference(data) 07785 07786 def _binary_init(self, data): 07787 self.NodeId = NodeId.from_binary(data) 07788 self.ReferenceTypeId = NodeId.from_binary(data) 07789 self.IsForward = uabin.Primitives.Boolean.unpack(data) 07790 length = uabin.Primitives.Int32.unpack(data) 07791 array = [] 07792 if length != -1: 07793 for _ in range(0, length): 07794 array.append(NodeId.from_binary(data)) 07795 self.ReferencedNodeIds = array 07796 07797 def __str__(self): 07798 return 'NodeReference(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 07799 'ReferenceTypeId:' + str(self.ReferenceTypeId) + ', ' + \ 07800 'IsForward:' + str(self.IsForward) + ', ' + \ 07801 'ReferencedNodeIds:' + str(self.ReferencedNodeIds) + ')' 07802 07803 __repr__ = __str__ 07804 07805 07806 class ContentFilterElement(FrozenClass): 07807 ''' 07808 :ivar FilterOperator: 07809 :vartype FilterOperator: FilterOperator 07810 :ivar FilterOperands: 07811 :vartype FilterOperands: ExtensionObject 07812 ''' 07813 07814 ua_types = { 07815 'FilterOperator': 'FilterOperator', 07816 'FilterOperands': 'ExtensionObject', 07817 } 07818 07819 def __init__(self, binary=None): 07820 if binary is not None: 07821 self._binary_init(binary) 07822 self._freeze = True 07823 return 07824 self.FilterOperator = FilterOperator(0) 07825 self.FilterOperands = [] 07826 self._freeze = True 07827 07828 def to_binary(self): 07829 packet = [] 07830 packet.append(uabin.Primitives.UInt32.pack(self.FilterOperator.value)) 07831 packet.append(uabin.Primitives.Int32.pack(len(self.FilterOperands))) 07832 for fieldname in self.FilterOperands: 07833 packet.append(extensionobject_to_binary(fieldname)) 07834 return b''.join(packet) 07835 07836 @staticmethod 07837 def from_binary(data): 07838 return ContentFilterElement(data) 07839 07840 def _binary_init(self, data): 07841 self.FilterOperator = FilterOperator(uabin.Primitives.UInt32.unpack(data)) 07842 length = uabin.Primitives.Int32.unpack(data) 07843 array = [] 07844 if length != -1: 07845 for _ in range(0, length): 07846 array.append(extensionobject_from_binary(data)) 07847 self.FilterOperands = array 07848 07849 def __str__(self): 07850 return 'ContentFilterElement(' + 'FilterOperator:' + str(self.FilterOperator) + ', ' + \ 07851 'FilterOperands:' + str(self.FilterOperands) + ')' 07852 07853 __repr__ = __str__ 07854 07855 07856 class ContentFilter(FrozenClass): 07857 ''' 07858 :ivar Elements: 07859 :vartype Elements: ContentFilterElement 07860 ''' 07861 07862 ua_types = { 07863 'Elements': 'ContentFilterElement', 07864 } 07865 07866 def __init__(self, binary=None): 07867 if binary is not None: 07868 self._binary_init(binary) 07869 self._freeze = True 07870 return 07871 self.Elements = [] 07872 self._freeze = True 07873 07874 def to_binary(self): 07875 packet = [] 07876 packet.append(uabin.Primitives.Int32.pack(len(self.Elements))) 07877 for fieldname in self.Elements: 07878 packet.append(fieldname.to_binary()) 07879 return b''.join(packet) 07880 07881 @staticmethod 07882 def from_binary(data): 07883 return ContentFilter(data) 07884 07885 def _binary_init(self, data): 07886 length = uabin.Primitives.Int32.unpack(data) 07887 array = [] 07888 if length != -1: 07889 for _ in range(0, length): 07890 array.append(ContentFilterElement.from_binary(data)) 07891 self.Elements = array 07892 07893 def __str__(self): 07894 return 'ContentFilter(' + 'Elements:' + str(self.Elements) + ')' 07895 07896 __repr__ = __str__ 07897 07898 07899 class ElementOperand(FrozenClass): 07900 ''' 07901 :ivar Index: 07902 :vartype Index: UInt32 07903 ''' 07904 07905 ua_types = { 07906 'Index': 'UInt32', 07907 } 07908 07909 def __init__(self, binary=None): 07910 if binary is not None: 07911 self._binary_init(binary) 07912 self._freeze = True 07913 return 07914 self.Index = 0 07915 self._freeze = True 07916 07917 def to_binary(self): 07918 packet = [] 07919 packet.append(uabin.Primitives.UInt32.pack(self.Index)) 07920 return b''.join(packet) 07921 07922 @staticmethod 07923 def from_binary(data): 07924 return ElementOperand(data) 07925 07926 def _binary_init(self, data): 07927 self.Index = uabin.Primitives.UInt32.unpack(data) 07928 07929 def __str__(self): 07930 return 'ElementOperand(' + 'Index:' + str(self.Index) + ')' 07931 07932 __repr__ = __str__ 07933 07934 07935 class LiteralOperand(FrozenClass): 07936 ''' 07937 :ivar Value: 07938 :vartype Value: Variant 07939 ''' 07940 07941 ua_types = { 07942 'Value': 'Variant', 07943 } 07944 07945 def __init__(self, binary=None): 07946 if binary is not None: 07947 self._binary_init(binary) 07948 self._freeze = True 07949 return 07950 self.Value = Variant() 07951 self._freeze = True 07952 07953 def to_binary(self): 07954 packet = [] 07955 packet.append(self.Value.to_binary()) 07956 return b''.join(packet) 07957 07958 @staticmethod 07959 def from_binary(data): 07960 return LiteralOperand(data) 07961 07962 def _binary_init(self, data): 07963 self.Value = Variant.from_binary(data) 07964 07965 def __str__(self): 07966 return 'LiteralOperand(' + 'Value:' + str(self.Value) + ')' 07967 07968 __repr__ = __str__ 07969 07970 07971 class AttributeOperand(FrozenClass): 07972 ''' 07973 :ivar NodeId: 07974 :vartype NodeId: NodeId 07975 :ivar Alias: 07976 :vartype Alias: String 07977 :ivar BrowsePath: 07978 :vartype BrowsePath: RelativePath 07979 :ivar AttributeId: 07980 :vartype AttributeId: UInt32 07981 :ivar IndexRange: 07982 :vartype IndexRange: String 07983 ''' 07984 07985 ua_types = { 07986 'NodeId': 'NodeId', 07987 'Alias': 'String', 07988 'BrowsePath': 'RelativePath', 07989 'AttributeId': 'UInt32', 07990 'IndexRange': 'String', 07991 } 07992 07993 def __init__(self, binary=None): 07994 if binary is not None: 07995 self._binary_init(binary) 07996 self._freeze = True 07997 return 07998 self.NodeId = NodeId() 07999 self.Alias = None 08000 self.BrowsePath = RelativePath() 08001 self.AttributeId = 0 08002 self.IndexRange = None 08003 self._freeze = True 08004 08005 def to_binary(self): 08006 packet = [] 08007 packet.append(self.NodeId.to_binary()) 08008 packet.append(uabin.Primitives.String.pack(self.Alias)) 08009 packet.append(self.BrowsePath.to_binary()) 08010 packet.append(uabin.Primitives.UInt32.pack(self.AttributeId)) 08011 packet.append(uabin.Primitives.String.pack(self.IndexRange)) 08012 return b''.join(packet) 08013 08014 @staticmethod 08015 def from_binary(data): 08016 return AttributeOperand(data) 08017 08018 def _binary_init(self, data): 08019 self.NodeId = NodeId.from_binary(data) 08020 self.Alias = uabin.Primitives.String.unpack(data) 08021 self.BrowsePath = RelativePath.from_binary(data) 08022 self.AttributeId = uabin.Primitives.UInt32.unpack(data) 08023 self.IndexRange = uabin.Primitives.String.unpack(data) 08024 08025 def __str__(self): 08026 return 'AttributeOperand(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 08027 'Alias:' + str(self.Alias) + ', ' + \ 08028 'BrowsePath:' + str(self.BrowsePath) + ', ' + \ 08029 'AttributeId:' + str(self.AttributeId) + ', ' + \ 08030 'IndexRange:' + str(self.IndexRange) + ')' 08031 08032 __repr__ = __str__ 08033 08034 08035 class SimpleAttributeOperand(FrozenClass): 08036 ''' 08037 :ivar TypeDefinitionId: 08038 :vartype TypeDefinitionId: NodeId 08039 :ivar BrowsePath: 08040 :vartype BrowsePath: QualifiedName 08041 :ivar AttributeId: 08042 :vartype AttributeId: UInt32 08043 :ivar IndexRange: 08044 :vartype IndexRange: String 08045 ''' 08046 08047 ua_types = { 08048 'TypeDefinitionId': 'NodeId', 08049 'BrowsePath': 'QualifiedName', 08050 'AttributeId': 'UInt32', 08051 'IndexRange': 'String', 08052 } 08053 08054 def __init__(self, binary=None): 08055 if binary is not None: 08056 self._binary_init(binary) 08057 self._freeze = True 08058 return 08059 self.TypeDefinitionId = NodeId() 08060 self.BrowsePath = [] 08061 self.AttributeId = 0 08062 self.IndexRange = None 08063 self._freeze = True 08064 08065 def to_binary(self): 08066 packet = [] 08067 packet.append(self.TypeDefinitionId.to_binary()) 08068 packet.append(uabin.Primitives.Int32.pack(len(self.BrowsePath))) 08069 for fieldname in self.BrowsePath: 08070 packet.append(fieldname.to_binary()) 08071 packet.append(uabin.Primitives.UInt32.pack(self.AttributeId)) 08072 packet.append(uabin.Primitives.String.pack(self.IndexRange)) 08073 return b''.join(packet) 08074 08075 @staticmethod 08076 def from_binary(data): 08077 return SimpleAttributeOperand(data) 08078 08079 def _binary_init(self, data): 08080 self.TypeDefinitionId = NodeId.from_binary(data) 08081 length = uabin.Primitives.Int32.unpack(data) 08082 array = [] 08083 if length != -1: 08084 for _ in range(0, length): 08085 array.append(QualifiedName.from_binary(data)) 08086 self.BrowsePath = array 08087 self.AttributeId = uabin.Primitives.UInt32.unpack(data) 08088 self.IndexRange = uabin.Primitives.String.unpack(data) 08089 08090 def __str__(self): 08091 return 'SimpleAttributeOperand(' + 'TypeDefinitionId:' + str(self.TypeDefinitionId) + ', ' + \ 08092 'BrowsePath:' + str(self.BrowsePath) + ', ' + \ 08093 'AttributeId:' + str(self.AttributeId) + ', ' + \ 08094 'IndexRange:' + str(self.IndexRange) + ')' 08095 08096 __repr__ = __str__ 08097 08098 08099 class ContentFilterElementResult(FrozenClass): 08100 ''' 08101 :ivar StatusCode: 08102 :vartype StatusCode: StatusCode 08103 :ivar OperandStatusCodes: 08104 :vartype OperandStatusCodes: StatusCode 08105 :ivar OperandDiagnosticInfos: 08106 :vartype OperandDiagnosticInfos: DiagnosticInfo 08107 ''' 08108 08109 ua_types = { 08110 'StatusCode': 'StatusCode', 08111 'OperandStatusCodes': 'StatusCode', 08112 'OperandDiagnosticInfos': 'DiagnosticInfo', 08113 } 08114 08115 def __init__(self, binary=None): 08116 if binary is not None: 08117 self._binary_init(binary) 08118 self._freeze = True 08119 return 08120 self.StatusCode = StatusCode() 08121 self.OperandStatusCodes = [] 08122 self.OperandDiagnosticInfos = [] 08123 self._freeze = True 08124 08125 def to_binary(self): 08126 packet = [] 08127 packet.append(self.StatusCode.to_binary()) 08128 packet.append(uabin.Primitives.Int32.pack(len(self.OperandStatusCodes))) 08129 for fieldname in self.OperandStatusCodes: 08130 packet.append(fieldname.to_binary()) 08131 packet.append(uabin.Primitives.Int32.pack(len(self.OperandDiagnosticInfos))) 08132 for fieldname in self.OperandDiagnosticInfos: 08133 packet.append(fieldname.to_binary()) 08134 return b''.join(packet) 08135 08136 @staticmethod 08137 def from_binary(data): 08138 return ContentFilterElementResult(data) 08139 08140 def _binary_init(self, data): 08141 self.StatusCode = StatusCode.from_binary(data) 08142 length = uabin.Primitives.Int32.unpack(data) 08143 array = [] 08144 if length != -1: 08145 for _ in range(0, length): 08146 array.append(StatusCode.from_binary(data)) 08147 self.OperandStatusCodes = array 08148 length = uabin.Primitives.Int32.unpack(data) 08149 array = [] 08150 if length != -1: 08151 for _ in range(0, length): 08152 array.append(DiagnosticInfo.from_binary(data)) 08153 self.OperandDiagnosticInfos = array 08154 08155 def __str__(self): 08156 return 'ContentFilterElementResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 08157 'OperandStatusCodes:' + str(self.OperandStatusCodes) + ', ' + \ 08158 'OperandDiagnosticInfos:' + str(self.OperandDiagnosticInfos) + ')' 08159 08160 __repr__ = __str__ 08161 08162 08163 class ContentFilterResult(FrozenClass): 08164 ''' 08165 :ivar ElementResults: 08166 :vartype ElementResults: ContentFilterElementResult 08167 :ivar ElementDiagnosticInfos: 08168 :vartype ElementDiagnosticInfos: DiagnosticInfo 08169 ''' 08170 08171 ua_types = { 08172 'ElementResults': 'ContentFilterElementResult', 08173 'ElementDiagnosticInfos': 'DiagnosticInfo', 08174 } 08175 08176 def __init__(self, binary=None): 08177 if binary is not None: 08178 self._binary_init(binary) 08179 self._freeze = True 08180 return 08181 self.ElementResults = [] 08182 self.ElementDiagnosticInfos = [] 08183 self._freeze = True 08184 08185 def to_binary(self): 08186 packet = [] 08187 packet.append(uabin.Primitives.Int32.pack(len(self.ElementResults))) 08188 for fieldname in self.ElementResults: 08189 packet.append(fieldname.to_binary()) 08190 packet.append(uabin.Primitives.Int32.pack(len(self.ElementDiagnosticInfos))) 08191 for fieldname in self.ElementDiagnosticInfos: 08192 packet.append(fieldname.to_binary()) 08193 return b''.join(packet) 08194 08195 @staticmethod 08196 def from_binary(data): 08197 return ContentFilterResult(data) 08198 08199 def _binary_init(self, data): 08200 length = uabin.Primitives.Int32.unpack(data) 08201 array = [] 08202 if length != -1: 08203 for _ in range(0, length): 08204 array.append(ContentFilterElementResult.from_binary(data)) 08205 self.ElementResults = array 08206 length = uabin.Primitives.Int32.unpack(data) 08207 array = [] 08208 if length != -1: 08209 for _ in range(0, length): 08210 array.append(DiagnosticInfo.from_binary(data)) 08211 self.ElementDiagnosticInfos = array 08212 08213 def __str__(self): 08214 return 'ContentFilterResult(' + 'ElementResults:' + str(self.ElementResults) + ', ' + \ 08215 'ElementDiagnosticInfos:' + str(self.ElementDiagnosticInfos) + ')' 08216 08217 __repr__ = __str__ 08218 08219 08220 class ParsingResult(FrozenClass): 08221 ''' 08222 :ivar StatusCode: 08223 :vartype StatusCode: StatusCode 08224 :ivar DataStatusCodes: 08225 :vartype DataStatusCodes: StatusCode 08226 :ivar DataDiagnosticInfos: 08227 :vartype DataDiagnosticInfos: DiagnosticInfo 08228 ''' 08229 08230 ua_types = { 08231 'StatusCode': 'StatusCode', 08232 'DataStatusCodes': 'StatusCode', 08233 'DataDiagnosticInfos': 'DiagnosticInfo', 08234 } 08235 08236 def __init__(self, binary=None): 08237 if binary is not None: 08238 self._binary_init(binary) 08239 self._freeze = True 08240 return 08241 self.StatusCode = StatusCode() 08242 self.DataStatusCodes = [] 08243 self.DataDiagnosticInfos = [] 08244 self._freeze = True 08245 08246 def to_binary(self): 08247 packet = [] 08248 packet.append(self.StatusCode.to_binary()) 08249 packet.append(uabin.Primitives.Int32.pack(len(self.DataStatusCodes))) 08250 for fieldname in self.DataStatusCodes: 08251 packet.append(fieldname.to_binary()) 08252 packet.append(uabin.Primitives.Int32.pack(len(self.DataDiagnosticInfos))) 08253 for fieldname in self.DataDiagnosticInfos: 08254 packet.append(fieldname.to_binary()) 08255 return b''.join(packet) 08256 08257 @staticmethod 08258 def from_binary(data): 08259 return ParsingResult(data) 08260 08261 def _binary_init(self, data): 08262 self.StatusCode = StatusCode.from_binary(data) 08263 length = uabin.Primitives.Int32.unpack(data) 08264 array = [] 08265 if length != -1: 08266 for _ in range(0, length): 08267 array.append(StatusCode.from_binary(data)) 08268 self.DataStatusCodes = array 08269 length = uabin.Primitives.Int32.unpack(data) 08270 array = [] 08271 if length != -1: 08272 for _ in range(0, length): 08273 array.append(DiagnosticInfo.from_binary(data)) 08274 self.DataDiagnosticInfos = array 08275 08276 def __str__(self): 08277 return 'ParsingResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 08278 'DataStatusCodes:' + str(self.DataStatusCodes) + ', ' + \ 08279 'DataDiagnosticInfos:' + str(self.DataDiagnosticInfos) + ')' 08280 08281 __repr__ = __str__ 08282 08283 08284 class QueryFirstParameters(FrozenClass): 08285 ''' 08286 :ivar View: 08287 :vartype View: ViewDescription 08288 :ivar NodeTypes: 08289 :vartype NodeTypes: NodeTypeDescription 08290 :ivar Filter: 08291 :vartype Filter: ContentFilter 08292 :ivar MaxDataSetsToReturn: 08293 :vartype MaxDataSetsToReturn: UInt32 08294 :ivar MaxReferencesToReturn: 08295 :vartype MaxReferencesToReturn: UInt32 08296 ''' 08297 08298 ua_types = { 08299 'View': 'ViewDescription', 08300 'NodeTypes': 'NodeTypeDescription', 08301 'Filter': 'ContentFilter', 08302 'MaxDataSetsToReturn': 'UInt32', 08303 'MaxReferencesToReturn': 'UInt32', 08304 } 08305 08306 def __init__(self, binary=None): 08307 if binary is not None: 08308 self._binary_init(binary) 08309 self._freeze = True 08310 return 08311 self.View = ViewDescription() 08312 self.NodeTypes = [] 08313 self.Filter = ContentFilter() 08314 self.MaxDataSetsToReturn = 0 08315 self.MaxReferencesToReturn = 0 08316 self._freeze = True 08317 08318 def to_binary(self): 08319 packet = [] 08320 packet.append(self.View.to_binary()) 08321 packet.append(uabin.Primitives.Int32.pack(len(self.NodeTypes))) 08322 for fieldname in self.NodeTypes: 08323 packet.append(fieldname.to_binary()) 08324 packet.append(self.Filter.to_binary()) 08325 packet.append(uabin.Primitives.UInt32.pack(self.MaxDataSetsToReturn)) 08326 packet.append(uabin.Primitives.UInt32.pack(self.MaxReferencesToReturn)) 08327 return b''.join(packet) 08328 08329 @staticmethod 08330 def from_binary(data): 08331 return QueryFirstParameters(data) 08332 08333 def _binary_init(self, data): 08334 self.View = ViewDescription.from_binary(data) 08335 length = uabin.Primitives.Int32.unpack(data) 08336 array = [] 08337 if length != -1: 08338 for _ in range(0, length): 08339 array.append(NodeTypeDescription.from_binary(data)) 08340 self.NodeTypes = array 08341 self.Filter = ContentFilter.from_binary(data) 08342 self.MaxDataSetsToReturn = uabin.Primitives.UInt32.unpack(data) 08343 self.MaxReferencesToReturn = uabin.Primitives.UInt32.unpack(data) 08344 08345 def __str__(self): 08346 return 'QueryFirstParameters(' + 'View:' + str(self.View) + ', ' + \ 08347 'NodeTypes:' + str(self.NodeTypes) + ', ' + \ 08348 'Filter:' + str(self.Filter) + ', ' + \ 08349 'MaxDataSetsToReturn:' + str(self.MaxDataSetsToReturn) + ', ' + \ 08350 'MaxReferencesToReturn:' + str(self.MaxReferencesToReturn) + ')' 08351 08352 __repr__ = __str__ 08353 08354 08355 class QueryFirstRequest(FrozenClass): 08356 ''' 08357 :ivar TypeId: 08358 :vartype TypeId: NodeId 08359 :ivar RequestHeader: 08360 :vartype RequestHeader: RequestHeader 08361 :ivar Parameters: 08362 :vartype Parameters: QueryFirstParameters 08363 ''' 08364 08365 ua_types = { 08366 'TypeId': 'NodeId', 08367 'RequestHeader': 'RequestHeader', 08368 'Parameters': 'QueryFirstParameters', 08369 } 08370 08371 def __init__(self, binary=None): 08372 if binary is not None: 08373 self._binary_init(binary) 08374 self._freeze = True 08375 return 08376 self.TypeId = FourByteNodeId(ObjectIds.QueryFirstRequest_Encoding_DefaultBinary) 08377 self.RequestHeader = RequestHeader() 08378 self.Parameters = QueryFirstParameters() 08379 self._freeze = True 08380 08381 def to_binary(self): 08382 packet = [] 08383 packet.append(self.TypeId.to_binary()) 08384 packet.append(self.RequestHeader.to_binary()) 08385 packet.append(self.Parameters.to_binary()) 08386 return b''.join(packet) 08387 08388 @staticmethod 08389 def from_binary(data): 08390 return QueryFirstRequest(data) 08391 08392 def _binary_init(self, data): 08393 self.TypeId = NodeId.from_binary(data) 08394 self.RequestHeader = RequestHeader.from_binary(data) 08395 self.Parameters = QueryFirstParameters.from_binary(data) 08396 08397 def __str__(self): 08398 return 'QueryFirstRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 08399 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 08400 'Parameters:' + str(self.Parameters) + ')' 08401 08402 __repr__ = __str__ 08403 08404 08405 class QueryFirstResult(FrozenClass): 08406 ''' 08407 :ivar QueryDataSets: 08408 :vartype QueryDataSets: QueryDataSet 08409 :ivar ContinuationPoint: 08410 :vartype ContinuationPoint: ByteString 08411 :ivar ParsingResults: 08412 :vartype ParsingResults: ParsingResult 08413 :ivar DiagnosticInfos: 08414 :vartype DiagnosticInfos: DiagnosticInfo 08415 :ivar FilterResult: 08416 :vartype FilterResult: ContentFilterResult 08417 ''' 08418 08419 ua_types = { 08420 'QueryDataSets': 'QueryDataSet', 08421 'ContinuationPoint': 'ByteString', 08422 'ParsingResults': 'ParsingResult', 08423 'DiagnosticInfos': 'DiagnosticInfo', 08424 'FilterResult': 'ContentFilterResult', 08425 } 08426 08427 def __init__(self, binary=None): 08428 if binary is not None: 08429 self._binary_init(binary) 08430 self._freeze = True 08431 return 08432 self.QueryDataSets = [] 08433 self.ContinuationPoint = None 08434 self.ParsingResults = [] 08435 self.DiagnosticInfos = [] 08436 self.FilterResult = ContentFilterResult() 08437 self._freeze = True 08438 08439 def to_binary(self): 08440 packet = [] 08441 packet.append(uabin.Primitives.Int32.pack(len(self.QueryDataSets))) 08442 for fieldname in self.QueryDataSets: 08443 packet.append(fieldname.to_binary()) 08444 packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint)) 08445 packet.append(uabin.Primitives.Int32.pack(len(self.ParsingResults))) 08446 for fieldname in self.ParsingResults: 08447 packet.append(fieldname.to_binary()) 08448 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 08449 for fieldname in self.DiagnosticInfos: 08450 packet.append(fieldname.to_binary()) 08451 packet.append(self.FilterResult.to_binary()) 08452 return b''.join(packet) 08453 08454 @staticmethod 08455 def from_binary(data): 08456 return QueryFirstResult(data) 08457 08458 def _binary_init(self, data): 08459 length = uabin.Primitives.Int32.unpack(data) 08460 array = [] 08461 if length != -1: 08462 for _ in range(0, length): 08463 array.append(QueryDataSet.from_binary(data)) 08464 self.QueryDataSets = array 08465 self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data) 08466 length = uabin.Primitives.Int32.unpack(data) 08467 array = [] 08468 if length != -1: 08469 for _ in range(0, length): 08470 array.append(ParsingResult.from_binary(data)) 08471 self.ParsingResults = array 08472 length = uabin.Primitives.Int32.unpack(data) 08473 array = [] 08474 if length != -1: 08475 for _ in range(0, length): 08476 array.append(DiagnosticInfo.from_binary(data)) 08477 self.DiagnosticInfos = array 08478 self.FilterResult = ContentFilterResult.from_binary(data) 08479 08480 def __str__(self): 08481 return 'QueryFirstResult(' + 'QueryDataSets:' + str(self.QueryDataSets) + ', ' + \ 08482 'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \ 08483 'ParsingResults:' + str(self.ParsingResults) + ', ' + \ 08484 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ', ' + \ 08485 'FilterResult:' + str(self.FilterResult) + ')' 08486 08487 __repr__ = __str__ 08488 08489 08490 class QueryFirstResponse(FrozenClass): 08491 ''' 08492 :ivar TypeId: 08493 :vartype TypeId: NodeId 08494 :ivar ResponseHeader: 08495 :vartype ResponseHeader: ResponseHeader 08496 :ivar Parameters: 08497 :vartype Parameters: QueryFirstResult 08498 ''' 08499 08500 ua_types = { 08501 'TypeId': 'NodeId', 08502 'ResponseHeader': 'ResponseHeader', 08503 'Parameters': 'QueryFirstResult', 08504 } 08505 08506 def __init__(self, binary=None): 08507 if binary is not None: 08508 self._binary_init(binary) 08509 self._freeze = True 08510 return 08511 self.TypeId = FourByteNodeId(ObjectIds.QueryFirstResponse_Encoding_DefaultBinary) 08512 self.ResponseHeader = ResponseHeader() 08513 self.Parameters = QueryFirstResult() 08514 self._freeze = True 08515 08516 def to_binary(self): 08517 packet = [] 08518 packet.append(self.TypeId.to_binary()) 08519 packet.append(self.ResponseHeader.to_binary()) 08520 packet.append(self.Parameters.to_binary()) 08521 return b''.join(packet) 08522 08523 @staticmethod 08524 def from_binary(data): 08525 return QueryFirstResponse(data) 08526 08527 def _binary_init(self, data): 08528 self.TypeId = NodeId.from_binary(data) 08529 self.ResponseHeader = ResponseHeader.from_binary(data) 08530 self.Parameters = QueryFirstResult.from_binary(data) 08531 08532 def __str__(self): 08533 return 'QueryFirstResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 08534 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 08535 'Parameters:' + str(self.Parameters) + ')' 08536 08537 __repr__ = __str__ 08538 08539 08540 class QueryNextParameters(FrozenClass): 08541 ''' 08542 :ivar ReleaseContinuationPoint: 08543 :vartype ReleaseContinuationPoint: Boolean 08544 :ivar ContinuationPoint: 08545 :vartype ContinuationPoint: ByteString 08546 ''' 08547 08548 ua_types = { 08549 'ReleaseContinuationPoint': 'Boolean', 08550 'ContinuationPoint': 'ByteString', 08551 } 08552 08553 def __init__(self, binary=None): 08554 if binary is not None: 08555 self._binary_init(binary) 08556 self._freeze = True 08557 return 08558 self.ReleaseContinuationPoint = True 08559 self.ContinuationPoint = None 08560 self._freeze = True 08561 08562 def to_binary(self): 08563 packet = [] 08564 packet.append(uabin.Primitives.Boolean.pack(self.ReleaseContinuationPoint)) 08565 packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint)) 08566 return b''.join(packet) 08567 08568 @staticmethod 08569 def from_binary(data): 08570 return QueryNextParameters(data) 08571 08572 def _binary_init(self, data): 08573 self.ReleaseContinuationPoint = uabin.Primitives.Boolean.unpack(data) 08574 self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data) 08575 08576 def __str__(self): 08577 return 'QueryNextParameters(' + 'ReleaseContinuationPoint:' + str(self.ReleaseContinuationPoint) + ', ' + \ 08578 'ContinuationPoint:' + str(self.ContinuationPoint) + ')' 08579 08580 __repr__ = __str__ 08581 08582 08583 class QueryNextRequest(FrozenClass): 08584 ''' 08585 :ivar TypeId: 08586 :vartype TypeId: NodeId 08587 :ivar RequestHeader: 08588 :vartype RequestHeader: RequestHeader 08589 :ivar Parameters: 08590 :vartype Parameters: QueryNextParameters 08591 ''' 08592 08593 ua_types = { 08594 'TypeId': 'NodeId', 08595 'RequestHeader': 'RequestHeader', 08596 'Parameters': 'QueryNextParameters', 08597 } 08598 08599 def __init__(self, binary=None): 08600 if binary is not None: 08601 self._binary_init(binary) 08602 self._freeze = True 08603 return 08604 self.TypeId = FourByteNodeId(ObjectIds.QueryNextRequest_Encoding_DefaultBinary) 08605 self.RequestHeader = RequestHeader() 08606 self.Parameters = QueryNextParameters() 08607 self._freeze = True 08608 08609 def to_binary(self): 08610 packet = [] 08611 packet.append(self.TypeId.to_binary()) 08612 packet.append(self.RequestHeader.to_binary()) 08613 packet.append(self.Parameters.to_binary()) 08614 return b''.join(packet) 08615 08616 @staticmethod 08617 def from_binary(data): 08618 return QueryNextRequest(data) 08619 08620 def _binary_init(self, data): 08621 self.TypeId = NodeId.from_binary(data) 08622 self.RequestHeader = RequestHeader.from_binary(data) 08623 self.Parameters = QueryNextParameters.from_binary(data) 08624 08625 def __str__(self): 08626 return 'QueryNextRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 08627 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 08628 'Parameters:' + str(self.Parameters) + ')' 08629 08630 __repr__ = __str__ 08631 08632 08633 class QueryNextResult(FrozenClass): 08634 ''' 08635 :ivar QueryDataSets: 08636 :vartype QueryDataSets: QueryDataSet 08637 :ivar RevisedContinuationPoint: 08638 :vartype RevisedContinuationPoint: ByteString 08639 ''' 08640 08641 ua_types = { 08642 'QueryDataSets': 'QueryDataSet', 08643 'RevisedContinuationPoint': 'ByteString', 08644 } 08645 08646 def __init__(self, binary=None): 08647 if binary is not None: 08648 self._binary_init(binary) 08649 self._freeze = True 08650 return 08651 self.QueryDataSets = [] 08652 self.RevisedContinuationPoint = None 08653 self._freeze = True 08654 08655 def to_binary(self): 08656 packet = [] 08657 packet.append(uabin.Primitives.Int32.pack(len(self.QueryDataSets))) 08658 for fieldname in self.QueryDataSets: 08659 packet.append(fieldname.to_binary()) 08660 packet.append(uabin.Primitives.ByteString.pack(self.RevisedContinuationPoint)) 08661 return b''.join(packet) 08662 08663 @staticmethod 08664 def from_binary(data): 08665 return QueryNextResult(data) 08666 08667 def _binary_init(self, data): 08668 length = uabin.Primitives.Int32.unpack(data) 08669 array = [] 08670 if length != -1: 08671 for _ in range(0, length): 08672 array.append(QueryDataSet.from_binary(data)) 08673 self.QueryDataSets = array 08674 self.RevisedContinuationPoint = uabin.Primitives.ByteString.unpack(data) 08675 08676 def __str__(self): 08677 return 'QueryNextResult(' + 'QueryDataSets:' + str(self.QueryDataSets) + ', ' + \ 08678 'RevisedContinuationPoint:' + str(self.RevisedContinuationPoint) + ')' 08679 08680 __repr__ = __str__ 08681 08682 08683 class QueryNextResponse(FrozenClass): 08684 ''' 08685 :ivar TypeId: 08686 :vartype TypeId: NodeId 08687 :ivar ResponseHeader: 08688 :vartype ResponseHeader: ResponseHeader 08689 :ivar Parameters: 08690 :vartype Parameters: QueryNextResult 08691 ''' 08692 08693 ua_types = { 08694 'TypeId': 'NodeId', 08695 'ResponseHeader': 'ResponseHeader', 08696 'Parameters': 'QueryNextResult', 08697 } 08698 08699 def __init__(self, binary=None): 08700 if binary is not None: 08701 self._binary_init(binary) 08702 self._freeze = True 08703 return 08704 self.TypeId = FourByteNodeId(ObjectIds.QueryNextResponse_Encoding_DefaultBinary) 08705 self.ResponseHeader = ResponseHeader() 08706 self.Parameters = QueryNextResult() 08707 self._freeze = True 08708 08709 def to_binary(self): 08710 packet = [] 08711 packet.append(self.TypeId.to_binary()) 08712 packet.append(self.ResponseHeader.to_binary()) 08713 packet.append(self.Parameters.to_binary()) 08714 return b''.join(packet) 08715 08716 @staticmethod 08717 def from_binary(data): 08718 return QueryNextResponse(data) 08719 08720 def _binary_init(self, data): 08721 self.TypeId = NodeId.from_binary(data) 08722 self.ResponseHeader = ResponseHeader.from_binary(data) 08723 self.Parameters = QueryNextResult.from_binary(data) 08724 08725 def __str__(self): 08726 return 'QueryNextResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 08727 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 08728 'Parameters:' + str(self.Parameters) + ')' 08729 08730 __repr__ = __str__ 08731 08732 08733 class ReadValueId(FrozenClass): 08734 ''' 08735 :ivar NodeId: 08736 :vartype NodeId: NodeId 08737 :ivar AttributeId: 08738 :vartype AttributeId: UInt32 08739 :ivar IndexRange: 08740 :vartype IndexRange: String 08741 :ivar DataEncoding: 08742 :vartype DataEncoding: QualifiedName 08743 ''' 08744 08745 ua_types = { 08746 'NodeId': 'NodeId', 08747 'AttributeId': 'UInt32', 08748 'IndexRange': 'String', 08749 'DataEncoding': 'QualifiedName', 08750 } 08751 08752 def __init__(self, binary=None): 08753 if binary is not None: 08754 self._binary_init(binary) 08755 self._freeze = True 08756 return 08757 self.NodeId = NodeId() 08758 self.AttributeId = 0 08759 self.IndexRange = None 08760 self.DataEncoding = QualifiedName() 08761 self._freeze = True 08762 08763 def to_binary(self): 08764 packet = [] 08765 packet.append(self.NodeId.to_binary()) 08766 packet.append(uabin.Primitives.UInt32.pack(self.AttributeId)) 08767 packet.append(uabin.Primitives.String.pack(self.IndexRange)) 08768 packet.append(self.DataEncoding.to_binary()) 08769 return b''.join(packet) 08770 08771 @staticmethod 08772 def from_binary(data): 08773 return ReadValueId(data) 08774 08775 def _binary_init(self, data): 08776 self.NodeId = NodeId.from_binary(data) 08777 self.AttributeId = uabin.Primitives.UInt32.unpack(data) 08778 self.IndexRange = uabin.Primitives.String.unpack(data) 08779 self.DataEncoding = QualifiedName.from_binary(data) 08780 08781 def __str__(self): 08782 return 'ReadValueId(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 08783 'AttributeId:' + str(self.AttributeId) + ', ' + \ 08784 'IndexRange:' + str(self.IndexRange) + ', ' + \ 08785 'DataEncoding:' + str(self.DataEncoding) + ')' 08786 08787 __repr__ = __str__ 08788 08789 08790 class ReadParameters(FrozenClass): 08791 ''' 08792 :ivar MaxAge: 08793 :vartype MaxAge: Double 08794 :ivar TimestampsToReturn: 08795 :vartype TimestampsToReturn: TimestampsToReturn 08796 :ivar NodesToRead: 08797 :vartype NodesToRead: ReadValueId 08798 ''' 08799 08800 ua_types = { 08801 'MaxAge': 'Double', 08802 'TimestampsToReturn': 'TimestampsToReturn', 08803 'NodesToRead': 'ReadValueId', 08804 } 08805 08806 def __init__(self, binary=None): 08807 if binary is not None: 08808 self._binary_init(binary) 08809 self._freeze = True 08810 return 08811 self.MaxAge = 0 08812 self.TimestampsToReturn = TimestampsToReturn(0) 08813 self.NodesToRead = [] 08814 self._freeze = True 08815 08816 def to_binary(self): 08817 packet = [] 08818 packet.append(uabin.Primitives.Double.pack(self.MaxAge)) 08819 packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) 08820 packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRead))) 08821 for fieldname in self.NodesToRead: 08822 packet.append(fieldname.to_binary()) 08823 return b''.join(packet) 08824 08825 @staticmethod 08826 def from_binary(data): 08827 return ReadParameters(data) 08828 08829 def _binary_init(self, data): 08830 self.MaxAge = uabin.Primitives.Double.unpack(data) 08831 self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) 08832 length = uabin.Primitives.Int32.unpack(data) 08833 array = [] 08834 if length != -1: 08835 for _ in range(0, length): 08836 array.append(ReadValueId.from_binary(data)) 08837 self.NodesToRead = array 08838 08839 def __str__(self): 08840 return 'ReadParameters(' + 'MaxAge:' + str(self.MaxAge) + ', ' + \ 08841 'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ 08842 'NodesToRead:' + str(self.NodesToRead) + ')' 08843 08844 __repr__ = __str__ 08845 08846 08847 class ReadRequest(FrozenClass): 08848 ''' 08849 :ivar TypeId: 08850 :vartype TypeId: NodeId 08851 :ivar RequestHeader: 08852 :vartype RequestHeader: RequestHeader 08853 :ivar Parameters: 08854 :vartype Parameters: ReadParameters 08855 ''' 08856 08857 ua_types = { 08858 'TypeId': 'NodeId', 08859 'RequestHeader': 'RequestHeader', 08860 'Parameters': 'ReadParameters', 08861 } 08862 08863 def __init__(self, binary=None): 08864 if binary is not None: 08865 self._binary_init(binary) 08866 self._freeze = True 08867 return 08868 self.TypeId = FourByteNodeId(ObjectIds.ReadRequest_Encoding_DefaultBinary) 08869 self.RequestHeader = RequestHeader() 08870 self.Parameters = ReadParameters() 08871 self._freeze = True 08872 08873 def to_binary(self): 08874 packet = [] 08875 packet.append(self.TypeId.to_binary()) 08876 packet.append(self.RequestHeader.to_binary()) 08877 packet.append(self.Parameters.to_binary()) 08878 return b''.join(packet) 08879 08880 @staticmethod 08881 def from_binary(data): 08882 return ReadRequest(data) 08883 08884 def _binary_init(self, data): 08885 self.TypeId = NodeId.from_binary(data) 08886 self.RequestHeader = RequestHeader.from_binary(data) 08887 self.Parameters = ReadParameters.from_binary(data) 08888 08889 def __str__(self): 08890 return 'ReadRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 08891 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 08892 'Parameters:' + str(self.Parameters) + ')' 08893 08894 __repr__ = __str__ 08895 08896 08897 class ReadResponse(FrozenClass): 08898 ''' 08899 :ivar TypeId: 08900 :vartype TypeId: NodeId 08901 :ivar ResponseHeader: 08902 :vartype ResponseHeader: ResponseHeader 08903 :ivar Results: 08904 :vartype Results: DataValue 08905 :ivar DiagnosticInfos: 08906 :vartype DiagnosticInfos: DiagnosticInfo 08907 ''' 08908 08909 ua_types = { 08910 'TypeId': 'NodeId', 08911 'ResponseHeader': 'ResponseHeader', 08912 'Results': 'DataValue', 08913 'DiagnosticInfos': 'DiagnosticInfo', 08914 } 08915 08916 def __init__(self, binary=None): 08917 if binary is not None: 08918 self._binary_init(binary) 08919 self._freeze = True 08920 return 08921 self.TypeId = FourByteNodeId(ObjectIds.ReadResponse_Encoding_DefaultBinary) 08922 self.ResponseHeader = ResponseHeader() 08923 self.Results = [] 08924 self.DiagnosticInfos = [] 08925 self._freeze = True 08926 08927 def to_binary(self): 08928 packet = [] 08929 packet.append(self.TypeId.to_binary()) 08930 packet.append(self.ResponseHeader.to_binary()) 08931 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 08932 for fieldname in self.Results: 08933 packet.append(fieldname.to_binary()) 08934 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 08935 for fieldname in self.DiagnosticInfos: 08936 packet.append(fieldname.to_binary()) 08937 return b''.join(packet) 08938 08939 @staticmethod 08940 def from_binary(data): 08941 return ReadResponse(data) 08942 08943 def _binary_init(self, data): 08944 self.TypeId = NodeId.from_binary(data) 08945 self.ResponseHeader = ResponseHeader.from_binary(data) 08946 length = uabin.Primitives.Int32.unpack(data) 08947 array = [] 08948 if length != -1: 08949 for _ in range(0, length): 08950 array.append(DataValue.from_binary(data)) 08951 self.Results = array 08952 length = uabin.Primitives.Int32.unpack(data) 08953 array = [] 08954 if length != -1: 08955 for _ in range(0, length): 08956 array.append(DiagnosticInfo.from_binary(data)) 08957 self.DiagnosticInfos = array 08958 08959 def __str__(self): 08960 return 'ReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 08961 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 08962 'Results:' + str(self.Results) + ', ' + \ 08963 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 08964 08965 __repr__ = __str__ 08966 08967 08968 class HistoryReadValueId(FrozenClass): 08969 ''' 08970 :ivar NodeId: 08971 :vartype NodeId: NodeId 08972 :ivar IndexRange: 08973 :vartype IndexRange: String 08974 :ivar DataEncoding: 08975 :vartype DataEncoding: QualifiedName 08976 :ivar ContinuationPoint: 08977 :vartype ContinuationPoint: ByteString 08978 ''' 08979 08980 ua_types = { 08981 'NodeId': 'NodeId', 08982 'IndexRange': 'String', 08983 'DataEncoding': 'QualifiedName', 08984 'ContinuationPoint': 'ByteString', 08985 } 08986 08987 def __init__(self, binary=None): 08988 if binary is not None: 08989 self._binary_init(binary) 08990 self._freeze = True 08991 return 08992 self.NodeId = NodeId() 08993 self.IndexRange = None 08994 self.DataEncoding = QualifiedName() 08995 self.ContinuationPoint = None 08996 self._freeze = True 08997 08998 def to_binary(self): 08999 packet = [] 09000 packet.append(self.NodeId.to_binary()) 09001 packet.append(uabin.Primitives.String.pack(self.IndexRange)) 09002 packet.append(self.DataEncoding.to_binary()) 09003 packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint)) 09004 return b''.join(packet) 09005 09006 @staticmethod 09007 def from_binary(data): 09008 return HistoryReadValueId(data) 09009 09010 def _binary_init(self, data): 09011 self.NodeId = NodeId.from_binary(data) 09012 self.IndexRange = uabin.Primitives.String.unpack(data) 09013 self.DataEncoding = QualifiedName.from_binary(data) 09014 self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data) 09015 09016 def __str__(self): 09017 return 'HistoryReadValueId(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 09018 'IndexRange:' + str(self.IndexRange) + ', ' + \ 09019 'DataEncoding:' + str(self.DataEncoding) + ', ' + \ 09020 'ContinuationPoint:' + str(self.ContinuationPoint) + ')' 09021 09022 __repr__ = __str__ 09023 09024 09025 class HistoryReadResult(FrozenClass): 09026 ''' 09027 :ivar StatusCode: 09028 :vartype StatusCode: StatusCode 09029 :ivar ContinuationPoint: 09030 :vartype ContinuationPoint: ByteString 09031 :ivar HistoryData: 09032 :vartype HistoryData: ExtensionObject 09033 ''' 09034 09035 ua_types = { 09036 'StatusCode': 'StatusCode', 09037 'ContinuationPoint': 'ByteString', 09038 'HistoryData': 'ExtensionObject', 09039 } 09040 09041 def __init__(self, binary=None): 09042 if binary is not None: 09043 self._binary_init(binary) 09044 self._freeze = True 09045 return 09046 self.StatusCode = StatusCode() 09047 self.ContinuationPoint = None 09048 self.HistoryData = None 09049 self._freeze = True 09050 09051 def to_binary(self): 09052 packet = [] 09053 packet.append(self.StatusCode.to_binary()) 09054 packet.append(uabin.Primitives.ByteString.pack(self.ContinuationPoint)) 09055 packet.append(extensionobject_to_binary(self.HistoryData)) 09056 return b''.join(packet) 09057 09058 @staticmethod 09059 def from_binary(data): 09060 return HistoryReadResult(data) 09061 09062 def _binary_init(self, data): 09063 self.StatusCode = StatusCode.from_binary(data) 09064 self.ContinuationPoint = uabin.Primitives.ByteString.unpack(data) 09065 self.HistoryData = extensionobject_from_binary(data) 09066 09067 def __str__(self): 09068 return 'HistoryReadResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 09069 'ContinuationPoint:' + str(self.ContinuationPoint) + ', ' + \ 09070 'HistoryData:' + str(self.HistoryData) + ')' 09071 09072 __repr__ = __str__ 09073 09074 09075 class HistoryReadDetails(FrozenClass): 09076 ''' 09077 ''' 09078 09079 ua_types = { 09080 } 09081 09082 def __init__(self, binary=None): 09083 if binary is not None: 09084 self._binary_init(binary) 09085 self._freeze = True 09086 return 09087 self._freeze = True 09088 09089 def to_binary(self): 09090 packet = [] 09091 return b''.join(packet) 09092 09093 @staticmethod 09094 def from_binary(data): 09095 return HistoryReadDetails(data) 09096 09097 def _binary_init(self, data): 09098 pass 09099 09100 def __str__(self): 09101 return 'HistoryReadDetails(' + + ')' 09102 09103 __repr__ = __str__ 09104 09105 09106 class ReadEventDetails(FrozenClass): 09107 ''' 09108 :ivar NumValuesPerNode: 09109 :vartype NumValuesPerNode: UInt32 09110 :ivar StartTime: 09111 :vartype StartTime: DateTime 09112 :ivar EndTime: 09113 :vartype EndTime: DateTime 09114 :ivar Filter: 09115 :vartype Filter: EventFilter 09116 ''' 09117 09118 ua_types = { 09119 'NumValuesPerNode': 'UInt32', 09120 'StartTime': 'DateTime', 09121 'EndTime': 'DateTime', 09122 'Filter': 'EventFilter', 09123 } 09124 09125 def __init__(self, binary=None): 09126 if binary is not None: 09127 self._binary_init(binary) 09128 self._freeze = True 09129 return 09130 self.NumValuesPerNode = 0 09131 self.StartTime = datetime.now() 09132 self.EndTime = datetime.now() 09133 self.Filter = EventFilter() 09134 self._freeze = True 09135 09136 def to_binary(self): 09137 packet = [] 09138 packet.append(uabin.Primitives.UInt32.pack(self.NumValuesPerNode)) 09139 packet.append(uabin.Primitives.DateTime.pack(self.StartTime)) 09140 packet.append(uabin.Primitives.DateTime.pack(self.EndTime)) 09141 packet.append(self.Filter.to_binary()) 09142 return b''.join(packet) 09143 09144 @staticmethod 09145 def from_binary(data): 09146 return ReadEventDetails(data) 09147 09148 def _binary_init(self, data): 09149 self.NumValuesPerNode = uabin.Primitives.UInt32.unpack(data) 09150 self.StartTime = uabin.Primitives.DateTime.unpack(data) 09151 self.EndTime = uabin.Primitives.DateTime.unpack(data) 09152 self.Filter = EventFilter.from_binary(data) 09153 09154 def __str__(self): 09155 return 'ReadEventDetails(' + 'NumValuesPerNode:' + str(self.NumValuesPerNode) + ', ' + \ 09156 'StartTime:' + str(self.StartTime) + ', ' + \ 09157 'EndTime:' + str(self.EndTime) + ', ' + \ 09158 'Filter:' + str(self.Filter) + ')' 09159 09160 __repr__ = __str__ 09161 09162 09163 class ReadRawModifiedDetails(FrozenClass): 09164 ''' 09165 :ivar IsReadModified: 09166 :vartype IsReadModified: Boolean 09167 :ivar StartTime: 09168 :vartype StartTime: DateTime 09169 :ivar EndTime: 09170 :vartype EndTime: DateTime 09171 :ivar NumValuesPerNode: 09172 :vartype NumValuesPerNode: UInt32 09173 :ivar ReturnBounds: 09174 :vartype ReturnBounds: Boolean 09175 ''' 09176 09177 ua_types = { 09178 'IsReadModified': 'Boolean', 09179 'StartTime': 'DateTime', 09180 'EndTime': 'DateTime', 09181 'NumValuesPerNode': 'UInt32', 09182 'ReturnBounds': 'Boolean', 09183 } 09184 09185 def __init__(self, binary=None): 09186 if binary is not None: 09187 self._binary_init(binary) 09188 self._freeze = True 09189 return 09190 self.IsReadModified = True 09191 self.StartTime = datetime.now() 09192 self.EndTime = datetime.now() 09193 self.NumValuesPerNode = 0 09194 self.ReturnBounds = True 09195 self._freeze = True 09196 09197 def to_binary(self): 09198 packet = [] 09199 packet.append(uabin.Primitives.Boolean.pack(self.IsReadModified)) 09200 packet.append(uabin.Primitives.DateTime.pack(self.StartTime)) 09201 packet.append(uabin.Primitives.DateTime.pack(self.EndTime)) 09202 packet.append(uabin.Primitives.UInt32.pack(self.NumValuesPerNode)) 09203 packet.append(uabin.Primitives.Boolean.pack(self.ReturnBounds)) 09204 return b''.join(packet) 09205 09206 @staticmethod 09207 def from_binary(data): 09208 return ReadRawModifiedDetails(data) 09209 09210 def _binary_init(self, data): 09211 self.IsReadModified = uabin.Primitives.Boolean.unpack(data) 09212 self.StartTime = uabin.Primitives.DateTime.unpack(data) 09213 self.EndTime = uabin.Primitives.DateTime.unpack(data) 09214 self.NumValuesPerNode = uabin.Primitives.UInt32.unpack(data) 09215 self.ReturnBounds = uabin.Primitives.Boolean.unpack(data) 09216 09217 def __str__(self): 09218 return 'ReadRawModifiedDetails(' + 'IsReadModified:' + str(self.IsReadModified) + ', ' + \ 09219 'StartTime:' + str(self.StartTime) + ', ' + \ 09220 'EndTime:' + str(self.EndTime) + ', ' + \ 09221 'NumValuesPerNode:' + str(self.NumValuesPerNode) + ', ' + \ 09222 'ReturnBounds:' + str(self.ReturnBounds) + ')' 09223 09224 __repr__ = __str__ 09225 09226 09227 class ReadProcessedDetails(FrozenClass): 09228 ''' 09229 :ivar StartTime: 09230 :vartype StartTime: DateTime 09231 :ivar EndTime: 09232 :vartype EndTime: DateTime 09233 :ivar ProcessingInterval: 09234 :vartype ProcessingInterval: Double 09235 :ivar AggregateType: 09236 :vartype AggregateType: NodeId 09237 :ivar AggregateConfiguration: 09238 :vartype AggregateConfiguration: AggregateConfiguration 09239 ''' 09240 09241 ua_types = { 09242 'StartTime': 'DateTime', 09243 'EndTime': 'DateTime', 09244 'ProcessingInterval': 'Double', 09245 'AggregateType': 'NodeId', 09246 'AggregateConfiguration': 'AggregateConfiguration', 09247 } 09248 09249 def __init__(self, binary=None): 09250 if binary is not None: 09251 self._binary_init(binary) 09252 self._freeze = True 09253 return 09254 self.StartTime = datetime.now() 09255 self.EndTime = datetime.now() 09256 self.ProcessingInterval = 0 09257 self.AggregateType = [] 09258 self.AggregateConfiguration = AggregateConfiguration() 09259 self._freeze = True 09260 09261 def to_binary(self): 09262 packet = [] 09263 packet.append(uabin.Primitives.DateTime.pack(self.StartTime)) 09264 packet.append(uabin.Primitives.DateTime.pack(self.EndTime)) 09265 packet.append(uabin.Primitives.Double.pack(self.ProcessingInterval)) 09266 packet.append(uabin.Primitives.Int32.pack(len(self.AggregateType))) 09267 for fieldname in self.AggregateType: 09268 packet.append(fieldname.to_binary()) 09269 packet.append(self.AggregateConfiguration.to_binary()) 09270 return b''.join(packet) 09271 09272 @staticmethod 09273 def from_binary(data): 09274 return ReadProcessedDetails(data) 09275 09276 def _binary_init(self, data): 09277 self.StartTime = uabin.Primitives.DateTime.unpack(data) 09278 self.EndTime = uabin.Primitives.DateTime.unpack(data) 09279 self.ProcessingInterval = uabin.Primitives.Double.unpack(data) 09280 length = uabin.Primitives.Int32.unpack(data) 09281 array = [] 09282 if length != -1: 09283 for _ in range(0, length): 09284 array.append(NodeId.from_binary(data)) 09285 self.AggregateType = array 09286 self.AggregateConfiguration = AggregateConfiguration.from_binary(data) 09287 09288 def __str__(self): 09289 return 'ReadProcessedDetails(' + 'StartTime:' + str(self.StartTime) + ', ' + \ 09290 'EndTime:' + str(self.EndTime) + ', ' + \ 09291 'ProcessingInterval:' + str(self.ProcessingInterval) + ', ' + \ 09292 'AggregateType:' + str(self.AggregateType) + ', ' + \ 09293 'AggregateConfiguration:' + str(self.AggregateConfiguration) + ')' 09294 09295 __repr__ = __str__ 09296 09297 09298 class ReadAtTimeDetails(FrozenClass): 09299 ''' 09300 :ivar ReqTimes: 09301 :vartype ReqTimes: DateTime 09302 :ivar UseSimpleBounds: 09303 :vartype UseSimpleBounds: Boolean 09304 ''' 09305 09306 ua_types = { 09307 'ReqTimes': 'DateTime', 09308 'UseSimpleBounds': 'Boolean', 09309 } 09310 09311 def __init__(self, binary=None): 09312 if binary is not None: 09313 self._binary_init(binary) 09314 self._freeze = True 09315 return 09316 self.ReqTimes = [] 09317 self.UseSimpleBounds = True 09318 self._freeze = True 09319 09320 def to_binary(self): 09321 packet = [] 09322 packet.append(uabin.Primitives.Int32.pack(len(self.ReqTimes))) 09323 for fieldname in self.ReqTimes: 09324 packet.append(uabin.Primitives.DateTime.pack(fieldname)) 09325 packet.append(uabin.Primitives.Boolean.pack(self.UseSimpleBounds)) 09326 return b''.join(packet) 09327 09328 @staticmethod 09329 def from_binary(data): 09330 return ReadAtTimeDetails(data) 09331 09332 def _binary_init(self, data): 09333 self.ReqTimes = uabin.Primitives.DateTime.unpack_array(data) 09334 self.UseSimpleBounds = uabin.Primitives.Boolean.unpack(data) 09335 09336 def __str__(self): 09337 return 'ReadAtTimeDetails(' + 'ReqTimes:' + str(self.ReqTimes) + ', ' + \ 09338 'UseSimpleBounds:' + str(self.UseSimpleBounds) + ')' 09339 09340 __repr__ = __str__ 09341 09342 09343 class HistoryData(FrozenClass): 09344 ''' 09345 :ivar DataValues: 09346 :vartype DataValues: DataValue 09347 ''' 09348 09349 ua_types = { 09350 'DataValues': 'DataValue', 09351 } 09352 09353 def __init__(self, binary=None): 09354 if binary is not None: 09355 self._binary_init(binary) 09356 self._freeze = True 09357 return 09358 self.DataValues = [] 09359 self._freeze = True 09360 09361 def to_binary(self): 09362 packet = [] 09363 packet.append(uabin.Primitives.Int32.pack(len(self.DataValues))) 09364 for fieldname in self.DataValues: 09365 packet.append(fieldname.to_binary()) 09366 return b''.join(packet) 09367 09368 @staticmethod 09369 def from_binary(data): 09370 return HistoryData(data) 09371 09372 def _binary_init(self, data): 09373 length = uabin.Primitives.Int32.unpack(data) 09374 array = [] 09375 if length != -1: 09376 for _ in range(0, length): 09377 array.append(DataValue.from_binary(data)) 09378 self.DataValues = array 09379 09380 def __str__(self): 09381 return 'HistoryData(' + 'DataValues:' + str(self.DataValues) + ')' 09382 09383 __repr__ = __str__ 09384 09385 09386 class ModificationInfo(FrozenClass): 09387 ''' 09388 :ivar ModificationTime: 09389 :vartype ModificationTime: DateTime 09390 :ivar UpdateType: 09391 :vartype UpdateType: HistoryUpdateType 09392 :ivar UserName: 09393 :vartype UserName: String 09394 ''' 09395 09396 ua_types = { 09397 'ModificationTime': 'DateTime', 09398 'UpdateType': 'HistoryUpdateType', 09399 'UserName': 'String', 09400 } 09401 09402 def __init__(self, binary=None): 09403 if binary is not None: 09404 self._binary_init(binary) 09405 self._freeze = True 09406 return 09407 self.ModificationTime = datetime.now() 09408 self.UpdateType = HistoryUpdateType(0) 09409 self.UserName = None 09410 self._freeze = True 09411 09412 def to_binary(self): 09413 packet = [] 09414 packet.append(uabin.Primitives.DateTime.pack(self.ModificationTime)) 09415 packet.append(uabin.Primitives.UInt32.pack(self.UpdateType.value)) 09416 packet.append(uabin.Primitives.String.pack(self.UserName)) 09417 return b''.join(packet) 09418 09419 @staticmethod 09420 def from_binary(data): 09421 return ModificationInfo(data) 09422 09423 def _binary_init(self, data): 09424 self.ModificationTime = uabin.Primitives.DateTime.unpack(data) 09425 self.UpdateType = HistoryUpdateType(uabin.Primitives.UInt32.unpack(data)) 09426 self.UserName = uabin.Primitives.String.unpack(data) 09427 09428 def __str__(self): 09429 return 'ModificationInfo(' + 'ModificationTime:' + str(self.ModificationTime) + ', ' + \ 09430 'UpdateType:' + str(self.UpdateType) + ', ' + \ 09431 'UserName:' + str(self.UserName) + ')' 09432 09433 __repr__ = __str__ 09434 09435 09436 class HistoryModifiedData(FrozenClass): 09437 ''' 09438 :ivar DataValues: 09439 :vartype DataValues: DataValue 09440 :ivar ModificationInfos: 09441 :vartype ModificationInfos: ModificationInfo 09442 ''' 09443 09444 ua_types = { 09445 'DataValues': 'DataValue', 09446 'ModificationInfos': 'ModificationInfo', 09447 } 09448 09449 def __init__(self, binary=None): 09450 if binary is not None: 09451 self._binary_init(binary) 09452 self._freeze = True 09453 return 09454 self.DataValues = [] 09455 self.ModificationInfos = [] 09456 self._freeze = True 09457 09458 def to_binary(self): 09459 packet = [] 09460 packet.append(uabin.Primitives.Int32.pack(len(self.DataValues))) 09461 for fieldname in self.DataValues: 09462 packet.append(fieldname.to_binary()) 09463 packet.append(uabin.Primitives.Int32.pack(len(self.ModificationInfos))) 09464 for fieldname in self.ModificationInfos: 09465 packet.append(fieldname.to_binary()) 09466 return b''.join(packet) 09467 09468 @staticmethod 09469 def from_binary(data): 09470 return HistoryModifiedData(data) 09471 09472 def _binary_init(self, data): 09473 length = uabin.Primitives.Int32.unpack(data) 09474 array = [] 09475 if length != -1: 09476 for _ in range(0, length): 09477 array.append(DataValue.from_binary(data)) 09478 self.DataValues = array 09479 length = uabin.Primitives.Int32.unpack(data) 09480 array = [] 09481 if length != -1: 09482 for _ in range(0, length): 09483 array.append(ModificationInfo.from_binary(data)) 09484 self.ModificationInfos = array 09485 09486 def __str__(self): 09487 return 'HistoryModifiedData(' + 'DataValues:' + str(self.DataValues) + ', ' + \ 09488 'ModificationInfos:' + str(self.ModificationInfos) + ')' 09489 09490 __repr__ = __str__ 09491 09492 09493 class HistoryEvent(FrozenClass): 09494 ''' 09495 :ivar Events: 09496 :vartype Events: HistoryEventFieldList 09497 ''' 09498 09499 ua_types = { 09500 'Events': 'HistoryEventFieldList', 09501 } 09502 09503 def __init__(self, binary=None): 09504 if binary is not None: 09505 self._binary_init(binary) 09506 self._freeze = True 09507 return 09508 self.Events = [] 09509 self._freeze = True 09510 09511 def to_binary(self): 09512 packet = [] 09513 packet.append(uabin.Primitives.Int32.pack(len(self.Events))) 09514 for fieldname in self.Events: 09515 packet.append(fieldname.to_binary()) 09516 return b''.join(packet) 09517 09518 @staticmethod 09519 def from_binary(data): 09520 return HistoryEvent(data) 09521 09522 def _binary_init(self, data): 09523 length = uabin.Primitives.Int32.unpack(data) 09524 array = [] 09525 if length != -1: 09526 for _ in range(0, length): 09527 array.append(HistoryEventFieldList.from_binary(data)) 09528 self.Events = array 09529 09530 def __str__(self): 09531 return 'HistoryEvent(' + 'Events:' + str(self.Events) + ')' 09532 09533 __repr__ = __str__ 09534 09535 09536 class HistoryReadParameters(FrozenClass): 09537 ''' 09538 :ivar HistoryReadDetails: 09539 :vartype HistoryReadDetails: ExtensionObject 09540 :ivar TimestampsToReturn: 09541 :vartype TimestampsToReturn: TimestampsToReturn 09542 :ivar ReleaseContinuationPoints: 09543 :vartype ReleaseContinuationPoints: Boolean 09544 :ivar NodesToRead: 09545 :vartype NodesToRead: HistoryReadValueId 09546 ''' 09547 09548 ua_types = { 09549 'HistoryReadDetails': 'ExtensionObject', 09550 'TimestampsToReturn': 'TimestampsToReturn', 09551 'ReleaseContinuationPoints': 'Boolean', 09552 'NodesToRead': 'HistoryReadValueId', 09553 } 09554 09555 def __init__(self, binary=None): 09556 if binary is not None: 09557 self._binary_init(binary) 09558 self._freeze = True 09559 return 09560 self.HistoryReadDetails = None 09561 self.TimestampsToReturn = TimestampsToReturn(0) 09562 self.ReleaseContinuationPoints = True 09563 self.NodesToRead = [] 09564 self._freeze = True 09565 09566 def to_binary(self): 09567 packet = [] 09568 packet.append(extensionobject_to_binary(self.HistoryReadDetails)) 09569 packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) 09570 packet.append(uabin.Primitives.Boolean.pack(self.ReleaseContinuationPoints)) 09571 packet.append(uabin.Primitives.Int32.pack(len(self.NodesToRead))) 09572 for fieldname in self.NodesToRead: 09573 packet.append(fieldname.to_binary()) 09574 return b''.join(packet) 09575 09576 @staticmethod 09577 def from_binary(data): 09578 return HistoryReadParameters(data) 09579 09580 def _binary_init(self, data): 09581 self.HistoryReadDetails = extensionobject_from_binary(data) 09582 self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) 09583 self.ReleaseContinuationPoints = uabin.Primitives.Boolean.unpack(data) 09584 length = uabin.Primitives.Int32.unpack(data) 09585 array = [] 09586 if length != -1: 09587 for _ in range(0, length): 09588 array.append(HistoryReadValueId.from_binary(data)) 09589 self.NodesToRead = array 09590 09591 def __str__(self): 09592 return 'HistoryReadParameters(' + 'HistoryReadDetails:' + str(self.HistoryReadDetails) + ', ' + \ 09593 'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ 09594 'ReleaseContinuationPoints:' + str(self.ReleaseContinuationPoints) + ', ' + \ 09595 'NodesToRead:' + str(self.NodesToRead) + ')' 09596 09597 __repr__ = __str__ 09598 09599 09600 class HistoryReadRequest(FrozenClass): 09601 ''' 09602 :ivar TypeId: 09603 :vartype TypeId: NodeId 09604 :ivar RequestHeader: 09605 :vartype RequestHeader: RequestHeader 09606 :ivar Parameters: 09607 :vartype Parameters: HistoryReadParameters 09608 ''' 09609 09610 ua_types = { 09611 'TypeId': 'NodeId', 09612 'RequestHeader': 'RequestHeader', 09613 'Parameters': 'HistoryReadParameters', 09614 } 09615 09616 def __init__(self, binary=None): 09617 if binary is not None: 09618 self._binary_init(binary) 09619 self._freeze = True 09620 return 09621 self.TypeId = FourByteNodeId(ObjectIds.HistoryReadRequest_Encoding_DefaultBinary) 09622 self.RequestHeader = RequestHeader() 09623 self.Parameters = HistoryReadParameters() 09624 self._freeze = True 09625 09626 def to_binary(self): 09627 packet = [] 09628 packet.append(self.TypeId.to_binary()) 09629 packet.append(self.RequestHeader.to_binary()) 09630 packet.append(self.Parameters.to_binary()) 09631 return b''.join(packet) 09632 09633 @staticmethod 09634 def from_binary(data): 09635 return HistoryReadRequest(data) 09636 09637 def _binary_init(self, data): 09638 self.TypeId = NodeId.from_binary(data) 09639 self.RequestHeader = RequestHeader.from_binary(data) 09640 self.Parameters = HistoryReadParameters.from_binary(data) 09641 09642 def __str__(self): 09643 return 'HistoryReadRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 09644 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 09645 'Parameters:' + str(self.Parameters) + ')' 09646 09647 __repr__ = __str__ 09648 09649 09650 class HistoryReadResponse(FrozenClass): 09651 ''' 09652 :ivar TypeId: 09653 :vartype TypeId: NodeId 09654 :ivar ResponseHeader: 09655 :vartype ResponseHeader: ResponseHeader 09656 :ivar Results: 09657 :vartype Results: HistoryReadResult 09658 :ivar DiagnosticInfos: 09659 :vartype DiagnosticInfos: DiagnosticInfo 09660 ''' 09661 09662 ua_types = { 09663 'TypeId': 'NodeId', 09664 'ResponseHeader': 'ResponseHeader', 09665 'Results': 'HistoryReadResult', 09666 'DiagnosticInfos': 'DiagnosticInfo', 09667 } 09668 09669 def __init__(self, binary=None): 09670 if binary is not None: 09671 self._binary_init(binary) 09672 self._freeze = True 09673 return 09674 self.TypeId = FourByteNodeId(ObjectIds.HistoryReadResponse_Encoding_DefaultBinary) 09675 self.ResponseHeader = ResponseHeader() 09676 self.Results = [] 09677 self.DiagnosticInfos = [] 09678 self._freeze = True 09679 09680 def to_binary(self): 09681 packet = [] 09682 packet.append(self.TypeId.to_binary()) 09683 packet.append(self.ResponseHeader.to_binary()) 09684 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 09685 for fieldname in self.Results: 09686 packet.append(fieldname.to_binary()) 09687 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 09688 for fieldname in self.DiagnosticInfos: 09689 packet.append(fieldname.to_binary()) 09690 return b''.join(packet) 09691 09692 @staticmethod 09693 def from_binary(data): 09694 return HistoryReadResponse(data) 09695 09696 def _binary_init(self, data): 09697 self.TypeId = NodeId.from_binary(data) 09698 self.ResponseHeader = ResponseHeader.from_binary(data) 09699 length = uabin.Primitives.Int32.unpack(data) 09700 array = [] 09701 if length != -1: 09702 for _ in range(0, length): 09703 array.append(HistoryReadResult.from_binary(data)) 09704 self.Results = array 09705 length = uabin.Primitives.Int32.unpack(data) 09706 array = [] 09707 if length != -1: 09708 for _ in range(0, length): 09709 array.append(DiagnosticInfo.from_binary(data)) 09710 self.DiagnosticInfos = array 09711 09712 def __str__(self): 09713 return 'HistoryReadResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 09714 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 09715 'Results:' + str(self.Results) + ', ' + \ 09716 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 09717 09718 __repr__ = __str__ 09719 09720 09721 class WriteValue(FrozenClass): 09722 ''' 09723 :ivar NodeId: 09724 :vartype NodeId: NodeId 09725 :ivar AttributeId: 09726 :vartype AttributeId: UInt32 09727 :ivar IndexRange: 09728 :vartype IndexRange: String 09729 :ivar Value: 09730 :vartype Value: DataValue 09731 ''' 09732 09733 ua_types = { 09734 'NodeId': 'NodeId', 09735 'AttributeId': 'UInt32', 09736 'IndexRange': 'String', 09737 'Value': 'DataValue', 09738 } 09739 09740 def __init__(self, binary=None): 09741 if binary is not None: 09742 self._binary_init(binary) 09743 self._freeze = True 09744 return 09745 self.NodeId = NodeId() 09746 self.AttributeId = 0 09747 self.IndexRange = None 09748 self.Value = DataValue() 09749 self._freeze = True 09750 09751 def to_binary(self): 09752 packet = [] 09753 packet.append(self.NodeId.to_binary()) 09754 packet.append(uabin.Primitives.UInt32.pack(self.AttributeId)) 09755 packet.append(uabin.Primitives.String.pack(self.IndexRange)) 09756 packet.append(self.Value.to_binary()) 09757 return b''.join(packet) 09758 09759 @staticmethod 09760 def from_binary(data): 09761 return WriteValue(data) 09762 09763 def _binary_init(self, data): 09764 self.NodeId = NodeId.from_binary(data) 09765 self.AttributeId = uabin.Primitives.UInt32.unpack(data) 09766 self.IndexRange = uabin.Primitives.String.unpack(data) 09767 self.Value = DataValue.from_binary(data) 09768 09769 def __str__(self): 09770 return 'WriteValue(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 09771 'AttributeId:' + str(self.AttributeId) + ', ' + \ 09772 'IndexRange:' + str(self.IndexRange) + ', ' + \ 09773 'Value:' + str(self.Value) + ')' 09774 09775 __repr__ = __str__ 09776 09777 09778 class WriteParameters(FrozenClass): 09779 ''' 09780 :ivar NodesToWrite: 09781 :vartype NodesToWrite: WriteValue 09782 ''' 09783 09784 ua_types = { 09785 'NodesToWrite': 'WriteValue', 09786 } 09787 09788 def __init__(self, binary=None): 09789 if binary is not None: 09790 self._binary_init(binary) 09791 self._freeze = True 09792 return 09793 self.NodesToWrite = [] 09794 self._freeze = True 09795 09796 def to_binary(self): 09797 packet = [] 09798 packet.append(uabin.Primitives.Int32.pack(len(self.NodesToWrite))) 09799 for fieldname in self.NodesToWrite: 09800 packet.append(fieldname.to_binary()) 09801 return b''.join(packet) 09802 09803 @staticmethod 09804 def from_binary(data): 09805 return WriteParameters(data) 09806 09807 def _binary_init(self, data): 09808 length = uabin.Primitives.Int32.unpack(data) 09809 array = [] 09810 if length != -1: 09811 for _ in range(0, length): 09812 array.append(WriteValue.from_binary(data)) 09813 self.NodesToWrite = array 09814 09815 def __str__(self): 09816 return 'WriteParameters(' + 'NodesToWrite:' + str(self.NodesToWrite) + ')' 09817 09818 __repr__ = __str__ 09819 09820 09821 class WriteRequest(FrozenClass): 09822 ''' 09823 :ivar TypeId: 09824 :vartype TypeId: NodeId 09825 :ivar RequestHeader: 09826 :vartype RequestHeader: RequestHeader 09827 :ivar Parameters: 09828 :vartype Parameters: WriteParameters 09829 ''' 09830 09831 ua_types = { 09832 'TypeId': 'NodeId', 09833 'RequestHeader': 'RequestHeader', 09834 'Parameters': 'WriteParameters', 09835 } 09836 09837 def __init__(self, binary=None): 09838 if binary is not None: 09839 self._binary_init(binary) 09840 self._freeze = True 09841 return 09842 self.TypeId = FourByteNodeId(ObjectIds.WriteRequest_Encoding_DefaultBinary) 09843 self.RequestHeader = RequestHeader() 09844 self.Parameters = WriteParameters() 09845 self._freeze = True 09846 09847 def to_binary(self): 09848 packet = [] 09849 packet.append(self.TypeId.to_binary()) 09850 packet.append(self.RequestHeader.to_binary()) 09851 packet.append(self.Parameters.to_binary()) 09852 return b''.join(packet) 09853 09854 @staticmethod 09855 def from_binary(data): 09856 return WriteRequest(data) 09857 09858 def _binary_init(self, data): 09859 self.TypeId = NodeId.from_binary(data) 09860 self.RequestHeader = RequestHeader.from_binary(data) 09861 self.Parameters = WriteParameters.from_binary(data) 09862 09863 def __str__(self): 09864 return 'WriteRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 09865 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 09866 'Parameters:' + str(self.Parameters) + ')' 09867 09868 __repr__ = __str__ 09869 09870 09871 class WriteResponse(FrozenClass): 09872 ''' 09873 :ivar TypeId: 09874 :vartype TypeId: NodeId 09875 :ivar ResponseHeader: 09876 :vartype ResponseHeader: ResponseHeader 09877 :ivar Results: 09878 :vartype Results: StatusCode 09879 :ivar DiagnosticInfos: 09880 :vartype DiagnosticInfos: DiagnosticInfo 09881 ''' 09882 09883 ua_types = { 09884 'TypeId': 'NodeId', 09885 'ResponseHeader': 'ResponseHeader', 09886 'Results': 'StatusCode', 09887 'DiagnosticInfos': 'DiagnosticInfo', 09888 } 09889 09890 def __init__(self, binary=None): 09891 if binary is not None: 09892 self._binary_init(binary) 09893 self._freeze = True 09894 return 09895 self.TypeId = FourByteNodeId(ObjectIds.WriteResponse_Encoding_DefaultBinary) 09896 self.ResponseHeader = ResponseHeader() 09897 self.Results = [] 09898 self.DiagnosticInfos = [] 09899 self._freeze = True 09900 09901 def to_binary(self): 09902 packet = [] 09903 packet.append(self.TypeId.to_binary()) 09904 packet.append(self.ResponseHeader.to_binary()) 09905 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 09906 for fieldname in self.Results: 09907 packet.append(fieldname.to_binary()) 09908 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 09909 for fieldname in self.DiagnosticInfos: 09910 packet.append(fieldname.to_binary()) 09911 return b''.join(packet) 09912 09913 @staticmethod 09914 def from_binary(data): 09915 return WriteResponse(data) 09916 09917 def _binary_init(self, data): 09918 self.TypeId = NodeId.from_binary(data) 09919 self.ResponseHeader = ResponseHeader.from_binary(data) 09920 length = uabin.Primitives.Int32.unpack(data) 09921 array = [] 09922 if length != -1: 09923 for _ in range(0, length): 09924 array.append(StatusCode.from_binary(data)) 09925 self.Results = array 09926 length = uabin.Primitives.Int32.unpack(data) 09927 array = [] 09928 if length != -1: 09929 for _ in range(0, length): 09930 array.append(DiagnosticInfo.from_binary(data)) 09931 self.DiagnosticInfos = array 09932 09933 def __str__(self): 09934 return 'WriteResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 09935 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 09936 'Results:' + str(self.Results) + ', ' + \ 09937 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 09938 09939 __repr__ = __str__ 09940 09941 09942 class HistoryUpdateDetails(FrozenClass): 09943 ''' 09944 :ivar NodeId: 09945 :vartype NodeId: NodeId 09946 ''' 09947 09948 ua_types = { 09949 'NodeId': 'NodeId', 09950 } 09951 09952 def __init__(self, binary=None): 09953 if binary is not None: 09954 self._binary_init(binary) 09955 self._freeze = True 09956 return 09957 self.NodeId = NodeId() 09958 self._freeze = True 09959 09960 def to_binary(self): 09961 packet = [] 09962 packet.append(self.NodeId.to_binary()) 09963 return b''.join(packet) 09964 09965 @staticmethod 09966 def from_binary(data): 09967 return HistoryUpdateDetails(data) 09968 09969 def _binary_init(self, data): 09970 self.NodeId = NodeId.from_binary(data) 09971 09972 def __str__(self): 09973 return 'HistoryUpdateDetails(' + 'NodeId:' + str(self.NodeId) + ')' 09974 09975 __repr__ = __str__ 09976 09977 09978 class UpdateDataDetails(FrozenClass): 09979 ''' 09980 :ivar NodeId: 09981 :vartype NodeId: NodeId 09982 :ivar PerformInsertReplace: 09983 :vartype PerformInsertReplace: PerformUpdateType 09984 :ivar UpdateValues: 09985 :vartype UpdateValues: DataValue 09986 ''' 09987 09988 ua_types = { 09989 'NodeId': 'NodeId', 09990 'PerformInsertReplace': 'PerformUpdateType', 09991 'UpdateValues': 'DataValue', 09992 } 09993 09994 def __init__(self, binary=None): 09995 if binary is not None: 09996 self._binary_init(binary) 09997 self._freeze = True 09998 return 09999 self.NodeId = NodeId() 10000 self.PerformInsertReplace = PerformUpdateType(0) 10001 self.UpdateValues = [] 10002 self._freeze = True 10003 10004 def to_binary(self): 10005 packet = [] 10006 packet.append(self.NodeId.to_binary()) 10007 packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value)) 10008 packet.append(uabin.Primitives.Int32.pack(len(self.UpdateValues))) 10009 for fieldname in self.UpdateValues: 10010 packet.append(fieldname.to_binary()) 10011 return b''.join(packet) 10012 10013 @staticmethod 10014 def from_binary(data): 10015 return UpdateDataDetails(data) 10016 10017 def _binary_init(self, data): 10018 self.NodeId = NodeId.from_binary(data) 10019 self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data)) 10020 length = uabin.Primitives.Int32.unpack(data) 10021 array = [] 10022 if length != -1: 10023 for _ in range(0, length): 10024 array.append(DataValue.from_binary(data)) 10025 self.UpdateValues = array 10026 10027 def __str__(self): 10028 return 'UpdateDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 10029 'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \ 10030 'UpdateValues:' + str(self.UpdateValues) + ')' 10031 10032 __repr__ = __str__ 10033 10034 10035 class UpdateStructureDataDetails(FrozenClass): 10036 ''' 10037 :ivar NodeId: 10038 :vartype NodeId: NodeId 10039 :ivar PerformInsertReplace: 10040 :vartype PerformInsertReplace: PerformUpdateType 10041 :ivar UpdateValues: 10042 :vartype UpdateValues: DataValue 10043 ''' 10044 10045 ua_types = { 10046 'NodeId': 'NodeId', 10047 'PerformInsertReplace': 'PerformUpdateType', 10048 'UpdateValues': 'DataValue', 10049 } 10050 10051 def __init__(self, binary=None): 10052 if binary is not None: 10053 self._binary_init(binary) 10054 self._freeze = True 10055 return 10056 self.NodeId = NodeId() 10057 self.PerformInsertReplace = PerformUpdateType(0) 10058 self.UpdateValues = [] 10059 self._freeze = True 10060 10061 def to_binary(self): 10062 packet = [] 10063 packet.append(self.NodeId.to_binary()) 10064 packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value)) 10065 packet.append(uabin.Primitives.Int32.pack(len(self.UpdateValues))) 10066 for fieldname in self.UpdateValues: 10067 packet.append(fieldname.to_binary()) 10068 return b''.join(packet) 10069 10070 @staticmethod 10071 def from_binary(data): 10072 return UpdateStructureDataDetails(data) 10073 10074 def _binary_init(self, data): 10075 self.NodeId = NodeId.from_binary(data) 10076 self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data)) 10077 length = uabin.Primitives.Int32.unpack(data) 10078 array = [] 10079 if length != -1: 10080 for _ in range(0, length): 10081 array.append(DataValue.from_binary(data)) 10082 self.UpdateValues = array 10083 10084 def __str__(self): 10085 return 'UpdateStructureDataDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 10086 'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \ 10087 'UpdateValues:' + str(self.UpdateValues) + ')' 10088 10089 __repr__ = __str__ 10090 10091 10092 class UpdateEventDetails(FrozenClass): 10093 ''' 10094 :ivar NodeId: 10095 :vartype NodeId: NodeId 10096 :ivar PerformInsertReplace: 10097 :vartype PerformInsertReplace: PerformUpdateType 10098 :ivar Filter: 10099 :vartype Filter: EventFilter 10100 :ivar EventData: 10101 :vartype EventData: HistoryEventFieldList 10102 ''' 10103 10104 ua_types = { 10105 'NodeId': 'NodeId', 10106 'PerformInsertReplace': 'PerformUpdateType', 10107 'Filter': 'EventFilter', 10108 'EventData': 'HistoryEventFieldList', 10109 } 10110 10111 def __init__(self, binary=None): 10112 if binary is not None: 10113 self._binary_init(binary) 10114 self._freeze = True 10115 return 10116 self.NodeId = NodeId() 10117 self.PerformInsertReplace = PerformUpdateType(0) 10118 self.Filter = EventFilter() 10119 self.EventData = [] 10120 self._freeze = True 10121 10122 def to_binary(self): 10123 packet = [] 10124 packet.append(self.NodeId.to_binary()) 10125 packet.append(uabin.Primitives.UInt32.pack(self.PerformInsertReplace.value)) 10126 packet.append(self.Filter.to_binary()) 10127 packet.append(uabin.Primitives.Int32.pack(len(self.EventData))) 10128 for fieldname in self.EventData: 10129 packet.append(fieldname.to_binary()) 10130 return b''.join(packet) 10131 10132 @staticmethod 10133 def from_binary(data): 10134 return UpdateEventDetails(data) 10135 10136 def _binary_init(self, data): 10137 self.NodeId = NodeId.from_binary(data) 10138 self.PerformInsertReplace = PerformUpdateType(uabin.Primitives.UInt32.unpack(data)) 10139 self.Filter = EventFilter.from_binary(data) 10140 length = uabin.Primitives.Int32.unpack(data) 10141 array = [] 10142 if length != -1: 10143 for _ in range(0, length): 10144 array.append(HistoryEventFieldList.from_binary(data)) 10145 self.EventData = array 10146 10147 def __str__(self): 10148 return 'UpdateEventDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 10149 'PerformInsertReplace:' + str(self.PerformInsertReplace) + ', ' + \ 10150 'Filter:' + str(self.Filter) + ', ' + \ 10151 'EventData:' + str(self.EventData) + ')' 10152 10153 __repr__ = __str__ 10154 10155 10156 class DeleteRawModifiedDetails(FrozenClass): 10157 ''' 10158 :ivar NodeId: 10159 :vartype NodeId: NodeId 10160 :ivar IsDeleteModified: 10161 :vartype IsDeleteModified: Boolean 10162 :ivar StartTime: 10163 :vartype StartTime: DateTime 10164 :ivar EndTime: 10165 :vartype EndTime: DateTime 10166 ''' 10167 10168 ua_types = { 10169 'NodeId': 'NodeId', 10170 'IsDeleteModified': 'Boolean', 10171 'StartTime': 'DateTime', 10172 'EndTime': 'DateTime', 10173 } 10174 10175 def __init__(self, binary=None): 10176 if binary is not None: 10177 self._binary_init(binary) 10178 self._freeze = True 10179 return 10180 self.NodeId = NodeId() 10181 self.IsDeleteModified = True 10182 self.StartTime = datetime.now() 10183 self.EndTime = datetime.now() 10184 self._freeze = True 10185 10186 def to_binary(self): 10187 packet = [] 10188 packet.append(self.NodeId.to_binary()) 10189 packet.append(uabin.Primitives.Boolean.pack(self.IsDeleteModified)) 10190 packet.append(uabin.Primitives.DateTime.pack(self.StartTime)) 10191 packet.append(uabin.Primitives.DateTime.pack(self.EndTime)) 10192 return b''.join(packet) 10193 10194 @staticmethod 10195 def from_binary(data): 10196 return DeleteRawModifiedDetails(data) 10197 10198 def _binary_init(self, data): 10199 self.NodeId = NodeId.from_binary(data) 10200 self.IsDeleteModified = uabin.Primitives.Boolean.unpack(data) 10201 self.StartTime = uabin.Primitives.DateTime.unpack(data) 10202 self.EndTime = uabin.Primitives.DateTime.unpack(data) 10203 10204 def __str__(self): 10205 return 'DeleteRawModifiedDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 10206 'IsDeleteModified:' + str(self.IsDeleteModified) + ', ' + \ 10207 'StartTime:' + str(self.StartTime) + ', ' + \ 10208 'EndTime:' + str(self.EndTime) + ')' 10209 10210 __repr__ = __str__ 10211 10212 10213 class DeleteAtTimeDetails(FrozenClass): 10214 ''' 10215 :ivar NodeId: 10216 :vartype NodeId: NodeId 10217 :ivar ReqTimes: 10218 :vartype ReqTimes: DateTime 10219 ''' 10220 10221 ua_types = { 10222 'NodeId': 'NodeId', 10223 'ReqTimes': 'DateTime', 10224 } 10225 10226 def __init__(self, binary=None): 10227 if binary is not None: 10228 self._binary_init(binary) 10229 self._freeze = True 10230 return 10231 self.NodeId = NodeId() 10232 self.ReqTimes = [] 10233 self._freeze = True 10234 10235 def to_binary(self): 10236 packet = [] 10237 packet.append(self.NodeId.to_binary()) 10238 packet.append(uabin.Primitives.Int32.pack(len(self.ReqTimes))) 10239 for fieldname in self.ReqTimes: 10240 packet.append(uabin.Primitives.DateTime.pack(fieldname)) 10241 return b''.join(packet) 10242 10243 @staticmethod 10244 def from_binary(data): 10245 return DeleteAtTimeDetails(data) 10246 10247 def _binary_init(self, data): 10248 self.NodeId = NodeId.from_binary(data) 10249 self.ReqTimes = uabin.Primitives.DateTime.unpack_array(data) 10250 10251 def __str__(self): 10252 return 'DeleteAtTimeDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 10253 'ReqTimes:' + str(self.ReqTimes) + ')' 10254 10255 __repr__ = __str__ 10256 10257 10258 class DeleteEventDetails(FrozenClass): 10259 ''' 10260 :ivar NodeId: 10261 :vartype NodeId: NodeId 10262 :ivar EventIds: 10263 :vartype EventIds: ByteString 10264 ''' 10265 10266 ua_types = { 10267 'NodeId': 'NodeId', 10268 'EventIds': 'ByteString', 10269 } 10270 10271 def __init__(self, binary=None): 10272 if binary is not None: 10273 self._binary_init(binary) 10274 self._freeze = True 10275 return 10276 self.NodeId = NodeId() 10277 self.EventIds = [] 10278 self._freeze = True 10279 10280 def to_binary(self): 10281 packet = [] 10282 packet.append(self.NodeId.to_binary()) 10283 packet.append(uabin.Primitives.Int32.pack(len(self.EventIds))) 10284 for fieldname in self.EventIds: 10285 packet.append(uabin.Primitives.ByteString.pack(fieldname)) 10286 return b''.join(packet) 10287 10288 @staticmethod 10289 def from_binary(data): 10290 return DeleteEventDetails(data) 10291 10292 def _binary_init(self, data): 10293 self.NodeId = NodeId.from_binary(data) 10294 self.EventIds = uabin.Primitives.ByteString.unpack_array(data) 10295 10296 def __str__(self): 10297 return 'DeleteEventDetails(' + 'NodeId:' + str(self.NodeId) + ', ' + \ 10298 'EventIds:' + str(self.EventIds) + ')' 10299 10300 __repr__ = __str__ 10301 10302 10303 class HistoryUpdateResult(FrozenClass): 10304 ''' 10305 :ivar StatusCode: 10306 :vartype StatusCode: StatusCode 10307 :ivar OperationResults: 10308 :vartype OperationResults: StatusCode 10309 :ivar DiagnosticInfos: 10310 :vartype DiagnosticInfos: DiagnosticInfo 10311 ''' 10312 10313 ua_types = { 10314 'StatusCode': 'StatusCode', 10315 'OperationResults': 'StatusCode', 10316 'DiagnosticInfos': 'DiagnosticInfo', 10317 } 10318 10319 def __init__(self, binary=None): 10320 if binary is not None: 10321 self._binary_init(binary) 10322 self._freeze = True 10323 return 10324 self.StatusCode = StatusCode() 10325 self.OperationResults = [] 10326 self.DiagnosticInfos = [] 10327 self._freeze = True 10328 10329 def to_binary(self): 10330 packet = [] 10331 packet.append(self.StatusCode.to_binary()) 10332 packet.append(uabin.Primitives.Int32.pack(len(self.OperationResults))) 10333 for fieldname in self.OperationResults: 10334 packet.append(fieldname.to_binary()) 10335 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 10336 for fieldname in self.DiagnosticInfos: 10337 packet.append(fieldname.to_binary()) 10338 return b''.join(packet) 10339 10340 @staticmethod 10341 def from_binary(data): 10342 return HistoryUpdateResult(data) 10343 10344 def _binary_init(self, data): 10345 self.StatusCode = StatusCode.from_binary(data) 10346 length = uabin.Primitives.Int32.unpack(data) 10347 array = [] 10348 if length != -1: 10349 for _ in range(0, length): 10350 array.append(StatusCode.from_binary(data)) 10351 self.OperationResults = array 10352 length = uabin.Primitives.Int32.unpack(data) 10353 array = [] 10354 if length != -1: 10355 for _ in range(0, length): 10356 array.append(DiagnosticInfo.from_binary(data)) 10357 self.DiagnosticInfos = array 10358 10359 def __str__(self): 10360 return 'HistoryUpdateResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 10361 'OperationResults:' + str(self.OperationResults) + ', ' + \ 10362 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 10363 10364 __repr__ = __str__ 10365 10366 10367 class HistoryUpdateParameters(FrozenClass): 10368 ''' 10369 :ivar HistoryUpdateDetails: 10370 :vartype HistoryUpdateDetails: ExtensionObject 10371 ''' 10372 10373 ua_types = { 10374 'HistoryUpdateDetails': 'ExtensionObject', 10375 } 10376 10377 def __init__(self, binary=None): 10378 if binary is not None: 10379 self._binary_init(binary) 10380 self._freeze = True 10381 return 10382 self.HistoryUpdateDetails = [] 10383 self._freeze = True 10384 10385 def to_binary(self): 10386 packet = [] 10387 packet.append(uabin.Primitives.Int32.pack(len(self.HistoryUpdateDetails))) 10388 for fieldname in self.HistoryUpdateDetails: 10389 packet.append(extensionobject_to_binary(fieldname)) 10390 return b''.join(packet) 10391 10392 @staticmethod 10393 def from_binary(data): 10394 return HistoryUpdateParameters(data) 10395 10396 def _binary_init(self, data): 10397 length = uabin.Primitives.Int32.unpack(data) 10398 array = [] 10399 if length != -1: 10400 for _ in range(0, length): 10401 array.append(extensionobject_from_binary(data)) 10402 self.HistoryUpdateDetails = array 10403 10404 def __str__(self): 10405 return 'HistoryUpdateParameters(' + 'HistoryUpdateDetails:' + str(self.HistoryUpdateDetails) + ')' 10406 10407 __repr__ = __str__ 10408 10409 10410 class HistoryUpdateRequest(FrozenClass): 10411 ''' 10412 :ivar TypeId: 10413 :vartype TypeId: NodeId 10414 :ivar RequestHeader: 10415 :vartype RequestHeader: RequestHeader 10416 :ivar Parameters: 10417 :vartype Parameters: HistoryUpdateParameters 10418 ''' 10419 10420 ua_types = { 10421 'TypeId': 'NodeId', 10422 'RequestHeader': 'RequestHeader', 10423 'Parameters': 'HistoryUpdateParameters', 10424 } 10425 10426 def __init__(self, binary=None): 10427 if binary is not None: 10428 self._binary_init(binary) 10429 self._freeze = True 10430 return 10431 self.TypeId = FourByteNodeId(ObjectIds.HistoryUpdateRequest_Encoding_DefaultBinary) 10432 self.RequestHeader = RequestHeader() 10433 self.Parameters = HistoryUpdateParameters() 10434 self._freeze = True 10435 10436 def to_binary(self): 10437 packet = [] 10438 packet.append(self.TypeId.to_binary()) 10439 packet.append(self.RequestHeader.to_binary()) 10440 packet.append(self.Parameters.to_binary()) 10441 return b''.join(packet) 10442 10443 @staticmethod 10444 def from_binary(data): 10445 return HistoryUpdateRequest(data) 10446 10447 def _binary_init(self, data): 10448 self.TypeId = NodeId.from_binary(data) 10449 self.RequestHeader = RequestHeader.from_binary(data) 10450 self.Parameters = HistoryUpdateParameters.from_binary(data) 10451 10452 def __str__(self): 10453 return 'HistoryUpdateRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 10454 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 10455 'Parameters:' + str(self.Parameters) + ')' 10456 10457 __repr__ = __str__ 10458 10459 10460 class HistoryUpdateResponse(FrozenClass): 10461 ''' 10462 :ivar TypeId: 10463 :vartype TypeId: NodeId 10464 :ivar ResponseHeader: 10465 :vartype ResponseHeader: ResponseHeader 10466 :ivar Results: 10467 :vartype Results: HistoryUpdateResult 10468 :ivar DiagnosticInfos: 10469 :vartype DiagnosticInfos: DiagnosticInfo 10470 ''' 10471 10472 ua_types = { 10473 'TypeId': 'NodeId', 10474 'ResponseHeader': 'ResponseHeader', 10475 'Results': 'HistoryUpdateResult', 10476 'DiagnosticInfos': 'DiagnosticInfo', 10477 } 10478 10479 def __init__(self, binary=None): 10480 if binary is not None: 10481 self._binary_init(binary) 10482 self._freeze = True 10483 return 10484 self.TypeId = FourByteNodeId(ObjectIds.HistoryUpdateResponse_Encoding_DefaultBinary) 10485 self.ResponseHeader = ResponseHeader() 10486 self.Results = [] 10487 self.DiagnosticInfos = [] 10488 self._freeze = True 10489 10490 def to_binary(self): 10491 packet = [] 10492 packet.append(self.TypeId.to_binary()) 10493 packet.append(self.ResponseHeader.to_binary()) 10494 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 10495 for fieldname in self.Results: 10496 packet.append(fieldname.to_binary()) 10497 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 10498 for fieldname in self.DiagnosticInfos: 10499 packet.append(fieldname.to_binary()) 10500 return b''.join(packet) 10501 10502 @staticmethod 10503 def from_binary(data): 10504 return HistoryUpdateResponse(data) 10505 10506 def _binary_init(self, data): 10507 self.TypeId = NodeId.from_binary(data) 10508 self.ResponseHeader = ResponseHeader.from_binary(data) 10509 length = uabin.Primitives.Int32.unpack(data) 10510 array = [] 10511 if length != -1: 10512 for _ in range(0, length): 10513 array.append(HistoryUpdateResult.from_binary(data)) 10514 self.Results = array 10515 length = uabin.Primitives.Int32.unpack(data) 10516 array = [] 10517 if length != -1: 10518 for _ in range(0, length): 10519 array.append(DiagnosticInfo.from_binary(data)) 10520 self.DiagnosticInfos = array 10521 10522 def __str__(self): 10523 return 'HistoryUpdateResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 10524 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 10525 'Results:' + str(self.Results) + ', ' + \ 10526 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 10527 10528 __repr__ = __str__ 10529 10530 10531 class CallMethodRequest(FrozenClass): 10532 ''' 10533 :ivar ObjectId: 10534 :vartype ObjectId: NodeId 10535 :ivar MethodId: 10536 :vartype MethodId: NodeId 10537 :ivar InputArguments: 10538 :vartype InputArguments: Variant 10539 ''' 10540 10541 ua_types = { 10542 'ObjectId': 'NodeId', 10543 'MethodId': 'NodeId', 10544 'InputArguments': 'Variant', 10545 } 10546 10547 def __init__(self, binary=None): 10548 if binary is not None: 10549 self._binary_init(binary) 10550 self._freeze = True 10551 return 10552 self.ObjectId = NodeId() 10553 self.MethodId = NodeId() 10554 self.InputArguments = [] 10555 self._freeze = True 10556 10557 def to_binary(self): 10558 packet = [] 10559 packet.append(self.ObjectId.to_binary()) 10560 packet.append(self.MethodId.to_binary()) 10561 packet.append(uabin.Primitives.Int32.pack(len(self.InputArguments))) 10562 for fieldname in self.InputArguments: 10563 packet.append(fieldname.to_binary()) 10564 return b''.join(packet) 10565 10566 @staticmethod 10567 def from_binary(data): 10568 return CallMethodRequest(data) 10569 10570 def _binary_init(self, data): 10571 self.ObjectId = NodeId.from_binary(data) 10572 self.MethodId = NodeId.from_binary(data) 10573 length = uabin.Primitives.Int32.unpack(data) 10574 array = [] 10575 if length != -1: 10576 for _ in range(0, length): 10577 array.append(Variant.from_binary(data)) 10578 self.InputArguments = array 10579 10580 def __str__(self): 10581 return 'CallMethodRequest(' + 'ObjectId:' + str(self.ObjectId) + ', ' + \ 10582 'MethodId:' + str(self.MethodId) + ', ' + \ 10583 'InputArguments:' + str(self.InputArguments) + ')' 10584 10585 __repr__ = __str__ 10586 10587 10588 class CallMethodResult(FrozenClass): 10589 ''' 10590 :ivar StatusCode: 10591 :vartype StatusCode: StatusCode 10592 :ivar InputArgumentResults: 10593 :vartype InputArgumentResults: StatusCode 10594 :ivar InputArgumentDiagnosticInfos: 10595 :vartype InputArgumentDiagnosticInfos: DiagnosticInfo 10596 :ivar OutputArguments: 10597 :vartype OutputArguments: Variant 10598 ''' 10599 10600 ua_types = { 10601 'StatusCode': 'StatusCode', 10602 'InputArgumentResults': 'StatusCode', 10603 'InputArgumentDiagnosticInfos': 'DiagnosticInfo', 10604 'OutputArguments': 'Variant', 10605 } 10606 10607 def __init__(self, binary=None): 10608 if binary is not None: 10609 self._binary_init(binary) 10610 self._freeze = True 10611 return 10612 self.StatusCode = StatusCode() 10613 self.InputArgumentResults = [] 10614 self.InputArgumentDiagnosticInfos = [] 10615 self.OutputArguments = [] 10616 self._freeze = True 10617 10618 def to_binary(self): 10619 packet = [] 10620 packet.append(self.StatusCode.to_binary()) 10621 packet.append(uabin.Primitives.Int32.pack(len(self.InputArgumentResults))) 10622 for fieldname in self.InputArgumentResults: 10623 packet.append(fieldname.to_binary()) 10624 packet.append(uabin.Primitives.Int32.pack(len(self.InputArgumentDiagnosticInfos))) 10625 for fieldname in self.InputArgumentDiagnosticInfos: 10626 packet.append(fieldname.to_binary()) 10627 packet.append(uabin.Primitives.Int32.pack(len(self.OutputArguments))) 10628 for fieldname in self.OutputArguments: 10629 packet.append(fieldname.to_binary()) 10630 return b''.join(packet) 10631 10632 @staticmethod 10633 def from_binary(data): 10634 return CallMethodResult(data) 10635 10636 def _binary_init(self, data): 10637 self.StatusCode = StatusCode.from_binary(data) 10638 length = uabin.Primitives.Int32.unpack(data) 10639 array = [] 10640 if length != -1: 10641 for _ in range(0, length): 10642 array.append(StatusCode.from_binary(data)) 10643 self.InputArgumentResults = array 10644 length = uabin.Primitives.Int32.unpack(data) 10645 array = [] 10646 if length != -1: 10647 for _ in range(0, length): 10648 array.append(DiagnosticInfo.from_binary(data)) 10649 self.InputArgumentDiagnosticInfos = array 10650 length = uabin.Primitives.Int32.unpack(data) 10651 array = [] 10652 if length != -1: 10653 for _ in range(0, length): 10654 array.append(Variant.from_binary(data)) 10655 self.OutputArguments = array 10656 10657 def __str__(self): 10658 return 'CallMethodResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 10659 'InputArgumentResults:' + str(self.InputArgumentResults) + ', ' + \ 10660 'InputArgumentDiagnosticInfos:' + str(self.InputArgumentDiagnosticInfos) + ', ' + \ 10661 'OutputArguments:' + str(self.OutputArguments) + ')' 10662 10663 __repr__ = __str__ 10664 10665 10666 class CallParameters(FrozenClass): 10667 ''' 10668 :ivar MethodsToCall: 10669 :vartype MethodsToCall: CallMethodRequest 10670 ''' 10671 10672 ua_types = { 10673 'MethodsToCall': 'CallMethodRequest', 10674 } 10675 10676 def __init__(self, binary=None): 10677 if binary is not None: 10678 self._binary_init(binary) 10679 self._freeze = True 10680 return 10681 self.MethodsToCall = [] 10682 self._freeze = True 10683 10684 def to_binary(self): 10685 packet = [] 10686 packet.append(uabin.Primitives.Int32.pack(len(self.MethodsToCall))) 10687 for fieldname in self.MethodsToCall: 10688 packet.append(fieldname.to_binary()) 10689 return b''.join(packet) 10690 10691 @staticmethod 10692 def from_binary(data): 10693 return CallParameters(data) 10694 10695 def _binary_init(self, data): 10696 length = uabin.Primitives.Int32.unpack(data) 10697 array = [] 10698 if length != -1: 10699 for _ in range(0, length): 10700 array.append(CallMethodRequest.from_binary(data)) 10701 self.MethodsToCall = array 10702 10703 def __str__(self): 10704 return 'CallParameters(' + 'MethodsToCall:' + str(self.MethodsToCall) + ')' 10705 10706 __repr__ = __str__ 10707 10708 10709 class CallRequest(FrozenClass): 10710 ''' 10711 :ivar TypeId: 10712 :vartype TypeId: NodeId 10713 :ivar RequestHeader: 10714 :vartype RequestHeader: RequestHeader 10715 :ivar Parameters: 10716 :vartype Parameters: CallParameters 10717 ''' 10718 10719 ua_types = { 10720 'TypeId': 'NodeId', 10721 'RequestHeader': 'RequestHeader', 10722 'Parameters': 'CallParameters', 10723 } 10724 10725 def __init__(self, binary=None): 10726 if binary is not None: 10727 self._binary_init(binary) 10728 self._freeze = True 10729 return 10730 self.TypeId = FourByteNodeId(ObjectIds.CallRequest_Encoding_DefaultBinary) 10731 self.RequestHeader = RequestHeader() 10732 self.Parameters = CallParameters() 10733 self._freeze = True 10734 10735 def to_binary(self): 10736 packet = [] 10737 packet.append(self.TypeId.to_binary()) 10738 packet.append(self.RequestHeader.to_binary()) 10739 packet.append(self.Parameters.to_binary()) 10740 return b''.join(packet) 10741 10742 @staticmethod 10743 def from_binary(data): 10744 return CallRequest(data) 10745 10746 def _binary_init(self, data): 10747 self.TypeId = NodeId.from_binary(data) 10748 self.RequestHeader = RequestHeader.from_binary(data) 10749 self.Parameters = CallParameters.from_binary(data) 10750 10751 def __str__(self): 10752 return 'CallRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 10753 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 10754 'Parameters:' + str(self.Parameters) + ')' 10755 10756 __repr__ = __str__ 10757 10758 10759 class CallResponse(FrozenClass): 10760 ''' 10761 :ivar TypeId: 10762 :vartype TypeId: NodeId 10763 :ivar ResponseHeader: 10764 :vartype ResponseHeader: ResponseHeader 10765 :ivar Results: 10766 :vartype Results: CallMethodResult 10767 :ivar DiagnosticInfos: 10768 :vartype DiagnosticInfos: DiagnosticInfo 10769 ''' 10770 10771 ua_types = { 10772 'TypeId': 'NodeId', 10773 'ResponseHeader': 'ResponseHeader', 10774 'Results': 'CallMethodResult', 10775 'DiagnosticInfos': 'DiagnosticInfo', 10776 } 10777 10778 def __init__(self, binary=None): 10779 if binary is not None: 10780 self._binary_init(binary) 10781 self._freeze = True 10782 return 10783 self.TypeId = FourByteNodeId(ObjectIds.CallResponse_Encoding_DefaultBinary) 10784 self.ResponseHeader = ResponseHeader() 10785 self.Results = [] 10786 self.DiagnosticInfos = [] 10787 self._freeze = True 10788 10789 def to_binary(self): 10790 packet = [] 10791 packet.append(self.TypeId.to_binary()) 10792 packet.append(self.ResponseHeader.to_binary()) 10793 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 10794 for fieldname in self.Results: 10795 packet.append(fieldname.to_binary()) 10796 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 10797 for fieldname in self.DiagnosticInfos: 10798 packet.append(fieldname.to_binary()) 10799 return b''.join(packet) 10800 10801 @staticmethod 10802 def from_binary(data): 10803 return CallResponse(data) 10804 10805 def _binary_init(self, data): 10806 self.TypeId = NodeId.from_binary(data) 10807 self.ResponseHeader = ResponseHeader.from_binary(data) 10808 length = uabin.Primitives.Int32.unpack(data) 10809 array = [] 10810 if length != -1: 10811 for _ in range(0, length): 10812 array.append(CallMethodResult.from_binary(data)) 10813 self.Results = array 10814 length = uabin.Primitives.Int32.unpack(data) 10815 array = [] 10816 if length != -1: 10817 for _ in range(0, length): 10818 array.append(DiagnosticInfo.from_binary(data)) 10819 self.DiagnosticInfos = array 10820 10821 def __str__(self): 10822 return 'CallResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 10823 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 10824 'Results:' + str(self.Results) + ', ' + \ 10825 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 10826 10827 __repr__ = __str__ 10828 10829 10830 class MonitoringFilter(FrozenClass): 10831 ''' 10832 ''' 10833 10834 ua_types = { 10835 } 10836 10837 def __init__(self, binary=None): 10838 if binary is not None: 10839 self._binary_init(binary) 10840 self._freeze = True 10841 return 10842 self._freeze = True 10843 10844 def to_binary(self): 10845 packet = [] 10846 return b''.join(packet) 10847 10848 @staticmethod 10849 def from_binary(data): 10850 return MonitoringFilter(data) 10851 10852 def _binary_init(self, data): 10853 pass 10854 10855 def __str__(self): 10856 return 'MonitoringFilter(' + + ')' 10857 10858 __repr__ = __str__ 10859 10860 10861 class DataChangeFilter(FrozenClass): 10862 ''' 10863 :ivar Trigger: 10864 :vartype Trigger: DataChangeTrigger 10865 :ivar DeadbandType: 10866 :vartype DeadbandType: UInt32 10867 :ivar DeadbandValue: 10868 :vartype DeadbandValue: Double 10869 ''' 10870 10871 ua_types = { 10872 'Trigger': 'DataChangeTrigger', 10873 'DeadbandType': 'UInt32', 10874 'DeadbandValue': 'Double', 10875 } 10876 10877 def __init__(self, binary=None): 10878 if binary is not None: 10879 self._binary_init(binary) 10880 self._freeze = True 10881 return 10882 self.Trigger = DataChangeTrigger(0) 10883 self.DeadbandType = 0 10884 self.DeadbandValue = 0 10885 self._freeze = True 10886 10887 def to_binary(self): 10888 packet = [] 10889 packet.append(uabin.Primitives.UInt32.pack(self.Trigger.value)) 10890 packet.append(uabin.Primitives.UInt32.pack(self.DeadbandType)) 10891 packet.append(uabin.Primitives.Double.pack(self.DeadbandValue)) 10892 return b''.join(packet) 10893 10894 @staticmethod 10895 def from_binary(data): 10896 return DataChangeFilter(data) 10897 10898 def _binary_init(self, data): 10899 self.Trigger = DataChangeTrigger(uabin.Primitives.UInt32.unpack(data)) 10900 self.DeadbandType = uabin.Primitives.UInt32.unpack(data) 10901 self.DeadbandValue = uabin.Primitives.Double.unpack(data) 10902 10903 def __str__(self): 10904 return 'DataChangeFilter(' + 'Trigger:' + str(self.Trigger) + ', ' + \ 10905 'DeadbandType:' + str(self.DeadbandType) + ', ' + \ 10906 'DeadbandValue:' + str(self.DeadbandValue) + ')' 10907 10908 __repr__ = __str__ 10909 10910 10911 class EventFilter(FrozenClass): 10912 ''' 10913 :ivar SelectClauses: 10914 :vartype SelectClauses: SimpleAttributeOperand 10915 :ivar WhereClause: 10916 :vartype WhereClause: ContentFilter 10917 ''' 10918 10919 ua_types = { 10920 'SelectClauses': 'SimpleAttributeOperand', 10921 'WhereClause': 'ContentFilter', 10922 } 10923 10924 def __init__(self, binary=None): 10925 if binary is not None: 10926 self._binary_init(binary) 10927 self._freeze = True 10928 return 10929 self.SelectClauses = [] 10930 self.WhereClause = ContentFilter() 10931 self._freeze = True 10932 10933 def to_binary(self): 10934 packet = [] 10935 packet.append(uabin.Primitives.Int32.pack(len(self.SelectClauses))) 10936 for fieldname in self.SelectClauses: 10937 packet.append(fieldname.to_binary()) 10938 packet.append(self.WhereClause.to_binary()) 10939 return b''.join(packet) 10940 10941 @staticmethod 10942 def from_binary(data): 10943 return EventFilter(data) 10944 10945 def _binary_init(self, data): 10946 length = uabin.Primitives.Int32.unpack(data) 10947 array = [] 10948 if length != -1: 10949 for _ in range(0, length): 10950 array.append(SimpleAttributeOperand.from_binary(data)) 10951 self.SelectClauses = array 10952 self.WhereClause = ContentFilter.from_binary(data) 10953 10954 def __str__(self): 10955 return 'EventFilter(' + 'SelectClauses:' + str(self.SelectClauses) + ', ' + \ 10956 'WhereClause:' + str(self.WhereClause) + ')' 10957 10958 __repr__ = __str__ 10959 10960 10961 class AggregateConfiguration(FrozenClass): 10962 ''' 10963 :ivar UseServerCapabilitiesDefaults: 10964 :vartype UseServerCapabilitiesDefaults: Boolean 10965 :ivar TreatUncertainAsBad: 10966 :vartype TreatUncertainAsBad: Boolean 10967 :ivar PercentDataBad: 10968 :vartype PercentDataBad: Byte 10969 :ivar PercentDataGood: 10970 :vartype PercentDataGood: Byte 10971 :ivar UseSlopedExtrapolation: 10972 :vartype UseSlopedExtrapolation: Boolean 10973 ''' 10974 10975 ua_types = { 10976 'UseServerCapabilitiesDefaults': 'Boolean', 10977 'TreatUncertainAsBad': 'Boolean', 10978 'PercentDataBad': 'Byte', 10979 'PercentDataGood': 'Byte', 10980 'UseSlopedExtrapolation': 'Boolean', 10981 } 10982 10983 def __init__(self, binary=None): 10984 if binary is not None: 10985 self._binary_init(binary) 10986 self._freeze = True 10987 return 10988 self.UseServerCapabilitiesDefaults = True 10989 self.TreatUncertainAsBad = True 10990 self.PercentDataBad = 0 10991 self.PercentDataGood = 0 10992 self.UseSlopedExtrapolation = True 10993 self._freeze = True 10994 10995 def to_binary(self): 10996 packet = [] 10997 packet.append(uabin.Primitives.Boolean.pack(self.UseServerCapabilitiesDefaults)) 10998 packet.append(uabin.Primitives.Boolean.pack(self.TreatUncertainAsBad)) 10999 packet.append(uabin.Primitives.Byte.pack(self.PercentDataBad)) 11000 packet.append(uabin.Primitives.Byte.pack(self.PercentDataGood)) 11001 packet.append(uabin.Primitives.Boolean.pack(self.UseSlopedExtrapolation)) 11002 return b''.join(packet) 11003 11004 @staticmethod 11005 def from_binary(data): 11006 return AggregateConfiguration(data) 11007 11008 def _binary_init(self, data): 11009 self.UseServerCapabilitiesDefaults = uabin.Primitives.Boolean.unpack(data) 11010 self.TreatUncertainAsBad = uabin.Primitives.Boolean.unpack(data) 11011 self.PercentDataBad = uabin.Primitives.Byte.unpack(data) 11012 self.PercentDataGood = uabin.Primitives.Byte.unpack(data) 11013 self.UseSlopedExtrapolation = uabin.Primitives.Boolean.unpack(data) 11014 11015 def __str__(self): 11016 return 'AggregateConfiguration(' + 'UseServerCapabilitiesDefaults:' + str(self.UseServerCapabilitiesDefaults) + ', ' + \ 11017 'TreatUncertainAsBad:' + str(self.TreatUncertainAsBad) + ', ' + \ 11018 'PercentDataBad:' + str(self.PercentDataBad) + ', ' + \ 11019 'PercentDataGood:' + str(self.PercentDataGood) + ', ' + \ 11020 'UseSlopedExtrapolation:' + str(self.UseSlopedExtrapolation) + ')' 11021 11022 __repr__ = __str__ 11023 11024 11025 class AggregateFilter(FrozenClass): 11026 ''' 11027 :ivar StartTime: 11028 :vartype StartTime: DateTime 11029 :ivar AggregateType: 11030 :vartype AggregateType: NodeId 11031 :ivar ProcessingInterval: 11032 :vartype ProcessingInterval: Double 11033 :ivar AggregateConfiguration: 11034 :vartype AggregateConfiguration: AggregateConfiguration 11035 ''' 11036 11037 ua_types = { 11038 'StartTime': 'DateTime', 11039 'AggregateType': 'NodeId', 11040 'ProcessingInterval': 'Double', 11041 'AggregateConfiguration': 'AggregateConfiguration', 11042 } 11043 11044 def __init__(self, binary=None): 11045 if binary is not None: 11046 self._binary_init(binary) 11047 self._freeze = True 11048 return 11049 self.StartTime = datetime.now() 11050 self.AggregateType = NodeId() 11051 self.ProcessingInterval = 0 11052 self.AggregateConfiguration = AggregateConfiguration() 11053 self._freeze = True 11054 11055 def to_binary(self): 11056 packet = [] 11057 packet.append(uabin.Primitives.DateTime.pack(self.StartTime)) 11058 packet.append(self.AggregateType.to_binary()) 11059 packet.append(uabin.Primitives.Double.pack(self.ProcessingInterval)) 11060 packet.append(self.AggregateConfiguration.to_binary()) 11061 return b''.join(packet) 11062 11063 @staticmethod 11064 def from_binary(data): 11065 return AggregateFilter(data) 11066 11067 def _binary_init(self, data): 11068 self.StartTime = uabin.Primitives.DateTime.unpack(data) 11069 self.AggregateType = NodeId.from_binary(data) 11070 self.ProcessingInterval = uabin.Primitives.Double.unpack(data) 11071 self.AggregateConfiguration = AggregateConfiguration.from_binary(data) 11072 11073 def __str__(self): 11074 return 'AggregateFilter(' + 'StartTime:' + str(self.StartTime) + ', ' + \ 11075 'AggregateType:' + str(self.AggregateType) + ', ' + \ 11076 'ProcessingInterval:' + str(self.ProcessingInterval) + ', ' + \ 11077 'AggregateConfiguration:' + str(self.AggregateConfiguration) + ')' 11078 11079 __repr__ = __str__ 11080 11081 11082 class MonitoringFilterResult(FrozenClass): 11083 ''' 11084 ''' 11085 11086 ua_types = { 11087 } 11088 11089 def __init__(self, binary=None): 11090 if binary is not None: 11091 self._binary_init(binary) 11092 self._freeze = True 11093 return 11094 self._freeze = True 11095 11096 def to_binary(self): 11097 packet = [] 11098 return b''.join(packet) 11099 11100 @staticmethod 11101 def from_binary(data): 11102 return MonitoringFilterResult(data) 11103 11104 def _binary_init(self, data): 11105 pass 11106 11107 def __str__(self): 11108 return 'MonitoringFilterResult(' + + ')' 11109 11110 __repr__ = __str__ 11111 11112 11113 class EventFilterResult(FrozenClass): 11114 ''' 11115 :ivar SelectClauseResults: 11116 :vartype SelectClauseResults: StatusCode 11117 :ivar SelectClauseDiagnosticInfos: 11118 :vartype SelectClauseDiagnosticInfos: DiagnosticInfo 11119 :ivar WhereClauseResult: 11120 :vartype WhereClauseResult: ContentFilterResult 11121 ''' 11122 11123 ua_types = { 11124 'SelectClauseResults': 'StatusCode', 11125 'SelectClauseDiagnosticInfos': 'DiagnosticInfo', 11126 'WhereClauseResult': 'ContentFilterResult', 11127 } 11128 11129 def __init__(self, binary=None): 11130 if binary is not None: 11131 self._binary_init(binary) 11132 self._freeze = True 11133 return 11134 self.SelectClauseResults = [] 11135 self.SelectClauseDiagnosticInfos = [] 11136 self.WhereClauseResult = ContentFilterResult() 11137 self._freeze = True 11138 11139 def to_binary(self): 11140 packet = [] 11141 packet.append(uabin.Primitives.Int32.pack(len(self.SelectClauseResults))) 11142 for fieldname in self.SelectClauseResults: 11143 packet.append(fieldname.to_binary()) 11144 packet.append(uabin.Primitives.Int32.pack(len(self.SelectClauseDiagnosticInfos))) 11145 for fieldname in self.SelectClauseDiagnosticInfos: 11146 packet.append(fieldname.to_binary()) 11147 packet.append(self.WhereClauseResult.to_binary()) 11148 return b''.join(packet) 11149 11150 @staticmethod 11151 def from_binary(data): 11152 return EventFilterResult(data) 11153 11154 def _binary_init(self, data): 11155 length = uabin.Primitives.Int32.unpack(data) 11156 array = [] 11157 if length != -1: 11158 for _ in range(0, length): 11159 array.append(StatusCode.from_binary(data)) 11160 self.SelectClauseResults = array 11161 length = uabin.Primitives.Int32.unpack(data) 11162 array = [] 11163 if length != -1: 11164 for _ in range(0, length): 11165 array.append(DiagnosticInfo.from_binary(data)) 11166 self.SelectClauseDiagnosticInfos = array 11167 self.WhereClauseResult = ContentFilterResult.from_binary(data) 11168 11169 def __str__(self): 11170 return 'EventFilterResult(' + 'SelectClauseResults:' + str(self.SelectClauseResults) + ', ' + \ 11171 'SelectClauseDiagnosticInfos:' + str(self.SelectClauseDiagnosticInfos) + ', ' + \ 11172 'WhereClauseResult:' + str(self.WhereClauseResult) + ')' 11173 11174 __repr__ = __str__ 11175 11176 11177 class AggregateFilterResult(FrozenClass): 11178 ''' 11179 :ivar RevisedStartTime: 11180 :vartype RevisedStartTime: DateTime 11181 :ivar RevisedProcessingInterval: 11182 :vartype RevisedProcessingInterval: Double 11183 :ivar RevisedAggregateConfiguration: 11184 :vartype RevisedAggregateConfiguration: AggregateConfiguration 11185 ''' 11186 11187 ua_types = { 11188 'RevisedStartTime': 'DateTime', 11189 'RevisedProcessingInterval': 'Double', 11190 'RevisedAggregateConfiguration': 'AggregateConfiguration', 11191 } 11192 11193 def __init__(self, binary=None): 11194 if binary is not None: 11195 self._binary_init(binary) 11196 self._freeze = True 11197 return 11198 self.RevisedStartTime = datetime.now() 11199 self.RevisedProcessingInterval = 0 11200 self.RevisedAggregateConfiguration = AggregateConfiguration() 11201 self._freeze = True 11202 11203 def to_binary(self): 11204 packet = [] 11205 packet.append(uabin.Primitives.DateTime.pack(self.RevisedStartTime)) 11206 packet.append(uabin.Primitives.Double.pack(self.RevisedProcessingInterval)) 11207 packet.append(self.RevisedAggregateConfiguration.to_binary()) 11208 return b''.join(packet) 11209 11210 @staticmethod 11211 def from_binary(data): 11212 return AggregateFilterResult(data) 11213 11214 def _binary_init(self, data): 11215 self.RevisedStartTime = uabin.Primitives.DateTime.unpack(data) 11216 self.RevisedProcessingInterval = uabin.Primitives.Double.unpack(data) 11217 self.RevisedAggregateConfiguration = AggregateConfiguration.from_binary(data) 11218 11219 def __str__(self): 11220 return 'AggregateFilterResult(' + 'RevisedStartTime:' + str(self.RevisedStartTime) + ', ' + \ 11221 'RevisedProcessingInterval:' + str(self.RevisedProcessingInterval) + ', ' + \ 11222 'RevisedAggregateConfiguration:' + str(self.RevisedAggregateConfiguration) + ')' 11223 11224 __repr__ = __str__ 11225 11226 11227 class MonitoringParameters(FrozenClass): 11228 ''' 11229 :ivar ClientHandle: 11230 :vartype ClientHandle: UInt32 11231 :ivar SamplingInterval: 11232 :vartype SamplingInterval: Double 11233 :ivar Filter: 11234 :vartype Filter: ExtensionObject 11235 :ivar QueueSize: 11236 :vartype QueueSize: UInt32 11237 :ivar DiscardOldest: 11238 :vartype DiscardOldest: Boolean 11239 ''' 11240 11241 ua_types = { 11242 'ClientHandle': 'UInt32', 11243 'SamplingInterval': 'Double', 11244 'Filter': 'ExtensionObject', 11245 'QueueSize': 'UInt32', 11246 'DiscardOldest': 'Boolean', 11247 } 11248 11249 def __init__(self, binary=None): 11250 if binary is not None: 11251 self._binary_init(binary) 11252 self._freeze = True 11253 return 11254 self.ClientHandle = 0 11255 self.SamplingInterval = 0 11256 self.Filter = None 11257 self.QueueSize = 0 11258 self.DiscardOldest = True 11259 self._freeze = True 11260 11261 def to_binary(self): 11262 packet = [] 11263 packet.append(uabin.Primitives.UInt32.pack(self.ClientHandle)) 11264 packet.append(uabin.Primitives.Double.pack(self.SamplingInterval)) 11265 packet.append(extensionobject_to_binary(self.Filter)) 11266 packet.append(uabin.Primitives.UInt32.pack(self.QueueSize)) 11267 packet.append(uabin.Primitives.Boolean.pack(self.DiscardOldest)) 11268 return b''.join(packet) 11269 11270 @staticmethod 11271 def from_binary(data): 11272 return MonitoringParameters(data) 11273 11274 def _binary_init(self, data): 11275 self.ClientHandle = uabin.Primitives.UInt32.unpack(data) 11276 self.SamplingInterval = uabin.Primitives.Double.unpack(data) 11277 self.Filter = extensionobject_from_binary(data) 11278 self.QueueSize = uabin.Primitives.UInt32.unpack(data) 11279 self.DiscardOldest = uabin.Primitives.Boolean.unpack(data) 11280 11281 def __str__(self): 11282 return 'MonitoringParameters(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \ 11283 'SamplingInterval:' + str(self.SamplingInterval) + ', ' + \ 11284 'Filter:' + str(self.Filter) + ', ' + \ 11285 'QueueSize:' + str(self.QueueSize) + ', ' + \ 11286 'DiscardOldest:' + str(self.DiscardOldest) + ')' 11287 11288 __repr__ = __str__ 11289 11290 11291 class MonitoredItemCreateRequest(FrozenClass): 11292 ''' 11293 :ivar ItemToMonitor: 11294 :vartype ItemToMonitor: ReadValueId 11295 :ivar MonitoringMode: 11296 :vartype MonitoringMode: MonitoringMode 11297 :ivar RequestedParameters: 11298 :vartype RequestedParameters: MonitoringParameters 11299 ''' 11300 11301 ua_types = { 11302 'ItemToMonitor': 'ReadValueId', 11303 'MonitoringMode': 'MonitoringMode', 11304 'RequestedParameters': 'MonitoringParameters', 11305 } 11306 11307 def __init__(self, binary=None): 11308 if binary is not None: 11309 self._binary_init(binary) 11310 self._freeze = True 11311 return 11312 self.ItemToMonitor = ReadValueId() 11313 self.MonitoringMode = MonitoringMode(0) 11314 self.RequestedParameters = MonitoringParameters() 11315 self._freeze = True 11316 11317 def to_binary(self): 11318 packet = [] 11319 packet.append(self.ItemToMonitor.to_binary()) 11320 packet.append(uabin.Primitives.UInt32.pack(self.MonitoringMode.value)) 11321 packet.append(self.RequestedParameters.to_binary()) 11322 return b''.join(packet) 11323 11324 @staticmethod 11325 def from_binary(data): 11326 return MonitoredItemCreateRequest(data) 11327 11328 def _binary_init(self, data): 11329 self.ItemToMonitor = ReadValueId.from_binary(data) 11330 self.MonitoringMode = MonitoringMode(uabin.Primitives.UInt32.unpack(data)) 11331 self.RequestedParameters = MonitoringParameters.from_binary(data) 11332 11333 def __str__(self): 11334 return 'MonitoredItemCreateRequest(' + 'ItemToMonitor:' + str(self.ItemToMonitor) + ', ' + \ 11335 'MonitoringMode:' + str(self.MonitoringMode) + ', ' + \ 11336 'RequestedParameters:' + str(self.RequestedParameters) + ')' 11337 11338 __repr__ = __str__ 11339 11340 11341 class MonitoredItemCreateResult(FrozenClass): 11342 ''' 11343 :ivar StatusCode: 11344 :vartype StatusCode: StatusCode 11345 :ivar MonitoredItemId: 11346 :vartype MonitoredItemId: UInt32 11347 :ivar RevisedSamplingInterval: 11348 :vartype RevisedSamplingInterval: Double 11349 :ivar RevisedQueueSize: 11350 :vartype RevisedQueueSize: UInt32 11351 :ivar FilterResult: 11352 :vartype FilterResult: ExtensionObject 11353 ''' 11354 11355 ua_types = { 11356 'StatusCode': 'StatusCode', 11357 'MonitoredItemId': 'UInt32', 11358 'RevisedSamplingInterval': 'Double', 11359 'RevisedQueueSize': 'UInt32', 11360 'FilterResult': 'ExtensionObject', 11361 } 11362 11363 def __init__(self, binary=None): 11364 if binary is not None: 11365 self._binary_init(binary) 11366 self._freeze = True 11367 return 11368 self.StatusCode = StatusCode() 11369 self.MonitoredItemId = 0 11370 self.RevisedSamplingInterval = 0 11371 self.RevisedQueueSize = 0 11372 self.FilterResult = None 11373 self._freeze = True 11374 11375 def to_binary(self): 11376 packet = [] 11377 packet.append(self.StatusCode.to_binary()) 11378 packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemId)) 11379 packet.append(uabin.Primitives.Double.pack(self.RevisedSamplingInterval)) 11380 packet.append(uabin.Primitives.UInt32.pack(self.RevisedQueueSize)) 11381 packet.append(extensionobject_to_binary(self.FilterResult)) 11382 return b''.join(packet) 11383 11384 @staticmethod 11385 def from_binary(data): 11386 return MonitoredItemCreateResult(data) 11387 11388 def _binary_init(self, data): 11389 self.StatusCode = StatusCode.from_binary(data) 11390 self.MonitoredItemId = uabin.Primitives.UInt32.unpack(data) 11391 self.RevisedSamplingInterval = uabin.Primitives.Double.unpack(data) 11392 self.RevisedQueueSize = uabin.Primitives.UInt32.unpack(data) 11393 self.FilterResult = extensionobject_from_binary(data) 11394 11395 def __str__(self): 11396 return 'MonitoredItemCreateResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 11397 'MonitoredItemId:' + str(self.MonitoredItemId) + ', ' + \ 11398 'RevisedSamplingInterval:' + str(self.RevisedSamplingInterval) + ', ' + \ 11399 'RevisedQueueSize:' + str(self.RevisedQueueSize) + ', ' + \ 11400 'FilterResult:' + str(self.FilterResult) + ')' 11401 11402 __repr__ = __str__ 11403 11404 11405 class CreateMonitoredItemsParameters(FrozenClass): 11406 ''' 11407 :ivar SubscriptionId: 11408 :vartype SubscriptionId: UInt32 11409 :ivar TimestampsToReturn: 11410 :vartype TimestampsToReturn: TimestampsToReturn 11411 :ivar ItemsToCreate: 11412 :vartype ItemsToCreate: MonitoredItemCreateRequest 11413 ''' 11414 11415 ua_types = { 11416 'SubscriptionId': 'UInt32', 11417 'TimestampsToReturn': 'TimestampsToReturn', 11418 'ItemsToCreate': 'MonitoredItemCreateRequest', 11419 } 11420 11421 def __init__(self, binary=None): 11422 if binary is not None: 11423 self._binary_init(binary) 11424 self._freeze = True 11425 return 11426 self.SubscriptionId = 0 11427 self.TimestampsToReturn = TimestampsToReturn(0) 11428 self.ItemsToCreate = [] 11429 self._freeze = True 11430 11431 def to_binary(self): 11432 packet = [] 11433 packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) 11434 packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) 11435 packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToCreate))) 11436 for fieldname in self.ItemsToCreate: 11437 packet.append(fieldname.to_binary()) 11438 return b''.join(packet) 11439 11440 @staticmethod 11441 def from_binary(data): 11442 return CreateMonitoredItemsParameters(data) 11443 11444 def _binary_init(self, data): 11445 self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) 11446 self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) 11447 length = uabin.Primitives.Int32.unpack(data) 11448 array = [] 11449 if length != -1: 11450 for _ in range(0, length): 11451 array.append(MonitoredItemCreateRequest.from_binary(data)) 11452 self.ItemsToCreate = array 11453 11454 def __str__(self): 11455 return 'CreateMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ 11456 'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ 11457 'ItemsToCreate:' + str(self.ItemsToCreate) + ')' 11458 11459 __repr__ = __str__ 11460 11461 11462 class CreateMonitoredItemsRequest(FrozenClass): 11463 ''' 11464 :ivar TypeId: 11465 :vartype TypeId: NodeId 11466 :ivar RequestHeader: 11467 :vartype RequestHeader: RequestHeader 11468 :ivar Parameters: 11469 :vartype Parameters: CreateMonitoredItemsParameters 11470 ''' 11471 11472 ua_types = { 11473 'TypeId': 'NodeId', 11474 'RequestHeader': 'RequestHeader', 11475 'Parameters': 'CreateMonitoredItemsParameters', 11476 } 11477 11478 def __init__(self, binary=None): 11479 if binary is not None: 11480 self._binary_init(binary) 11481 self._freeze = True 11482 return 11483 self.TypeId = FourByteNodeId(ObjectIds.CreateMonitoredItemsRequest_Encoding_DefaultBinary) 11484 self.RequestHeader = RequestHeader() 11485 self.Parameters = CreateMonitoredItemsParameters() 11486 self._freeze = True 11487 11488 def to_binary(self): 11489 packet = [] 11490 packet.append(self.TypeId.to_binary()) 11491 packet.append(self.RequestHeader.to_binary()) 11492 packet.append(self.Parameters.to_binary()) 11493 return b''.join(packet) 11494 11495 @staticmethod 11496 def from_binary(data): 11497 return CreateMonitoredItemsRequest(data) 11498 11499 def _binary_init(self, data): 11500 self.TypeId = NodeId.from_binary(data) 11501 self.RequestHeader = RequestHeader.from_binary(data) 11502 self.Parameters = CreateMonitoredItemsParameters.from_binary(data) 11503 11504 def __str__(self): 11505 return 'CreateMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 11506 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 11507 'Parameters:' + str(self.Parameters) + ')' 11508 11509 __repr__ = __str__ 11510 11511 11512 class CreateMonitoredItemsResponse(FrozenClass): 11513 ''' 11514 :ivar TypeId: 11515 :vartype TypeId: NodeId 11516 :ivar ResponseHeader: 11517 :vartype ResponseHeader: ResponseHeader 11518 :ivar Results: 11519 :vartype Results: MonitoredItemCreateResult 11520 :ivar DiagnosticInfos: 11521 :vartype DiagnosticInfos: DiagnosticInfo 11522 ''' 11523 11524 ua_types = { 11525 'TypeId': 'NodeId', 11526 'ResponseHeader': 'ResponseHeader', 11527 'Results': 'MonitoredItemCreateResult', 11528 'DiagnosticInfos': 'DiagnosticInfo', 11529 } 11530 11531 def __init__(self, binary=None): 11532 if binary is not None: 11533 self._binary_init(binary) 11534 self._freeze = True 11535 return 11536 self.TypeId = FourByteNodeId(ObjectIds.CreateMonitoredItemsResponse_Encoding_DefaultBinary) 11537 self.ResponseHeader = ResponseHeader() 11538 self.Results = [] 11539 self.DiagnosticInfos = [] 11540 self._freeze = True 11541 11542 def to_binary(self): 11543 packet = [] 11544 packet.append(self.TypeId.to_binary()) 11545 packet.append(self.ResponseHeader.to_binary()) 11546 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 11547 for fieldname in self.Results: 11548 packet.append(fieldname.to_binary()) 11549 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 11550 for fieldname in self.DiagnosticInfos: 11551 packet.append(fieldname.to_binary()) 11552 return b''.join(packet) 11553 11554 @staticmethod 11555 def from_binary(data): 11556 return CreateMonitoredItemsResponse(data) 11557 11558 def _binary_init(self, data): 11559 self.TypeId = NodeId.from_binary(data) 11560 self.ResponseHeader = ResponseHeader.from_binary(data) 11561 length = uabin.Primitives.Int32.unpack(data) 11562 array = [] 11563 if length != -1: 11564 for _ in range(0, length): 11565 array.append(MonitoredItemCreateResult.from_binary(data)) 11566 self.Results = array 11567 length = uabin.Primitives.Int32.unpack(data) 11568 array = [] 11569 if length != -1: 11570 for _ in range(0, length): 11571 array.append(DiagnosticInfo.from_binary(data)) 11572 self.DiagnosticInfos = array 11573 11574 def __str__(self): 11575 return 'CreateMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 11576 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 11577 'Results:' + str(self.Results) + ', ' + \ 11578 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 11579 11580 __repr__ = __str__ 11581 11582 11583 class MonitoredItemModifyRequest(FrozenClass): 11584 ''' 11585 :ivar MonitoredItemId: 11586 :vartype MonitoredItemId: UInt32 11587 :ivar RequestedParameters: 11588 :vartype RequestedParameters: MonitoringParameters 11589 ''' 11590 11591 ua_types = { 11592 'MonitoredItemId': 'UInt32', 11593 'RequestedParameters': 'MonitoringParameters', 11594 } 11595 11596 def __init__(self, binary=None): 11597 if binary is not None: 11598 self._binary_init(binary) 11599 self._freeze = True 11600 return 11601 self.MonitoredItemId = 0 11602 self.RequestedParameters = MonitoringParameters() 11603 self._freeze = True 11604 11605 def to_binary(self): 11606 packet = [] 11607 packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemId)) 11608 packet.append(self.RequestedParameters.to_binary()) 11609 return b''.join(packet) 11610 11611 @staticmethod 11612 def from_binary(data): 11613 return MonitoredItemModifyRequest(data) 11614 11615 def _binary_init(self, data): 11616 self.MonitoredItemId = uabin.Primitives.UInt32.unpack(data) 11617 self.RequestedParameters = MonitoringParameters.from_binary(data) 11618 11619 def __str__(self): 11620 return 'MonitoredItemModifyRequest(' + 'MonitoredItemId:' + str(self.MonitoredItemId) + ', ' + \ 11621 'RequestedParameters:' + str(self.RequestedParameters) + ')' 11622 11623 __repr__ = __str__ 11624 11625 11626 class MonitoredItemModifyResult(FrozenClass): 11627 ''' 11628 :ivar StatusCode: 11629 :vartype StatusCode: StatusCode 11630 :ivar RevisedSamplingInterval: 11631 :vartype RevisedSamplingInterval: Double 11632 :ivar RevisedQueueSize: 11633 :vartype RevisedQueueSize: UInt32 11634 :ivar FilterResult: 11635 :vartype FilterResult: ExtensionObject 11636 ''' 11637 11638 ua_types = { 11639 'StatusCode': 'StatusCode', 11640 'RevisedSamplingInterval': 'Double', 11641 'RevisedQueueSize': 'UInt32', 11642 'FilterResult': 'ExtensionObject', 11643 } 11644 11645 def __init__(self, binary=None): 11646 if binary is not None: 11647 self._binary_init(binary) 11648 self._freeze = True 11649 return 11650 self.StatusCode = StatusCode() 11651 self.RevisedSamplingInterval = 0 11652 self.RevisedQueueSize = 0 11653 self.FilterResult = None 11654 self._freeze = True 11655 11656 def to_binary(self): 11657 packet = [] 11658 packet.append(self.StatusCode.to_binary()) 11659 packet.append(uabin.Primitives.Double.pack(self.RevisedSamplingInterval)) 11660 packet.append(uabin.Primitives.UInt32.pack(self.RevisedQueueSize)) 11661 packet.append(extensionobject_to_binary(self.FilterResult)) 11662 return b''.join(packet) 11663 11664 @staticmethod 11665 def from_binary(data): 11666 return MonitoredItemModifyResult(data) 11667 11668 def _binary_init(self, data): 11669 self.StatusCode = StatusCode.from_binary(data) 11670 self.RevisedSamplingInterval = uabin.Primitives.Double.unpack(data) 11671 self.RevisedQueueSize = uabin.Primitives.UInt32.unpack(data) 11672 self.FilterResult = extensionobject_from_binary(data) 11673 11674 def __str__(self): 11675 return 'MonitoredItemModifyResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 11676 'RevisedSamplingInterval:' + str(self.RevisedSamplingInterval) + ', ' + \ 11677 'RevisedQueueSize:' + str(self.RevisedQueueSize) + ', ' + \ 11678 'FilterResult:' + str(self.FilterResult) + ')' 11679 11680 __repr__ = __str__ 11681 11682 11683 class ModifyMonitoredItemsParameters(FrozenClass): 11684 ''' 11685 :ivar SubscriptionId: 11686 :vartype SubscriptionId: UInt32 11687 :ivar TimestampsToReturn: 11688 :vartype TimestampsToReturn: TimestampsToReturn 11689 :ivar ItemsToModify: 11690 :vartype ItemsToModify: MonitoredItemModifyRequest 11691 ''' 11692 11693 ua_types = { 11694 'SubscriptionId': 'UInt32', 11695 'TimestampsToReturn': 'TimestampsToReturn', 11696 'ItemsToModify': 'MonitoredItemModifyRequest', 11697 } 11698 11699 def __init__(self, binary=None): 11700 if binary is not None: 11701 self._binary_init(binary) 11702 self._freeze = True 11703 return 11704 self.SubscriptionId = 0 11705 self.TimestampsToReturn = TimestampsToReturn(0) 11706 self.ItemsToModify = [] 11707 self._freeze = True 11708 11709 def to_binary(self): 11710 packet = [] 11711 packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) 11712 packet.append(uabin.Primitives.UInt32.pack(self.TimestampsToReturn.value)) 11713 packet.append(uabin.Primitives.Int32.pack(len(self.ItemsToModify))) 11714 for fieldname in self.ItemsToModify: 11715 packet.append(fieldname.to_binary()) 11716 return b''.join(packet) 11717 11718 @staticmethod 11719 def from_binary(data): 11720 return ModifyMonitoredItemsParameters(data) 11721 11722 def _binary_init(self, data): 11723 self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) 11724 self.TimestampsToReturn = TimestampsToReturn(uabin.Primitives.UInt32.unpack(data)) 11725 length = uabin.Primitives.Int32.unpack(data) 11726 array = [] 11727 if length != -1: 11728 for _ in range(0, length): 11729 array.append(MonitoredItemModifyRequest.from_binary(data)) 11730 self.ItemsToModify = array 11731 11732 def __str__(self): 11733 return 'ModifyMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ 11734 'TimestampsToReturn:' + str(self.TimestampsToReturn) + ', ' + \ 11735 'ItemsToModify:' + str(self.ItemsToModify) + ')' 11736 11737 __repr__ = __str__ 11738 11739 11740 class ModifyMonitoredItemsRequest(FrozenClass): 11741 ''' 11742 :ivar TypeId: 11743 :vartype TypeId: NodeId 11744 :ivar RequestHeader: 11745 :vartype RequestHeader: RequestHeader 11746 :ivar Parameters: 11747 :vartype Parameters: ModifyMonitoredItemsParameters 11748 ''' 11749 11750 ua_types = { 11751 'TypeId': 'NodeId', 11752 'RequestHeader': 'RequestHeader', 11753 'Parameters': 'ModifyMonitoredItemsParameters', 11754 } 11755 11756 def __init__(self, binary=None): 11757 if binary is not None: 11758 self._binary_init(binary) 11759 self._freeze = True 11760 return 11761 self.TypeId = FourByteNodeId(ObjectIds.ModifyMonitoredItemsRequest_Encoding_DefaultBinary) 11762 self.RequestHeader = RequestHeader() 11763 self.Parameters = ModifyMonitoredItemsParameters() 11764 self._freeze = True 11765 11766 def to_binary(self): 11767 packet = [] 11768 packet.append(self.TypeId.to_binary()) 11769 packet.append(self.RequestHeader.to_binary()) 11770 packet.append(self.Parameters.to_binary()) 11771 return b''.join(packet) 11772 11773 @staticmethod 11774 def from_binary(data): 11775 return ModifyMonitoredItemsRequest(data) 11776 11777 def _binary_init(self, data): 11778 self.TypeId = NodeId.from_binary(data) 11779 self.RequestHeader = RequestHeader.from_binary(data) 11780 self.Parameters = ModifyMonitoredItemsParameters.from_binary(data) 11781 11782 def __str__(self): 11783 return 'ModifyMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 11784 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 11785 'Parameters:' + str(self.Parameters) + ')' 11786 11787 __repr__ = __str__ 11788 11789 11790 class ModifyMonitoredItemsResponse(FrozenClass): 11791 ''' 11792 :ivar TypeId: 11793 :vartype TypeId: NodeId 11794 :ivar ResponseHeader: 11795 :vartype ResponseHeader: ResponseHeader 11796 :ivar Results: 11797 :vartype Results: MonitoredItemModifyResult 11798 :ivar DiagnosticInfos: 11799 :vartype DiagnosticInfos: DiagnosticInfo 11800 ''' 11801 11802 ua_types = { 11803 'TypeId': 'NodeId', 11804 'ResponseHeader': 'ResponseHeader', 11805 'Results': 'MonitoredItemModifyResult', 11806 'DiagnosticInfos': 'DiagnosticInfo', 11807 } 11808 11809 def __init__(self, binary=None): 11810 if binary is not None: 11811 self._binary_init(binary) 11812 self._freeze = True 11813 return 11814 self.TypeId = FourByteNodeId(ObjectIds.ModifyMonitoredItemsResponse_Encoding_DefaultBinary) 11815 self.ResponseHeader = ResponseHeader() 11816 self.Results = [] 11817 self.DiagnosticInfos = [] 11818 self._freeze = True 11819 11820 def to_binary(self): 11821 packet = [] 11822 packet.append(self.TypeId.to_binary()) 11823 packet.append(self.ResponseHeader.to_binary()) 11824 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 11825 for fieldname in self.Results: 11826 packet.append(fieldname.to_binary()) 11827 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 11828 for fieldname in self.DiagnosticInfos: 11829 packet.append(fieldname.to_binary()) 11830 return b''.join(packet) 11831 11832 @staticmethod 11833 def from_binary(data): 11834 return ModifyMonitoredItemsResponse(data) 11835 11836 def _binary_init(self, data): 11837 self.TypeId = NodeId.from_binary(data) 11838 self.ResponseHeader = ResponseHeader.from_binary(data) 11839 length = uabin.Primitives.Int32.unpack(data) 11840 array = [] 11841 if length != -1: 11842 for _ in range(0, length): 11843 array.append(MonitoredItemModifyResult.from_binary(data)) 11844 self.Results = array 11845 length = uabin.Primitives.Int32.unpack(data) 11846 array = [] 11847 if length != -1: 11848 for _ in range(0, length): 11849 array.append(DiagnosticInfo.from_binary(data)) 11850 self.DiagnosticInfos = array 11851 11852 def __str__(self): 11853 return 'ModifyMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 11854 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 11855 'Results:' + str(self.Results) + ', ' + \ 11856 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 11857 11858 __repr__ = __str__ 11859 11860 11861 class SetMonitoringModeParameters(FrozenClass): 11862 ''' 11863 :ivar SubscriptionId: 11864 :vartype SubscriptionId: UInt32 11865 :ivar MonitoringMode: 11866 :vartype MonitoringMode: MonitoringMode 11867 :ivar MonitoredItemIds: 11868 :vartype MonitoredItemIds: UInt32 11869 ''' 11870 11871 ua_types = { 11872 'SubscriptionId': 'UInt32', 11873 'MonitoringMode': 'MonitoringMode', 11874 'MonitoredItemIds': 'UInt32', 11875 } 11876 11877 def __init__(self, binary=None): 11878 if binary is not None: 11879 self._binary_init(binary) 11880 self._freeze = True 11881 return 11882 self.SubscriptionId = 0 11883 self.MonitoringMode = MonitoringMode(0) 11884 self.MonitoredItemIds = [] 11885 self._freeze = True 11886 11887 def to_binary(self): 11888 packet = [] 11889 packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) 11890 packet.append(uabin.Primitives.UInt32.pack(self.MonitoringMode.value)) 11891 packet.append(uabin.Primitives.Int32.pack(len(self.MonitoredItemIds))) 11892 for fieldname in self.MonitoredItemIds: 11893 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 11894 return b''.join(packet) 11895 11896 @staticmethod 11897 def from_binary(data): 11898 return SetMonitoringModeParameters(data) 11899 11900 def _binary_init(self, data): 11901 self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) 11902 self.MonitoringMode = MonitoringMode(uabin.Primitives.UInt32.unpack(data)) 11903 self.MonitoredItemIds = uabin.Primitives.UInt32.unpack_array(data) 11904 11905 def __str__(self): 11906 return 'SetMonitoringModeParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ 11907 'MonitoringMode:' + str(self.MonitoringMode) + ', ' + \ 11908 'MonitoredItemIds:' + str(self.MonitoredItemIds) + ')' 11909 11910 __repr__ = __str__ 11911 11912 11913 class SetMonitoringModeRequest(FrozenClass): 11914 ''' 11915 :ivar TypeId: 11916 :vartype TypeId: NodeId 11917 :ivar RequestHeader: 11918 :vartype RequestHeader: RequestHeader 11919 :ivar Parameters: 11920 :vartype Parameters: SetMonitoringModeParameters 11921 ''' 11922 11923 ua_types = { 11924 'TypeId': 'NodeId', 11925 'RequestHeader': 'RequestHeader', 11926 'Parameters': 'SetMonitoringModeParameters', 11927 } 11928 11929 def __init__(self, binary=None): 11930 if binary is not None: 11931 self._binary_init(binary) 11932 self._freeze = True 11933 return 11934 self.TypeId = FourByteNodeId(ObjectIds.SetMonitoringModeRequest_Encoding_DefaultBinary) 11935 self.RequestHeader = RequestHeader() 11936 self.Parameters = SetMonitoringModeParameters() 11937 self._freeze = True 11938 11939 def to_binary(self): 11940 packet = [] 11941 packet.append(self.TypeId.to_binary()) 11942 packet.append(self.RequestHeader.to_binary()) 11943 packet.append(self.Parameters.to_binary()) 11944 return b''.join(packet) 11945 11946 @staticmethod 11947 def from_binary(data): 11948 return SetMonitoringModeRequest(data) 11949 11950 def _binary_init(self, data): 11951 self.TypeId = NodeId.from_binary(data) 11952 self.RequestHeader = RequestHeader.from_binary(data) 11953 self.Parameters = SetMonitoringModeParameters.from_binary(data) 11954 11955 def __str__(self): 11956 return 'SetMonitoringModeRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 11957 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 11958 'Parameters:' + str(self.Parameters) + ')' 11959 11960 __repr__ = __str__ 11961 11962 11963 class SetMonitoringModeResult(FrozenClass): 11964 ''' 11965 :ivar Results: 11966 :vartype Results: StatusCode 11967 :ivar DiagnosticInfos: 11968 :vartype DiagnosticInfos: DiagnosticInfo 11969 ''' 11970 11971 ua_types = { 11972 'Results': 'StatusCode', 11973 'DiagnosticInfos': 'DiagnosticInfo', 11974 } 11975 11976 def __init__(self, binary=None): 11977 if binary is not None: 11978 self._binary_init(binary) 11979 self._freeze = True 11980 return 11981 self.Results = [] 11982 self.DiagnosticInfos = [] 11983 self._freeze = True 11984 11985 def to_binary(self): 11986 packet = [] 11987 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 11988 for fieldname in self.Results: 11989 packet.append(fieldname.to_binary()) 11990 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 11991 for fieldname in self.DiagnosticInfos: 11992 packet.append(fieldname.to_binary()) 11993 return b''.join(packet) 11994 11995 @staticmethod 11996 def from_binary(data): 11997 return SetMonitoringModeResult(data) 11998 11999 def _binary_init(self, data): 12000 length = uabin.Primitives.Int32.unpack(data) 12001 array = [] 12002 if length != -1: 12003 for _ in range(0, length): 12004 array.append(StatusCode.from_binary(data)) 12005 self.Results = array 12006 length = uabin.Primitives.Int32.unpack(data) 12007 array = [] 12008 if length != -1: 12009 for _ in range(0, length): 12010 array.append(DiagnosticInfo.from_binary(data)) 12011 self.DiagnosticInfos = array 12012 12013 def __str__(self): 12014 return 'SetMonitoringModeResult(' + 'Results:' + str(self.Results) + ', ' + \ 12015 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 12016 12017 __repr__ = __str__ 12018 12019 12020 class SetMonitoringModeResponse(FrozenClass): 12021 ''' 12022 :ivar TypeId: 12023 :vartype TypeId: NodeId 12024 :ivar ResponseHeader: 12025 :vartype ResponseHeader: ResponseHeader 12026 :ivar Parameters: 12027 :vartype Parameters: SetMonitoringModeResult 12028 ''' 12029 12030 ua_types = { 12031 'TypeId': 'NodeId', 12032 'ResponseHeader': 'ResponseHeader', 12033 'Parameters': 'SetMonitoringModeResult', 12034 } 12035 12036 def __init__(self, binary=None): 12037 if binary is not None: 12038 self._binary_init(binary) 12039 self._freeze = True 12040 return 12041 self.TypeId = FourByteNodeId(ObjectIds.SetMonitoringModeResponse_Encoding_DefaultBinary) 12042 self.ResponseHeader = ResponseHeader() 12043 self.Parameters = SetMonitoringModeResult() 12044 self._freeze = True 12045 12046 def to_binary(self): 12047 packet = [] 12048 packet.append(self.TypeId.to_binary()) 12049 packet.append(self.ResponseHeader.to_binary()) 12050 packet.append(self.Parameters.to_binary()) 12051 return b''.join(packet) 12052 12053 @staticmethod 12054 def from_binary(data): 12055 return SetMonitoringModeResponse(data) 12056 12057 def _binary_init(self, data): 12058 self.TypeId = NodeId.from_binary(data) 12059 self.ResponseHeader = ResponseHeader.from_binary(data) 12060 self.Parameters = SetMonitoringModeResult.from_binary(data) 12061 12062 def __str__(self): 12063 return 'SetMonitoringModeResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 12064 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 12065 'Parameters:' + str(self.Parameters) + ')' 12066 12067 __repr__ = __str__ 12068 12069 12070 class SetTriggeringParameters(FrozenClass): 12071 ''' 12072 :ivar SubscriptionId: 12073 :vartype SubscriptionId: UInt32 12074 :ivar TriggeringItemId: 12075 :vartype TriggeringItemId: UInt32 12076 :ivar LinksToAdd: 12077 :vartype LinksToAdd: UInt32 12078 :ivar LinksToRemove: 12079 :vartype LinksToRemove: UInt32 12080 ''' 12081 12082 ua_types = { 12083 'SubscriptionId': 'UInt32', 12084 'TriggeringItemId': 'UInt32', 12085 'LinksToAdd': 'UInt32', 12086 'LinksToRemove': 'UInt32', 12087 } 12088 12089 def __init__(self, binary=None): 12090 if binary is not None: 12091 self._binary_init(binary) 12092 self._freeze = True 12093 return 12094 self.SubscriptionId = 0 12095 self.TriggeringItemId = 0 12096 self.LinksToAdd = [] 12097 self.LinksToRemove = [] 12098 self._freeze = True 12099 12100 def to_binary(self): 12101 packet = [] 12102 packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) 12103 packet.append(uabin.Primitives.UInt32.pack(self.TriggeringItemId)) 12104 packet.append(uabin.Primitives.Int32.pack(len(self.LinksToAdd))) 12105 for fieldname in self.LinksToAdd: 12106 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 12107 packet.append(uabin.Primitives.Int32.pack(len(self.LinksToRemove))) 12108 for fieldname in self.LinksToRemove: 12109 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 12110 return b''.join(packet) 12111 12112 @staticmethod 12113 def from_binary(data): 12114 return SetTriggeringParameters(data) 12115 12116 def _binary_init(self, data): 12117 self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) 12118 self.TriggeringItemId = uabin.Primitives.UInt32.unpack(data) 12119 self.LinksToAdd = uabin.Primitives.UInt32.unpack_array(data) 12120 self.LinksToRemove = uabin.Primitives.UInt32.unpack_array(data) 12121 12122 def __str__(self): 12123 return 'SetTriggeringParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ 12124 'TriggeringItemId:' + str(self.TriggeringItemId) + ', ' + \ 12125 'LinksToAdd:' + str(self.LinksToAdd) + ', ' + \ 12126 'LinksToRemove:' + str(self.LinksToRemove) + ')' 12127 12128 __repr__ = __str__ 12129 12130 12131 class SetTriggeringRequest(FrozenClass): 12132 ''' 12133 :ivar TypeId: 12134 :vartype TypeId: NodeId 12135 :ivar RequestHeader: 12136 :vartype RequestHeader: RequestHeader 12137 :ivar Parameters: 12138 :vartype Parameters: SetTriggeringParameters 12139 ''' 12140 12141 ua_types = { 12142 'TypeId': 'NodeId', 12143 'RequestHeader': 'RequestHeader', 12144 'Parameters': 'SetTriggeringParameters', 12145 } 12146 12147 def __init__(self, binary=None): 12148 if binary is not None: 12149 self._binary_init(binary) 12150 self._freeze = True 12151 return 12152 self.TypeId = FourByteNodeId(ObjectIds.SetTriggeringRequest_Encoding_DefaultBinary) 12153 self.RequestHeader = RequestHeader() 12154 self.Parameters = SetTriggeringParameters() 12155 self._freeze = True 12156 12157 def to_binary(self): 12158 packet = [] 12159 packet.append(self.TypeId.to_binary()) 12160 packet.append(self.RequestHeader.to_binary()) 12161 packet.append(self.Parameters.to_binary()) 12162 return b''.join(packet) 12163 12164 @staticmethod 12165 def from_binary(data): 12166 return SetTriggeringRequest(data) 12167 12168 def _binary_init(self, data): 12169 self.TypeId = NodeId.from_binary(data) 12170 self.RequestHeader = RequestHeader.from_binary(data) 12171 self.Parameters = SetTriggeringParameters.from_binary(data) 12172 12173 def __str__(self): 12174 return 'SetTriggeringRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 12175 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 12176 'Parameters:' + str(self.Parameters) + ')' 12177 12178 __repr__ = __str__ 12179 12180 12181 class SetTriggeringResult(FrozenClass): 12182 ''' 12183 :ivar AddResults: 12184 :vartype AddResults: StatusCode 12185 :ivar AddDiagnosticInfos: 12186 :vartype AddDiagnosticInfos: DiagnosticInfo 12187 :ivar RemoveResults: 12188 :vartype RemoveResults: StatusCode 12189 :ivar RemoveDiagnosticInfos: 12190 :vartype RemoveDiagnosticInfos: DiagnosticInfo 12191 ''' 12192 12193 ua_types = { 12194 'AddResults': 'StatusCode', 12195 'AddDiagnosticInfos': 'DiagnosticInfo', 12196 'RemoveResults': 'StatusCode', 12197 'RemoveDiagnosticInfos': 'DiagnosticInfo', 12198 } 12199 12200 def __init__(self, binary=None): 12201 if binary is not None: 12202 self._binary_init(binary) 12203 self._freeze = True 12204 return 12205 self.AddResults = [] 12206 self.AddDiagnosticInfos = [] 12207 self.RemoveResults = [] 12208 self.RemoveDiagnosticInfos = [] 12209 self._freeze = True 12210 12211 def to_binary(self): 12212 packet = [] 12213 packet.append(uabin.Primitives.Int32.pack(len(self.AddResults))) 12214 for fieldname in self.AddResults: 12215 packet.append(fieldname.to_binary()) 12216 packet.append(uabin.Primitives.Int32.pack(len(self.AddDiagnosticInfos))) 12217 for fieldname in self.AddDiagnosticInfos: 12218 packet.append(fieldname.to_binary()) 12219 packet.append(uabin.Primitives.Int32.pack(len(self.RemoveResults))) 12220 for fieldname in self.RemoveResults: 12221 packet.append(fieldname.to_binary()) 12222 packet.append(uabin.Primitives.Int32.pack(len(self.RemoveDiagnosticInfos))) 12223 for fieldname in self.RemoveDiagnosticInfos: 12224 packet.append(fieldname.to_binary()) 12225 return b''.join(packet) 12226 12227 @staticmethod 12228 def from_binary(data): 12229 return SetTriggeringResult(data) 12230 12231 def _binary_init(self, data): 12232 length = uabin.Primitives.Int32.unpack(data) 12233 array = [] 12234 if length != -1: 12235 for _ in range(0, length): 12236 array.append(StatusCode.from_binary(data)) 12237 self.AddResults = array 12238 length = uabin.Primitives.Int32.unpack(data) 12239 array = [] 12240 if length != -1: 12241 for _ in range(0, length): 12242 array.append(DiagnosticInfo.from_binary(data)) 12243 self.AddDiagnosticInfos = array 12244 length = uabin.Primitives.Int32.unpack(data) 12245 array = [] 12246 if length != -1: 12247 for _ in range(0, length): 12248 array.append(StatusCode.from_binary(data)) 12249 self.RemoveResults = array 12250 length = uabin.Primitives.Int32.unpack(data) 12251 array = [] 12252 if length != -1: 12253 for _ in range(0, length): 12254 array.append(DiagnosticInfo.from_binary(data)) 12255 self.RemoveDiagnosticInfos = array 12256 12257 def __str__(self): 12258 return 'SetTriggeringResult(' + 'AddResults:' + str(self.AddResults) + ', ' + \ 12259 'AddDiagnosticInfos:' + str(self.AddDiagnosticInfos) + ', ' + \ 12260 'RemoveResults:' + str(self.RemoveResults) + ', ' + \ 12261 'RemoveDiagnosticInfos:' + str(self.RemoveDiagnosticInfos) + ')' 12262 12263 __repr__ = __str__ 12264 12265 12266 class SetTriggeringResponse(FrozenClass): 12267 ''' 12268 :ivar TypeId: 12269 :vartype TypeId: NodeId 12270 :ivar ResponseHeader: 12271 :vartype ResponseHeader: ResponseHeader 12272 :ivar Parameters: 12273 :vartype Parameters: SetTriggeringResult 12274 ''' 12275 12276 ua_types = { 12277 'TypeId': 'NodeId', 12278 'ResponseHeader': 'ResponseHeader', 12279 'Parameters': 'SetTriggeringResult', 12280 } 12281 12282 def __init__(self, binary=None): 12283 if binary is not None: 12284 self._binary_init(binary) 12285 self._freeze = True 12286 return 12287 self.TypeId = FourByteNodeId(ObjectIds.SetTriggeringResponse_Encoding_DefaultBinary) 12288 self.ResponseHeader = ResponseHeader() 12289 self.Parameters = SetTriggeringResult() 12290 self._freeze = True 12291 12292 def to_binary(self): 12293 packet = [] 12294 packet.append(self.TypeId.to_binary()) 12295 packet.append(self.ResponseHeader.to_binary()) 12296 packet.append(self.Parameters.to_binary()) 12297 return b''.join(packet) 12298 12299 @staticmethod 12300 def from_binary(data): 12301 return SetTriggeringResponse(data) 12302 12303 def _binary_init(self, data): 12304 self.TypeId = NodeId.from_binary(data) 12305 self.ResponseHeader = ResponseHeader.from_binary(data) 12306 self.Parameters = SetTriggeringResult.from_binary(data) 12307 12308 def __str__(self): 12309 return 'SetTriggeringResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 12310 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 12311 'Parameters:' + str(self.Parameters) + ')' 12312 12313 __repr__ = __str__ 12314 12315 12316 class DeleteMonitoredItemsParameters(FrozenClass): 12317 ''' 12318 :ivar SubscriptionId: 12319 :vartype SubscriptionId: UInt32 12320 :ivar MonitoredItemIds: 12321 :vartype MonitoredItemIds: UInt32 12322 ''' 12323 12324 ua_types = { 12325 'SubscriptionId': 'UInt32', 12326 'MonitoredItemIds': 'UInt32', 12327 } 12328 12329 def __init__(self, binary=None): 12330 if binary is not None: 12331 self._binary_init(binary) 12332 self._freeze = True 12333 return 12334 self.SubscriptionId = 0 12335 self.MonitoredItemIds = [] 12336 self._freeze = True 12337 12338 def to_binary(self): 12339 packet = [] 12340 packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) 12341 packet.append(uabin.Primitives.Int32.pack(len(self.MonitoredItemIds))) 12342 for fieldname in self.MonitoredItemIds: 12343 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 12344 return b''.join(packet) 12345 12346 @staticmethod 12347 def from_binary(data): 12348 return DeleteMonitoredItemsParameters(data) 12349 12350 def _binary_init(self, data): 12351 self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) 12352 self.MonitoredItemIds = uabin.Primitives.UInt32.unpack_array(data) 12353 12354 def __str__(self): 12355 return 'DeleteMonitoredItemsParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ 12356 'MonitoredItemIds:' + str(self.MonitoredItemIds) + ')' 12357 12358 __repr__ = __str__ 12359 12360 12361 class DeleteMonitoredItemsRequest(FrozenClass): 12362 ''' 12363 :ivar TypeId: 12364 :vartype TypeId: NodeId 12365 :ivar RequestHeader: 12366 :vartype RequestHeader: RequestHeader 12367 :ivar Parameters: 12368 :vartype Parameters: DeleteMonitoredItemsParameters 12369 ''' 12370 12371 ua_types = { 12372 'TypeId': 'NodeId', 12373 'RequestHeader': 'RequestHeader', 12374 'Parameters': 'DeleteMonitoredItemsParameters', 12375 } 12376 12377 def __init__(self, binary=None): 12378 if binary is not None: 12379 self._binary_init(binary) 12380 self._freeze = True 12381 return 12382 self.TypeId = FourByteNodeId(ObjectIds.DeleteMonitoredItemsRequest_Encoding_DefaultBinary) 12383 self.RequestHeader = RequestHeader() 12384 self.Parameters = DeleteMonitoredItemsParameters() 12385 self._freeze = True 12386 12387 def to_binary(self): 12388 packet = [] 12389 packet.append(self.TypeId.to_binary()) 12390 packet.append(self.RequestHeader.to_binary()) 12391 packet.append(self.Parameters.to_binary()) 12392 return b''.join(packet) 12393 12394 @staticmethod 12395 def from_binary(data): 12396 return DeleteMonitoredItemsRequest(data) 12397 12398 def _binary_init(self, data): 12399 self.TypeId = NodeId.from_binary(data) 12400 self.RequestHeader = RequestHeader.from_binary(data) 12401 self.Parameters = DeleteMonitoredItemsParameters.from_binary(data) 12402 12403 def __str__(self): 12404 return 'DeleteMonitoredItemsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 12405 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 12406 'Parameters:' + str(self.Parameters) + ')' 12407 12408 __repr__ = __str__ 12409 12410 12411 class DeleteMonitoredItemsResponse(FrozenClass): 12412 ''' 12413 :ivar TypeId: 12414 :vartype TypeId: NodeId 12415 :ivar ResponseHeader: 12416 :vartype ResponseHeader: ResponseHeader 12417 :ivar Results: 12418 :vartype Results: StatusCode 12419 :ivar DiagnosticInfos: 12420 :vartype DiagnosticInfos: DiagnosticInfo 12421 ''' 12422 12423 ua_types = { 12424 'TypeId': 'NodeId', 12425 'ResponseHeader': 'ResponseHeader', 12426 'Results': 'StatusCode', 12427 'DiagnosticInfos': 'DiagnosticInfo', 12428 } 12429 12430 def __init__(self, binary=None): 12431 if binary is not None: 12432 self._binary_init(binary) 12433 self._freeze = True 12434 return 12435 self.TypeId = FourByteNodeId(ObjectIds.DeleteMonitoredItemsResponse_Encoding_DefaultBinary) 12436 self.ResponseHeader = ResponseHeader() 12437 self.Results = [] 12438 self.DiagnosticInfos = [] 12439 self._freeze = True 12440 12441 def to_binary(self): 12442 packet = [] 12443 packet.append(self.TypeId.to_binary()) 12444 packet.append(self.ResponseHeader.to_binary()) 12445 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 12446 for fieldname in self.Results: 12447 packet.append(fieldname.to_binary()) 12448 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 12449 for fieldname in self.DiagnosticInfos: 12450 packet.append(fieldname.to_binary()) 12451 return b''.join(packet) 12452 12453 @staticmethod 12454 def from_binary(data): 12455 return DeleteMonitoredItemsResponse(data) 12456 12457 def _binary_init(self, data): 12458 self.TypeId = NodeId.from_binary(data) 12459 self.ResponseHeader = ResponseHeader.from_binary(data) 12460 length = uabin.Primitives.Int32.unpack(data) 12461 array = [] 12462 if length != -1: 12463 for _ in range(0, length): 12464 array.append(StatusCode.from_binary(data)) 12465 self.Results = array 12466 length = uabin.Primitives.Int32.unpack(data) 12467 array = [] 12468 if length != -1: 12469 for _ in range(0, length): 12470 array.append(DiagnosticInfo.from_binary(data)) 12471 self.DiagnosticInfos = array 12472 12473 def __str__(self): 12474 return 'DeleteMonitoredItemsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 12475 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 12476 'Results:' + str(self.Results) + ', ' + \ 12477 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 12478 12479 __repr__ = __str__ 12480 12481 12482 class CreateSubscriptionParameters(FrozenClass): 12483 ''' 12484 :ivar RequestedPublishingInterval: 12485 :vartype RequestedPublishingInterval: Double 12486 :ivar RequestedLifetimeCount: 12487 :vartype RequestedLifetimeCount: UInt32 12488 :ivar RequestedMaxKeepAliveCount: 12489 :vartype RequestedMaxKeepAliveCount: UInt32 12490 :ivar MaxNotificationsPerPublish: 12491 :vartype MaxNotificationsPerPublish: UInt32 12492 :ivar PublishingEnabled: 12493 :vartype PublishingEnabled: Boolean 12494 :ivar Priority: 12495 :vartype Priority: Byte 12496 ''' 12497 12498 ua_types = { 12499 'RequestedPublishingInterval': 'Double', 12500 'RequestedLifetimeCount': 'UInt32', 12501 'RequestedMaxKeepAliveCount': 'UInt32', 12502 'MaxNotificationsPerPublish': 'UInt32', 12503 'PublishingEnabled': 'Boolean', 12504 'Priority': 'Byte', 12505 } 12506 12507 def __init__(self, binary=None): 12508 if binary is not None: 12509 self._binary_init(binary) 12510 self._freeze = True 12511 return 12512 self.RequestedPublishingInterval = 0 12513 self.RequestedLifetimeCount = 0 12514 self.RequestedMaxKeepAliveCount = 0 12515 self.MaxNotificationsPerPublish = 0 12516 self.PublishingEnabled = True 12517 self.Priority = 0 12518 self._freeze = True 12519 12520 def to_binary(self): 12521 packet = [] 12522 packet.append(uabin.Primitives.Double.pack(self.RequestedPublishingInterval)) 12523 packet.append(uabin.Primitives.UInt32.pack(self.RequestedLifetimeCount)) 12524 packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxKeepAliveCount)) 12525 packet.append(uabin.Primitives.UInt32.pack(self.MaxNotificationsPerPublish)) 12526 packet.append(uabin.Primitives.Boolean.pack(self.PublishingEnabled)) 12527 packet.append(uabin.Primitives.Byte.pack(self.Priority)) 12528 return b''.join(packet) 12529 12530 @staticmethod 12531 def from_binary(data): 12532 return CreateSubscriptionParameters(data) 12533 12534 def _binary_init(self, data): 12535 self.RequestedPublishingInterval = uabin.Primitives.Double.unpack(data) 12536 self.RequestedLifetimeCount = uabin.Primitives.UInt32.unpack(data) 12537 self.RequestedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data) 12538 self.MaxNotificationsPerPublish = uabin.Primitives.UInt32.unpack(data) 12539 self.PublishingEnabled = uabin.Primitives.Boolean.unpack(data) 12540 self.Priority = uabin.Primitives.Byte.unpack(data) 12541 12542 def __str__(self): 12543 return 'CreateSubscriptionParameters(' + 'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \ 12544 'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \ 12545 'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \ 12546 'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \ 12547 'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \ 12548 'Priority:' + str(self.Priority) + ')' 12549 12550 __repr__ = __str__ 12551 12552 12553 class CreateSubscriptionRequest(FrozenClass): 12554 ''' 12555 :ivar TypeId: 12556 :vartype TypeId: NodeId 12557 :ivar RequestHeader: 12558 :vartype RequestHeader: RequestHeader 12559 :ivar Parameters: 12560 :vartype Parameters: CreateSubscriptionParameters 12561 ''' 12562 12563 ua_types = { 12564 'TypeId': 'NodeId', 12565 'RequestHeader': 'RequestHeader', 12566 'Parameters': 'CreateSubscriptionParameters', 12567 } 12568 12569 def __init__(self, binary=None): 12570 if binary is not None: 12571 self._binary_init(binary) 12572 self._freeze = True 12573 return 12574 self.TypeId = FourByteNodeId(ObjectIds.CreateSubscriptionRequest_Encoding_DefaultBinary) 12575 self.RequestHeader = RequestHeader() 12576 self.Parameters = CreateSubscriptionParameters() 12577 self._freeze = True 12578 12579 def to_binary(self): 12580 packet = [] 12581 packet.append(self.TypeId.to_binary()) 12582 packet.append(self.RequestHeader.to_binary()) 12583 packet.append(self.Parameters.to_binary()) 12584 return b''.join(packet) 12585 12586 @staticmethod 12587 def from_binary(data): 12588 return CreateSubscriptionRequest(data) 12589 12590 def _binary_init(self, data): 12591 self.TypeId = NodeId.from_binary(data) 12592 self.RequestHeader = RequestHeader.from_binary(data) 12593 self.Parameters = CreateSubscriptionParameters.from_binary(data) 12594 12595 def __str__(self): 12596 return 'CreateSubscriptionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 12597 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 12598 'Parameters:' + str(self.Parameters) + ')' 12599 12600 __repr__ = __str__ 12601 12602 12603 class CreateSubscriptionResult(FrozenClass): 12604 ''' 12605 :ivar SubscriptionId: 12606 :vartype SubscriptionId: UInt32 12607 :ivar RevisedPublishingInterval: 12608 :vartype RevisedPublishingInterval: Double 12609 :ivar RevisedLifetimeCount: 12610 :vartype RevisedLifetimeCount: UInt32 12611 :ivar RevisedMaxKeepAliveCount: 12612 :vartype RevisedMaxKeepAliveCount: UInt32 12613 ''' 12614 12615 ua_types = { 12616 'SubscriptionId': 'UInt32', 12617 'RevisedPublishingInterval': 'Double', 12618 'RevisedLifetimeCount': 'UInt32', 12619 'RevisedMaxKeepAliveCount': 'UInt32', 12620 } 12621 12622 def __init__(self, binary=None): 12623 if binary is not None: 12624 self._binary_init(binary) 12625 self._freeze = True 12626 return 12627 self.SubscriptionId = 0 12628 self.RevisedPublishingInterval = 0 12629 self.RevisedLifetimeCount = 0 12630 self.RevisedMaxKeepAliveCount = 0 12631 self._freeze = True 12632 12633 def to_binary(self): 12634 packet = [] 12635 packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) 12636 packet.append(uabin.Primitives.Double.pack(self.RevisedPublishingInterval)) 12637 packet.append(uabin.Primitives.UInt32.pack(self.RevisedLifetimeCount)) 12638 packet.append(uabin.Primitives.UInt32.pack(self.RevisedMaxKeepAliveCount)) 12639 return b''.join(packet) 12640 12641 @staticmethod 12642 def from_binary(data): 12643 return CreateSubscriptionResult(data) 12644 12645 def _binary_init(self, data): 12646 self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) 12647 self.RevisedPublishingInterval = uabin.Primitives.Double.unpack(data) 12648 self.RevisedLifetimeCount = uabin.Primitives.UInt32.unpack(data) 12649 self.RevisedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data) 12650 12651 def __str__(self): 12652 return 'CreateSubscriptionResult(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ 12653 'RevisedPublishingInterval:' + str(self.RevisedPublishingInterval) + ', ' + \ 12654 'RevisedLifetimeCount:' + str(self.RevisedLifetimeCount) + ', ' + \ 12655 'RevisedMaxKeepAliveCount:' + str(self.RevisedMaxKeepAliveCount) + ')' 12656 12657 __repr__ = __str__ 12658 12659 12660 class CreateSubscriptionResponse(FrozenClass): 12661 ''' 12662 :ivar TypeId: 12663 :vartype TypeId: NodeId 12664 :ivar ResponseHeader: 12665 :vartype ResponseHeader: ResponseHeader 12666 :ivar Parameters: 12667 :vartype Parameters: CreateSubscriptionResult 12668 ''' 12669 12670 ua_types = { 12671 'TypeId': 'NodeId', 12672 'ResponseHeader': 'ResponseHeader', 12673 'Parameters': 'CreateSubscriptionResult', 12674 } 12675 12676 def __init__(self, binary=None): 12677 if binary is not None: 12678 self._binary_init(binary) 12679 self._freeze = True 12680 return 12681 self.TypeId = FourByteNodeId(ObjectIds.CreateSubscriptionResponse_Encoding_DefaultBinary) 12682 self.ResponseHeader = ResponseHeader() 12683 self.Parameters = CreateSubscriptionResult() 12684 self._freeze = True 12685 12686 def to_binary(self): 12687 packet = [] 12688 packet.append(self.TypeId.to_binary()) 12689 packet.append(self.ResponseHeader.to_binary()) 12690 packet.append(self.Parameters.to_binary()) 12691 return b''.join(packet) 12692 12693 @staticmethod 12694 def from_binary(data): 12695 return CreateSubscriptionResponse(data) 12696 12697 def _binary_init(self, data): 12698 self.TypeId = NodeId.from_binary(data) 12699 self.ResponseHeader = ResponseHeader.from_binary(data) 12700 self.Parameters = CreateSubscriptionResult.from_binary(data) 12701 12702 def __str__(self): 12703 return 'CreateSubscriptionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 12704 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 12705 'Parameters:' + str(self.Parameters) + ')' 12706 12707 __repr__ = __str__ 12708 12709 12710 class ModifySubscriptionParameters(FrozenClass): 12711 ''' 12712 :ivar SubscriptionId: 12713 :vartype SubscriptionId: UInt32 12714 :ivar RequestedPublishingInterval: 12715 :vartype RequestedPublishingInterval: Double 12716 :ivar RequestedLifetimeCount: 12717 :vartype RequestedLifetimeCount: UInt32 12718 :ivar RequestedMaxKeepAliveCount: 12719 :vartype RequestedMaxKeepAliveCount: UInt32 12720 :ivar MaxNotificationsPerPublish: 12721 :vartype MaxNotificationsPerPublish: UInt32 12722 :ivar Priority: 12723 :vartype Priority: Byte 12724 ''' 12725 12726 ua_types = { 12727 'SubscriptionId': 'UInt32', 12728 'RequestedPublishingInterval': 'Double', 12729 'RequestedLifetimeCount': 'UInt32', 12730 'RequestedMaxKeepAliveCount': 'UInt32', 12731 'MaxNotificationsPerPublish': 'UInt32', 12732 'Priority': 'Byte', 12733 } 12734 12735 def __init__(self, binary=None): 12736 if binary is not None: 12737 self._binary_init(binary) 12738 self._freeze = True 12739 return 12740 self.SubscriptionId = 0 12741 self.RequestedPublishingInterval = 0 12742 self.RequestedLifetimeCount = 0 12743 self.RequestedMaxKeepAliveCount = 0 12744 self.MaxNotificationsPerPublish = 0 12745 self.Priority = 0 12746 self._freeze = True 12747 12748 def to_binary(self): 12749 packet = [] 12750 packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) 12751 packet.append(uabin.Primitives.Double.pack(self.RequestedPublishingInterval)) 12752 packet.append(uabin.Primitives.UInt32.pack(self.RequestedLifetimeCount)) 12753 packet.append(uabin.Primitives.UInt32.pack(self.RequestedMaxKeepAliveCount)) 12754 packet.append(uabin.Primitives.UInt32.pack(self.MaxNotificationsPerPublish)) 12755 packet.append(uabin.Primitives.Byte.pack(self.Priority)) 12756 return b''.join(packet) 12757 12758 @staticmethod 12759 def from_binary(data): 12760 return ModifySubscriptionParameters(data) 12761 12762 def _binary_init(self, data): 12763 self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) 12764 self.RequestedPublishingInterval = uabin.Primitives.Double.unpack(data) 12765 self.RequestedLifetimeCount = uabin.Primitives.UInt32.unpack(data) 12766 self.RequestedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data) 12767 self.MaxNotificationsPerPublish = uabin.Primitives.UInt32.unpack(data) 12768 self.Priority = uabin.Primitives.Byte.unpack(data) 12769 12770 def __str__(self): 12771 return 'ModifySubscriptionParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ 12772 'RequestedPublishingInterval:' + str(self.RequestedPublishingInterval) + ', ' + \ 12773 'RequestedLifetimeCount:' + str(self.RequestedLifetimeCount) + ', ' + \ 12774 'RequestedMaxKeepAliveCount:' + str(self.RequestedMaxKeepAliveCount) + ', ' + \ 12775 'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \ 12776 'Priority:' + str(self.Priority) + ')' 12777 12778 __repr__ = __str__ 12779 12780 12781 class ModifySubscriptionRequest(FrozenClass): 12782 ''' 12783 :ivar TypeId: 12784 :vartype TypeId: NodeId 12785 :ivar RequestHeader: 12786 :vartype RequestHeader: RequestHeader 12787 :ivar Parameters: 12788 :vartype Parameters: ModifySubscriptionParameters 12789 ''' 12790 12791 ua_types = { 12792 'TypeId': 'NodeId', 12793 'RequestHeader': 'RequestHeader', 12794 'Parameters': 'ModifySubscriptionParameters', 12795 } 12796 12797 def __init__(self, binary=None): 12798 if binary is not None: 12799 self._binary_init(binary) 12800 self._freeze = True 12801 return 12802 self.TypeId = FourByteNodeId(ObjectIds.ModifySubscriptionRequest_Encoding_DefaultBinary) 12803 self.RequestHeader = RequestHeader() 12804 self.Parameters = ModifySubscriptionParameters() 12805 self._freeze = True 12806 12807 def to_binary(self): 12808 packet = [] 12809 packet.append(self.TypeId.to_binary()) 12810 packet.append(self.RequestHeader.to_binary()) 12811 packet.append(self.Parameters.to_binary()) 12812 return b''.join(packet) 12813 12814 @staticmethod 12815 def from_binary(data): 12816 return ModifySubscriptionRequest(data) 12817 12818 def _binary_init(self, data): 12819 self.TypeId = NodeId.from_binary(data) 12820 self.RequestHeader = RequestHeader.from_binary(data) 12821 self.Parameters = ModifySubscriptionParameters.from_binary(data) 12822 12823 def __str__(self): 12824 return 'ModifySubscriptionRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 12825 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 12826 'Parameters:' + str(self.Parameters) + ')' 12827 12828 __repr__ = __str__ 12829 12830 12831 class ModifySubscriptionResult(FrozenClass): 12832 ''' 12833 :ivar RevisedPublishingInterval: 12834 :vartype RevisedPublishingInterval: Double 12835 :ivar RevisedLifetimeCount: 12836 :vartype RevisedLifetimeCount: UInt32 12837 :ivar RevisedMaxKeepAliveCount: 12838 :vartype RevisedMaxKeepAliveCount: UInt32 12839 ''' 12840 12841 ua_types = { 12842 'RevisedPublishingInterval': 'Double', 12843 'RevisedLifetimeCount': 'UInt32', 12844 'RevisedMaxKeepAliveCount': 'UInt32', 12845 } 12846 12847 def __init__(self, binary=None): 12848 if binary is not None: 12849 self._binary_init(binary) 12850 self._freeze = True 12851 return 12852 self.RevisedPublishingInterval = 0 12853 self.RevisedLifetimeCount = 0 12854 self.RevisedMaxKeepAliveCount = 0 12855 self._freeze = True 12856 12857 def to_binary(self): 12858 packet = [] 12859 packet.append(uabin.Primitives.Double.pack(self.RevisedPublishingInterval)) 12860 packet.append(uabin.Primitives.UInt32.pack(self.RevisedLifetimeCount)) 12861 packet.append(uabin.Primitives.UInt32.pack(self.RevisedMaxKeepAliveCount)) 12862 return b''.join(packet) 12863 12864 @staticmethod 12865 def from_binary(data): 12866 return ModifySubscriptionResult(data) 12867 12868 def _binary_init(self, data): 12869 self.RevisedPublishingInterval = uabin.Primitives.Double.unpack(data) 12870 self.RevisedLifetimeCount = uabin.Primitives.UInt32.unpack(data) 12871 self.RevisedMaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data) 12872 12873 def __str__(self): 12874 return 'ModifySubscriptionResult(' + 'RevisedPublishingInterval:' + str(self.RevisedPublishingInterval) + ', ' + \ 12875 'RevisedLifetimeCount:' + str(self.RevisedLifetimeCount) + ', ' + \ 12876 'RevisedMaxKeepAliveCount:' + str(self.RevisedMaxKeepAliveCount) + ')' 12877 12878 __repr__ = __str__ 12879 12880 12881 class ModifySubscriptionResponse(FrozenClass): 12882 ''' 12883 :ivar TypeId: 12884 :vartype TypeId: NodeId 12885 :ivar ResponseHeader: 12886 :vartype ResponseHeader: ResponseHeader 12887 :ivar Parameters: 12888 :vartype Parameters: ModifySubscriptionResult 12889 ''' 12890 12891 ua_types = { 12892 'TypeId': 'NodeId', 12893 'ResponseHeader': 'ResponseHeader', 12894 'Parameters': 'ModifySubscriptionResult', 12895 } 12896 12897 def __init__(self, binary=None): 12898 if binary is not None: 12899 self._binary_init(binary) 12900 self._freeze = True 12901 return 12902 self.TypeId = FourByteNodeId(ObjectIds.ModifySubscriptionResponse_Encoding_DefaultBinary) 12903 self.ResponseHeader = ResponseHeader() 12904 self.Parameters = ModifySubscriptionResult() 12905 self._freeze = True 12906 12907 def to_binary(self): 12908 packet = [] 12909 packet.append(self.TypeId.to_binary()) 12910 packet.append(self.ResponseHeader.to_binary()) 12911 packet.append(self.Parameters.to_binary()) 12912 return b''.join(packet) 12913 12914 @staticmethod 12915 def from_binary(data): 12916 return ModifySubscriptionResponse(data) 12917 12918 def _binary_init(self, data): 12919 self.TypeId = NodeId.from_binary(data) 12920 self.ResponseHeader = ResponseHeader.from_binary(data) 12921 self.Parameters = ModifySubscriptionResult.from_binary(data) 12922 12923 def __str__(self): 12924 return 'ModifySubscriptionResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 12925 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 12926 'Parameters:' + str(self.Parameters) + ')' 12927 12928 __repr__ = __str__ 12929 12930 12931 class SetPublishingModeParameters(FrozenClass): 12932 ''' 12933 :ivar PublishingEnabled: 12934 :vartype PublishingEnabled: Boolean 12935 :ivar SubscriptionIds: 12936 :vartype SubscriptionIds: UInt32 12937 ''' 12938 12939 ua_types = { 12940 'PublishingEnabled': 'Boolean', 12941 'SubscriptionIds': 'UInt32', 12942 } 12943 12944 def __init__(self, binary=None): 12945 if binary is not None: 12946 self._binary_init(binary) 12947 self._freeze = True 12948 return 12949 self.PublishingEnabled = True 12950 self.SubscriptionIds = [] 12951 self._freeze = True 12952 12953 def to_binary(self): 12954 packet = [] 12955 packet.append(uabin.Primitives.Boolean.pack(self.PublishingEnabled)) 12956 packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionIds))) 12957 for fieldname in self.SubscriptionIds: 12958 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 12959 return b''.join(packet) 12960 12961 @staticmethod 12962 def from_binary(data): 12963 return SetPublishingModeParameters(data) 12964 12965 def _binary_init(self, data): 12966 self.PublishingEnabled = uabin.Primitives.Boolean.unpack(data) 12967 self.SubscriptionIds = uabin.Primitives.UInt32.unpack_array(data) 12968 12969 def __str__(self): 12970 return 'SetPublishingModeParameters(' + 'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \ 12971 'SubscriptionIds:' + str(self.SubscriptionIds) + ')' 12972 12973 __repr__ = __str__ 12974 12975 12976 class SetPublishingModeRequest(FrozenClass): 12977 ''' 12978 :ivar TypeId: 12979 :vartype TypeId: NodeId 12980 :ivar RequestHeader: 12981 :vartype RequestHeader: RequestHeader 12982 :ivar Parameters: 12983 :vartype Parameters: SetPublishingModeParameters 12984 ''' 12985 12986 ua_types = { 12987 'TypeId': 'NodeId', 12988 'RequestHeader': 'RequestHeader', 12989 'Parameters': 'SetPublishingModeParameters', 12990 } 12991 12992 def __init__(self, binary=None): 12993 if binary is not None: 12994 self._binary_init(binary) 12995 self._freeze = True 12996 return 12997 self.TypeId = FourByteNodeId(ObjectIds.SetPublishingModeRequest_Encoding_DefaultBinary) 12998 self.RequestHeader = RequestHeader() 12999 self.Parameters = SetPublishingModeParameters() 13000 self._freeze = True 13001 13002 def to_binary(self): 13003 packet = [] 13004 packet.append(self.TypeId.to_binary()) 13005 packet.append(self.RequestHeader.to_binary()) 13006 packet.append(self.Parameters.to_binary()) 13007 return b''.join(packet) 13008 13009 @staticmethod 13010 def from_binary(data): 13011 return SetPublishingModeRequest(data) 13012 13013 def _binary_init(self, data): 13014 self.TypeId = NodeId.from_binary(data) 13015 self.RequestHeader = RequestHeader.from_binary(data) 13016 self.Parameters = SetPublishingModeParameters.from_binary(data) 13017 13018 def __str__(self): 13019 return 'SetPublishingModeRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 13020 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 13021 'Parameters:' + str(self.Parameters) + ')' 13022 13023 __repr__ = __str__ 13024 13025 13026 class SetPublishingModeResult(FrozenClass): 13027 ''' 13028 :ivar Results: 13029 :vartype Results: StatusCode 13030 :ivar DiagnosticInfos: 13031 :vartype DiagnosticInfos: DiagnosticInfo 13032 ''' 13033 13034 ua_types = { 13035 'Results': 'StatusCode', 13036 'DiagnosticInfos': 'DiagnosticInfo', 13037 } 13038 13039 def __init__(self, binary=None): 13040 if binary is not None: 13041 self._binary_init(binary) 13042 self._freeze = True 13043 return 13044 self.Results = [] 13045 self.DiagnosticInfos = [] 13046 self._freeze = True 13047 13048 def to_binary(self): 13049 packet = [] 13050 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 13051 for fieldname in self.Results: 13052 packet.append(fieldname.to_binary()) 13053 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 13054 for fieldname in self.DiagnosticInfos: 13055 packet.append(fieldname.to_binary()) 13056 return b''.join(packet) 13057 13058 @staticmethod 13059 def from_binary(data): 13060 return SetPublishingModeResult(data) 13061 13062 def _binary_init(self, data): 13063 length = uabin.Primitives.Int32.unpack(data) 13064 array = [] 13065 if length != -1: 13066 for _ in range(0, length): 13067 array.append(StatusCode.from_binary(data)) 13068 self.Results = array 13069 length = uabin.Primitives.Int32.unpack(data) 13070 array = [] 13071 if length != -1: 13072 for _ in range(0, length): 13073 array.append(DiagnosticInfo.from_binary(data)) 13074 self.DiagnosticInfos = array 13075 13076 def __str__(self): 13077 return 'SetPublishingModeResult(' + 'Results:' + str(self.Results) + ', ' + \ 13078 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 13079 13080 __repr__ = __str__ 13081 13082 13083 class SetPublishingModeResponse(FrozenClass): 13084 ''' 13085 :ivar TypeId: 13086 :vartype TypeId: NodeId 13087 :ivar ResponseHeader: 13088 :vartype ResponseHeader: ResponseHeader 13089 :ivar Parameters: 13090 :vartype Parameters: SetPublishingModeResult 13091 ''' 13092 13093 ua_types = { 13094 'TypeId': 'NodeId', 13095 'ResponseHeader': 'ResponseHeader', 13096 'Parameters': 'SetPublishingModeResult', 13097 } 13098 13099 def __init__(self, binary=None): 13100 if binary is not None: 13101 self._binary_init(binary) 13102 self._freeze = True 13103 return 13104 self.TypeId = FourByteNodeId(ObjectIds.SetPublishingModeResponse_Encoding_DefaultBinary) 13105 self.ResponseHeader = ResponseHeader() 13106 self.Parameters = SetPublishingModeResult() 13107 self._freeze = True 13108 13109 def to_binary(self): 13110 packet = [] 13111 packet.append(self.TypeId.to_binary()) 13112 packet.append(self.ResponseHeader.to_binary()) 13113 packet.append(self.Parameters.to_binary()) 13114 return b''.join(packet) 13115 13116 @staticmethod 13117 def from_binary(data): 13118 return SetPublishingModeResponse(data) 13119 13120 def _binary_init(self, data): 13121 self.TypeId = NodeId.from_binary(data) 13122 self.ResponseHeader = ResponseHeader.from_binary(data) 13123 self.Parameters = SetPublishingModeResult.from_binary(data) 13124 13125 def __str__(self): 13126 return 'SetPublishingModeResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 13127 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 13128 'Parameters:' + str(self.Parameters) + ')' 13129 13130 __repr__ = __str__ 13131 13132 13133 class NotificationMessage(FrozenClass): 13134 ''' 13135 :ivar SequenceNumber: 13136 :vartype SequenceNumber: UInt32 13137 :ivar PublishTime: 13138 :vartype PublishTime: DateTime 13139 :ivar NotificationData: 13140 :vartype NotificationData: ExtensionObject 13141 ''' 13142 13143 ua_types = { 13144 'SequenceNumber': 'UInt32', 13145 'PublishTime': 'DateTime', 13146 'NotificationData': 'ExtensionObject', 13147 } 13148 13149 def __init__(self, binary=None): 13150 if binary is not None: 13151 self._binary_init(binary) 13152 self._freeze = True 13153 return 13154 self.SequenceNumber = 0 13155 self.PublishTime = datetime.now() 13156 self.NotificationData = [] 13157 self._freeze = True 13158 13159 def to_binary(self): 13160 packet = [] 13161 packet.append(uabin.Primitives.UInt32.pack(self.SequenceNumber)) 13162 packet.append(uabin.Primitives.DateTime.pack(self.PublishTime)) 13163 packet.append(uabin.Primitives.Int32.pack(len(self.NotificationData))) 13164 for fieldname in self.NotificationData: 13165 packet.append(extensionobject_to_binary(fieldname)) 13166 return b''.join(packet) 13167 13168 @staticmethod 13169 def from_binary(data): 13170 return NotificationMessage(data) 13171 13172 def _binary_init(self, data): 13173 self.SequenceNumber = uabin.Primitives.UInt32.unpack(data) 13174 self.PublishTime = uabin.Primitives.DateTime.unpack(data) 13175 length = uabin.Primitives.Int32.unpack(data) 13176 array = [] 13177 if length != -1: 13178 for _ in range(0, length): 13179 array.append(extensionobject_from_binary(data)) 13180 self.NotificationData = array 13181 13182 def __str__(self): 13183 return 'NotificationMessage(' + 'SequenceNumber:' + str(self.SequenceNumber) + ', ' + \ 13184 'PublishTime:' + str(self.PublishTime) + ', ' + \ 13185 'NotificationData:' + str(self.NotificationData) + ')' 13186 13187 __repr__ = __str__ 13188 13189 13190 class NotificationData(FrozenClass): 13191 ''' 13192 ''' 13193 13194 ua_types = { 13195 } 13196 13197 def __init__(self, binary=None): 13198 if binary is not None: 13199 self._binary_init(binary) 13200 self._freeze = True 13201 return 13202 self._freeze = True 13203 13204 def to_binary(self): 13205 packet = [] 13206 return b''.join(packet) 13207 13208 @staticmethod 13209 def from_binary(data): 13210 return NotificationData(data) 13211 13212 def _binary_init(self, data): 13213 pass 13214 13215 def __str__(self): 13216 return 'NotificationData(' + + ')' 13217 13218 __repr__ = __str__ 13219 13220 13221 class DataChangeNotification(FrozenClass): 13222 ''' 13223 :ivar MonitoredItems: 13224 :vartype MonitoredItems: MonitoredItemNotification 13225 :ivar DiagnosticInfos: 13226 :vartype DiagnosticInfos: DiagnosticInfo 13227 ''' 13228 13229 ua_types = { 13230 'MonitoredItems': 'MonitoredItemNotification', 13231 'DiagnosticInfos': 'DiagnosticInfo', 13232 } 13233 13234 def __init__(self, binary=None): 13235 if binary is not None: 13236 self._binary_init(binary) 13237 self._freeze = True 13238 return 13239 self.MonitoredItems = [] 13240 self.DiagnosticInfos = [] 13241 self._freeze = True 13242 13243 def to_binary(self): 13244 packet = [] 13245 packet.append(uabin.Primitives.Int32.pack(len(self.MonitoredItems))) 13246 for fieldname in self.MonitoredItems: 13247 packet.append(fieldname.to_binary()) 13248 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 13249 for fieldname in self.DiagnosticInfos: 13250 packet.append(fieldname.to_binary()) 13251 return b''.join(packet) 13252 13253 @staticmethod 13254 def from_binary(data): 13255 return DataChangeNotification(data) 13256 13257 def _binary_init(self, data): 13258 length = uabin.Primitives.Int32.unpack(data) 13259 array = [] 13260 if length != -1: 13261 for _ in range(0, length): 13262 array.append(MonitoredItemNotification.from_binary(data)) 13263 self.MonitoredItems = array 13264 length = uabin.Primitives.Int32.unpack(data) 13265 array = [] 13266 if length != -1: 13267 for _ in range(0, length): 13268 array.append(DiagnosticInfo.from_binary(data)) 13269 self.DiagnosticInfos = array 13270 13271 def __str__(self): 13272 return 'DataChangeNotification(' + 'MonitoredItems:' + str(self.MonitoredItems) + ', ' + \ 13273 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 13274 13275 __repr__ = __str__ 13276 13277 13278 class MonitoredItemNotification(FrozenClass): 13279 ''' 13280 :ivar ClientHandle: 13281 :vartype ClientHandle: UInt32 13282 :ivar Value: 13283 :vartype Value: DataValue 13284 ''' 13285 13286 ua_types = { 13287 'ClientHandle': 'UInt32', 13288 'Value': 'DataValue', 13289 } 13290 13291 def __init__(self, binary=None): 13292 if binary is not None: 13293 self._binary_init(binary) 13294 self._freeze = True 13295 return 13296 self.ClientHandle = 0 13297 self.Value = DataValue() 13298 self._freeze = True 13299 13300 def to_binary(self): 13301 packet = [] 13302 packet.append(uabin.Primitives.UInt32.pack(self.ClientHandle)) 13303 packet.append(self.Value.to_binary()) 13304 return b''.join(packet) 13305 13306 @staticmethod 13307 def from_binary(data): 13308 return MonitoredItemNotification(data) 13309 13310 def _binary_init(self, data): 13311 self.ClientHandle = uabin.Primitives.UInt32.unpack(data) 13312 self.Value = DataValue.from_binary(data) 13313 13314 def __str__(self): 13315 return 'MonitoredItemNotification(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \ 13316 'Value:' + str(self.Value) + ')' 13317 13318 __repr__ = __str__ 13319 13320 13321 class EventNotificationList(FrozenClass): 13322 ''' 13323 :ivar Events: 13324 :vartype Events: EventFieldList 13325 ''' 13326 13327 ua_types = { 13328 'Events': 'EventFieldList', 13329 } 13330 13331 def __init__(self, binary=None): 13332 if binary is not None: 13333 self._binary_init(binary) 13334 self._freeze = True 13335 return 13336 self.Events = [] 13337 self._freeze = True 13338 13339 def to_binary(self): 13340 packet = [] 13341 packet.append(uabin.Primitives.Int32.pack(len(self.Events))) 13342 for fieldname in self.Events: 13343 packet.append(fieldname.to_binary()) 13344 return b''.join(packet) 13345 13346 @staticmethod 13347 def from_binary(data): 13348 return EventNotificationList(data) 13349 13350 def _binary_init(self, data): 13351 length = uabin.Primitives.Int32.unpack(data) 13352 array = [] 13353 if length != -1: 13354 for _ in range(0, length): 13355 array.append(EventFieldList.from_binary(data)) 13356 self.Events = array 13357 13358 def __str__(self): 13359 return 'EventNotificationList(' + 'Events:' + str(self.Events) + ')' 13360 13361 __repr__ = __str__ 13362 13363 13364 class EventFieldList(FrozenClass): 13365 ''' 13366 :ivar ClientHandle: 13367 :vartype ClientHandle: UInt32 13368 :ivar EventFields: 13369 :vartype EventFields: Variant 13370 ''' 13371 13372 ua_types = { 13373 'ClientHandle': 'UInt32', 13374 'EventFields': 'Variant', 13375 } 13376 13377 def __init__(self, binary=None): 13378 if binary is not None: 13379 self._binary_init(binary) 13380 self._freeze = True 13381 return 13382 self.ClientHandle = 0 13383 self.EventFields = [] 13384 self._freeze = True 13385 13386 def to_binary(self): 13387 packet = [] 13388 packet.append(uabin.Primitives.UInt32.pack(self.ClientHandle)) 13389 packet.append(uabin.Primitives.Int32.pack(len(self.EventFields))) 13390 for fieldname in self.EventFields: 13391 packet.append(fieldname.to_binary()) 13392 return b''.join(packet) 13393 13394 @staticmethod 13395 def from_binary(data): 13396 return EventFieldList(data) 13397 13398 def _binary_init(self, data): 13399 self.ClientHandle = uabin.Primitives.UInt32.unpack(data) 13400 length = uabin.Primitives.Int32.unpack(data) 13401 array = [] 13402 if length != -1: 13403 for _ in range(0, length): 13404 array.append(Variant.from_binary(data)) 13405 self.EventFields = array 13406 13407 def __str__(self): 13408 return 'EventFieldList(' + 'ClientHandle:' + str(self.ClientHandle) + ', ' + \ 13409 'EventFields:' + str(self.EventFields) + ')' 13410 13411 __repr__ = __str__ 13412 13413 13414 class HistoryEventFieldList(FrozenClass): 13415 ''' 13416 :ivar EventFields: 13417 :vartype EventFields: Variant 13418 ''' 13419 13420 ua_types = { 13421 'EventFields': 'Variant', 13422 } 13423 13424 def __init__(self, binary=None): 13425 if binary is not None: 13426 self._binary_init(binary) 13427 self._freeze = True 13428 return 13429 self.EventFields = [] 13430 self._freeze = True 13431 13432 def to_binary(self): 13433 packet = [] 13434 packet.append(uabin.Primitives.Int32.pack(len(self.EventFields))) 13435 for fieldname in self.EventFields: 13436 packet.append(fieldname.to_binary()) 13437 return b''.join(packet) 13438 13439 @staticmethod 13440 def from_binary(data): 13441 return HistoryEventFieldList(data) 13442 13443 def _binary_init(self, data): 13444 length = uabin.Primitives.Int32.unpack(data) 13445 array = [] 13446 if length != -1: 13447 for _ in range(0, length): 13448 array.append(Variant.from_binary(data)) 13449 self.EventFields = array 13450 13451 def __str__(self): 13452 return 'HistoryEventFieldList(' + 'EventFields:' + str(self.EventFields) + ')' 13453 13454 __repr__ = __str__ 13455 13456 13457 class StatusChangeNotification(FrozenClass): 13458 ''' 13459 :ivar Status: 13460 :vartype Status: StatusCode 13461 :ivar DiagnosticInfo: 13462 :vartype DiagnosticInfo: DiagnosticInfo 13463 ''' 13464 13465 ua_types = { 13466 'Status': 'StatusCode', 13467 'DiagnosticInfo': 'DiagnosticInfo', 13468 } 13469 13470 def __init__(self, binary=None): 13471 if binary is not None: 13472 self._binary_init(binary) 13473 self._freeze = True 13474 return 13475 self.Status = StatusCode() 13476 self.DiagnosticInfo = DiagnosticInfo() 13477 self._freeze = True 13478 13479 def to_binary(self): 13480 packet = [] 13481 packet.append(self.Status.to_binary()) 13482 packet.append(self.DiagnosticInfo.to_binary()) 13483 return b''.join(packet) 13484 13485 @staticmethod 13486 def from_binary(data): 13487 return StatusChangeNotification(data) 13488 13489 def _binary_init(self, data): 13490 self.Status = StatusCode.from_binary(data) 13491 self.DiagnosticInfo = DiagnosticInfo.from_binary(data) 13492 13493 def __str__(self): 13494 return 'StatusChangeNotification(' + 'Status:' + str(self.Status) + ', ' + \ 13495 'DiagnosticInfo:' + str(self.DiagnosticInfo) + ')' 13496 13497 __repr__ = __str__ 13498 13499 13500 class SubscriptionAcknowledgement(FrozenClass): 13501 ''' 13502 :ivar SubscriptionId: 13503 :vartype SubscriptionId: UInt32 13504 :ivar SequenceNumber: 13505 :vartype SequenceNumber: UInt32 13506 ''' 13507 13508 ua_types = { 13509 'SubscriptionId': 'UInt32', 13510 'SequenceNumber': 'UInt32', 13511 } 13512 13513 def __init__(self, binary=None): 13514 if binary is not None: 13515 self._binary_init(binary) 13516 self._freeze = True 13517 return 13518 self.SubscriptionId = 0 13519 self.SequenceNumber = 0 13520 self._freeze = True 13521 13522 def to_binary(self): 13523 packet = [] 13524 packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) 13525 packet.append(uabin.Primitives.UInt32.pack(self.SequenceNumber)) 13526 return b''.join(packet) 13527 13528 @staticmethod 13529 def from_binary(data): 13530 return SubscriptionAcknowledgement(data) 13531 13532 def _binary_init(self, data): 13533 self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) 13534 self.SequenceNumber = uabin.Primitives.UInt32.unpack(data) 13535 13536 def __str__(self): 13537 return 'SubscriptionAcknowledgement(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ 13538 'SequenceNumber:' + str(self.SequenceNumber) + ')' 13539 13540 __repr__ = __str__ 13541 13542 13543 class PublishParameters(FrozenClass): 13544 ''' 13545 :ivar SubscriptionAcknowledgements: 13546 :vartype SubscriptionAcknowledgements: SubscriptionAcknowledgement 13547 ''' 13548 13549 ua_types = { 13550 'SubscriptionAcknowledgements': 'SubscriptionAcknowledgement', 13551 } 13552 13553 def __init__(self, binary=None): 13554 if binary is not None: 13555 self._binary_init(binary) 13556 self._freeze = True 13557 return 13558 self.SubscriptionAcknowledgements = [] 13559 self._freeze = True 13560 13561 def to_binary(self): 13562 packet = [] 13563 packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionAcknowledgements))) 13564 for fieldname in self.SubscriptionAcknowledgements: 13565 packet.append(fieldname.to_binary()) 13566 return b''.join(packet) 13567 13568 @staticmethod 13569 def from_binary(data): 13570 return PublishParameters(data) 13571 13572 def _binary_init(self, data): 13573 length = uabin.Primitives.Int32.unpack(data) 13574 array = [] 13575 if length != -1: 13576 for _ in range(0, length): 13577 array.append(SubscriptionAcknowledgement.from_binary(data)) 13578 self.SubscriptionAcknowledgements = array 13579 13580 def __str__(self): 13581 return 'PublishParameters(' + 'SubscriptionAcknowledgements:' + str(self.SubscriptionAcknowledgements) + ')' 13582 13583 __repr__ = __str__ 13584 13585 13586 class PublishRequest(FrozenClass): 13587 ''' 13588 :ivar TypeId: 13589 :vartype TypeId: NodeId 13590 :ivar RequestHeader: 13591 :vartype RequestHeader: RequestHeader 13592 :ivar Parameters: 13593 :vartype Parameters: PublishParameters 13594 ''' 13595 13596 ua_types = { 13597 'TypeId': 'NodeId', 13598 'RequestHeader': 'RequestHeader', 13599 'Parameters': 'PublishParameters', 13600 } 13601 13602 def __init__(self, binary=None): 13603 if binary is not None: 13604 self._binary_init(binary) 13605 self._freeze = True 13606 return 13607 self.TypeId = FourByteNodeId(ObjectIds.PublishRequest_Encoding_DefaultBinary) 13608 self.RequestHeader = RequestHeader() 13609 self.Parameters = PublishParameters() 13610 self._freeze = True 13611 13612 def to_binary(self): 13613 packet = [] 13614 packet.append(self.TypeId.to_binary()) 13615 packet.append(self.RequestHeader.to_binary()) 13616 packet.append(self.Parameters.to_binary()) 13617 return b''.join(packet) 13618 13619 @staticmethod 13620 def from_binary(data): 13621 return PublishRequest(data) 13622 13623 def _binary_init(self, data): 13624 self.TypeId = NodeId.from_binary(data) 13625 self.RequestHeader = RequestHeader.from_binary(data) 13626 self.Parameters = PublishParameters.from_binary(data) 13627 13628 def __str__(self): 13629 return 'PublishRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 13630 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 13631 'Parameters:' + str(self.Parameters) + ')' 13632 13633 __repr__ = __str__ 13634 13635 13636 class PublishResult(FrozenClass): 13637 ''' 13638 :ivar SubscriptionId: 13639 :vartype SubscriptionId: UInt32 13640 :ivar AvailableSequenceNumbers: 13641 :vartype AvailableSequenceNumbers: UInt32 13642 :ivar MoreNotifications: 13643 :vartype MoreNotifications: Boolean 13644 :ivar NotificationMessage: 13645 :vartype NotificationMessage: NotificationMessage 13646 :ivar Results: 13647 :vartype Results: StatusCode 13648 :ivar DiagnosticInfos: 13649 :vartype DiagnosticInfos: DiagnosticInfo 13650 ''' 13651 13652 ua_types = { 13653 'SubscriptionId': 'UInt32', 13654 'AvailableSequenceNumbers': 'UInt32', 13655 'MoreNotifications': 'Boolean', 13656 'NotificationMessage': 'NotificationMessage', 13657 'Results': 'StatusCode', 13658 'DiagnosticInfos': 'DiagnosticInfo', 13659 } 13660 13661 def __init__(self, binary=None): 13662 if binary is not None: 13663 self._binary_init(binary) 13664 self._freeze = True 13665 return 13666 self.SubscriptionId = 0 13667 self.AvailableSequenceNumbers = [] 13668 self.MoreNotifications = True 13669 self.NotificationMessage = NotificationMessage() 13670 self.Results = [] 13671 self.DiagnosticInfos = [] 13672 self._freeze = True 13673 13674 def to_binary(self): 13675 packet = [] 13676 packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) 13677 packet.append(uabin.Primitives.Int32.pack(len(self.AvailableSequenceNumbers))) 13678 for fieldname in self.AvailableSequenceNumbers: 13679 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 13680 packet.append(uabin.Primitives.Boolean.pack(self.MoreNotifications)) 13681 packet.append(self.NotificationMessage.to_binary()) 13682 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 13683 for fieldname in self.Results: 13684 packet.append(fieldname.to_binary()) 13685 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 13686 for fieldname in self.DiagnosticInfos: 13687 packet.append(fieldname.to_binary()) 13688 return b''.join(packet) 13689 13690 @staticmethod 13691 def from_binary(data): 13692 return PublishResult(data) 13693 13694 def _binary_init(self, data): 13695 self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) 13696 self.AvailableSequenceNumbers = uabin.Primitives.UInt32.unpack_array(data) 13697 self.MoreNotifications = uabin.Primitives.Boolean.unpack(data) 13698 self.NotificationMessage = NotificationMessage.from_binary(data) 13699 length = uabin.Primitives.Int32.unpack(data) 13700 array = [] 13701 if length != -1: 13702 for _ in range(0, length): 13703 array.append(StatusCode.from_binary(data)) 13704 self.Results = array 13705 length = uabin.Primitives.Int32.unpack(data) 13706 array = [] 13707 if length != -1: 13708 for _ in range(0, length): 13709 array.append(DiagnosticInfo.from_binary(data)) 13710 self.DiagnosticInfos = array 13711 13712 def __str__(self): 13713 return 'PublishResult(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ 13714 'AvailableSequenceNumbers:' + str(self.AvailableSequenceNumbers) + ', ' + \ 13715 'MoreNotifications:' + str(self.MoreNotifications) + ', ' + \ 13716 'NotificationMessage:' + str(self.NotificationMessage) + ', ' + \ 13717 'Results:' + str(self.Results) + ', ' + \ 13718 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 13719 13720 __repr__ = __str__ 13721 13722 13723 class PublishResponse(FrozenClass): 13724 ''' 13725 :ivar TypeId: 13726 :vartype TypeId: NodeId 13727 :ivar ResponseHeader: 13728 :vartype ResponseHeader: ResponseHeader 13729 :ivar Parameters: 13730 :vartype Parameters: PublishResult 13731 ''' 13732 13733 ua_types = { 13734 'TypeId': 'NodeId', 13735 'ResponseHeader': 'ResponseHeader', 13736 'Parameters': 'PublishResult', 13737 } 13738 13739 def __init__(self, binary=None): 13740 if binary is not None: 13741 self._binary_init(binary) 13742 self._freeze = True 13743 return 13744 self.TypeId = FourByteNodeId(ObjectIds.PublishResponse_Encoding_DefaultBinary) 13745 self.ResponseHeader = ResponseHeader() 13746 self.Parameters = PublishResult() 13747 self._freeze = True 13748 13749 def to_binary(self): 13750 packet = [] 13751 packet.append(self.TypeId.to_binary()) 13752 packet.append(self.ResponseHeader.to_binary()) 13753 packet.append(self.Parameters.to_binary()) 13754 return b''.join(packet) 13755 13756 @staticmethod 13757 def from_binary(data): 13758 return PublishResponse(data) 13759 13760 def _binary_init(self, data): 13761 self.TypeId = NodeId.from_binary(data) 13762 self.ResponseHeader = ResponseHeader.from_binary(data) 13763 self.Parameters = PublishResult.from_binary(data) 13764 13765 def __str__(self): 13766 return 'PublishResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 13767 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 13768 'Parameters:' + str(self.Parameters) + ')' 13769 13770 __repr__ = __str__ 13771 13772 13773 class RepublishParameters(FrozenClass): 13774 ''' 13775 :ivar SubscriptionId: 13776 :vartype SubscriptionId: UInt32 13777 :ivar RetransmitSequenceNumber: 13778 :vartype RetransmitSequenceNumber: UInt32 13779 ''' 13780 13781 ua_types = { 13782 'SubscriptionId': 'UInt32', 13783 'RetransmitSequenceNumber': 'UInt32', 13784 } 13785 13786 def __init__(self, binary=None): 13787 if binary is not None: 13788 self._binary_init(binary) 13789 self._freeze = True 13790 return 13791 self.SubscriptionId = 0 13792 self.RetransmitSequenceNumber = 0 13793 self._freeze = True 13794 13795 def to_binary(self): 13796 packet = [] 13797 packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) 13798 packet.append(uabin.Primitives.UInt32.pack(self.RetransmitSequenceNumber)) 13799 return b''.join(packet) 13800 13801 @staticmethod 13802 def from_binary(data): 13803 return RepublishParameters(data) 13804 13805 def _binary_init(self, data): 13806 self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) 13807 self.RetransmitSequenceNumber = uabin.Primitives.UInt32.unpack(data) 13808 13809 def __str__(self): 13810 return 'RepublishParameters(' + 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ 13811 'RetransmitSequenceNumber:' + str(self.RetransmitSequenceNumber) + ')' 13812 13813 __repr__ = __str__ 13814 13815 13816 class RepublishRequest(FrozenClass): 13817 ''' 13818 :ivar TypeId: 13819 :vartype TypeId: NodeId 13820 :ivar RequestHeader: 13821 :vartype RequestHeader: RequestHeader 13822 :ivar Parameters: 13823 :vartype Parameters: RepublishParameters 13824 ''' 13825 13826 ua_types = { 13827 'TypeId': 'NodeId', 13828 'RequestHeader': 'RequestHeader', 13829 'Parameters': 'RepublishParameters', 13830 } 13831 13832 def __init__(self, binary=None): 13833 if binary is not None: 13834 self._binary_init(binary) 13835 self._freeze = True 13836 return 13837 self.TypeId = FourByteNodeId(ObjectIds.RepublishRequest_Encoding_DefaultBinary) 13838 self.RequestHeader = RequestHeader() 13839 self.Parameters = RepublishParameters() 13840 self._freeze = True 13841 13842 def to_binary(self): 13843 packet = [] 13844 packet.append(self.TypeId.to_binary()) 13845 packet.append(self.RequestHeader.to_binary()) 13846 packet.append(self.Parameters.to_binary()) 13847 return b''.join(packet) 13848 13849 @staticmethod 13850 def from_binary(data): 13851 return RepublishRequest(data) 13852 13853 def _binary_init(self, data): 13854 self.TypeId = NodeId.from_binary(data) 13855 self.RequestHeader = RequestHeader.from_binary(data) 13856 self.Parameters = RepublishParameters.from_binary(data) 13857 13858 def __str__(self): 13859 return 'RepublishRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 13860 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 13861 'Parameters:' + str(self.Parameters) + ')' 13862 13863 __repr__ = __str__ 13864 13865 13866 class RepublishResponse(FrozenClass): 13867 ''' 13868 :ivar TypeId: 13869 :vartype TypeId: NodeId 13870 :ivar ResponseHeader: 13871 :vartype ResponseHeader: ResponseHeader 13872 :ivar NotificationMessage: 13873 :vartype NotificationMessage: NotificationMessage 13874 ''' 13875 13876 ua_types = { 13877 'TypeId': 'NodeId', 13878 'ResponseHeader': 'ResponseHeader', 13879 'NotificationMessage': 'NotificationMessage', 13880 } 13881 13882 def __init__(self, binary=None): 13883 if binary is not None: 13884 self._binary_init(binary) 13885 self._freeze = True 13886 return 13887 self.TypeId = FourByteNodeId(ObjectIds.RepublishResponse_Encoding_DefaultBinary) 13888 self.ResponseHeader = ResponseHeader() 13889 self.NotificationMessage = NotificationMessage() 13890 self._freeze = True 13891 13892 def to_binary(self): 13893 packet = [] 13894 packet.append(self.TypeId.to_binary()) 13895 packet.append(self.ResponseHeader.to_binary()) 13896 packet.append(self.NotificationMessage.to_binary()) 13897 return b''.join(packet) 13898 13899 @staticmethod 13900 def from_binary(data): 13901 return RepublishResponse(data) 13902 13903 def _binary_init(self, data): 13904 self.TypeId = NodeId.from_binary(data) 13905 self.ResponseHeader = ResponseHeader.from_binary(data) 13906 self.NotificationMessage = NotificationMessage.from_binary(data) 13907 13908 def __str__(self): 13909 return 'RepublishResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 13910 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 13911 'NotificationMessage:' + str(self.NotificationMessage) + ')' 13912 13913 __repr__ = __str__ 13914 13915 13916 class TransferResult(FrozenClass): 13917 ''' 13918 :ivar StatusCode: 13919 :vartype StatusCode: StatusCode 13920 :ivar AvailableSequenceNumbers: 13921 :vartype AvailableSequenceNumbers: UInt32 13922 ''' 13923 13924 ua_types = { 13925 'StatusCode': 'StatusCode', 13926 'AvailableSequenceNumbers': 'UInt32', 13927 } 13928 13929 def __init__(self, binary=None): 13930 if binary is not None: 13931 self._binary_init(binary) 13932 self._freeze = True 13933 return 13934 self.StatusCode = StatusCode() 13935 self.AvailableSequenceNumbers = [] 13936 self._freeze = True 13937 13938 def to_binary(self): 13939 packet = [] 13940 packet.append(self.StatusCode.to_binary()) 13941 packet.append(uabin.Primitives.Int32.pack(len(self.AvailableSequenceNumbers))) 13942 for fieldname in self.AvailableSequenceNumbers: 13943 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 13944 return b''.join(packet) 13945 13946 @staticmethod 13947 def from_binary(data): 13948 return TransferResult(data) 13949 13950 def _binary_init(self, data): 13951 self.StatusCode = StatusCode.from_binary(data) 13952 self.AvailableSequenceNumbers = uabin.Primitives.UInt32.unpack_array(data) 13953 13954 def __str__(self): 13955 return 'TransferResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 13956 'AvailableSequenceNumbers:' + str(self.AvailableSequenceNumbers) + ')' 13957 13958 __repr__ = __str__ 13959 13960 13961 class TransferSubscriptionsParameters(FrozenClass): 13962 ''' 13963 :ivar SubscriptionIds: 13964 :vartype SubscriptionIds: UInt32 13965 :ivar SendInitialValues: 13966 :vartype SendInitialValues: Boolean 13967 ''' 13968 13969 ua_types = { 13970 'SubscriptionIds': 'UInt32', 13971 'SendInitialValues': 'Boolean', 13972 } 13973 13974 def __init__(self, binary=None): 13975 if binary is not None: 13976 self._binary_init(binary) 13977 self._freeze = True 13978 return 13979 self.SubscriptionIds = [] 13980 self.SendInitialValues = True 13981 self._freeze = True 13982 13983 def to_binary(self): 13984 packet = [] 13985 packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionIds))) 13986 for fieldname in self.SubscriptionIds: 13987 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 13988 packet.append(uabin.Primitives.Boolean.pack(self.SendInitialValues)) 13989 return b''.join(packet) 13990 13991 @staticmethod 13992 def from_binary(data): 13993 return TransferSubscriptionsParameters(data) 13994 13995 def _binary_init(self, data): 13996 self.SubscriptionIds = uabin.Primitives.UInt32.unpack_array(data) 13997 self.SendInitialValues = uabin.Primitives.Boolean.unpack(data) 13998 13999 def __str__(self): 14000 return 'TransferSubscriptionsParameters(' + 'SubscriptionIds:' + str(self.SubscriptionIds) + ', ' + \ 14001 'SendInitialValues:' + str(self.SendInitialValues) + ')' 14002 14003 __repr__ = __str__ 14004 14005 14006 class TransferSubscriptionsRequest(FrozenClass): 14007 ''' 14008 :ivar TypeId: 14009 :vartype TypeId: NodeId 14010 :ivar RequestHeader: 14011 :vartype RequestHeader: RequestHeader 14012 :ivar Parameters: 14013 :vartype Parameters: TransferSubscriptionsParameters 14014 ''' 14015 14016 ua_types = { 14017 'TypeId': 'NodeId', 14018 'RequestHeader': 'RequestHeader', 14019 'Parameters': 'TransferSubscriptionsParameters', 14020 } 14021 14022 def __init__(self, binary=None): 14023 if binary is not None: 14024 self._binary_init(binary) 14025 self._freeze = True 14026 return 14027 self.TypeId = FourByteNodeId(ObjectIds.TransferSubscriptionsRequest_Encoding_DefaultBinary) 14028 self.RequestHeader = RequestHeader() 14029 self.Parameters = TransferSubscriptionsParameters() 14030 self._freeze = True 14031 14032 def to_binary(self): 14033 packet = [] 14034 packet.append(self.TypeId.to_binary()) 14035 packet.append(self.RequestHeader.to_binary()) 14036 packet.append(self.Parameters.to_binary()) 14037 return b''.join(packet) 14038 14039 @staticmethod 14040 def from_binary(data): 14041 return TransferSubscriptionsRequest(data) 14042 14043 def _binary_init(self, data): 14044 self.TypeId = NodeId.from_binary(data) 14045 self.RequestHeader = RequestHeader.from_binary(data) 14046 self.Parameters = TransferSubscriptionsParameters.from_binary(data) 14047 14048 def __str__(self): 14049 return 'TransferSubscriptionsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 14050 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 14051 'Parameters:' + str(self.Parameters) + ')' 14052 14053 __repr__ = __str__ 14054 14055 14056 class TransferSubscriptionsResult(FrozenClass): 14057 ''' 14058 :ivar Results: 14059 :vartype Results: TransferResult 14060 :ivar DiagnosticInfos: 14061 :vartype DiagnosticInfos: DiagnosticInfo 14062 ''' 14063 14064 ua_types = { 14065 'Results': 'TransferResult', 14066 'DiagnosticInfos': 'DiagnosticInfo', 14067 } 14068 14069 def __init__(self, binary=None): 14070 if binary is not None: 14071 self._binary_init(binary) 14072 self._freeze = True 14073 return 14074 self.Results = [] 14075 self.DiagnosticInfos = [] 14076 self._freeze = True 14077 14078 def to_binary(self): 14079 packet = [] 14080 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 14081 for fieldname in self.Results: 14082 packet.append(fieldname.to_binary()) 14083 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 14084 for fieldname in self.DiagnosticInfos: 14085 packet.append(fieldname.to_binary()) 14086 return b''.join(packet) 14087 14088 @staticmethod 14089 def from_binary(data): 14090 return TransferSubscriptionsResult(data) 14091 14092 def _binary_init(self, data): 14093 length = uabin.Primitives.Int32.unpack(data) 14094 array = [] 14095 if length != -1: 14096 for _ in range(0, length): 14097 array.append(TransferResult.from_binary(data)) 14098 self.Results = array 14099 length = uabin.Primitives.Int32.unpack(data) 14100 array = [] 14101 if length != -1: 14102 for _ in range(0, length): 14103 array.append(DiagnosticInfo.from_binary(data)) 14104 self.DiagnosticInfos = array 14105 14106 def __str__(self): 14107 return 'TransferSubscriptionsResult(' + 'Results:' + str(self.Results) + ', ' + \ 14108 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 14109 14110 __repr__ = __str__ 14111 14112 14113 class TransferSubscriptionsResponse(FrozenClass): 14114 ''' 14115 :ivar TypeId: 14116 :vartype TypeId: NodeId 14117 :ivar ResponseHeader: 14118 :vartype ResponseHeader: ResponseHeader 14119 :ivar Parameters: 14120 :vartype Parameters: TransferSubscriptionsResult 14121 ''' 14122 14123 ua_types = { 14124 'TypeId': 'NodeId', 14125 'ResponseHeader': 'ResponseHeader', 14126 'Parameters': 'TransferSubscriptionsResult', 14127 } 14128 14129 def __init__(self, binary=None): 14130 if binary is not None: 14131 self._binary_init(binary) 14132 self._freeze = True 14133 return 14134 self.TypeId = FourByteNodeId(ObjectIds.TransferSubscriptionsResponse_Encoding_DefaultBinary) 14135 self.ResponseHeader = ResponseHeader() 14136 self.Parameters = TransferSubscriptionsResult() 14137 self._freeze = True 14138 14139 def to_binary(self): 14140 packet = [] 14141 packet.append(self.TypeId.to_binary()) 14142 packet.append(self.ResponseHeader.to_binary()) 14143 packet.append(self.Parameters.to_binary()) 14144 return b''.join(packet) 14145 14146 @staticmethod 14147 def from_binary(data): 14148 return TransferSubscriptionsResponse(data) 14149 14150 def _binary_init(self, data): 14151 self.TypeId = NodeId.from_binary(data) 14152 self.ResponseHeader = ResponseHeader.from_binary(data) 14153 self.Parameters = TransferSubscriptionsResult.from_binary(data) 14154 14155 def __str__(self): 14156 return 'TransferSubscriptionsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 14157 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 14158 'Parameters:' + str(self.Parameters) + ')' 14159 14160 __repr__ = __str__ 14161 14162 14163 class DeleteSubscriptionsParameters(FrozenClass): 14164 ''' 14165 :ivar SubscriptionIds: 14166 :vartype SubscriptionIds: UInt32 14167 ''' 14168 14169 ua_types = { 14170 'SubscriptionIds': 'UInt32', 14171 } 14172 14173 def __init__(self, binary=None): 14174 if binary is not None: 14175 self._binary_init(binary) 14176 self._freeze = True 14177 return 14178 self.SubscriptionIds = [] 14179 self._freeze = True 14180 14181 def to_binary(self): 14182 packet = [] 14183 packet.append(uabin.Primitives.Int32.pack(len(self.SubscriptionIds))) 14184 for fieldname in self.SubscriptionIds: 14185 packet.append(uabin.Primitives.UInt32.pack(fieldname)) 14186 return b''.join(packet) 14187 14188 @staticmethod 14189 def from_binary(data): 14190 return DeleteSubscriptionsParameters(data) 14191 14192 def _binary_init(self, data): 14193 self.SubscriptionIds = uabin.Primitives.UInt32.unpack_array(data) 14194 14195 def __str__(self): 14196 return 'DeleteSubscriptionsParameters(' + 'SubscriptionIds:' + str(self.SubscriptionIds) + ')' 14197 14198 __repr__ = __str__ 14199 14200 14201 class DeleteSubscriptionsRequest(FrozenClass): 14202 ''' 14203 :ivar TypeId: 14204 :vartype TypeId: NodeId 14205 :ivar RequestHeader: 14206 :vartype RequestHeader: RequestHeader 14207 :ivar Parameters: 14208 :vartype Parameters: DeleteSubscriptionsParameters 14209 ''' 14210 14211 ua_types = { 14212 'TypeId': 'NodeId', 14213 'RequestHeader': 'RequestHeader', 14214 'Parameters': 'DeleteSubscriptionsParameters', 14215 } 14216 14217 def __init__(self, binary=None): 14218 if binary is not None: 14219 self._binary_init(binary) 14220 self._freeze = True 14221 return 14222 self.TypeId = FourByteNodeId(ObjectIds.DeleteSubscriptionsRequest_Encoding_DefaultBinary) 14223 self.RequestHeader = RequestHeader() 14224 self.Parameters = DeleteSubscriptionsParameters() 14225 self._freeze = True 14226 14227 def to_binary(self): 14228 packet = [] 14229 packet.append(self.TypeId.to_binary()) 14230 packet.append(self.RequestHeader.to_binary()) 14231 packet.append(self.Parameters.to_binary()) 14232 return b''.join(packet) 14233 14234 @staticmethod 14235 def from_binary(data): 14236 return DeleteSubscriptionsRequest(data) 14237 14238 def _binary_init(self, data): 14239 self.TypeId = NodeId.from_binary(data) 14240 self.RequestHeader = RequestHeader.from_binary(data) 14241 self.Parameters = DeleteSubscriptionsParameters.from_binary(data) 14242 14243 def __str__(self): 14244 return 'DeleteSubscriptionsRequest(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 14245 'RequestHeader:' + str(self.RequestHeader) + ', ' + \ 14246 'Parameters:' + str(self.Parameters) + ')' 14247 14248 __repr__ = __str__ 14249 14250 14251 class DeleteSubscriptionsResponse(FrozenClass): 14252 ''' 14253 :ivar TypeId: 14254 :vartype TypeId: NodeId 14255 :ivar ResponseHeader: 14256 :vartype ResponseHeader: ResponseHeader 14257 :ivar Results: 14258 :vartype Results: StatusCode 14259 :ivar DiagnosticInfos: 14260 :vartype DiagnosticInfos: DiagnosticInfo 14261 ''' 14262 14263 ua_types = { 14264 'TypeId': 'NodeId', 14265 'ResponseHeader': 'ResponseHeader', 14266 'Results': 'StatusCode', 14267 'DiagnosticInfos': 'DiagnosticInfo', 14268 } 14269 14270 def __init__(self, binary=None): 14271 if binary is not None: 14272 self._binary_init(binary) 14273 self._freeze = True 14274 return 14275 self.TypeId = FourByteNodeId(ObjectIds.DeleteSubscriptionsResponse_Encoding_DefaultBinary) 14276 self.ResponseHeader = ResponseHeader() 14277 self.Results = [] 14278 self.DiagnosticInfos = [] 14279 self._freeze = True 14280 14281 def to_binary(self): 14282 packet = [] 14283 packet.append(self.TypeId.to_binary()) 14284 packet.append(self.ResponseHeader.to_binary()) 14285 packet.append(uabin.Primitives.Int32.pack(len(self.Results))) 14286 for fieldname in self.Results: 14287 packet.append(fieldname.to_binary()) 14288 packet.append(uabin.Primitives.Int32.pack(len(self.DiagnosticInfos))) 14289 for fieldname in self.DiagnosticInfos: 14290 packet.append(fieldname.to_binary()) 14291 return b''.join(packet) 14292 14293 @staticmethod 14294 def from_binary(data): 14295 return DeleteSubscriptionsResponse(data) 14296 14297 def _binary_init(self, data): 14298 self.TypeId = NodeId.from_binary(data) 14299 self.ResponseHeader = ResponseHeader.from_binary(data) 14300 length = uabin.Primitives.Int32.unpack(data) 14301 array = [] 14302 if length != -1: 14303 for _ in range(0, length): 14304 array.append(StatusCode.from_binary(data)) 14305 self.Results = array 14306 length = uabin.Primitives.Int32.unpack(data) 14307 array = [] 14308 if length != -1: 14309 for _ in range(0, length): 14310 array.append(DiagnosticInfo.from_binary(data)) 14311 self.DiagnosticInfos = array 14312 14313 def __str__(self): 14314 return 'DeleteSubscriptionsResponse(' + 'TypeId:' + str(self.TypeId) + ', ' + \ 14315 'ResponseHeader:' + str(self.ResponseHeader) + ', ' + \ 14316 'Results:' + str(self.Results) + ', ' + \ 14317 'DiagnosticInfos:' + str(self.DiagnosticInfos) + ')' 14318 14319 __repr__ = __str__ 14320 14321 14322 class BuildInfo(FrozenClass): 14323 ''' 14324 :ivar ProductUri: 14325 :vartype ProductUri: String 14326 :ivar ManufacturerName: 14327 :vartype ManufacturerName: String 14328 :ivar ProductName: 14329 :vartype ProductName: String 14330 :ivar SoftwareVersion: 14331 :vartype SoftwareVersion: String 14332 :ivar BuildNumber: 14333 :vartype BuildNumber: String 14334 :ivar BuildDate: 14335 :vartype BuildDate: DateTime 14336 ''' 14337 14338 ua_types = { 14339 'ProductUri': 'String', 14340 'ManufacturerName': 'String', 14341 'ProductName': 'String', 14342 'SoftwareVersion': 'String', 14343 'BuildNumber': 'String', 14344 'BuildDate': 'DateTime', 14345 } 14346 14347 def __init__(self, binary=None): 14348 if binary is not None: 14349 self._binary_init(binary) 14350 self._freeze = True 14351 return 14352 self.ProductUri = None 14353 self.ManufacturerName = None 14354 self.ProductName = None 14355 self.SoftwareVersion = None 14356 self.BuildNumber = None 14357 self.BuildDate = datetime.now() 14358 self._freeze = True 14359 14360 def to_binary(self): 14361 packet = [] 14362 packet.append(uabin.Primitives.String.pack(self.ProductUri)) 14363 packet.append(uabin.Primitives.String.pack(self.ManufacturerName)) 14364 packet.append(uabin.Primitives.String.pack(self.ProductName)) 14365 packet.append(uabin.Primitives.String.pack(self.SoftwareVersion)) 14366 packet.append(uabin.Primitives.String.pack(self.BuildNumber)) 14367 packet.append(uabin.Primitives.DateTime.pack(self.BuildDate)) 14368 return b''.join(packet) 14369 14370 @staticmethod 14371 def from_binary(data): 14372 return BuildInfo(data) 14373 14374 def _binary_init(self, data): 14375 self.ProductUri = uabin.Primitives.String.unpack(data) 14376 self.ManufacturerName = uabin.Primitives.String.unpack(data) 14377 self.ProductName = uabin.Primitives.String.unpack(data) 14378 self.SoftwareVersion = uabin.Primitives.String.unpack(data) 14379 self.BuildNumber = uabin.Primitives.String.unpack(data) 14380 self.BuildDate = uabin.Primitives.DateTime.unpack(data) 14381 14382 def __str__(self): 14383 return 'BuildInfo(' + 'ProductUri:' + str(self.ProductUri) + ', ' + \ 14384 'ManufacturerName:' + str(self.ManufacturerName) + ', ' + \ 14385 'ProductName:' + str(self.ProductName) + ', ' + \ 14386 'SoftwareVersion:' + str(self.SoftwareVersion) + ', ' + \ 14387 'BuildNumber:' + str(self.BuildNumber) + ', ' + \ 14388 'BuildDate:' + str(self.BuildDate) + ')' 14389 14390 __repr__ = __str__ 14391 14392 14393 class RedundantServerDataType(FrozenClass): 14394 ''' 14395 :ivar ServerId: 14396 :vartype ServerId: String 14397 :ivar ServiceLevel: 14398 :vartype ServiceLevel: Byte 14399 :ivar ServerState: 14400 :vartype ServerState: ServerState 14401 ''' 14402 14403 ua_types = { 14404 'ServerId': 'String', 14405 'ServiceLevel': 'Byte', 14406 'ServerState': 'ServerState', 14407 } 14408 14409 def __init__(self, binary=None): 14410 if binary is not None: 14411 self._binary_init(binary) 14412 self._freeze = True 14413 return 14414 self.ServerId = None 14415 self.ServiceLevel = 0 14416 self.ServerState = ServerState(0) 14417 self._freeze = True 14418 14419 def to_binary(self): 14420 packet = [] 14421 packet.append(uabin.Primitives.String.pack(self.ServerId)) 14422 packet.append(uabin.Primitives.Byte.pack(self.ServiceLevel)) 14423 packet.append(uabin.Primitives.UInt32.pack(self.ServerState.value)) 14424 return b''.join(packet) 14425 14426 @staticmethod 14427 def from_binary(data): 14428 return RedundantServerDataType(data) 14429 14430 def _binary_init(self, data): 14431 self.ServerId = uabin.Primitives.String.unpack(data) 14432 self.ServiceLevel = uabin.Primitives.Byte.unpack(data) 14433 self.ServerState = ServerState(uabin.Primitives.UInt32.unpack(data)) 14434 14435 def __str__(self): 14436 return 'RedundantServerDataType(' + 'ServerId:' + str(self.ServerId) + ', ' + \ 14437 'ServiceLevel:' + str(self.ServiceLevel) + ', ' + \ 14438 'ServerState:' + str(self.ServerState) + ')' 14439 14440 __repr__ = __str__ 14441 14442 14443 class EndpointUrlListDataType(FrozenClass): 14444 ''' 14445 :ivar EndpointUrlList: 14446 :vartype EndpointUrlList: String 14447 ''' 14448 14449 ua_types = { 14450 'EndpointUrlList': 'String', 14451 } 14452 14453 def __init__(self, binary=None): 14454 if binary is not None: 14455 self._binary_init(binary) 14456 self._freeze = True 14457 return 14458 self.EndpointUrlList = [] 14459 self._freeze = True 14460 14461 def to_binary(self): 14462 packet = [] 14463 packet.append(uabin.Primitives.Int32.pack(len(self.EndpointUrlList))) 14464 for fieldname in self.EndpointUrlList: 14465 packet.append(uabin.Primitives.String.pack(fieldname)) 14466 return b''.join(packet) 14467 14468 @staticmethod 14469 def from_binary(data): 14470 return EndpointUrlListDataType(data) 14471 14472 def _binary_init(self, data): 14473 self.EndpointUrlList = uabin.Primitives.String.unpack_array(data) 14474 14475 def __str__(self): 14476 return 'EndpointUrlListDataType(' + 'EndpointUrlList:' + str(self.EndpointUrlList) + ')' 14477 14478 __repr__ = __str__ 14479 14480 14481 class NetworkGroupDataType(FrozenClass): 14482 ''' 14483 :ivar ServerUri: 14484 :vartype ServerUri: String 14485 :ivar NetworkPaths: 14486 :vartype NetworkPaths: EndpointUrlListDataType 14487 ''' 14488 14489 ua_types = { 14490 'ServerUri': 'String', 14491 'NetworkPaths': 'EndpointUrlListDataType', 14492 } 14493 14494 def __init__(self, binary=None): 14495 if binary is not None: 14496 self._binary_init(binary) 14497 self._freeze = True 14498 return 14499 self.ServerUri = None 14500 self.NetworkPaths = [] 14501 self._freeze = True 14502 14503 def to_binary(self): 14504 packet = [] 14505 packet.append(uabin.Primitives.String.pack(self.ServerUri)) 14506 packet.append(uabin.Primitives.Int32.pack(len(self.NetworkPaths))) 14507 for fieldname in self.NetworkPaths: 14508 packet.append(fieldname.to_binary()) 14509 return b''.join(packet) 14510 14511 @staticmethod 14512 def from_binary(data): 14513 return NetworkGroupDataType(data) 14514 14515 def _binary_init(self, data): 14516 self.ServerUri = uabin.Primitives.String.unpack(data) 14517 length = uabin.Primitives.Int32.unpack(data) 14518 array = [] 14519 if length != -1: 14520 for _ in range(0, length): 14521 array.append(EndpointUrlListDataType.from_binary(data)) 14522 self.NetworkPaths = array 14523 14524 def __str__(self): 14525 return 'NetworkGroupDataType(' + 'ServerUri:' + str(self.ServerUri) + ', ' + \ 14526 'NetworkPaths:' + str(self.NetworkPaths) + ')' 14527 14528 __repr__ = __str__ 14529 14530 14531 class SamplingIntervalDiagnosticsDataType(FrozenClass): 14532 ''' 14533 :ivar SamplingInterval: 14534 :vartype SamplingInterval: Double 14535 :ivar MonitoredItemCount: 14536 :vartype MonitoredItemCount: UInt32 14537 :ivar MaxMonitoredItemCount: 14538 :vartype MaxMonitoredItemCount: UInt32 14539 :ivar DisabledMonitoredItemCount: 14540 :vartype DisabledMonitoredItemCount: UInt32 14541 ''' 14542 14543 ua_types = { 14544 'SamplingInterval': 'Double', 14545 'MonitoredItemCount': 'UInt32', 14546 'MaxMonitoredItemCount': 'UInt32', 14547 'DisabledMonitoredItemCount': 'UInt32', 14548 } 14549 14550 def __init__(self, binary=None): 14551 if binary is not None: 14552 self._binary_init(binary) 14553 self._freeze = True 14554 return 14555 self.SamplingInterval = 0 14556 self.MonitoredItemCount = 0 14557 self.MaxMonitoredItemCount = 0 14558 self.DisabledMonitoredItemCount = 0 14559 self._freeze = True 14560 14561 def to_binary(self): 14562 packet = [] 14563 packet.append(uabin.Primitives.Double.pack(self.SamplingInterval)) 14564 packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemCount)) 14565 packet.append(uabin.Primitives.UInt32.pack(self.MaxMonitoredItemCount)) 14566 packet.append(uabin.Primitives.UInt32.pack(self.DisabledMonitoredItemCount)) 14567 return b''.join(packet) 14568 14569 @staticmethod 14570 def from_binary(data): 14571 return SamplingIntervalDiagnosticsDataType(data) 14572 14573 def _binary_init(self, data): 14574 self.SamplingInterval = uabin.Primitives.Double.unpack(data) 14575 self.MonitoredItemCount = uabin.Primitives.UInt32.unpack(data) 14576 self.MaxMonitoredItemCount = uabin.Primitives.UInt32.unpack(data) 14577 self.DisabledMonitoredItemCount = uabin.Primitives.UInt32.unpack(data) 14578 14579 def __str__(self): 14580 return 'SamplingIntervalDiagnosticsDataType(' + 'SamplingInterval:' + str(self.SamplingInterval) + ', ' + \ 14581 'MonitoredItemCount:' + str(self.MonitoredItemCount) + ', ' + \ 14582 'MaxMonitoredItemCount:' + str(self.MaxMonitoredItemCount) + ', ' + \ 14583 'DisabledMonitoredItemCount:' + str(self.DisabledMonitoredItemCount) + ')' 14584 14585 __repr__ = __str__ 14586 14587 14588 class ServerDiagnosticsSummaryDataType(FrozenClass): 14589 ''' 14590 :ivar ServerViewCount: 14591 :vartype ServerViewCount: UInt32 14592 :ivar CurrentSessionCount: 14593 :vartype CurrentSessionCount: UInt32 14594 :ivar CumulatedSessionCount: 14595 :vartype CumulatedSessionCount: UInt32 14596 :ivar SecurityRejectedSessionCount: 14597 :vartype SecurityRejectedSessionCount: UInt32 14598 :ivar RejectedSessionCount: 14599 :vartype RejectedSessionCount: UInt32 14600 :ivar SessionTimeoutCount: 14601 :vartype SessionTimeoutCount: UInt32 14602 :ivar SessionAbortCount: 14603 :vartype SessionAbortCount: UInt32 14604 :ivar CurrentSubscriptionCount: 14605 :vartype CurrentSubscriptionCount: UInt32 14606 :ivar CumulatedSubscriptionCount: 14607 :vartype CumulatedSubscriptionCount: UInt32 14608 :ivar PublishingIntervalCount: 14609 :vartype PublishingIntervalCount: UInt32 14610 :ivar SecurityRejectedRequestsCount: 14611 :vartype SecurityRejectedRequestsCount: UInt32 14612 :ivar RejectedRequestsCount: 14613 :vartype RejectedRequestsCount: UInt32 14614 ''' 14615 14616 ua_types = { 14617 'ServerViewCount': 'UInt32', 14618 'CurrentSessionCount': 'UInt32', 14619 'CumulatedSessionCount': 'UInt32', 14620 'SecurityRejectedSessionCount': 'UInt32', 14621 'RejectedSessionCount': 'UInt32', 14622 'SessionTimeoutCount': 'UInt32', 14623 'SessionAbortCount': 'UInt32', 14624 'CurrentSubscriptionCount': 'UInt32', 14625 'CumulatedSubscriptionCount': 'UInt32', 14626 'PublishingIntervalCount': 'UInt32', 14627 'SecurityRejectedRequestsCount': 'UInt32', 14628 'RejectedRequestsCount': 'UInt32', 14629 } 14630 14631 def __init__(self, binary=None): 14632 if binary is not None: 14633 self._binary_init(binary) 14634 self._freeze = True 14635 return 14636 self.ServerViewCount = 0 14637 self.CurrentSessionCount = 0 14638 self.CumulatedSessionCount = 0 14639 self.SecurityRejectedSessionCount = 0 14640 self.RejectedSessionCount = 0 14641 self.SessionTimeoutCount = 0 14642 self.SessionAbortCount = 0 14643 self.CurrentSubscriptionCount = 0 14644 self.CumulatedSubscriptionCount = 0 14645 self.PublishingIntervalCount = 0 14646 self.SecurityRejectedRequestsCount = 0 14647 self.RejectedRequestsCount = 0 14648 self._freeze = True 14649 14650 def to_binary(self): 14651 packet = [] 14652 packet.append(uabin.Primitives.UInt32.pack(self.ServerViewCount)) 14653 packet.append(uabin.Primitives.UInt32.pack(self.CurrentSessionCount)) 14654 packet.append(uabin.Primitives.UInt32.pack(self.CumulatedSessionCount)) 14655 packet.append(uabin.Primitives.UInt32.pack(self.SecurityRejectedSessionCount)) 14656 packet.append(uabin.Primitives.UInt32.pack(self.RejectedSessionCount)) 14657 packet.append(uabin.Primitives.UInt32.pack(self.SessionTimeoutCount)) 14658 packet.append(uabin.Primitives.UInt32.pack(self.SessionAbortCount)) 14659 packet.append(uabin.Primitives.UInt32.pack(self.CurrentSubscriptionCount)) 14660 packet.append(uabin.Primitives.UInt32.pack(self.CumulatedSubscriptionCount)) 14661 packet.append(uabin.Primitives.UInt32.pack(self.PublishingIntervalCount)) 14662 packet.append(uabin.Primitives.UInt32.pack(self.SecurityRejectedRequestsCount)) 14663 packet.append(uabin.Primitives.UInt32.pack(self.RejectedRequestsCount)) 14664 return b''.join(packet) 14665 14666 @staticmethod 14667 def from_binary(data): 14668 return ServerDiagnosticsSummaryDataType(data) 14669 14670 def _binary_init(self, data): 14671 self.ServerViewCount = uabin.Primitives.UInt32.unpack(data) 14672 self.CurrentSessionCount = uabin.Primitives.UInt32.unpack(data) 14673 self.CumulatedSessionCount = uabin.Primitives.UInt32.unpack(data) 14674 self.SecurityRejectedSessionCount = uabin.Primitives.UInt32.unpack(data) 14675 self.RejectedSessionCount = uabin.Primitives.UInt32.unpack(data) 14676 self.SessionTimeoutCount = uabin.Primitives.UInt32.unpack(data) 14677 self.SessionAbortCount = uabin.Primitives.UInt32.unpack(data) 14678 self.CurrentSubscriptionCount = uabin.Primitives.UInt32.unpack(data) 14679 self.CumulatedSubscriptionCount = uabin.Primitives.UInt32.unpack(data) 14680 self.PublishingIntervalCount = uabin.Primitives.UInt32.unpack(data) 14681 self.SecurityRejectedRequestsCount = uabin.Primitives.UInt32.unpack(data) 14682 self.RejectedRequestsCount = uabin.Primitives.UInt32.unpack(data) 14683 14684 def __str__(self): 14685 return 'ServerDiagnosticsSummaryDataType(' + 'ServerViewCount:' + str(self.ServerViewCount) + ', ' + \ 14686 'CurrentSessionCount:' + str(self.CurrentSessionCount) + ', ' + \ 14687 'CumulatedSessionCount:' + str(self.CumulatedSessionCount) + ', ' + \ 14688 'SecurityRejectedSessionCount:' + str(self.SecurityRejectedSessionCount) + ', ' + \ 14689 'RejectedSessionCount:' + str(self.RejectedSessionCount) + ', ' + \ 14690 'SessionTimeoutCount:' + str(self.SessionTimeoutCount) + ', ' + \ 14691 'SessionAbortCount:' + str(self.SessionAbortCount) + ', ' + \ 14692 'CurrentSubscriptionCount:' + str(self.CurrentSubscriptionCount) + ', ' + \ 14693 'CumulatedSubscriptionCount:' + str(self.CumulatedSubscriptionCount) + ', ' + \ 14694 'PublishingIntervalCount:' + str(self.PublishingIntervalCount) + ', ' + \ 14695 'SecurityRejectedRequestsCount:' + str(self.SecurityRejectedRequestsCount) + ', ' + \ 14696 'RejectedRequestsCount:' + str(self.RejectedRequestsCount) + ')' 14697 14698 __repr__ = __str__ 14699 14700 14701 class ServerStatusDataType(FrozenClass): 14702 ''' 14703 :ivar StartTime: 14704 :vartype StartTime: DateTime 14705 :ivar CurrentTime: 14706 :vartype CurrentTime: DateTime 14707 :ivar State: 14708 :vartype State: ServerState 14709 :ivar BuildInfo: 14710 :vartype BuildInfo: BuildInfo 14711 :ivar SecondsTillShutdown: 14712 :vartype SecondsTillShutdown: UInt32 14713 :ivar ShutdownReason: 14714 :vartype ShutdownReason: LocalizedText 14715 ''' 14716 14717 ua_types = { 14718 'StartTime': 'DateTime', 14719 'CurrentTime': 'DateTime', 14720 'State': 'ServerState', 14721 'BuildInfo': 'BuildInfo', 14722 'SecondsTillShutdown': 'UInt32', 14723 'ShutdownReason': 'LocalizedText', 14724 } 14725 14726 def __init__(self, binary=None): 14727 if binary is not None: 14728 self._binary_init(binary) 14729 self._freeze = True 14730 return 14731 self.StartTime = datetime.now() 14732 self.CurrentTime = datetime.now() 14733 self.State = ServerState(0) 14734 self.BuildInfo = BuildInfo() 14735 self.SecondsTillShutdown = 0 14736 self.ShutdownReason = LocalizedText() 14737 self._freeze = True 14738 14739 def to_binary(self): 14740 packet = [] 14741 packet.append(uabin.Primitives.DateTime.pack(self.StartTime)) 14742 packet.append(uabin.Primitives.DateTime.pack(self.CurrentTime)) 14743 packet.append(uabin.Primitives.UInt32.pack(self.State.value)) 14744 packet.append(self.BuildInfo.to_binary()) 14745 packet.append(uabin.Primitives.UInt32.pack(self.SecondsTillShutdown)) 14746 packet.append(self.ShutdownReason.to_binary()) 14747 return b''.join(packet) 14748 14749 @staticmethod 14750 def from_binary(data): 14751 return ServerStatusDataType(data) 14752 14753 def _binary_init(self, data): 14754 self.StartTime = uabin.Primitives.DateTime.unpack(data) 14755 self.CurrentTime = uabin.Primitives.DateTime.unpack(data) 14756 self.State = ServerState(uabin.Primitives.UInt32.unpack(data)) 14757 self.BuildInfo = BuildInfo.from_binary(data) 14758 self.SecondsTillShutdown = uabin.Primitives.UInt32.unpack(data) 14759 self.ShutdownReason = LocalizedText.from_binary(data) 14760 14761 def __str__(self): 14762 return 'ServerStatusDataType(' + 'StartTime:' + str(self.StartTime) + ', ' + \ 14763 'CurrentTime:' + str(self.CurrentTime) + ', ' + \ 14764 'State:' + str(self.State) + ', ' + \ 14765 'BuildInfo:' + str(self.BuildInfo) + ', ' + \ 14766 'SecondsTillShutdown:' + str(self.SecondsTillShutdown) + ', ' + \ 14767 'ShutdownReason:' + str(self.ShutdownReason) + ')' 14768 14769 __repr__ = __str__ 14770 14771 14772 class SessionDiagnosticsDataType(FrozenClass): 14773 ''' 14774 :ivar SessionId: 14775 :vartype SessionId: NodeId 14776 :ivar SessionName: 14777 :vartype SessionName: String 14778 :ivar ClientDescription: 14779 :vartype ClientDescription: ApplicationDescription 14780 :ivar ServerUri: 14781 :vartype ServerUri: String 14782 :ivar EndpointUrl: 14783 :vartype EndpointUrl: String 14784 :ivar LocaleIds: 14785 :vartype LocaleIds: String 14786 :ivar ActualSessionTimeout: 14787 :vartype ActualSessionTimeout: Double 14788 :ivar MaxResponseMessageSize: 14789 :vartype MaxResponseMessageSize: UInt32 14790 :ivar ClientConnectionTime: 14791 :vartype ClientConnectionTime: DateTime 14792 :ivar ClientLastContactTime: 14793 :vartype ClientLastContactTime: DateTime 14794 :ivar CurrentSubscriptionsCount: 14795 :vartype CurrentSubscriptionsCount: UInt32 14796 :ivar CurrentMonitoredItemsCount: 14797 :vartype CurrentMonitoredItemsCount: UInt32 14798 :ivar CurrentPublishRequestsInQueue: 14799 :vartype CurrentPublishRequestsInQueue: UInt32 14800 :ivar TotalRequestCount: 14801 :vartype TotalRequestCount: ServiceCounterDataType 14802 :ivar UnauthorizedRequestCount: 14803 :vartype UnauthorizedRequestCount: UInt32 14804 :ivar ReadCount: 14805 :vartype ReadCount: ServiceCounterDataType 14806 :ivar HistoryReadCount: 14807 :vartype HistoryReadCount: ServiceCounterDataType 14808 :ivar WriteCount: 14809 :vartype WriteCount: ServiceCounterDataType 14810 :ivar HistoryUpdateCount: 14811 :vartype HistoryUpdateCount: ServiceCounterDataType 14812 :ivar CallCount: 14813 :vartype CallCount: ServiceCounterDataType 14814 :ivar CreateMonitoredItemsCount: 14815 :vartype CreateMonitoredItemsCount: ServiceCounterDataType 14816 :ivar ModifyMonitoredItemsCount: 14817 :vartype ModifyMonitoredItemsCount: ServiceCounterDataType 14818 :ivar SetMonitoringModeCount: 14819 :vartype SetMonitoringModeCount: ServiceCounterDataType 14820 :ivar SetTriggeringCount: 14821 :vartype SetTriggeringCount: ServiceCounterDataType 14822 :ivar DeleteMonitoredItemsCount: 14823 :vartype DeleteMonitoredItemsCount: ServiceCounterDataType 14824 :ivar CreateSubscriptionCount: 14825 :vartype CreateSubscriptionCount: ServiceCounterDataType 14826 :ivar ModifySubscriptionCount: 14827 :vartype ModifySubscriptionCount: ServiceCounterDataType 14828 :ivar SetPublishingModeCount: 14829 :vartype SetPublishingModeCount: ServiceCounterDataType 14830 :ivar PublishCount: 14831 :vartype PublishCount: ServiceCounterDataType 14832 :ivar RepublishCount: 14833 :vartype RepublishCount: ServiceCounterDataType 14834 :ivar TransferSubscriptionsCount: 14835 :vartype TransferSubscriptionsCount: ServiceCounterDataType 14836 :ivar DeleteSubscriptionsCount: 14837 :vartype DeleteSubscriptionsCount: ServiceCounterDataType 14838 :ivar AddNodesCount: 14839 :vartype AddNodesCount: ServiceCounterDataType 14840 :ivar AddReferencesCount: 14841 :vartype AddReferencesCount: ServiceCounterDataType 14842 :ivar DeleteNodesCount: 14843 :vartype DeleteNodesCount: ServiceCounterDataType 14844 :ivar DeleteReferencesCount: 14845 :vartype DeleteReferencesCount: ServiceCounterDataType 14846 :ivar BrowseCount: 14847 :vartype BrowseCount: ServiceCounterDataType 14848 :ivar BrowseNextCount: 14849 :vartype BrowseNextCount: ServiceCounterDataType 14850 :ivar TranslateBrowsePathsToNodeIdsCount: 14851 :vartype TranslateBrowsePathsToNodeIdsCount: ServiceCounterDataType 14852 :ivar QueryFirstCount: 14853 :vartype QueryFirstCount: ServiceCounterDataType 14854 :ivar QueryNextCount: 14855 :vartype QueryNextCount: ServiceCounterDataType 14856 :ivar RegisterNodesCount: 14857 :vartype RegisterNodesCount: ServiceCounterDataType 14858 :ivar UnregisterNodesCount: 14859 :vartype UnregisterNodesCount: ServiceCounterDataType 14860 ''' 14861 14862 ua_types = { 14863 'SessionId': 'NodeId', 14864 'SessionName': 'String', 14865 'ClientDescription': 'ApplicationDescription', 14866 'ServerUri': 'String', 14867 'EndpointUrl': 'String', 14868 'LocaleIds': 'String', 14869 'ActualSessionTimeout': 'Double', 14870 'MaxResponseMessageSize': 'UInt32', 14871 'ClientConnectionTime': 'DateTime', 14872 'ClientLastContactTime': 'DateTime', 14873 'CurrentSubscriptionsCount': 'UInt32', 14874 'CurrentMonitoredItemsCount': 'UInt32', 14875 'CurrentPublishRequestsInQueue': 'UInt32', 14876 'TotalRequestCount': 'ServiceCounterDataType', 14877 'UnauthorizedRequestCount': 'UInt32', 14878 'ReadCount': 'ServiceCounterDataType', 14879 'HistoryReadCount': 'ServiceCounterDataType', 14880 'WriteCount': 'ServiceCounterDataType', 14881 'HistoryUpdateCount': 'ServiceCounterDataType', 14882 'CallCount': 'ServiceCounterDataType', 14883 'CreateMonitoredItemsCount': 'ServiceCounterDataType', 14884 'ModifyMonitoredItemsCount': 'ServiceCounterDataType', 14885 'SetMonitoringModeCount': 'ServiceCounterDataType', 14886 'SetTriggeringCount': 'ServiceCounterDataType', 14887 'DeleteMonitoredItemsCount': 'ServiceCounterDataType', 14888 'CreateSubscriptionCount': 'ServiceCounterDataType', 14889 'ModifySubscriptionCount': 'ServiceCounterDataType', 14890 'SetPublishingModeCount': 'ServiceCounterDataType', 14891 'PublishCount': 'ServiceCounterDataType', 14892 'RepublishCount': 'ServiceCounterDataType', 14893 'TransferSubscriptionsCount': 'ServiceCounterDataType', 14894 'DeleteSubscriptionsCount': 'ServiceCounterDataType', 14895 'AddNodesCount': 'ServiceCounterDataType', 14896 'AddReferencesCount': 'ServiceCounterDataType', 14897 'DeleteNodesCount': 'ServiceCounterDataType', 14898 'DeleteReferencesCount': 'ServiceCounterDataType', 14899 'BrowseCount': 'ServiceCounterDataType', 14900 'BrowseNextCount': 'ServiceCounterDataType', 14901 'TranslateBrowsePathsToNodeIdsCount': 'ServiceCounterDataType', 14902 'QueryFirstCount': 'ServiceCounterDataType', 14903 'QueryNextCount': 'ServiceCounterDataType', 14904 'RegisterNodesCount': 'ServiceCounterDataType', 14905 'UnregisterNodesCount': 'ServiceCounterDataType', 14906 } 14907 14908 def __init__(self, binary=None): 14909 if binary is not None: 14910 self._binary_init(binary) 14911 self._freeze = True 14912 return 14913 self.SessionId = NodeId() 14914 self.SessionName = None 14915 self.ClientDescription = ApplicationDescription() 14916 self.ServerUri = None 14917 self.EndpointUrl = None 14918 self.LocaleIds = [] 14919 self.ActualSessionTimeout = 0 14920 self.MaxResponseMessageSize = 0 14921 self.ClientConnectionTime = datetime.now() 14922 self.ClientLastContactTime = datetime.now() 14923 self.CurrentSubscriptionsCount = 0 14924 self.CurrentMonitoredItemsCount = 0 14925 self.CurrentPublishRequestsInQueue = 0 14926 self.TotalRequestCount = ServiceCounterDataType() 14927 self.UnauthorizedRequestCount = 0 14928 self.ReadCount = ServiceCounterDataType() 14929 self.HistoryReadCount = ServiceCounterDataType() 14930 self.WriteCount = ServiceCounterDataType() 14931 self.HistoryUpdateCount = ServiceCounterDataType() 14932 self.CallCount = ServiceCounterDataType() 14933 self.CreateMonitoredItemsCount = ServiceCounterDataType() 14934 self.ModifyMonitoredItemsCount = ServiceCounterDataType() 14935 self.SetMonitoringModeCount = ServiceCounterDataType() 14936 self.SetTriggeringCount = ServiceCounterDataType() 14937 self.DeleteMonitoredItemsCount = ServiceCounterDataType() 14938 self.CreateSubscriptionCount = ServiceCounterDataType() 14939 self.ModifySubscriptionCount = ServiceCounterDataType() 14940 self.SetPublishingModeCount = ServiceCounterDataType() 14941 self.PublishCount = ServiceCounterDataType() 14942 self.RepublishCount = ServiceCounterDataType() 14943 self.TransferSubscriptionsCount = ServiceCounterDataType() 14944 self.DeleteSubscriptionsCount = ServiceCounterDataType() 14945 self.AddNodesCount = ServiceCounterDataType() 14946 self.AddReferencesCount = ServiceCounterDataType() 14947 self.DeleteNodesCount = ServiceCounterDataType() 14948 self.DeleteReferencesCount = ServiceCounterDataType() 14949 self.BrowseCount = ServiceCounterDataType() 14950 self.BrowseNextCount = ServiceCounterDataType() 14951 self.TranslateBrowsePathsToNodeIdsCount = ServiceCounterDataType() 14952 self.QueryFirstCount = ServiceCounterDataType() 14953 self.QueryNextCount = ServiceCounterDataType() 14954 self.RegisterNodesCount = ServiceCounterDataType() 14955 self.UnregisterNodesCount = ServiceCounterDataType() 14956 self._freeze = True 14957 14958 def to_binary(self): 14959 packet = [] 14960 packet.append(self.SessionId.to_binary()) 14961 packet.append(uabin.Primitives.String.pack(self.SessionName)) 14962 packet.append(self.ClientDescription.to_binary()) 14963 packet.append(uabin.Primitives.String.pack(self.ServerUri)) 14964 packet.append(uabin.Primitives.String.pack(self.EndpointUrl)) 14965 packet.append(uabin.Primitives.Int32.pack(len(self.LocaleIds))) 14966 for fieldname in self.LocaleIds: 14967 packet.append(uabin.Primitives.String.pack(fieldname)) 14968 packet.append(uabin.Primitives.Double.pack(self.ActualSessionTimeout)) 14969 packet.append(uabin.Primitives.UInt32.pack(self.MaxResponseMessageSize)) 14970 packet.append(uabin.Primitives.DateTime.pack(self.ClientConnectionTime)) 14971 packet.append(uabin.Primitives.DateTime.pack(self.ClientLastContactTime)) 14972 packet.append(uabin.Primitives.UInt32.pack(self.CurrentSubscriptionsCount)) 14973 packet.append(uabin.Primitives.UInt32.pack(self.CurrentMonitoredItemsCount)) 14974 packet.append(uabin.Primitives.UInt32.pack(self.CurrentPublishRequestsInQueue)) 14975 packet.append(self.TotalRequestCount.to_binary()) 14976 packet.append(uabin.Primitives.UInt32.pack(self.UnauthorizedRequestCount)) 14977 packet.append(self.ReadCount.to_binary()) 14978 packet.append(self.HistoryReadCount.to_binary()) 14979 packet.append(self.WriteCount.to_binary()) 14980 packet.append(self.HistoryUpdateCount.to_binary()) 14981 packet.append(self.CallCount.to_binary()) 14982 packet.append(self.CreateMonitoredItemsCount.to_binary()) 14983 packet.append(self.ModifyMonitoredItemsCount.to_binary()) 14984 packet.append(self.SetMonitoringModeCount.to_binary()) 14985 packet.append(self.SetTriggeringCount.to_binary()) 14986 packet.append(self.DeleteMonitoredItemsCount.to_binary()) 14987 packet.append(self.CreateSubscriptionCount.to_binary()) 14988 packet.append(self.ModifySubscriptionCount.to_binary()) 14989 packet.append(self.SetPublishingModeCount.to_binary()) 14990 packet.append(self.PublishCount.to_binary()) 14991 packet.append(self.RepublishCount.to_binary()) 14992 packet.append(self.TransferSubscriptionsCount.to_binary()) 14993 packet.append(self.DeleteSubscriptionsCount.to_binary()) 14994 packet.append(self.AddNodesCount.to_binary()) 14995 packet.append(self.AddReferencesCount.to_binary()) 14996 packet.append(self.DeleteNodesCount.to_binary()) 14997 packet.append(self.DeleteReferencesCount.to_binary()) 14998 packet.append(self.BrowseCount.to_binary()) 14999 packet.append(self.BrowseNextCount.to_binary()) 15000 packet.append(self.TranslateBrowsePathsToNodeIdsCount.to_binary()) 15001 packet.append(self.QueryFirstCount.to_binary()) 15002 packet.append(self.QueryNextCount.to_binary()) 15003 packet.append(self.RegisterNodesCount.to_binary()) 15004 packet.append(self.UnregisterNodesCount.to_binary()) 15005 return b''.join(packet) 15006 15007 @staticmethod 15008 def from_binary(data): 15009 return SessionDiagnosticsDataType(data) 15010 15011 def _binary_init(self, data): 15012 self.SessionId = NodeId.from_binary(data) 15013 self.SessionName = uabin.Primitives.String.unpack(data) 15014 self.ClientDescription = ApplicationDescription.from_binary(data) 15015 self.ServerUri = uabin.Primitives.String.unpack(data) 15016 self.EndpointUrl = uabin.Primitives.String.unpack(data) 15017 self.LocaleIds = uabin.Primitives.String.unpack_array(data) 15018 self.ActualSessionTimeout = uabin.Primitives.Double.unpack(data) 15019 self.MaxResponseMessageSize = uabin.Primitives.UInt32.unpack(data) 15020 self.ClientConnectionTime = uabin.Primitives.DateTime.unpack(data) 15021 self.ClientLastContactTime = uabin.Primitives.DateTime.unpack(data) 15022 self.CurrentSubscriptionsCount = uabin.Primitives.UInt32.unpack(data) 15023 self.CurrentMonitoredItemsCount = uabin.Primitives.UInt32.unpack(data) 15024 self.CurrentPublishRequestsInQueue = uabin.Primitives.UInt32.unpack(data) 15025 self.TotalRequestCount = ServiceCounterDataType.from_binary(data) 15026 self.UnauthorizedRequestCount = uabin.Primitives.UInt32.unpack(data) 15027 self.ReadCount = ServiceCounterDataType.from_binary(data) 15028 self.HistoryReadCount = ServiceCounterDataType.from_binary(data) 15029 self.WriteCount = ServiceCounterDataType.from_binary(data) 15030 self.HistoryUpdateCount = ServiceCounterDataType.from_binary(data) 15031 self.CallCount = ServiceCounterDataType.from_binary(data) 15032 self.CreateMonitoredItemsCount = ServiceCounterDataType.from_binary(data) 15033 self.ModifyMonitoredItemsCount = ServiceCounterDataType.from_binary(data) 15034 self.SetMonitoringModeCount = ServiceCounterDataType.from_binary(data) 15035 self.SetTriggeringCount = ServiceCounterDataType.from_binary(data) 15036 self.DeleteMonitoredItemsCount = ServiceCounterDataType.from_binary(data) 15037 self.CreateSubscriptionCount = ServiceCounterDataType.from_binary(data) 15038 self.ModifySubscriptionCount = ServiceCounterDataType.from_binary(data) 15039 self.SetPublishingModeCount = ServiceCounterDataType.from_binary(data) 15040 self.PublishCount = ServiceCounterDataType.from_binary(data) 15041 self.RepublishCount = ServiceCounterDataType.from_binary(data) 15042 self.TransferSubscriptionsCount = ServiceCounterDataType.from_binary(data) 15043 self.DeleteSubscriptionsCount = ServiceCounterDataType.from_binary(data) 15044 self.AddNodesCount = ServiceCounterDataType.from_binary(data) 15045 self.AddReferencesCount = ServiceCounterDataType.from_binary(data) 15046 self.DeleteNodesCount = ServiceCounterDataType.from_binary(data) 15047 self.DeleteReferencesCount = ServiceCounterDataType.from_binary(data) 15048 self.BrowseCount = ServiceCounterDataType.from_binary(data) 15049 self.BrowseNextCount = ServiceCounterDataType.from_binary(data) 15050 self.TranslateBrowsePathsToNodeIdsCount = ServiceCounterDataType.from_binary(data) 15051 self.QueryFirstCount = ServiceCounterDataType.from_binary(data) 15052 self.QueryNextCount = ServiceCounterDataType.from_binary(data) 15053 self.RegisterNodesCount = ServiceCounterDataType.from_binary(data) 15054 self.UnregisterNodesCount = ServiceCounterDataType.from_binary(data) 15055 15056 def __str__(self): 15057 return 'SessionDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \ 15058 'SessionName:' + str(self.SessionName) + ', ' + \ 15059 'ClientDescription:' + str(self.ClientDescription) + ', ' + \ 15060 'ServerUri:' + str(self.ServerUri) + ', ' + \ 15061 'EndpointUrl:' + str(self.EndpointUrl) + ', ' + \ 15062 'LocaleIds:' + str(self.LocaleIds) + ', ' + \ 15063 'ActualSessionTimeout:' + str(self.ActualSessionTimeout) + ', ' + \ 15064 'MaxResponseMessageSize:' + str(self.MaxResponseMessageSize) + ', ' + \ 15065 'ClientConnectionTime:' + str(self.ClientConnectionTime) + ', ' + \ 15066 'ClientLastContactTime:' + str(self.ClientLastContactTime) + ', ' + \ 15067 'CurrentSubscriptionsCount:' + str(self.CurrentSubscriptionsCount) + ', ' + \ 15068 'CurrentMonitoredItemsCount:' + str(self.CurrentMonitoredItemsCount) + ', ' + \ 15069 'CurrentPublishRequestsInQueue:' + str(self.CurrentPublishRequestsInQueue) + ', ' + \ 15070 'TotalRequestCount:' + str(self.TotalRequestCount) + ', ' + \ 15071 'UnauthorizedRequestCount:' + str(self.UnauthorizedRequestCount) + ', ' + \ 15072 'ReadCount:' + str(self.ReadCount) + ', ' + \ 15073 'HistoryReadCount:' + str(self.HistoryReadCount) + ', ' + \ 15074 'WriteCount:' + str(self.WriteCount) + ', ' + \ 15075 'HistoryUpdateCount:' + str(self.HistoryUpdateCount) + ', ' + \ 15076 'CallCount:' + str(self.CallCount) + ', ' + \ 15077 'CreateMonitoredItemsCount:' + str(self.CreateMonitoredItemsCount) + ', ' + \ 15078 'ModifyMonitoredItemsCount:' + str(self.ModifyMonitoredItemsCount) + ', ' + \ 15079 'SetMonitoringModeCount:' + str(self.SetMonitoringModeCount) + ', ' + \ 15080 'SetTriggeringCount:' + str(self.SetTriggeringCount) + ', ' + \ 15081 'DeleteMonitoredItemsCount:' + str(self.DeleteMonitoredItemsCount) + ', ' + \ 15082 'CreateSubscriptionCount:' + str(self.CreateSubscriptionCount) + ', ' + \ 15083 'ModifySubscriptionCount:' + str(self.ModifySubscriptionCount) + ', ' + \ 15084 'SetPublishingModeCount:' + str(self.SetPublishingModeCount) + ', ' + \ 15085 'PublishCount:' + str(self.PublishCount) + ', ' + \ 15086 'RepublishCount:' + str(self.RepublishCount) + ', ' + \ 15087 'TransferSubscriptionsCount:' + str(self.TransferSubscriptionsCount) + ', ' + \ 15088 'DeleteSubscriptionsCount:' + str(self.DeleteSubscriptionsCount) + ', ' + \ 15089 'AddNodesCount:' + str(self.AddNodesCount) + ', ' + \ 15090 'AddReferencesCount:' + str(self.AddReferencesCount) + ', ' + \ 15091 'DeleteNodesCount:' + str(self.DeleteNodesCount) + ', ' + \ 15092 'DeleteReferencesCount:' + str(self.DeleteReferencesCount) + ', ' + \ 15093 'BrowseCount:' + str(self.BrowseCount) + ', ' + \ 15094 'BrowseNextCount:' + str(self.BrowseNextCount) + ', ' + \ 15095 'TranslateBrowsePathsToNodeIdsCount:' + str(self.TranslateBrowsePathsToNodeIdsCount) + ', ' + \ 15096 'QueryFirstCount:' + str(self.QueryFirstCount) + ', ' + \ 15097 'QueryNextCount:' + str(self.QueryNextCount) + ', ' + \ 15098 'RegisterNodesCount:' + str(self.RegisterNodesCount) + ', ' + \ 15099 'UnregisterNodesCount:' + str(self.UnregisterNodesCount) + ')' 15100 15101 __repr__ = __str__ 15102 15103 15104 class SessionSecurityDiagnosticsDataType(FrozenClass): 15105 ''' 15106 :ivar SessionId: 15107 :vartype SessionId: NodeId 15108 :ivar ClientUserIdOfSession: 15109 :vartype ClientUserIdOfSession: String 15110 :ivar ClientUserIdHistory: 15111 :vartype ClientUserIdHistory: String 15112 :ivar AuthenticationMechanism: 15113 :vartype AuthenticationMechanism: String 15114 :ivar Encoding: 15115 :vartype Encoding: String 15116 :ivar TransportProtocol: 15117 :vartype TransportProtocol: String 15118 :ivar SecurityMode: 15119 :vartype SecurityMode: MessageSecurityMode 15120 :ivar SecurityPolicyUri: 15121 :vartype SecurityPolicyUri: String 15122 :ivar ClientCertificate: 15123 :vartype ClientCertificate: ByteString 15124 ''' 15125 15126 ua_types = { 15127 'SessionId': 'NodeId', 15128 'ClientUserIdOfSession': 'String', 15129 'ClientUserIdHistory': 'String', 15130 'AuthenticationMechanism': 'String', 15131 'Encoding': 'String', 15132 'TransportProtocol': 'String', 15133 'SecurityMode': 'MessageSecurityMode', 15134 'SecurityPolicyUri': 'String', 15135 'ClientCertificate': 'ByteString', 15136 } 15137 15138 def __init__(self, binary=None): 15139 if binary is not None: 15140 self._binary_init(binary) 15141 self._freeze = True 15142 return 15143 self.SessionId = NodeId() 15144 self.ClientUserIdOfSession = None 15145 self.ClientUserIdHistory = [] 15146 self.AuthenticationMechanism = None 15147 self.Encoding = None 15148 self.TransportProtocol = None 15149 self.SecurityMode = MessageSecurityMode(0) 15150 self.SecurityPolicyUri = None 15151 self.ClientCertificate = None 15152 self._freeze = True 15153 15154 def to_binary(self): 15155 packet = [] 15156 packet.append(self.SessionId.to_binary()) 15157 packet.append(uabin.Primitives.String.pack(self.ClientUserIdOfSession)) 15158 packet.append(uabin.Primitives.Int32.pack(len(self.ClientUserIdHistory))) 15159 for fieldname in self.ClientUserIdHistory: 15160 packet.append(uabin.Primitives.String.pack(fieldname)) 15161 packet.append(uabin.Primitives.String.pack(self.AuthenticationMechanism)) 15162 packet.append(uabin.Primitives.String.pack(self.Encoding)) 15163 packet.append(uabin.Primitives.String.pack(self.TransportProtocol)) 15164 packet.append(uabin.Primitives.UInt32.pack(self.SecurityMode.value)) 15165 packet.append(uabin.Primitives.String.pack(self.SecurityPolicyUri)) 15166 packet.append(uabin.Primitives.ByteString.pack(self.ClientCertificate)) 15167 return b''.join(packet) 15168 15169 @staticmethod 15170 def from_binary(data): 15171 return SessionSecurityDiagnosticsDataType(data) 15172 15173 def _binary_init(self, data): 15174 self.SessionId = NodeId.from_binary(data) 15175 self.ClientUserIdOfSession = uabin.Primitives.String.unpack(data) 15176 self.ClientUserIdHistory = uabin.Primitives.String.unpack_array(data) 15177 self.AuthenticationMechanism = uabin.Primitives.String.unpack(data) 15178 self.Encoding = uabin.Primitives.String.unpack(data) 15179 self.TransportProtocol = uabin.Primitives.String.unpack(data) 15180 self.SecurityMode = MessageSecurityMode(uabin.Primitives.UInt32.unpack(data)) 15181 self.SecurityPolicyUri = uabin.Primitives.String.unpack(data) 15182 self.ClientCertificate = uabin.Primitives.ByteString.unpack(data) 15183 15184 def __str__(self): 15185 return 'SessionSecurityDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \ 15186 'ClientUserIdOfSession:' + str(self.ClientUserIdOfSession) + ', ' + \ 15187 'ClientUserIdHistory:' + str(self.ClientUserIdHistory) + ', ' + \ 15188 'AuthenticationMechanism:' + str(self.AuthenticationMechanism) + ', ' + \ 15189 'Encoding:' + str(self.Encoding) + ', ' + \ 15190 'TransportProtocol:' + str(self.TransportProtocol) + ', ' + \ 15191 'SecurityMode:' + str(self.SecurityMode) + ', ' + \ 15192 'SecurityPolicyUri:' + str(self.SecurityPolicyUri) + ', ' + \ 15193 'ClientCertificate:' + str(self.ClientCertificate) + ')' 15194 15195 __repr__ = __str__ 15196 15197 15198 class ServiceCounterDataType(FrozenClass): 15199 ''' 15200 :ivar TotalCount: 15201 :vartype TotalCount: UInt32 15202 :ivar ErrorCount: 15203 :vartype ErrorCount: UInt32 15204 ''' 15205 15206 ua_types = { 15207 'TotalCount': 'UInt32', 15208 'ErrorCount': 'UInt32', 15209 } 15210 15211 def __init__(self, binary=None): 15212 if binary is not None: 15213 self._binary_init(binary) 15214 self._freeze = True 15215 return 15216 self.TotalCount = 0 15217 self.ErrorCount = 0 15218 self._freeze = True 15219 15220 def to_binary(self): 15221 packet = [] 15222 packet.append(uabin.Primitives.UInt32.pack(self.TotalCount)) 15223 packet.append(uabin.Primitives.UInt32.pack(self.ErrorCount)) 15224 return b''.join(packet) 15225 15226 @staticmethod 15227 def from_binary(data): 15228 return ServiceCounterDataType(data) 15229 15230 def _binary_init(self, data): 15231 self.TotalCount = uabin.Primitives.UInt32.unpack(data) 15232 self.ErrorCount = uabin.Primitives.UInt32.unpack(data) 15233 15234 def __str__(self): 15235 return 'ServiceCounterDataType(' + 'TotalCount:' + str(self.TotalCount) + ', ' + \ 15236 'ErrorCount:' + str(self.ErrorCount) + ')' 15237 15238 __repr__ = __str__ 15239 15240 15241 class StatusResult(FrozenClass): 15242 ''' 15243 :ivar StatusCode: 15244 :vartype StatusCode: StatusCode 15245 :ivar DiagnosticInfo: 15246 :vartype DiagnosticInfo: DiagnosticInfo 15247 ''' 15248 15249 ua_types = { 15250 'StatusCode': 'StatusCode', 15251 'DiagnosticInfo': 'DiagnosticInfo', 15252 } 15253 15254 def __init__(self, binary=None): 15255 if binary is not None: 15256 self._binary_init(binary) 15257 self._freeze = True 15258 return 15259 self.StatusCode = StatusCode() 15260 self.DiagnosticInfo = DiagnosticInfo() 15261 self._freeze = True 15262 15263 def to_binary(self): 15264 packet = [] 15265 packet.append(self.StatusCode.to_binary()) 15266 packet.append(self.DiagnosticInfo.to_binary()) 15267 return b''.join(packet) 15268 15269 @staticmethod 15270 def from_binary(data): 15271 return StatusResult(data) 15272 15273 def _binary_init(self, data): 15274 self.StatusCode = StatusCode.from_binary(data) 15275 self.DiagnosticInfo = DiagnosticInfo.from_binary(data) 15276 15277 def __str__(self): 15278 return 'StatusResult(' + 'StatusCode:' + str(self.StatusCode) + ', ' + \ 15279 'DiagnosticInfo:' + str(self.DiagnosticInfo) + ')' 15280 15281 __repr__ = __str__ 15282 15283 15284 class SubscriptionDiagnosticsDataType(FrozenClass): 15285 ''' 15286 :ivar SessionId: 15287 :vartype SessionId: NodeId 15288 :ivar SubscriptionId: 15289 :vartype SubscriptionId: UInt32 15290 :ivar Priority: 15291 :vartype Priority: Byte 15292 :ivar PublishingInterval: 15293 :vartype PublishingInterval: Double 15294 :ivar MaxKeepAliveCount: 15295 :vartype MaxKeepAliveCount: UInt32 15296 :ivar MaxLifetimeCount: 15297 :vartype MaxLifetimeCount: UInt32 15298 :ivar MaxNotificationsPerPublish: 15299 :vartype MaxNotificationsPerPublish: UInt32 15300 :ivar PublishingEnabled: 15301 :vartype PublishingEnabled: Boolean 15302 :ivar ModifyCount: 15303 :vartype ModifyCount: UInt32 15304 :ivar EnableCount: 15305 :vartype EnableCount: UInt32 15306 :ivar DisableCount: 15307 :vartype DisableCount: UInt32 15308 :ivar RepublishRequestCount: 15309 :vartype RepublishRequestCount: UInt32 15310 :ivar RepublishMessageRequestCount: 15311 :vartype RepublishMessageRequestCount: UInt32 15312 :ivar RepublishMessageCount: 15313 :vartype RepublishMessageCount: UInt32 15314 :ivar TransferRequestCount: 15315 :vartype TransferRequestCount: UInt32 15316 :ivar TransferredToAltClientCount: 15317 :vartype TransferredToAltClientCount: UInt32 15318 :ivar TransferredToSameClientCount: 15319 :vartype TransferredToSameClientCount: UInt32 15320 :ivar PublishRequestCount: 15321 :vartype PublishRequestCount: UInt32 15322 :ivar DataChangeNotificationsCount: 15323 :vartype DataChangeNotificationsCount: UInt32 15324 :ivar EventNotificationsCount: 15325 :vartype EventNotificationsCount: UInt32 15326 :ivar NotificationsCount: 15327 :vartype NotificationsCount: UInt32 15328 :ivar LatePublishRequestCount: 15329 :vartype LatePublishRequestCount: UInt32 15330 :ivar CurrentKeepAliveCount: 15331 :vartype CurrentKeepAliveCount: UInt32 15332 :ivar CurrentLifetimeCount: 15333 :vartype CurrentLifetimeCount: UInt32 15334 :ivar UnacknowledgedMessageCount: 15335 :vartype UnacknowledgedMessageCount: UInt32 15336 :ivar DiscardedMessageCount: 15337 :vartype DiscardedMessageCount: UInt32 15338 :ivar MonitoredItemCount: 15339 :vartype MonitoredItemCount: UInt32 15340 :ivar DisabledMonitoredItemCount: 15341 :vartype DisabledMonitoredItemCount: UInt32 15342 :ivar MonitoringQueueOverflowCount: 15343 :vartype MonitoringQueueOverflowCount: UInt32 15344 :ivar NextSequenceNumber: 15345 :vartype NextSequenceNumber: UInt32 15346 :ivar EventQueueOverFlowCount: 15347 :vartype EventQueueOverFlowCount: UInt32 15348 ''' 15349 15350 ua_types = { 15351 'SessionId': 'NodeId', 15352 'SubscriptionId': 'UInt32', 15353 'Priority': 'Byte', 15354 'PublishingInterval': 'Double', 15355 'MaxKeepAliveCount': 'UInt32', 15356 'MaxLifetimeCount': 'UInt32', 15357 'MaxNotificationsPerPublish': 'UInt32', 15358 'PublishingEnabled': 'Boolean', 15359 'ModifyCount': 'UInt32', 15360 'EnableCount': 'UInt32', 15361 'DisableCount': 'UInt32', 15362 'RepublishRequestCount': 'UInt32', 15363 'RepublishMessageRequestCount': 'UInt32', 15364 'RepublishMessageCount': 'UInt32', 15365 'TransferRequestCount': 'UInt32', 15366 'TransferredToAltClientCount': 'UInt32', 15367 'TransferredToSameClientCount': 'UInt32', 15368 'PublishRequestCount': 'UInt32', 15369 'DataChangeNotificationsCount': 'UInt32', 15370 'EventNotificationsCount': 'UInt32', 15371 'NotificationsCount': 'UInt32', 15372 'LatePublishRequestCount': 'UInt32', 15373 'CurrentKeepAliveCount': 'UInt32', 15374 'CurrentLifetimeCount': 'UInt32', 15375 'UnacknowledgedMessageCount': 'UInt32', 15376 'DiscardedMessageCount': 'UInt32', 15377 'MonitoredItemCount': 'UInt32', 15378 'DisabledMonitoredItemCount': 'UInt32', 15379 'MonitoringQueueOverflowCount': 'UInt32', 15380 'NextSequenceNumber': 'UInt32', 15381 'EventQueueOverFlowCount': 'UInt32', 15382 } 15383 15384 def __init__(self, binary=None): 15385 if binary is not None: 15386 self._binary_init(binary) 15387 self._freeze = True 15388 return 15389 self.SessionId = NodeId() 15390 self.SubscriptionId = 0 15391 self.Priority = 0 15392 self.PublishingInterval = 0 15393 self.MaxKeepAliveCount = 0 15394 self.MaxLifetimeCount = 0 15395 self.MaxNotificationsPerPublish = 0 15396 self.PublishingEnabled = True 15397 self.ModifyCount = 0 15398 self.EnableCount = 0 15399 self.DisableCount = 0 15400 self.RepublishRequestCount = 0 15401 self.RepublishMessageRequestCount = 0 15402 self.RepublishMessageCount = 0 15403 self.TransferRequestCount = 0 15404 self.TransferredToAltClientCount = 0 15405 self.TransferredToSameClientCount = 0 15406 self.PublishRequestCount = 0 15407 self.DataChangeNotificationsCount = 0 15408 self.EventNotificationsCount = 0 15409 self.NotificationsCount = 0 15410 self.LatePublishRequestCount = 0 15411 self.CurrentKeepAliveCount = 0 15412 self.CurrentLifetimeCount = 0 15413 self.UnacknowledgedMessageCount = 0 15414 self.DiscardedMessageCount = 0 15415 self.MonitoredItemCount = 0 15416 self.DisabledMonitoredItemCount = 0 15417 self.MonitoringQueueOverflowCount = 0 15418 self.NextSequenceNumber = 0 15419 self.EventQueueOverFlowCount = 0 15420 self._freeze = True 15421 15422 def to_binary(self): 15423 packet = [] 15424 packet.append(self.SessionId.to_binary()) 15425 packet.append(uabin.Primitives.UInt32.pack(self.SubscriptionId)) 15426 packet.append(uabin.Primitives.Byte.pack(self.Priority)) 15427 packet.append(uabin.Primitives.Double.pack(self.PublishingInterval)) 15428 packet.append(uabin.Primitives.UInt32.pack(self.MaxKeepAliveCount)) 15429 packet.append(uabin.Primitives.UInt32.pack(self.MaxLifetimeCount)) 15430 packet.append(uabin.Primitives.UInt32.pack(self.MaxNotificationsPerPublish)) 15431 packet.append(uabin.Primitives.Boolean.pack(self.PublishingEnabled)) 15432 packet.append(uabin.Primitives.UInt32.pack(self.ModifyCount)) 15433 packet.append(uabin.Primitives.UInt32.pack(self.EnableCount)) 15434 packet.append(uabin.Primitives.UInt32.pack(self.DisableCount)) 15435 packet.append(uabin.Primitives.UInt32.pack(self.RepublishRequestCount)) 15436 packet.append(uabin.Primitives.UInt32.pack(self.RepublishMessageRequestCount)) 15437 packet.append(uabin.Primitives.UInt32.pack(self.RepublishMessageCount)) 15438 packet.append(uabin.Primitives.UInt32.pack(self.TransferRequestCount)) 15439 packet.append(uabin.Primitives.UInt32.pack(self.TransferredToAltClientCount)) 15440 packet.append(uabin.Primitives.UInt32.pack(self.TransferredToSameClientCount)) 15441 packet.append(uabin.Primitives.UInt32.pack(self.PublishRequestCount)) 15442 packet.append(uabin.Primitives.UInt32.pack(self.DataChangeNotificationsCount)) 15443 packet.append(uabin.Primitives.UInt32.pack(self.EventNotificationsCount)) 15444 packet.append(uabin.Primitives.UInt32.pack(self.NotificationsCount)) 15445 packet.append(uabin.Primitives.UInt32.pack(self.LatePublishRequestCount)) 15446 packet.append(uabin.Primitives.UInt32.pack(self.CurrentKeepAliveCount)) 15447 packet.append(uabin.Primitives.UInt32.pack(self.CurrentLifetimeCount)) 15448 packet.append(uabin.Primitives.UInt32.pack(self.UnacknowledgedMessageCount)) 15449 packet.append(uabin.Primitives.UInt32.pack(self.DiscardedMessageCount)) 15450 packet.append(uabin.Primitives.UInt32.pack(self.MonitoredItemCount)) 15451 packet.append(uabin.Primitives.UInt32.pack(self.DisabledMonitoredItemCount)) 15452 packet.append(uabin.Primitives.UInt32.pack(self.MonitoringQueueOverflowCount)) 15453 packet.append(uabin.Primitives.UInt32.pack(self.NextSequenceNumber)) 15454 packet.append(uabin.Primitives.UInt32.pack(self.EventQueueOverFlowCount)) 15455 return b''.join(packet) 15456 15457 @staticmethod 15458 def from_binary(data): 15459 return SubscriptionDiagnosticsDataType(data) 15460 15461 def _binary_init(self, data): 15462 self.SessionId = NodeId.from_binary(data) 15463 self.SubscriptionId = uabin.Primitives.UInt32.unpack(data) 15464 self.Priority = uabin.Primitives.Byte.unpack(data) 15465 self.PublishingInterval = uabin.Primitives.Double.unpack(data) 15466 self.MaxKeepAliveCount = uabin.Primitives.UInt32.unpack(data) 15467 self.MaxLifetimeCount = uabin.Primitives.UInt32.unpack(data) 15468 self.MaxNotificationsPerPublish = uabin.Primitives.UInt32.unpack(data) 15469 self.PublishingEnabled = uabin.Primitives.Boolean.unpack(data) 15470 self.ModifyCount = uabin.Primitives.UInt32.unpack(data) 15471 self.EnableCount = uabin.Primitives.UInt32.unpack(data) 15472 self.DisableCount = uabin.Primitives.UInt32.unpack(data) 15473 self.RepublishRequestCount = uabin.Primitives.UInt32.unpack(data) 15474 self.RepublishMessageRequestCount = uabin.Primitives.UInt32.unpack(data) 15475 self.RepublishMessageCount = uabin.Primitives.UInt32.unpack(data) 15476 self.TransferRequestCount = uabin.Primitives.UInt32.unpack(data) 15477 self.TransferredToAltClientCount = uabin.Primitives.UInt32.unpack(data) 15478 self.TransferredToSameClientCount = uabin.Primitives.UInt32.unpack(data) 15479 self.PublishRequestCount = uabin.Primitives.UInt32.unpack(data) 15480 self.DataChangeNotificationsCount = uabin.Primitives.UInt32.unpack(data) 15481 self.EventNotificationsCount = uabin.Primitives.UInt32.unpack(data) 15482 self.NotificationsCount = uabin.Primitives.UInt32.unpack(data) 15483 self.LatePublishRequestCount = uabin.Primitives.UInt32.unpack(data) 15484 self.CurrentKeepAliveCount = uabin.Primitives.UInt32.unpack(data) 15485 self.CurrentLifetimeCount = uabin.Primitives.UInt32.unpack(data) 15486 self.UnacknowledgedMessageCount = uabin.Primitives.UInt32.unpack(data) 15487 self.DiscardedMessageCount = uabin.Primitives.UInt32.unpack(data) 15488 self.MonitoredItemCount = uabin.Primitives.UInt32.unpack(data) 15489 self.DisabledMonitoredItemCount = uabin.Primitives.UInt32.unpack(data) 15490 self.MonitoringQueueOverflowCount = uabin.Primitives.UInt32.unpack(data) 15491 self.NextSequenceNumber = uabin.Primitives.UInt32.unpack(data) 15492 self.EventQueueOverFlowCount = uabin.Primitives.UInt32.unpack(data) 15493 15494 def __str__(self): 15495 return 'SubscriptionDiagnosticsDataType(' + 'SessionId:' + str(self.SessionId) + ', ' + \ 15496 'SubscriptionId:' + str(self.SubscriptionId) + ', ' + \ 15497 'Priority:' + str(self.Priority) + ', ' + \ 15498 'PublishingInterval:' + str(self.PublishingInterval) + ', ' + \ 15499 'MaxKeepAliveCount:' + str(self.MaxKeepAliveCount) + ', ' + \ 15500 'MaxLifetimeCount:' + str(self.MaxLifetimeCount) + ', ' + \ 15501 'MaxNotificationsPerPublish:' + str(self.MaxNotificationsPerPublish) + ', ' + \ 15502 'PublishingEnabled:' + str(self.PublishingEnabled) + ', ' + \ 15503 'ModifyCount:' + str(self.ModifyCount) + ', ' + \ 15504 'EnableCount:' + str(self.EnableCount) + ', ' + \ 15505 'DisableCount:' + str(self.DisableCount) + ', ' + \ 15506 'RepublishRequestCount:' + str(self.RepublishRequestCount) + ', ' + \ 15507 'RepublishMessageRequestCount:' + str(self.RepublishMessageRequestCount) + ', ' + \ 15508 'RepublishMessageCount:' + str(self.RepublishMessageCount) + ', ' + \ 15509 'TransferRequestCount:' + str(self.TransferRequestCount) + ', ' + \ 15510 'TransferredToAltClientCount:' + str(self.TransferredToAltClientCount) + ', ' + \ 15511 'TransferredToSameClientCount:' + str(self.TransferredToSameClientCount) + ', ' + \ 15512 'PublishRequestCount:' + str(self.PublishRequestCount) + ', ' + \ 15513 'DataChangeNotificationsCount:' + str(self.DataChangeNotificationsCount) + ', ' + \ 15514 'EventNotificationsCount:' + str(self.EventNotificationsCount) + ', ' + \ 15515 'NotificationsCount:' + str(self.NotificationsCount) + ', ' + \ 15516 'LatePublishRequestCount:' + str(self.LatePublishRequestCount) + ', ' + \ 15517 'CurrentKeepAliveCount:' + str(self.CurrentKeepAliveCount) + ', ' + \ 15518 'CurrentLifetimeCount:' + str(self.CurrentLifetimeCount) + ', ' + \ 15519 'UnacknowledgedMessageCount:' + str(self.UnacknowledgedMessageCount) + ', ' + \ 15520 'DiscardedMessageCount:' + str(self.DiscardedMessageCount) + ', ' + \ 15521 'MonitoredItemCount:' + str(self.MonitoredItemCount) + ', ' + \ 15522 'DisabledMonitoredItemCount:' + str(self.DisabledMonitoredItemCount) + ', ' + \ 15523 'MonitoringQueueOverflowCount:' + str(self.MonitoringQueueOverflowCount) + ', ' + \ 15524 'NextSequenceNumber:' + str(self.NextSequenceNumber) + ', ' + \ 15525 'EventQueueOverFlowCount:' + str(self.EventQueueOverFlowCount) + ')' 15526 15527 __repr__ = __str__ 15528 15529 15530 class ModelChangeStructureDataType(FrozenClass): 15531 ''' 15532 :ivar Affected: 15533 :vartype Affected: NodeId 15534 :ivar AffectedType: 15535 :vartype AffectedType: NodeId 15536 :ivar Verb: 15537 :vartype Verb: Byte 15538 ''' 15539 15540 ua_types = { 15541 'Affected': 'NodeId', 15542 'AffectedType': 'NodeId', 15543 'Verb': 'Byte', 15544 } 15545 15546 def __init__(self, binary=None): 15547 if binary is not None: 15548 self._binary_init(binary) 15549 self._freeze = True 15550 return 15551 self.Affected = NodeId() 15552 self.AffectedType = NodeId() 15553 self.Verb = 0 15554 self._freeze = True 15555 15556 def to_binary(self): 15557 packet = [] 15558 packet.append(self.Affected.to_binary()) 15559 packet.append(self.AffectedType.to_binary()) 15560 packet.append(uabin.Primitives.Byte.pack(self.Verb)) 15561 return b''.join(packet) 15562 15563 @staticmethod 15564 def from_binary(data): 15565 return ModelChangeStructureDataType(data) 15566 15567 def _binary_init(self, data): 15568 self.Affected = NodeId.from_binary(data) 15569 self.AffectedType = NodeId.from_binary(data) 15570 self.Verb = uabin.Primitives.Byte.unpack(data) 15571 15572 def __str__(self): 15573 return 'ModelChangeStructureDataType(' + 'Affected:' + str(self.Affected) + ', ' + \ 15574 'AffectedType:' + str(self.AffectedType) + ', ' + \ 15575 'Verb:' + str(self.Verb) + ')' 15576 15577 __repr__ = __str__ 15578 15579 15580 class SemanticChangeStructureDataType(FrozenClass): 15581 ''' 15582 :ivar Affected: 15583 :vartype Affected: NodeId 15584 :ivar AffectedType: 15585 :vartype AffectedType: NodeId 15586 ''' 15587 15588 ua_types = { 15589 'Affected': 'NodeId', 15590 'AffectedType': 'NodeId', 15591 } 15592 15593 def __init__(self, binary=None): 15594 if binary is not None: 15595 self._binary_init(binary) 15596 self._freeze = True 15597 return 15598 self.Affected = NodeId() 15599 self.AffectedType = NodeId() 15600 self._freeze = True 15601 15602 def to_binary(self): 15603 packet = [] 15604 packet.append(self.Affected.to_binary()) 15605 packet.append(self.AffectedType.to_binary()) 15606 return b''.join(packet) 15607 15608 @staticmethod 15609 def from_binary(data): 15610 return SemanticChangeStructureDataType(data) 15611 15612 def _binary_init(self, data): 15613 self.Affected = NodeId.from_binary(data) 15614 self.AffectedType = NodeId.from_binary(data) 15615 15616 def __str__(self): 15617 return 'SemanticChangeStructureDataType(' + 'Affected:' + str(self.Affected) + ', ' + \ 15618 'AffectedType:' + str(self.AffectedType) + ')' 15619 15620 __repr__ = __str__ 15621 15622 15623 class Range(FrozenClass): 15624 ''' 15625 :ivar Low: 15626 :vartype Low: Double 15627 :ivar High: 15628 :vartype High: Double 15629 ''' 15630 15631 ua_types = { 15632 'Low': 'Double', 15633 'High': 'Double', 15634 } 15635 15636 def __init__(self, binary=None): 15637 if binary is not None: 15638 self._binary_init(binary) 15639 self._freeze = True 15640 return 15641 self.Low = 0 15642 self.High = 0 15643 self._freeze = True 15644 15645 def to_binary(self): 15646 packet = [] 15647 packet.append(uabin.Primitives.Double.pack(self.Low)) 15648 packet.append(uabin.Primitives.Double.pack(self.High)) 15649 return b''.join(packet) 15650 15651 @staticmethod 15652 def from_binary(data): 15653 return Range(data) 15654 15655 def _binary_init(self, data): 15656 self.Low = uabin.Primitives.Double.unpack(data) 15657 self.High = uabin.Primitives.Double.unpack(data) 15658 15659 def __str__(self): 15660 return 'Range(' + 'Low:' + str(self.Low) + ', ' + \ 15661 'High:' + str(self.High) + ')' 15662 15663 __repr__ = __str__ 15664 15665 15666 class EUInformation(FrozenClass): 15667 ''' 15668 :ivar NamespaceUri: 15669 :vartype NamespaceUri: String 15670 :ivar UnitId: 15671 :vartype UnitId: Int32 15672 :ivar DisplayName: 15673 :vartype DisplayName: LocalizedText 15674 :ivar Description: 15675 :vartype Description: LocalizedText 15676 ''' 15677 15678 ua_types = { 15679 'NamespaceUri': 'String', 15680 'UnitId': 'Int32', 15681 'DisplayName': 'LocalizedText', 15682 'Description': 'LocalizedText', 15683 } 15684 15685 def __init__(self, binary=None): 15686 if binary is not None: 15687 self._binary_init(binary) 15688 self._freeze = True 15689 return 15690 self.NamespaceUri = None 15691 self.UnitId = 0 15692 self.DisplayName = LocalizedText() 15693 self.Description = LocalizedText() 15694 self._freeze = True 15695 15696 def to_binary(self): 15697 packet = [] 15698 packet.append(uabin.Primitives.String.pack(self.NamespaceUri)) 15699 packet.append(uabin.Primitives.Int32.pack(self.UnitId)) 15700 packet.append(self.DisplayName.to_binary()) 15701 packet.append(self.Description.to_binary()) 15702 return b''.join(packet) 15703 15704 @staticmethod 15705 def from_binary(data): 15706 return EUInformation(data) 15707 15708 def _binary_init(self, data): 15709 self.NamespaceUri = uabin.Primitives.String.unpack(data) 15710 self.UnitId = uabin.Primitives.Int32.unpack(data) 15711 self.DisplayName = LocalizedText.from_binary(data) 15712 self.Description = LocalizedText.from_binary(data) 15713 15714 def __str__(self): 15715 return 'EUInformation(' + 'NamespaceUri:' + str(self.NamespaceUri) + ', ' + \ 15716 'UnitId:' + str(self.UnitId) + ', ' + \ 15717 'DisplayName:' + str(self.DisplayName) + ', ' + \ 15718 'Description:' + str(self.Description) + ')' 15719 15720 __repr__ = __str__ 15721 15722 15723 class ComplexNumberType(FrozenClass): 15724 ''' 15725 :ivar Real: 15726 :vartype Real: Float 15727 :ivar Imaginary: 15728 :vartype Imaginary: Float 15729 ''' 15730 15731 ua_types = { 15732 'Real': 'Float', 15733 'Imaginary': 'Float', 15734 } 15735 15736 def __init__(self, binary=None): 15737 if binary is not None: 15738 self._binary_init(binary) 15739 self._freeze = True 15740 return 15741 self.Real = 0 15742 self.Imaginary = 0 15743 self._freeze = True 15744 15745 def to_binary(self): 15746 packet = [] 15747 packet.append(uabin.Primitives.Float.pack(self.Real)) 15748 packet.append(uabin.Primitives.Float.pack(self.Imaginary)) 15749 return b''.join(packet) 15750 15751 @staticmethod 15752 def from_binary(data): 15753 return ComplexNumberType(data) 15754 15755 def _binary_init(self, data): 15756 self.Real = uabin.Primitives.Float.unpack(data) 15757 self.Imaginary = uabin.Primitives.Float.unpack(data) 15758 15759 def __str__(self): 15760 return 'ComplexNumberType(' + 'Real:' + str(self.Real) + ', ' + \ 15761 'Imaginary:' + str(self.Imaginary) + ')' 15762 15763 __repr__ = __str__ 15764 15765 15766 class DoubleComplexNumberType(FrozenClass): 15767 ''' 15768 :ivar Real: 15769 :vartype Real: Double 15770 :ivar Imaginary: 15771 :vartype Imaginary: Double 15772 ''' 15773 15774 ua_types = { 15775 'Real': 'Double', 15776 'Imaginary': 'Double', 15777 } 15778 15779 def __init__(self, binary=None): 15780 if binary is not None: 15781 self._binary_init(binary) 15782 self._freeze = True 15783 return 15784 self.Real = 0 15785 self.Imaginary = 0 15786 self._freeze = True 15787 15788 def to_binary(self): 15789 packet = [] 15790 packet.append(uabin.Primitives.Double.pack(self.Real)) 15791 packet.append(uabin.Primitives.Double.pack(self.Imaginary)) 15792 return b''.join(packet) 15793 15794 @staticmethod 15795 def from_binary(data): 15796 return DoubleComplexNumberType(data) 15797 15798 def _binary_init(self, data): 15799 self.Real = uabin.Primitives.Double.unpack(data) 15800 self.Imaginary = uabin.Primitives.Double.unpack(data) 15801 15802 def __str__(self): 15803 return 'DoubleComplexNumberType(' + 'Real:' + str(self.Real) + ', ' + \ 15804 'Imaginary:' + str(self.Imaginary) + ')' 15805 15806 __repr__ = __str__ 15807 15808 15809 class AxisInformation(FrozenClass): 15810 ''' 15811 :ivar EngineeringUnits: 15812 :vartype EngineeringUnits: EUInformation 15813 :ivar EURange: 15814 :vartype EURange: Range 15815 :ivar Title: 15816 :vartype Title: LocalizedText 15817 :ivar AxisScaleType: 15818 :vartype AxisScaleType: AxisScaleEnumeration 15819 :ivar AxisSteps: 15820 :vartype AxisSteps: Double 15821 ''' 15822 15823 ua_types = { 15824 'EngineeringUnits': 'EUInformation', 15825 'EURange': 'Range', 15826 'Title': 'LocalizedText', 15827 'AxisScaleType': 'AxisScaleEnumeration', 15828 'AxisSteps': 'Double', 15829 } 15830 15831 def __init__(self, binary=None): 15832 if binary is not None: 15833 self._binary_init(binary) 15834 self._freeze = True 15835 return 15836 self.EngineeringUnits = EUInformation() 15837 self.EURange = Range() 15838 self.Title = LocalizedText() 15839 self.AxisScaleType = AxisScaleEnumeration(0) 15840 self.AxisSteps = [] 15841 self._freeze = True 15842 15843 def to_binary(self): 15844 packet = [] 15845 packet.append(self.EngineeringUnits.to_binary()) 15846 packet.append(self.EURange.to_binary()) 15847 packet.append(self.Title.to_binary()) 15848 packet.append(uabin.Primitives.UInt32.pack(self.AxisScaleType.value)) 15849 packet.append(uabin.Primitives.Int32.pack(len(self.AxisSteps))) 15850 for fieldname in self.AxisSteps: 15851 packet.append(uabin.Primitives.Double.pack(fieldname)) 15852 return b''.join(packet) 15853 15854 @staticmethod 15855 def from_binary(data): 15856 return AxisInformation(data) 15857 15858 def _binary_init(self, data): 15859 self.EngineeringUnits = EUInformation.from_binary(data) 15860 self.EURange = Range.from_binary(data) 15861 self.Title = LocalizedText.from_binary(data) 15862 self.AxisScaleType = AxisScaleEnumeration(uabin.Primitives.UInt32.unpack(data)) 15863 self.AxisSteps = uabin.Primitives.Double.unpack_array(data) 15864 15865 def __str__(self): 15866 return 'AxisInformation(' + 'EngineeringUnits:' + str(self.EngineeringUnits) + ', ' + \ 15867 'EURange:' + str(self.EURange) + ', ' + \ 15868 'Title:' + str(self.Title) + ', ' + \ 15869 'AxisScaleType:' + str(self.AxisScaleType) + ', ' + \ 15870 'AxisSteps:' + str(self.AxisSteps) + ')' 15871 15872 __repr__ = __str__ 15873 15874 15875 class XVType(FrozenClass): 15876 ''' 15877 :ivar X: 15878 :vartype X: Double 15879 :ivar Value: 15880 :vartype Value: Float 15881 ''' 15882 15883 ua_types = { 15884 'X': 'Double', 15885 'Value': 'Float', 15886 } 15887 15888 def __init__(self, binary=None): 15889 if binary is not None: 15890 self._binary_init(binary) 15891 self._freeze = True 15892 return 15893 self.X = 0 15894 self.Value = 0 15895 self._freeze = True 15896 15897 def to_binary(self): 15898 packet = [] 15899 packet.append(uabin.Primitives.Double.pack(self.X)) 15900 packet.append(uabin.Primitives.Float.pack(self.Value)) 15901 return b''.join(packet) 15902 15903 @staticmethod 15904 def from_binary(data): 15905 return XVType(data) 15906 15907 def _binary_init(self, data): 15908 self.X = uabin.Primitives.Double.unpack(data) 15909 self.Value = uabin.Primitives.Float.unpack(data) 15910 15911 def __str__(self): 15912 return 'XVType(' + 'X:' + str(self.X) + ', ' + \ 15913 'Value:' + str(self.Value) + ')' 15914 15915 __repr__ = __str__ 15916 15917 15918 class ProgramDiagnosticDataType(FrozenClass): 15919 ''' 15920 :ivar CreateSessionId: 15921 :vartype CreateSessionId: NodeId 15922 :ivar CreateClientName: 15923 :vartype CreateClientName: String 15924 :ivar InvocationCreationTime: 15925 :vartype InvocationCreationTime: DateTime 15926 :ivar LastTransitionTime: 15927 :vartype LastTransitionTime: DateTime 15928 :ivar LastMethodCall: 15929 :vartype LastMethodCall: String 15930 :ivar LastMethodSessionId: 15931 :vartype LastMethodSessionId: NodeId 15932 :ivar LastMethodInputArguments: 15933 :vartype LastMethodInputArguments: Argument 15934 :ivar LastMethodOutputArguments: 15935 :vartype LastMethodOutputArguments: Argument 15936 :ivar LastMethodCallTime: 15937 :vartype LastMethodCallTime: DateTime 15938 :ivar LastMethodReturnStatus: 15939 :vartype LastMethodReturnStatus: StatusResult 15940 ''' 15941 15942 ua_types = { 15943 'CreateSessionId': 'NodeId', 15944 'CreateClientName': 'String', 15945 'InvocationCreationTime': 'DateTime', 15946 'LastTransitionTime': 'DateTime', 15947 'LastMethodCall': 'String', 15948 'LastMethodSessionId': 'NodeId', 15949 'LastMethodInputArguments': 'Argument', 15950 'LastMethodOutputArguments': 'Argument', 15951 'LastMethodCallTime': 'DateTime', 15952 'LastMethodReturnStatus': 'StatusResult', 15953 } 15954 15955 def __init__(self, binary=None): 15956 if binary is not None: 15957 self._binary_init(binary) 15958 self._freeze = True 15959 return 15960 self.CreateSessionId = NodeId() 15961 self.CreateClientName = None 15962 self.InvocationCreationTime = datetime.now() 15963 self.LastTransitionTime = datetime.now() 15964 self.LastMethodCall = None 15965 self.LastMethodSessionId = NodeId() 15966 self.LastMethodInputArguments = [] 15967 self.LastMethodOutputArguments = [] 15968 self.LastMethodCallTime = datetime.now() 15969 self.LastMethodReturnStatus = StatusResult() 15970 self._freeze = True 15971 15972 def to_binary(self): 15973 packet = [] 15974 packet.append(self.CreateSessionId.to_binary()) 15975 packet.append(uabin.Primitives.String.pack(self.CreateClientName)) 15976 packet.append(uabin.Primitives.DateTime.pack(self.InvocationCreationTime)) 15977 packet.append(uabin.Primitives.DateTime.pack(self.LastTransitionTime)) 15978 packet.append(uabin.Primitives.String.pack(self.LastMethodCall)) 15979 packet.append(self.LastMethodSessionId.to_binary()) 15980 packet.append(uabin.Primitives.Int32.pack(len(self.LastMethodInputArguments))) 15981 for fieldname in self.LastMethodInputArguments: 15982 packet.append(fieldname.to_binary()) 15983 packet.append(uabin.Primitives.Int32.pack(len(self.LastMethodOutputArguments))) 15984 for fieldname in self.LastMethodOutputArguments: 15985 packet.append(fieldname.to_binary()) 15986 packet.append(uabin.Primitives.DateTime.pack(self.LastMethodCallTime)) 15987 packet.append(self.LastMethodReturnStatus.to_binary()) 15988 return b''.join(packet) 15989 15990 @staticmethod 15991 def from_binary(data): 15992 return ProgramDiagnosticDataType(data) 15993 15994 def _binary_init(self, data): 15995 self.CreateSessionId = NodeId.from_binary(data) 15996 self.CreateClientName = uabin.Primitives.String.unpack(data) 15997 self.InvocationCreationTime = uabin.Primitives.DateTime.unpack(data) 15998 self.LastTransitionTime = uabin.Primitives.DateTime.unpack(data) 15999 self.LastMethodCall = uabin.Primitives.String.unpack(data) 16000 self.LastMethodSessionId = NodeId.from_binary(data) 16001 length = uabin.Primitives.Int32.unpack(data) 16002 array = [] 16003 if length != -1: 16004 for _ in range(0, length): 16005 array.append(Argument.from_binary(data)) 16006 self.LastMethodInputArguments = array 16007 length = uabin.Primitives.Int32.unpack(data) 16008 array = [] 16009 if length != -1: 16010 for _ in range(0, length): 16011 array.append(Argument.from_binary(data)) 16012 self.LastMethodOutputArguments = array 16013 self.LastMethodCallTime = uabin.Primitives.DateTime.unpack(data) 16014 self.LastMethodReturnStatus = StatusResult.from_binary(data) 16015 16016 def __str__(self): 16017 return 'ProgramDiagnosticDataType(' + 'CreateSessionId:' + str(self.CreateSessionId) + ', ' + \ 16018 'CreateClientName:' + str(self.CreateClientName) + ', ' + \ 16019 'InvocationCreationTime:' + str(self.InvocationCreationTime) + ', ' + \ 16020 'LastTransitionTime:' + str(self.LastTransitionTime) + ', ' + \ 16021 'LastMethodCall:' + str(self.LastMethodCall) + ', ' + \ 16022 'LastMethodSessionId:' + str(self.LastMethodSessionId) + ', ' + \ 16023 'LastMethodInputArguments:' + str(self.LastMethodInputArguments) + ', ' + \ 16024 'LastMethodOutputArguments:' + str(self.LastMethodOutputArguments) + ', ' + \ 16025 'LastMethodCallTime:' + str(self.LastMethodCallTime) + ', ' + \ 16026 'LastMethodReturnStatus:' + str(self.LastMethodReturnStatus) + ')' 16027 16028 __repr__ = __str__ 16029 16030 16031 class Annotation(FrozenClass): 16032 ''' 16033 :ivar Message: 16034 :vartype Message: String 16035 :ivar UserName: 16036 :vartype UserName: String 16037 :ivar AnnotationTime: 16038 :vartype AnnotationTime: DateTime 16039 ''' 16040 16041 ua_types = { 16042 'Message': 'String', 16043 'UserName': 'String', 16044 'AnnotationTime': 'DateTime', 16045 } 16046 16047 def __init__(self, binary=None): 16048 if binary is not None: 16049 self._binary_init(binary) 16050 self._freeze = True 16051 return 16052 self.Message = None 16053 self.UserName = None 16054 self.AnnotationTime = datetime.now() 16055 self._freeze = True 16056 16057 def to_binary(self): 16058 packet = [] 16059 packet.append(uabin.Primitives.String.pack(self.Message)) 16060 packet.append(uabin.Primitives.String.pack(self.UserName)) 16061 packet.append(uabin.Primitives.DateTime.pack(self.AnnotationTime)) 16062 return b''.join(packet) 16063 16064 @staticmethod 16065 def from_binary(data): 16066 return Annotation(data) 16067 16068 def _binary_init(self, data): 16069 self.Message = uabin.Primitives.String.unpack(data) 16070 self.UserName = uabin.Primitives.String.unpack(data) 16071 self.AnnotationTime = uabin.Primitives.DateTime.unpack(data) 16072 16073 def __str__(self): 16074 return 'Annotation(' + 'Message:' + str(self.Message) + ', ' + \ 16075 'UserName:' + str(self.UserName) + ', ' + \ 16076 'AnnotationTime:' + str(self.AnnotationTime) + ')' 16077 16078 __repr__ = __str__ 16079 16080 16081 ExtensionClasses = { 16082 ObjectIds.TrustListDataType_Encoding_DefaultBinary: TrustListDataType, 16083 ObjectIds.Argument_Encoding_DefaultBinary: Argument, 16084 ObjectIds.EnumValueType_Encoding_DefaultBinary: EnumValueType, 16085 ObjectIds.OptionSet_Encoding_DefaultBinary: OptionSet, 16086 ObjectIds.Union_Encoding_DefaultBinary: Union, 16087 ObjectIds.TimeZoneDataType_Encoding_DefaultBinary: TimeZoneDataType, 16088 ObjectIds.ApplicationDescription_Encoding_DefaultBinary: ApplicationDescription, 16089 ObjectIds.RequestHeader_Encoding_DefaultBinary: RequestHeader, 16090 ObjectIds.ResponseHeader_Encoding_DefaultBinary: ResponseHeader, 16091 ObjectIds.ServiceFault_Encoding_DefaultBinary: ServiceFault, 16092 ObjectIds.FindServersRequest_Encoding_DefaultBinary: FindServersRequest, 16093 ObjectIds.FindServersResponse_Encoding_DefaultBinary: FindServersResponse, 16094 ObjectIds.ServerOnNetwork_Encoding_DefaultBinary: ServerOnNetwork, 16095 ObjectIds.FindServersOnNetworkRequest_Encoding_DefaultBinary: FindServersOnNetworkRequest, 16096 ObjectIds.FindServersOnNetworkResponse_Encoding_DefaultBinary: FindServersOnNetworkResponse, 16097 ObjectIds.UserTokenPolicy_Encoding_DefaultBinary: UserTokenPolicy, 16098 ObjectIds.EndpointDescription_Encoding_DefaultBinary: EndpointDescription, 16099 ObjectIds.GetEndpointsRequest_Encoding_DefaultBinary: GetEndpointsRequest, 16100 ObjectIds.GetEndpointsResponse_Encoding_DefaultBinary: GetEndpointsResponse, 16101 ObjectIds.RegisteredServer_Encoding_DefaultBinary: RegisteredServer, 16102 ObjectIds.RegisterServerRequest_Encoding_DefaultBinary: RegisterServerRequest, 16103 ObjectIds.RegisterServerResponse_Encoding_DefaultBinary: RegisterServerResponse, 16104 ObjectIds.DiscoveryConfiguration_Encoding_DefaultBinary: DiscoveryConfiguration, 16105 ObjectIds.MdnsDiscoveryConfiguration_Encoding_DefaultBinary: MdnsDiscoveryConfiguration, 16106 ObjectIds.RegisterServer2Request_Encoding_DefaultBinary: RegisterServer2Request, 16107 ObjectIds.RegisterServer2Response_Encoding_DefaultBinary: RegisterServer2Response, 16108 ObjectIds.ChannelSecurityToken_Encoding_DefaultBinary: ChannelSecurityToken, 16109 ObjectIds.OpenSecureChannelRequest_Encoding_DefaultBinary: OpenSecureChannelRequest, 16110 ObjectIds.OpenSecureChannelResponse_Encoding_DefaultBinary: OpenSecureChannelResponse, 16111 ObjectIds.CloseSecureChannelRequest_Encoding_DefaultBinary: CloseSecureChannelRequest, 16112 ObjectIds.CloseSecureChannelResponse_Encoding_DefaultBinary: CloseSecureChannelResponse, 16113 ObjectIds.SignedSoftwareCertificate_Encoding_DefaultBinary: SignedSoftwareCertificate, 16114 ObjectIds.SignatureData_Encoding_DefaultBinary: SignatureData, 16115 ObjectIds.CreateSessionRequest_Encoding_DefaultBinary: CreateSessionRequest, 16116 ObjectIds.CreateSessionResponse_Encoding_DefaultBinary: CreateSessionResponse, 16117 ObjectIds.UserIdentityToken_Encoding_DefaultBinary: UserIdentityToken, 16118 ObjectIds.AnonymousIdentityToken_Encoding_DefaultBinary: AnonymousIdentityToken, 16119 ObjectIds.UserNameIdentityToken_Encoding_DefaultBinary: UserNameIdentityToken, 16120 ObjectIds.X509IdentityToken_Encoding_DefaultBinary: X509IdentityToken, 16121 ObjectIds.KerberosIdentityToken_Encoding_DefaultBinary: KerberosIdentityToken, 16122 ObjectIds.IssuedIdentityToken_Encoding_DefaultBinary: IssuedIdentityToken, 16123 ObjectIds.ActivateSessionRequest_Encoding_DefaultBinary: ActivateSessionRequest, 16124 ObjectIds.ActivateSessionResponse_Encoding_DefaultBinary: ActivateSessionResponse, 16125 ObjectIds.CloseSessionRequest_Encoding_DefaultBinary: CloseSessionRequest, 16126 ObjectIds.CloseSessionResponse_Encoding_DefaultBinary: CloseSessionResponse, 16127 ObjectIds.CancelRequest_Encoding_DefaultBinary: CancelRequest, 16128 ObjectIds.CancelResponse_Encoding_DefaultBinary: CancelResponse, 16129 ObjectIds.NodeAttributes_Encoding_DefaultBinary: NodeAttributes, 16130 ObjectIds.ObjectAttributes_Encoding_DefaultBinary: ObjectAttributes, 16131 ObjectIds.VariableAttributes_Encoding_DefaultBinary: VariableAttributes, 16132 ObjectIds.MethodAttributes_Encoding_DefaultBinary: MethodAttributes, 16133 ObjectIds.ObjectTypeAttributes_Encoding_DefaultBinary: ObjectTypeAttributes, 16134 ObjectIds.VariableTypeAttributes_Encoding_DefaultBinary: VariableTypeAttributes, 16135 ObjectIds.ReferenceTypeAttributes_Encoding_DefaultBinary: ReferenceTypeAttributes, 16136 ObjectIds.DataTypeAttributes_Encoding_DefaultBinary: DataTypeAttributes, 16137 ObjectIds.ViewAttributes_Encoding_DefaultBinary: ViewAttributes, 16138 ObjectIds.AddNodesItem_Encoding_DefaultBinary: AddNodesItem, 16139 ObjectIds.AddNodesResult_Encoding_DefaultBinary: AddNodesResult, 16140 ObjectIds.AddNodesRequest_Encoding_DefaultBinary: AddNodesRequest, 16141 ObjectIds.AddNodesResponse_Encoding_DefaultBinary: AddNodesResponse, 16142 ObjectIds.AddReferencesItem_Encoding_DefaultBinary: AddReferencesItem, 16143 ObjectIds.AddReferencesRequest_Encoding_DefaultBinary: AddReferencesRequest, 16144 ObjectIds.AddReferencesResponse_Encoding_DefaultBinary: AddReferencesResponse, 16145 ObjectIds.DeleteNodesItem_Encoding_DefaultBinary: DeleteNodesItem, 16146 ObjectIds.DeleteNodesRequest_Encoding_DefaultBinary: DeleteNodesRequest, 16147 ObjectIds.DeleteNodesResponse_Encoding_DefaultBinary: DeleteNodesResponse, 16148 ObjectIds.DeleteReferencesItem_Encoding_DefaultBinary: DeleteReferencesItem, 16149 ObjectIds.DeleteReferencesRequest_Encoding_DefaultBinary: DeleteReferencesRequest, 16150 ObjectIds.DeleteReferencesResponse_Encoding_DefaultBinary: DeleteReferencesResponse, 16151 ObjectIds.ViewDescription_Encoding_DefaultBinary: ViewDescription, 16152 ObjectIds.BrowseDescription_Encoding_DefaultBinary: BrowseDescription, 16153 ObjectIds.ReferenceDescription_Encoding_DefaultBinary: ReferenceDescription, 16154 ObjectIds.BrowseResult_Encoding_DefaultBinary: BrowseResult, 16155 ObjectIds.BrowseRequest_Encoding_DefaultBinary: BrowseRequest, 16156 ObjectIds.BrowseResponse_Encoding_DefaultBinary: BrowseResponse, 16157 ObjectIds.BrowseNextRequest_Encoding_DefaultBinary: BrowseNextRequest, 16158 ObjectIds.BrowseNextResponse_Encoding_DefaultBinary: BrowseNextResponse, 16159 ObjectIds.RelativePathElement_Encoding_DefaultBinary: RelativePathElement, 16160 ObjectIds.RelativePath_Encoding_DefaultBinary: RelativePath, 16161 ObjectIds.BrowsePath_Encoding_DefaultBinary: BrowsePath, 16162 ObjectIds.BrowsePathTarget_Encoding_DefaultBinary: BrowsePathTarget, 16163 ObjectIds.BrowsePathResult_Encoding_DefaultBinary: BrowsePathResult, 16164 ObjectIds.TranslateBrowsePathsToNodeIdsRequest_Encoding_DefaultBinary: TranslateBrowsePathsToNodeIdsRequest, 16165 ObjectIds.TranslateBrowsePathsToNodeIdsResponse_Encoding_DefaultBinary: TranslateBrowsePathsToNodeIdsResponse, 16166 ObjectIds.RegisterNodesRequest_Encoding_DefaultBinary: RegisterNodesRequest, 16167 ObjectIds.RegisterNodesResponse_Encoding_DefaultBinary: RegisterNodesResponse, 16168 ObjectIds.UnregisterNodesRequest_Encoding_DefaultBinary: UnregisterNodesRequest, 16169 ObjectIds.UnregisterNodesResponse_Encoding_DefaultBinary: UnregisterNodesResponse, 16170 ObjectIds.EndpointConfiguration_Encoding_DefaultBinary: EndpointConfiguration, 16171 ObjectIds.SupportedProfile_Encoding_DefaultBinary: SupportedProfile, 16172 ObjectIds.SoftwareCertificate_Encoding_DefaultBinary: SoftwareCertificate, 16173 ObjectIds.QueryDataDescription_Encoding_DefaultBinary: QueryDataDescription, 16174 ObjectIds.NodeTypeDescription_Encoding_DefaultBinary: NodeTypeDescription, 16175 ObjectIds.QueryDataSet_Encoding_DefaultBinary: QueryDataSet, 16176 ObjectIds.NodeReference_Encoding_DefaultBinary: NodeReference, 16177 ObjectIds.ContentFilterElement_Encoding_DefaultBinary: ContentFilterElement, 16178 ObjectIds.ContentFilter_Encoding_DefaultBinary: ContentFilter, 16179 ObjectIds.ElementOperand_Encoding_DefaultBinary: ElementOperand, 16180 ObjectIds.LiteralOperand_Encoding_DefaultBinary: LiteralOperand, 16181 ObjectIds.AttributeOperand_Encoding_DefaultBinary: AttributeOperand, 16182 ObjectIds.SimpleAttributeOperand_Encoding_DefaultBinary: SimpleAttributeOperand, 16183 ObjectIds.ContentFilterElementResult_Encoding_DefaultBinary: ContentFilterElementResult, 16184 ObjectIds.ContentFilterResult_Encoding_DefaultBinary: ContentFilterResult, 16185 ObjectIds.ParsingResult_Encoding_DefaultBinary: ParsingResult, 16186 ObjectIds.QueryFirstRequest_Encoding_DefaultBinary: QueryFirstRequest, 16187 ObjectIds.QueryFirstResponse_Encoding_DefaultBinary: QueryFirstResponse, 16188 ObjectIds.QueryNextRequest_Encoding_DefaultBinary: QueryNextRequest, 16189 ObjectIds.QueryNextResponse_Encoding_DefaultBinary: QueryNextResponse, 16190 ObjectIds.ReadValueId_Encoding_DefaultBinary: ReadValueId, 16191 ObjectIds.ReadRequest_Encoding_DefaultBinary: ReadRequest, 16192 ObjectIds.ReadResponse_Encoding_DefaultBinary: ReadResponse, 16193 ObjectIds.HistoryReadValueId_Encoding_DefaultBinary: HistoryReadValueId, 16194 ObjectIds.HistoryReadResult_Encoding_DefaultBinary: HistoryReadResult, 16195 ObjectIds.HistoryReadDetails_Encoding_DefaultBinary: HistoryReadDetails, 16196 ObjectIds.ReadEventDetails_Encoding_DefaultBinary: ReadEventDetails, 16197 ObjectIds.ReadRawModifiedDetails_Encoding_DefaultBinary: ReadRawModifiedDetails, 16198 ObjectIds.ReadProcessedDetails_Encoding_DefaultBinary: ReadProcessedDetails, 16199 ObjectIds.ReadAtTimeDetails_Encoding_DefaultBinary: ReadAtTimeDetails, 16200 ObjectIds.HistoryData_Encoding_DefaultBinary: HistoryData, 16201 ObjectIds.ModificationInfo_Encoding_DefaultBinary: ModificationInfo, 16202 ObjectIds.HistoryModifiedData_Encoding_DefaultBinary: HistoryModifiedData, 16203 ObjectIds.HistoryEvent_Encoding_DefaultBinary: HistoryEvent, 16204 ObjectIds.HistoryReadRequest_Encoding_DefaultBinary: HistoryReadRequest, 16205 ObjectIds.HistoryReadResponse_Encoding_DefaultBinary: HistoryReadResponse, 16206 ObjectIds.WriteValue_Encoding_DefaultBinary: WriteValue, 16207 ObjectIds.WriteRequest_Encoding_DefaultBinary: WriteRequest, 16208 ObjectIds.WriteResponse_Encoding_DefaultBinary: WriteResponse, 16209 ObjectIds.HistoryUpdateDetails_Encoding_DefaultBinary: HistoryUpdateDetails, 16210 ObjectIds.UpdateDataDetails_Encoding_DefaultBinary: UpdateDataDetails, 16211 ObjectIds.UpdateStructureDataDetails_Encoding_DefaultBinary: UpdateStructureDataDetails, 16212 ObjectIds.UpdateEventDetails_Encoding_DefaultBinary: UpdateEventDetails, 16213 ObjectIds.DeleteRawModifiedDetails_Encoding_DefaultBinary: DeleteRawModifiedDetails, 16214 ObjectIds.DeleteAtTimeDetails_Encoding_DefaultBinary: DeleteAtTimeDetails, 16215 ObjectIds.DeleteEventDetails_Encoding_DefaultBinary: DeleteEventDetails, 16216 ObjectIds.HistoryUpdateResult_Encoding_DefaultBinary: HistoryUpdateResult, 16217 ObjectIds.HistoryUpdateRequest_Encoding_DefaultBinary: HistoryUpdateRequest, 16218 ObjectIds.HistoryUpdateResponse_Encoding_DefaultBinary: HistoryUpdateResponse, 16219 ObjectIds.CallMethodRequest_Encoding_DefaultBinary: CallMethodRequest, 16220 ObjectIds.CallMethodResult_Encoding_DefaultBinary: CallMethodResult, 16221 ObjectIds.CallRequest_Encoding_DefaultBinary: CallRequest, 16222 ObjectIds.CallResponse_Encoding_DefaultBinary: CallResponse, 16223 ObjectIds.MonitoringFilter_Encoding_DefaultBinary: MonitoringFilter, 16224 ObjectIds.DataChangeFilter_Encoding_DefaultBinary: DataChangeFilter, 16225 ObjectIds.EventFilter_Encoding_DefaultBinary: EventFilter, 16226 ObjectIds.AggregateConfiguration_Encoding_DefaultBinary: AggregateConfiguration, 16227 ObjectIds.AggregateFilter_Encoding_DefaultBinary: AggregateFilter, 16228 ObjectIds.MonitoringFilterResult_Encoding_DefaultBinary: MonitoringFilterResult, 16229 ObjectIds.EventFilterResult_Encoding_DefaultBinary: EventFilterResult, 16230 ObjectIds.AggregateFilterResult_Encoding_DefaultBinary: AggregateFilterResult, 16231 ObjectIds.MonitoringParameters_Encoding_DefaultBinary: MonitoringParameters, 16232 ObjectIds.MonitoredItemCreateRequest_Encoding_DefaultBinary: MonitoredItemCreateRequest, 16233 ObjectIds.MonitoredItemCreateResult_Encoding_DefaultBinary: MonitoredItemCreateResult, 16234 ObjectIds.CreateMonitoredItemsRequest_Encoding_DefaultBinary: CreateMonitoredItemsRequest, 16235 ObjectIds.CreateMonitoredItemsResponse_Encoding_DefaultBinary: CreateMonitoredItemsResponse, 16236 ObjectIds.MonitoredItemModifyRequest_Encoding_DefaultBinary: MonitoredItemModifyRequest, 16237 ObjectIds.MonitoredItemModifyResult_Encoding_DefaultBinary: MonitoredItemModifyResult, 16238 ObjectIds.ModifyMonitoredItemsRequest_Encoding_DefaultBinary: ModifyMonitoredItemsRequest, 16239 ObjectIds.ModifyMonitoredItemsResponse_Encoding_DefaultBinary: ModifyMonitoredItemsResponse, 16240 ObjectIds.SetMonitoringModeRequest_Encoding_DefaultBinary: SetMonitoringModeRequest, 16241 ObjectIds.SetMonitoringModeResponse_Encoding_DefaultBinary: SetMonitoringModeResponse, 16242 ObjectIds.SetTriggeringRequest_Encoding_DefaultBinary: SetTriggeringRequest, 16243 ObjectIds.SetTriggeringResponse_Encoding_DefaultBinary: SetTriggeringResponse, 16244 ObjectIds.DeleteMonitoredItemsRequest_Encoding_DefaultBinary: DeleteMonitoredItemsRequest, 16245 ObjectIds.DeleteMonitoredItemsResponse_Encoding_DefaultBinary: DeleteMonitoredItemsResponse, 16246 ObjectIds.CreateSubscriptionRequest_Encoding_DefaultBinary: CreateSubscriptionRequest, 16247 ObjectIds.CreateSubscriptionResponse_Encoding_DefaultBinary: CreateSubscriptionResponse, 16248 ObjectIds.ModifySubscriptionRequest_Encoding_DefaultBinary: ModifySubscriptionRequest, 16249 ObjectIds.ModifySubscriptionResponse_Encoding_DefaultBinary: ModifySubscriptionResponse, 16250 ObjectIds.SetPublishingModeRequest_Encoding_DefaultBinary: SetPublishingModeRequest, 16251 ObjectIds.SetPublishingModeResponse_Encoding_DefaultBinary: SetPublishingModeResponse, 16252 ObjectIds.NotificationMessage_Encoding_DefaultBinary: NotificationMessage, 16253 ObjectIds.NotificationData_Encoding_DefaultBinary: NotificationData, 16254 ObjectIds.DataChangeNotification_Encoding_DefaultBinary: DataChangeNotification, 16255 ObjectIds.MonitoredItemNotification_Encoding_DefaultBinary: MonitoredItemNotification, 16256 ObjectIds.EventNotificationList_Encoding_DefaultBinary: EventNotificationList, 16257 ObjectIds.EventFieldList_Encoding_DefaultBinary: EventFieldList, 16258 ObjectIds.HistoryEventFieldList_Encoding_DefaultBinary: HistoryEventFieldList, 16259 ObjectIds.StatusChangeNotification_Encoding_DefaultBinary: StatusChangeNotification, 16260 ObjectIds.SubscriptionAcknowledgement_Encoding_DefaultBinary: SubscriptionAcknowledgement, 16261 ObjectIds.PublishRequest_Encoding_DefaultBinary: PublishRequest, 16262 ObjectIds.PublishResponse_Encoding_DefaultBinary: PublishResponse, 16263 ObjectIds.RepublishRequest_Encoding_DefaultBinary: RepublishRequest, 16264 ObjectIds.RepublishResponse_Encoding_DefaultBinary: RepublishResponse, 16265 ObjectIds.TransferResult_Encoding_DefaultBinary: TransferResult, 16266 ObjectIds.TransferSubscriptionsRequest_Encoding_DefaultBinary: TransferSubscriptionsRequest, 16267 ObjectIds.TransferSubscriptionsResponse_Encoding_DefaultBinary: TransferSubscriptionsResponse, 16268 ObjectIds.DeleteSubscriptionsRequest_Encoding_DefaultBinary: DeleteSubscriptionsRequest, 16269 ObjectIds.DeleteSubscriptionsResponse_Encoding_DefaultBinary: DeleteSubscriptionsResponse, 16270 ObjectIds.BuildInfo_Encoding_DefaultBinary: BuildInfo, 16271 ObjectIds.RedundantServerDataType_Encoding_DefaultBinary: RedundantServerDataType, 16272 ObjectIds.EndpointUrlListDataType_Encoding_DefaultBinary: EndpointUrlListDataType, 16273 ObjectIds.NetworkGroupDataType_Encoding_DefaultBinary: NetworkGroupDataType, 16274 ObjectIds.SamplingIntervalDiagnosticsDataType_Encoding_DefaultBinary: SamplingIntervalDiagnosticsDataType, 16275 ObjectIds.ServerDiagnosticsSummaryDataType_Encoding_DefaultBinary: ServerDiagnosticsSummaryDataType, 16276 ObjectIds.ServerStatusDataType_Encoding_DefaultBinary: ServerStatusDataType, 16277 ObjectIds.SessionDiagnosticsDataType_Encoding_DefaultBinary: SessionDiagnosticsDataType, 16278 ObjectIds.SessionSecurityDiagnosticsDataType_Encoding_DefaultBinary: SessionSecurityDiagnosticsDataType, 16279 ObjectIds.ServiceCounterDataType_Encoding_DefaultBinary: ServiceCounterDataType, 16280 ObjectIds.StatusResult_Encoding_DefaultBinary: StatusResult, 16281 ObjectIds.SubscriptionDiagnosticsDataType_Encoding_DefaultBinary: SubscriptionDiagnosticsDataType, 16282 ObjectIds.ModelChangeStructureDataType_Encoding_DefaultBinary: ModelChangeStructureDataType, 16283 ObjectIds.SemanticChangeStructureDataType_Encoding_DefaultBinary: SemanticChangeStructureDataType, 16284 ObjectIds.Range_Encoding_DefaultBinary: Range, 16285 ObjectIds.EUInformation_Encoding_DefaultBinary: EUInformation, 16286 ObjectIds.ComplexNumberType_Encoding_DefaultBinary: ComplexNumberType, 16287 ObjectIds.DoubleComplexNumberType_Encoding_DefaultBinary: DoubleComplexNumberType, 16288 ObjectIds.AxisInformation_Encoding_DefaultBinary: AxisInformation, 16289 ObjectIds.XVType_Encoding_DefaultBinary: XVType, 16290 ObjectIds.ProgramDiagnosticDataType_Encoding_DefaultBinary: ProgramDiagnosticDataType, 16291 ObjectIds.Annotation_Encoding_DefaultBinary: Annotation, 16292 } 16293 16294 16295 def extensionobject_from_binary(data): 16296 """ 16297 Convert binary-coded ExtensionObject to a Python object. 16298 Returns an object, or None if TypeId is zero 16299 """ 16300 TypeId = NodeId.from_binary(data) 16301 Encoding = ord(data.read(1)) 16302 body = None 16303 if Encoding & (1 << 0): 16304 length = uabin.Primitives.Int32.unpack(data) 16305 if length < 1: 16306 body = Buffer(b"") 16307 else: 16308 body = data.copy(length) 16309 data.skip(length) 16310 if TypeId.Identifier == 0: 16311 return None 16312 elif TypeId.Identifier not in ExtensionClasses: 16313 e = ExtensionObject() 16314 e.TypeId = TypeId 16315 e.Encoding = Encoding 16316 if body is not None: 16317 e.Body = body.read(len(body)) 16318 return e 16319 klass = ExtensionClasses[TypeId.Identifier] 16320 if body is None: 16321 raise UaError("parsing ExtensionObject {0} without data".format(klass.__name__)) 16322 return klass.from_binary(body) 16323 16324 16325 def extensionobject_to_binary(obj): 16326 """ 16327 Convert Python object to binary-coded ExtensionObject. 16328 If obj is None, convert to empty ExtensionObject (TypeId = 0, no Body). 16329 Returns a binary string 16330 """ 16331 if isinstance(obj, ExtensionObject): 16332 return obj.to_binary() 16333 TypeId = NodeId() 16334 Encoding = 0 16335 Body = None 16336 if obj is not None: 16337 TypeId = FourByteNodeId(getattr(ObjectIds, "{0}_Encoding_DefaultBinary".format(obj.__class__.__name__))) 16338 Encoding |= (1 << 0) 16339 Body = obj.to_binary() 16340 packet = [] 16341 packet.append(TypeId.to_binary()) 16342 packet.append(uabin.Primitives.UInt8.pack(Encoding)) 16343 if Body: 16344 packet.append(uabin.Primitives.Bytes.pack(Body)) 16345 return b''.join(packet)