Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Update address space to 1.05.02 #1444

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified asyncua/binary_address_space.pickle
Binary file not shown.
74 changes: 62 additions & 12 deletions asyncua/common/event_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
Autogenerated code from xml"

Model Uri:http://opcfoundation.org/UA/"
Version:1.05.01"
Publication date:2022-02-24T00:00:00Z"
Version:1.05.03"
Publication date:2023-12-15T00:00:00Z"

File creation Date:2023-07-25 09:08:45.084676"
File creation Date:2024-04-25 09:57:44.866645"
"""
from asyncua import ua
from .events import Event


__all__ = ["BaseEvent", "AuditEvent", "AuditSecurityEvent", "AuditChannelEvent", "AuditOpenSecureChannelEvent", "AuditSessionEvent", "AuditCreateSessionEvent", "AuditActivateSessionEvent", "AuditCancelEvent", "AuditCertificateEvent", "AuditCertificateDataMismatchEvent", "AuditCertificateExpiredEvent", "AuditCertificateInvalidEvent", "AuditCertificateUntrustedEvent", "AuditCertificateRevokedEvent", "AuditCertificateMismatchEvent", "AuditNodeManagementEvent", "AuditAddNodesEvent", "AuditDeleteNodesEvent", "AuditAddReferencesEvent", "AuditDeleteReferencesEvent", "AuditUpdateEvent", "AuditWriteUpdateEvent", "AuditHistoryUpdateEvent", "AuditUpdateMethodEvent", "SystemEvent", "DeviceFailureEvent", "BaseModelChangeEvent", "GeneralModelChangeEvent", "TransitionEvent", "AuditUpdateStateEvent", "ProgramTransitionEvent", "SemanticChangeEvent", "AuditUrlMismatchEvent", "Condition", "RefreshStartEvent", "RefreshEndEvent", "RefreshRequiredEvent", "AuditConditionEvent", "AuditConditionEnableEvent", "AuditConditionCommentEvent", "DialogCondition", "AcknowledgeableCondition", "AlarmCondition", "LimitAlarm", "AuditHistoryEventUpdateEvent", "AuditHistoryValueUpdateEvent", "AuditHistoryDeleteEvent", "AuditHistoryRawModifyDeleteEvent", "AuditHistoryAtTimeDeleteEvent", "AuditHistoryEventDeleteEvent", "EventQueueOverflowEvent", "ProgramTransitionAuditEvent", "AuditConditionRespondEvent", "AuditConditionAcknowledgeEvent", "AuditConditionConfirmEvent", "ExclusiveLimitAlarm", "ExclusiveLevelAlarm", "ExclusiveRateOfChangeAlarm", "ExclusiveDeviationAlarm", "NonExclusiveLimitAlarm", "NonExclusiveLevelAlarm", "NonExclusiveRateOfChangeAlarm", "NonExclusiveDeviationAlarm", "DiscreteAlarm", "OffNormalAlarm", "TripAlarm", "AuditConditionShelvingEvent", "ProgressEvent", "SystemStatusChangeEvent", "SystemOffNormalAlarm", "AuditProgramTransitionEvent", "TrustListUpdatedAuditEvent", "CertificateUpdatedAuditEvent", "CertificateExpirationAlarm", "AuditConditionResetEvent", "PubSubStatusEvent", "PubSubTransportLimitsExceedEvent", "PubSubCommunicationFailureEvent", "DiscrepancyAlarm", "AuditConditionSuppressionEvent", "AuditConditionSilenceEvent", "AuditConditionOutOfServiceEvent", "RoleMappingRuleChangedAuditEvent", "KeyCredentialAuditEvent", "KeyCredentialUpdatedAuditEvent", "KeyCredentialDeletedAuditEvent", "InstrumentDiagnosticAlarm", "SystemDiagnosticAlarm", "AuditHistoryAnnotationUpdateEvent", "TrustListOutOfDateAlarm", "AuditClientEvent", "AuditClientUpdateMethodResultEvent"]
__all__ = ["BaseEvent", "AuditEvent", "AuditSecurityEvent", "AuditChannelEvent", "AuditOpenSecureChannelEvent", "AuditSessionEvent", "AuditCreateSessionEvent", "AuditActivateSessionEvent", "AuditCancelEvent", "AuditCertificateEvent", "AuditCertificateDataMismatchEvent", "AuditCertificateExpiredEvent", "AuditCertificateInvalidEvent", "AuditCertificateUntrustedEvent", "AuditCertificateRevokedEvent", "AuditCertificateMismatchEvent", "AuditNodeManagementEvent", "AuditAddNodesEvent", "AuditDeleteNodesEvent", "AuditAddReferencesEvent", "AuditDeleteReferencesEvent", "AuditUpdateEvent", "AuditWriteUpdateEvent", "AuditHistoryUpdateEvent", "AuditUpdateMethodEvent", "SystemEvent", "DeviceFailureEvent", "BaseModelChangeEvent", "GeneralModelChangeEvent", "TransitionEvent", "AuditUpdateStateEvent", "ProgramTransitionEvent", "SemanticChangeEvent", "AuditUrlMismatchEvent", "Condition", "RefreshStartEvent", "RefreshEndEvent", "RefreshRequiredEvent", "AuditConditionEvent", "AuditConditionEnableEvent", "AuditConditionCommentEvent", "DialogCondition", "AcknowledgeableCondition", "AlarmCondition", "LimitAlarm", "AuditHistoryEventUpdateEvent", "AuditHistoryValueUpdateEvent", "AuditHistoryDeleteEvent", "AuditHistoryRawModifyDeleteEvent", "AuditHistoryAtTimeDeleteEvent", "AuditHistoryEventDeleteEvent", "EventQueueOverflowEvent", "ProgramTransitionAuditEvent", "AuditConditionRespondEvent", "AuditConditionAcknowledgeEvent", "AuditConditionConfirmEvent", "ExclusiveLimitAlarm", "ExclusiveLevelAlarm", "ExclusiveRateOfChangeAlarm", "ExclusiveDeviationAlarm", "NonExclusiveLimitAlarm", "NonExclusiveLevelAlarm", "NonExclusiveRateOfChangeAlarm", "NonExclusiveDeviationAlarm", "DiscreteAlarm", "OffNormalAlarm", "TripAlarm", "AuditConditionShelvingEvent", "ProgressEvent", "SystemStatusChangeEvent", "SystemOffNormalAlarm", "AuditProgramTransitionEvent", "TrustListUpdatedAuditEvent", "CertificateUpdatedAuditEvent", "CertificateExpirationAlarm", "AuditConditionResetEvent", "PubSubStatusEvent", "PubSubTransportLimitsExceedEvent", "PubSubCommunicationFailureEvent", "DiscrepancyAlarm", "AuditConditionSuppressionEvent", "AuditConditionSilenceEvent", "AuditConditionOutOfServiceEvent", "RoleMappingRuleChangedAuditEvent", "KeyCredentialAuditEvent", "KeyCredentialUpdatedAuditEvent", "KeyCredentialDeletedAuditEvent", "InstrumentDiagnosticAlarm", "SystemDiagnosticAlarm", "AuditHistoryAnnotationUpdateEvent", "TrustListOutOfDateAlarm", "AuditClientEvent", "AuditClientUpdateMethodResultEvent", "TrustListUpdateRequestedAuditEvent", "CertificateUpdateRequestedAuditEvent", "AuditHistoryConfigurationChangeEvent", "AuditHistoryBulkInsertEvent"]



class BaseEvent(Event):
Expand All @@ -30,6 +31,10 @@ def __init__(self, sourcenode=None, message=None, severity=1):
self.add_property('LocalTime', ua.uaprotocol_auto.TimeZoneDataType(), ua.VariantType.ExtensionObject)
self.add_property('Message', ua.LocalizedText(message), ua.VariantType.LocalizedText)
self.add_property('Severity', severity, ua.VariantType.UInt16)
self.add_property('ConditionClassId', None, ua.VariantType.NodeId)
self.add_property('ConditionClassName', None, ua.VariantType.LocalizedText)
self.add_property('ConditionSubClassId', None, ua.VariantType.NodeId)
self.add_property('ConditionSubClassName', None, ua.VariantType.LocalizedText)
Comment on lines +34 to +37
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These optional Fields got added to every event.



class AuditEvent(BaseEvent):
Expand Down Expand Up @@ -79,7 +84,7 @@ def __init__(self, sourcenode=None, message=None, severity=1):
self.add_property('SecurityPolicyUri', None, ua.VariantType.String)
self.add_property('SecurityMode', None, ua.NodeId(ua.ObjectIds.MessageSecurityMode))
self.add_property('RequestedLifetime', None, ua.NodeId(ua.ObjectIds.Duration))
self.add_property('CertificateErrorEventId', None, ua.VariantType.String)
self.add_property('CertificateErrorEventId', None, ua.VariantType.ByteString)


class AuditSessionEvent(AuditSecurityEvent):
Expand Down Expand Up @@ -392,6 +397,7 @@ def __init__(self, sourcenode=None, message=None, severity=1):
self.add_property('ConditionName', None, ua.VariantType.String)
self.add_property('BranchId', None, ua.VariantType.NodeId)
self.add_property('Retain', None, ua.VariantType.Boolean)
self.add_property('SupportsFilteredRetain', None, ua.VariantType.Boolean)
self.add_property('EnabledState/Id', None, ua.VariantType.Boolean)
self.add_property('EnabledState/EffectiveDisplayName', None, ua.VariantType.LocalizedText)
self.add_property('EnabledState/TransitionTime', None, ua.NodeId(ua.ObjectIds.UtcTime))
Expand Down Expand Up @@ -884,16 +890,17 @@ def __init__(self, sourcenode=None, message=None, severity=1):
self.add_property('TransitionNumber', None, ua.VariantType.UInt32)


class TrustListUpdatedAuditEvent(AuditUpdateMethodEvent):
class TrustListUpdatedAuditEvent(AuditEvent):
"""
TrustListUpdatedAuditEvent:
"""
def __init__(self, sourcenode=None, message=None, severity=1):
super().__init__(sourcenode, message, severity)
self.EventType = ua.NodeId(ua.ObjectIds.TrustListUpdatedAuditEventType)
self.add_property('TrustListId', None, ua.VariantType.NodeId)


class CertificateUpdatedAuditEvent(AuditUpdateMethodEvent):
class CertificateUpdatedAuditEvent(AuditEvent):
"""
CertificateUpdatedAuditEvent:
"""
Expand Down Expand Up @@ -1062,8 +1069,8 @@ def __init__(self, sourcenode=None, message=None, severity=1):
super().__init__(sourcenode, message, severity)
self.EventType = ua.NodeId(ua.ObjectIds.AuditHistoryAnnotationUpdateEventType)
self.add_property('PerformInsertReplace', None, ua.NodeId(ua.ObjectIds.PerformUpdateType))
self.add_property('NewValues', None, ua.NodeId(ua.ObjectIds.DataValue))
self.add_property('OldValues', None, ua.NodeId(ua.ObjectIds.DataValue))
self.add_property('NewValues', None, ua.NodeId(ua.ObjectIds.Annotation))
self.add_property('OldValues', None, ua.NodeId(ua.ObjectIds.Annotation))


class TrustListOutOfDateAlarm(SystemOffNormalAlarm):
Expand Down Expand Up @@ -1098,8 +1105,47 @@ def __init__(self, sourcenode=None, message=None, severity=1):
self.add_property('ObjectId', None, ua.VariantType.NodeId)
self.add_property('MethodId', None, ua.VariantType.NodeId)
self.add_property('StatusCodeId', None, ua.VariantType.StatusCode)
self.add_property('InputArguments', None, ua.NodeId(ua.ObjectIds.Argument))
self.add_property('OutputArguments', None, ua.NodeId(ua.ObjectIds.Argument))
self.add_property('InputArguments', None, ua.VariantType.Variant)
self.add_property('OutputArguments', None, ua.VariantType.Variant)


class TrustListUpdateRequestedAuditEvent(AuditUpdateMethodEvent):
"""
TrustListUpdateRequestedAuditEvent:
"""
def __init__(self, sourcenode=None, message=None, severity=1):
super().__init__(sourcenode, message, severity)
self.EventType = ua.NodeId(ua.ObjectIds.TrustListUpdateRequestedAuditEventType)


class CertificateUpdateRequestedAuditEvent(AuditUpdateMethodEvent):
"""
CertificateUpdateRequestedAuditEvent:
"""
def __init__(self, sourcenode=None, message=None, severity=1):
super().__init__(sourcenode, message, severity)
self.EventType = ua.NodeId(ua.ObjectIds.CertificateUpdateRequestedAuditEventType)


class AuditHistoryConfigurationChangeEvent(AuditEvent):
"""
AuditHistoryConfigurationChangeEvent:
"""
def __init__(self, sourcenode=None, message=None, severity=1):
super().__init__(sourcenode, message, severity)
self.EventType = ua.NodeId(ua.ObjectIds.AuditHistoryConfigurationChangeEventType)


class AuditHistoryBulkInsertEvent(AuditEvent):
"""
AuditHistoryBulkInsertEvent:
"""
def __init__(self, sourcenode=None, message=None, severity=1):
super().__init__(sourcenode, message, severity)
self.EventType = ua.NodeId(ua.ObjectIds.AuditHistoryBulkInsertEventType)
self.add_property('UpdatedNode', None, ua.VariantType.NodeId)
self.add_property('StartTime', None, ua.NodeId(ua.ObjectIds.UtcTime))
self.add_property('EndTime', None, ua.NodeId(ua.ObjectIds.UtcTime))


IMPLEMENTED_EVENTS = {
Expand Down Expand Up @@ -1196,4 +1242,8 @@ def __init__(self, sourcenode=None, message=None, severity=1):
ua.ObjectIds.TrustListOutOfDateAlarmType: TrustListOutOfDateAlarm,
ua.ObjectIds.AuditClientEventType: AuditClientEvent,
ua.ObjectIds.AuditClientUpdateMethodResultEventType: AuditClientUpdateMethodResultEvent,
}
ua.ObjectIds.TrustListUpdateRequestedAuditEventType: TrustListUpdateRequestedAuditEvent,
ua.ObjectIds.CertificateUpdateRequestedAuditEventType: CertificateUpdateRequestedAuditEvent,
ua.ObjectIds.AuditHistoryConfigurationChangeEventType: AuditHistoryConfigurationChangeEvent,
ua.ObjectIds.AuditHistoryBulkInsertEventType: AuditHistoryBulkInsertEvent,
}
Loading
Loading