C++ Based OPC UA Client/Server SDK
1.5.3.346
|
Event data class for the OPC UA event type AuditEventType. More...
#include <opcua_auditeventtypedata.h>
Inherits BaseEventTypeData.
Inherited by OpcUa::AuditNodeManagementEventTypeData, OpcUa::AuditSecurityEventTypeData, OpcUa::AuditUpdateEventTypeData, and OpcUa::AuditUpdateMethodEventTypeData.
Public Member Functions | |
AuditEventTypeData () | |
Constructs an instance of the event data class AuditEventTypeData. | |
virtual | ~AuditEventTypeData () |
Destroys the AuditEventTypeData object. | |
virtual void | getFieldData (OpcUa_UInt32 index, Session *pSession, OpcUa_Variant &data) |
Get the field value for the passed index. More... | |
void | setActionTimeStamp (const UaDateTime &ActionTimeStamp) |
Set the event field value ActionTimeStamp. More... | |
void | setActionTimeStampStatus (OpcUa_StatusCode status) |
Set a status code for the event field value ActionTimeStamp. More... | |
UaDateTime | getActionTimeStamp () |
Get the event field value ActionTimeStamp. More... | |
virtual void | getActionTimeStampValue (Session *pSession, OpcUa_Variant &value) |
Get the event field value ActionTimeStamp for delivering the event data. More... | |
void | setClientAuditEntryId (const UaString &ClientAuditEntryId) |
Set the event field value ClientAuditEntryId. More... | |
void | setClientAuditEntryIdStatus (OpcUa_StatusCode status) |
Set a status code for the event field value ClientAuditEntryId. More... | |
UaString | getClientAuditEntryId () |
Get the event field value ClientAuditEntryId. More... | |
virtual void | getClientAuditEntryIdValue (Session *pSession, OpcUa_Variant &value) |
Get the event field value ClientAuditEntryId for delivering the event data. More... | |
void | setClientUserId (const UaString &ClientUserId) |
Set the event field value ClientUserId. More... | |
void | setClientUserIdStatus (OpcUa_StatusCode status) |
Set a status code for the event field value ClientUserId. More... | |
UaString | getClientUserId () |
Get the event field value ClientUserId. More... | |
virtual void | getClientUserIdValue (Session *pSession, OpcUa_Variant &value) |
Get the event field value ClientUserId for delivering the event data. More... | |
void | setServerId (const UaString &ServerId) |
Set the event field value ServerId. More... | |
void | setServerIdStatus (OpcUa_StatusCode status) |
Set a status code for the event field value ServerId. More... | |
UaString | getServerId () |
Get the event field value ServerId. More... | |
virtual void | getServerIdValue (Session *pSession, OpcUa_Variant &value) |
Get the event field value ServerId for delivering the event data. More... | |
void | setStatus (OpcUa_Boolean Status) |
Set the event field value Status. More... | |
void | setStatusStatus (OpcUa_StatusCode status) |
Set a status code for the event field value Status. More... | |
OpcUa_Boolean | getStatus () |
Get the event field value Status. More... | |
virtual void | getStatusValue (Session *pSession, OpcUa_Variant &value) |
Get the event field value Status for delivering the event data. More... | |
Public Member Functions inherited from BaseEventTypeData | |
BaseEventTypeData () | |
Constructs a BaseEventTypeData object. | |
virtual | ~BaseEventTypeData () |
Destroys the BaseEventTypeData object. | |
virtual void | prepareNewEvent (const UaDateTime &time, const UaDateTime &receiveTime, const UaByteString &userEventId) |
Initializes the event data fields EventId, Time and ReceiveTime with valid values for the next event. More... | |
virtual UaByteString | getEventId () const |
Get the EventId event field. More... | |
virtual UaNodeId | getEventTypeId () const |
Get the EventType event field. More... | |
virtual void | setSource (const UaNode *pNode) |
Set the SourceNode and SourceName by passing in a node pointer for the source node. | |
virtual void | setSourceNode (const UaNodeId &sourceNode) |
Set the SourceNode event field. More... | |
virtual UaNodeId | getSourceNode () const |
Get the SourceNode event field. More... | |
virtual void | setSourceName (const UaString &sourceName) |
Set the SourceName event field. More... | |
virtual UaString | getSourceName () const |
Get the SourceName event field. More... | |
virtual void | setTime (const UaDateTime &time) |
Set the Time event field. More... | |
virtual UaDateTime | getTime () const |
Get the Time event field. More... | |
virtual void | setReceiveTime (const UaDateTime &receiveTime) |
Set the ReceiveTime event field. More... | |
virtual UaDateTime | getReceiveTime () const |
Get the ReceiveTime event field. More... | |
virtual void | setMessage (const UaLocalizedText &message) |
Set the Message event field. More... | |
virtual UaLocalizedText | getMessage () const |
Get the Message event field. More... | |
virtual void | getMessageValue (Session *pSession, UaVariant &data) |
Get the message field value. More... | |
virtual void | setSeverity (OpcUa_UInt16 severity) |
Set the Severity event field. More... | |
virtual OpcUa_UInt16 | getSeverity () const |
Get the Severity event field. More... | |
virtual void | setLocalTime (const UaTimeZoneDataType &localTime) |
Set the LocalTime event field. More... | |
virtual UaTimeZoneDataType | getLocalTime () const |
Get the LocalTime event field. More... | |
Public Member Functions inherited from UaEventData | |
UaEventData () | |
construction | |
virtual | ~UaEventData () |
destruction | |
virtual UaNodeId | getConditionNodeId () |
Returns the condition NodeId if the event data is related to a condition object. More... | |
virtual UaNodeId | getConditionBranchNodeId () |
Returns the condition branch NodeId if the event data is related to a condition object. More... | |
virtual OpcUa_Boolean | getConditionRetain () |
Returns the Retain flag if the event data is related to a condition object. More... | |
virtual void | lockEventData () |
Lock the event data for data update and event handling. More... | |
virtual void | unlockEventData () |
Unlock the event data after data update or event handling. More... | |
void | setEventUserData (OpcUa_Handle pEventUserData) |
Sets the user specific event data to the EventData object. More... | |
OpcUa_Handle | getEventUserData () const |
Returns the user specific event data. | |
const NodeAccessInfo * | getEventAccessInfo () const |
Returns the access info associated with this UaEventData. More... | |
void | useEventAccessInfoFrom (const UaEventData *pOther) |
Set the access info from another node to this node. More... | |
void | setEventAccessInfo (NodeAccessInfo *pAccessInfo) |
Set access info for this UaEventData. More... | |
void | attachEventAccessInfo (NodeAccessInfo *pAccessInfo) |
Set access info for this UaEventData. More... | |
virtual ReferenceCounter * | getConditionDataReferenceCounter () |
Get the ReferenceCounter interface necessary for condition event data classes. | |
Static Public Member Functions | |
static void | createTypes () |
Create the type nodes for the event type AuditEventType. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
static void | registerEventFields () |
Registers all event type fields with the EventManagerBase. | |
Static Public Member Functions inherited from BaseEventTypeData | |
static void | registerEventFields () |
Registers all event type fields with the EventManagerBase. | |
Static Public Member Functions inherited from UaEventData | |
static void | registerEventFields () |
Registers all event type fields with the EventManagerBase. | |
Additional Inherited Members | |
Public Attributes inherited from BaseEventTypeData | |
UaVariant | m_EventId |
Field 01 - EventId. | |
UaNodeId | m_EventTypeId |
Field 02 - EventType. | |
UaVariant | m_SourceNode |
Field 03 - SourceNode. | |
UaVariant | m_SourceName |
Field 04 - SourceName. | |
UaVariant | m_Time |
Field 05 - Time. | |
UaVariant | m_ReceiveTime |
Field 06 - ReceiveTime. | |
UaVariant | m_LocalTime |
Field 07 - LocalTime. | |
UaVariant | m_Message |
Field 08 - Message. | |
UaVariant | m_Severity |
Field 09 - Severity. | |
Event data class for the OPC UA event type AuditEventType.
This class provides the functionality necessary to create an event of type AuditEventType, to set the values of the event fields and to send the event to interested clients through EventManagerBase::fireEvent().
Event Fields of the AuditEventType:
Browse Name | DataType | TypeDefinition | Modelling Rule | See Also |
---|---|---|---|---|
ActionTimeStamp | UtcTime | PropertyType | Mandatory | getActionTimeStamp, setActionTimeStamp |
ClientAuditEntryId | String | PropertyType | Mandatory | getClientAuditEntryId, setClientAuditEntryId |
ClientUserId | String | PropertyType | Mandatory | getClientUserId, setClientUserId |
ServerId | String | PropertyType | Mandatory | getServerId, setServerId |
Status | Boolean | PropertyType | Mandatory | getStatus, setStatus |
OPC UA includes support for security audit trails with traceability between Client and Server audit logs. OPC UA defines audit events for security related client actions, like creating a connection with a server, and also audit events for actions changing the system, like write calls to variables or method calls. If a security-related problem is detected at the Server, the associated Client audit log entry can be located and examined. OPC UA also provides the capability for Servers to generate Event Notifications that report auditable Events to Clients capable of processing and logging them. OPC UA defines security audit parameters that can be included in audit log entries and in audit Event Notifications.
AuditEvents are Events of AuditEventType or subtypes that are generated as a result of an action taken on the Server by a Client of the Server. For example, in response to a Client issuing a write to a Variable, the Server would generate an AuditEvent describing the Variable as the source and the user and Client session as the initiators of the Event.
OPC UA Servers create audit events for an auditable action request. If the action is accepted, then an action AuditEvent is generated and processed by the Server. If the action is not accepted due to security reasons, a security AuditEvent is generated and processed by the Server. The Server may involve the underlying device or system in the process, but it is the Server’s responsibility to provide the Event to any interested Clients. Clients are free to subscribe to Events from the Server and will receive the AuditEvents in response to normal Publish requests.
See also AuditEventType for a documentation of the complete Information Model.
UaDateTime OpcUa::AuditEventTypeData::getActionTimeStamp | ( | ) |
Get the event field value ActionTimeStamp.
Identifies the time the user initiated the action that resulted in the AuditEvent being generated.
It differs from the Time Property because this is the time the server generated the AuditEvent documenting the action.
|
virtual |
Get the event field value ActionTimeStamp for delivering the event data.
This method can be overwritten in a derived class to return a client session specific value like a localized text matching the LocaleId requested by the client
Identifies the time the user initiated the action that resulted in the AuditEvent being generated.
It differs from the Time Property because this is the time the server generated the AuditEvent documenting the action.
UaString OpcUa::AuditEventTypeData::getClientAuditEntryId | ( | ) |
Get the event field value ClientAuditEntryId.
Contains the human-readable AuditEntryId.
All action requests include a human readable AuditEntryId. The AuditEntryId is included in the AuditEvent to allow human readers to correlate an Event with the initiating action. The AuditEntryId typically contains who initiated the action and from where it was initiated.
|
virtual |
Get the event field value ClientAuditEntryId for delivering the event data.
This method can be overwritten in a derived class to return a client session specific value like a localized text matching the LocaleId requested by the client
Contains the human-readable AuditEntryId.
All action requests include a human readable AuditEntryId. The AuditEntryId is included in the AuditEvent to allow human readers to correlate an Event with the initiating action. The AuditEntryId typically contains who initiated the action and from where it was initiated.
UaString OpcUa::AuditEventTypeData::getClientUserId | ( | ) |
Get the event field value ClientUserId.
Identifies the user of the client requesting an action.
The ClientUserId can be obtained from the UserIdentityToken passed in the ActivateSession call. If the UserIdentityToken is a UserNameIdentityToken, then the ClientUserId is the UserName. If the UserIdentityToken is an X509IdentityToken, then the ClientUserId is the X509 Subject Name of the certificate. If the UserIdentityToken is an IssuedIdentityToken, then the ClientUserId should be a string that represents the owner of the token. The best choice for the string depends on the type of IssuedIdentityToken. If an AnonymousIdentityToken was used, the value is null.
|
virtual |
Get the event field value ClientUserId for delivering the event data.
This method can be overwritten in a derived class to return a client session specific value like a localized text matching the LocaleId requested by the client
Identifies the user of the client requesting an action.
The ClientUserId can be obtained from the UserIdentityToken passed in the ActivateSession call. If the UserIdentityToken is a UserNameIdentityToken, then the ClientUserId is the UserName. If the UserIdentityToken is an X509IdentityToken, then the ClientUserId is the X509 Subject Name of the certificate. If the UserIdentityToken is an IssuedIdentityToken, then the ClientUserId should be a string that represents the owner of the token. The best choice for the string depends on the type of IssuedIdentityToken. If an AnonymousIdentityToken was used, the value is null.
|
virtual |
Get the field value for the passed index.
index | The index of the selected field. |
pSession | The session context for the method call. |
data | The data for the selected field. |
Reimplemented from BaseEventTypeData.
Reimplemented in OpcUa::TrustListUpdatedAuditEventTypeData, OpcUa::CertificateUpdatedAuditEventTypeData, OpcUa::ProgramTransitionAuditEventTypeData, OpcUa::AuditProgramTransitionEventTypeData, OpcUa::AuditUpdateStateEventTypeData, OpcUa::AuditConditionShelvingEventTypeData, OpcUa::AuditConditionRespondEventTypeData, OpcUa::AuditConditionEnableEventTypeData, OpcUa::AuditConditionConfirmEventTypeData, OpcUa::AuditConditionCommentEventTypeData, OpcUa::AuditConditionAcknowledgeEventTypeData, OpcUa::AuditConditionEventTypeData, OpcUa::AuditUpdateMethodEventTypeData, OpcUa::AuditWriteUpdateEventTypeData, OpcUa::AuditHistoryValueUpdateEventTypeData, OpcUa::AuditHistoryEventUpdateEventTypeData, OpcUa::AuditHistoryRawModifyDeleteEventTypeData, OpcUa::AuditHistoryEventDeleteEventTypeData, OpcUa::AuditHistoryAtTimeDeleteEventTypeData, OpcUa::AuditHistoryDeleteEventTypeData, OpcUa::AuditHistoryUpdateEventTypeData, OpcUa::AuditUpdateEventTypeData, OpcUa::AuditUrlMismatchEventTypeData, OpcUa::AuditCreateSessionEventTypeData, OpcUa::AuditCancelEventTypeData, OpcUa::AuditActivateSessionEventTypeData, OpcUa::AuditSessionEventTypeData, OpcUa::AuditOpenSecureChannelEventTypeData, OpcUa::AuditChannelEventTypeData, OpcUa::AuditCertificateUntrustedEventTypeData, OpcUa::AuditCertificateRevokedEventTypeData, OpcUa::AuditCertificateMismatchEventTypeData, OpcUa::AuditCertificateInvalidEventTypeData, OpcUa::AuditCertificateExpiredEventTypeData, OpcUa::AuditCertificateDataMismatchEventTypeData, OpcUa::AuditCertificateEventTypeData, OpcUa::AuditSecurityEventTypeData, OpcUa::AuditDeleteReferencesEventTypeData, OpcUa::AuditDeleteNodesEventTypeData, OpcUa::AuditAddReferencesEventTypeData, OpcUa::AuditAddNodesEventTypeData, and OpcUa::AuditNodeManagementEventTypeData.
UaString OpcUa::AuditEventTypeData::getServerId | ( | ) |
Get the event field value ServerId.
Uniquely identifies the Server generating the Event.
It identifies the Server uniquely even in a server-controlled transparent redundancy scenario where several Servers may use the same URI.
|
virtual |
Get the event field value ServerId for delivering the event data.
This method can be overwritten in a derived class to return a client session specific value like a localized text matching the LocaleId requested by the client
Uniquely identifies the Server generating the Event.
It identifies the Server uniquely even in a server-controlled transparent redundancy scenario where several Servers may use the same URI.
OpcUa_Boolean OpcUa::AuditEventTypeData::getStatus | ( | ) |
Get the event field value Status.
Identifies whether the requested action could be performed.
Set Status to TRUE if the requested action could be performed, or to FALSE if not.
|
virtual |
Get the event field value Status for delivering the event data.
This method can be overwritten in a derived class to return a client session specific value like a localized text matching the LocaleId requested by the client
Identifies whether the requested action could be performed.
Set Status to TRUE if the requested action could be performed, or to FALSE if not.
void OpcUa::AuditEventTypeData::setActionTimeStamp | ( | const UaDateTime & | ActionTimeStamp | ) |
Set the event field value ActionTimeStamp.
Identifies the time the user initiated the action that resulted in the AuditEvent being generated.
It differs from the Time Property because this is the time the server generated the AuditEvent documenting the action.
void OpcUa::AuditEventTypeData::setActionTimeStampStatus | ( | OpcUa_StatusCode | status | ) |
Set a status code for the event field value ActionTimeStamp.
If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.
void OpcUa::AuditEventTypeData::setClientAuditEntryId | ( | const UaString & | ClientAuditEntryId | ) |
Set the event field value ClientAuditEntryId.
Contains the human-readable AuditEntryId.
All action requests include a human readable AuditEntryId. The AuditEntryId is included in the AuditEvent to allow human readers to correlate an Event with the initiating action. The AuditEntryId typically contains who initiated the action and from where it was initiated.
void OpcUa::AuditEventTypeData::setClientAuditEntryIdStatus | ( | OpcUa_StatusCode | status | ) |
Set a status code for the event field value ClientAuditEntryId.
If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.
void OpcUa::AuditEventTypeData::setClientUserId | ( | const UaString & | ClientUserId | ) |
Set the event field value ClientUserId.
Identifies the user of the client requesting an action.
The ClientUserId can be obtained from the UserIdentityToken passed in the ActivateSession call. If the UserIdentityToken is a UserNameIdentityToken, then the ClientUserId is the UserName. If the UserIdentityToken is an X509IdentityToken, then the ClientUserId is the X509 Subject Name of the certificate. If the UserIdentityToken is an IssuedIdentityToken, then the ClientUserId should be a string that represents the owner of the token. The best choice for the string depends on the type of IssuedIdentityToken. If an AnonymousIdentityToken was used, the value is null.
void OpcUa::AuditEventTypeData::setClientUserIdStatus | ( | OpcUa_StatusCode | status | ) |
Set a status code for the event field value ClientUserId.
If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.
void OpcUa::AuditEventTypeData::setServerId | ( | const UaString & | ServerId | ) |
Set the event field value ServerId.
Uniquely identifies the Server generating the Event.
It identifies the Server uniquely even in a server-controlled transparent redundancy scenario where several Servers may use the same URI.
void OpcUa::AuditEventTypeData::setServerIdStatus | ( | OpcUa_StatusCode | status | ) |
Set a status code for the event field value ServerId.
If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.
void OpcUa::AuditEventTypeData::setStatus | ( | OpcUa_Boolean | Status | ) |
Set the event field value Status.
Identifies whether the requested action could be performed.
Set Status to TRUE if the requested action could be performed, or to FALSE if not.
void OpcUa::AuditEventTypeData::setStatusStatus | ( | OpcUa_StatusCode | status | ) |
Set a status code for the event field value Status.
If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.