C++ Based OPC UA Client/Server SDK  1.5.5.355

Wrapper class for the UA stack structure OpcUa_HistoryEvent. More...

#include <uahistoryevent.h>

Public Member Functions

 UaHistoryEvent ()
 Constructs an instance of the class UaHistoryEvent with empty default values.
 
 UaHistoryEvent (const UaHistoryEvent &other)
 Constructs an instance of the class UaHistoryEvent with values from another UaHistoryEvent object. More...
 
 UaHistoryEvent (const OpcUa_HistoryEvent &other)
 Constructs an instance of the class UaHistoryEvent with values from another OpcUa_HistoryEvent structure. More...
 
 UaHistoryEvent (const UaHistoryEventFieldLists &events)
 Constructs an instance of the class UaHistoryEvent with values provided in the constructor.
 
 UaHistoryEvent (const UaExtensionObject &extensionObject)
 Constructs an instance of the class UaHistoryEvent initialized with value from a UaExtensionObject. More...
 
 UaHistoryEvent (const OpcUa_ExtensionObject &extensionObject)
 Constructs an instance of the class UaHistoryEvent initialized with value from an OpcUa_ExtensionObject structure. More...
 
 ~UaHistoryEvent ()
 Destroys the UaHistoryEvent object.
 
void clear ()
 Clear the data of the UaHistoryEvent. More...
 
bool operator== (const UaHistoryEvent &other) const
 Compare two UaHistoryEvent for equality. More...
 
bool operator!= (const UaHistoryEvent &other) const
 Compare two UaHistoryEvent for inequality. More...
 
UaHistoryEventoperator= (const UaHistoryEvent &other)
 Assignment operator. More...
 
OpcUa_HistoryEventcopy () const
 Copy UaHistoryEvent data to a newly allocated OpcUa_HistoryEvent. More...
 
void copyTo (OpcUa_HistoryEvent *pDst) const
 Copy UaHistoryEvent data to an existing OpcUa_HistoryEvent structure. More...
 
void attach (OpcUa_HistoryEvent *pValue)
 Attaches to an existing OpcUa_HistoryEvent structure. More...
 
OpcUa_HistoryEventdetach (OpcUa_HistoryEvent *pDst)
 Detaches the internal HistoryEvent structure from this class. More...
 
void getEvents (UaHistoryEventFieldLists &events) const
 The list of Events being delivered.
 
void setEvents (const UaHistoryEventFieldLists &events)
 The list of Events being delivered.
 

Static Public Member Functions

static OpcUa_HistoryEventclone (const OpcUa_HistoryEvent &source)
 Copy OpcUa_HistoryEvent data to a newly allocated OpcUa_HistoryEvent. More...
 
static void cloneTo (const OpcUa_HistoryEvent &source, OpcUa_HistoryEvent &copy)
 Copy OpcUa_HistoryEvent data to an existing OpcUa_HistoryEvent structure. More...
 

Detailed Description

Wrapper class for the UA stack structure OpcUa_HistoryEvent.

This class encapsulates the native OpcUa_HistoryEvent structure and handles memory allocation and cleanup for you. UaHistoryEvent uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared HistoryEvent it creates a copy for that (copy-on-write). So assigning another UaHistoryEvent or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.

A table structure that is used to return Event fields to a Historical Read.

The structure is in the form of a table consisting of one or more Events, each containing an array of one or more fields. The selection and order of the fields returned for each Event is identical to the selected parameter of the EventFilter.

Constructor & Destructor Documentation

UaHistoryEvent::UaHistoryEvent ( const UaHistoryEvent other)

Constructs an instance of the class UaHistoryEvent with values from another UaHistoryEvent object.

Parameters
otherthe other UaHistoryEvent used to initialize the object
UaHistoryEvent::UaHistoryEvent ( const OpcUa_HistoryEvent other)

Constructs an instance of the class UaHistoryEvent with values from another OpcUa_HistoryEvent structure.

Parameters
otherthe other OpcUa_HistoryEvent used to initialize the object
UaHistoryEvent::UaHistoryEvent ( const UaExtensionObject extensionObject)

Constructs an instance of the class UaHistoryEvent initialized with value from a UaExtensionObject.

Parameters
extensionObjectthe extension object containing the HistoryEvent
UaHistoryEvent::UaHistoryEvent ( const OpcUa_ExtensionObject extensionObject)

Constructs an instance of the class UaHistoryEvent initialized with value from an OpcUa_ExtensionObject structure.

Parameters
extensionObjectthe extension object containing the HistoryEvent

Member Function Documentation

void UaHistoryEvent::attach ( OpcUa_HistoryEvent pValue)

Attaches to an existing OpcUa_HistoryEvent structure.

Don't manually free the attached structure afterwards, because UaHistoryEvent is responsible for it now.

Parameters
pValue[in] Parameter to attach to.
void UaHistoryEvent::clear ( )

Clear the data of the UaHistoryEvent.

OpcUa_HistoryEvent * UaHistoryEvent::clone ( const OpcUa_HistoryEvent source)
static

Copy OpcUa_HistoryEvent data to a newly allocated OpcUa_HistoryEvent.

Parameters
sourceSource to clone.
Returns
pointer to a newly allocated OpcUa_HistoryEvent.
void UaHistoryEvent::cloneTo ( const OpcUa_HistoryEvent source,
OpcUa_HistoryEvent copy 
)
static

Copy OpcUa_HistoryEvent data to an existing OpcUa_HistoryEvent structure.

Parameters
sourcethe source of the clone operation.
copythe destination of the clone operation.
OpcUa_HistoryEvent * UaHistoryEvent::copy ( ) const

Copy UaHistoryEvent data to a newly allocated OpcUa_HistoryEvent.

Returns
pointer to a newly allocated OpcUa_HistoryEvent.
void UaHistoryEvent::copyTo ( OpcUa_HistoryEvent pDst) const

Copy UaHistoryEvent data to an existing OpcUa_HistoryEvent structure.

Parameters
pDstthe destination of this copy operation.
OpcUa_HistoryEvent * UaHistoryEvent::detach ( OpcUa_HistoryEvent pDst)

Detaches the internal HistoryEvent structure from this class.

This way you take over the control of freeing the HistoryEvent data. If more than one reference exists, the data is copied to pDst instead of being detached.

Parameters
pDst[out] Pointer to an OpcUa_HistoryEvent structure that receives the HistoryEvent data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
bool UaHistoryEvent::operator!= ( const UaHistoryEvent other) const

Compare two UaHistoryEvent for inequality.

See also
operator==
Parameters
otherthe UaHistoryEvent to compare with.
Returns
true if not equal, false otherwise.
UaHistoryEvent & UaHistoryEvent::operator= ( const UaHistoryEvent other)

Assignment operator.

Parameters
otherthe UaHistoryEvent to assign.
Returns
reference to itself.
bool UaHistoryEvent::operator== ( const UaHistoryEvent other) const

Compare two UaHistoryEvent for equality.

Parameters
otherthe UaHistoryEvent to compare with.
Returns
true if equal, false if not.

The documentation for this class was generated from the following files: