C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
PubSubBase::PubSubConnection Class Reference

Management object for PubSubConnections. More...

#include <pubsubconnection.h>

Inherits PubSubBase::PubSubObject.

Public Member Functions

UaStatus startUp ()
 Start up the connection object.
 
UaStatus shutDown ()
 Shut down the connection object.
 
UaStatus transportSettingsBroker (UaBrokerConnectionTransportDataType &brokerTransportSettings) const
 Returns the broker transport settings structure if a broker transport is configured. More...
 
UaStatus setTransportSettingsBroker (const UaBrokerConnectionTransportDataType &brokerTransportSettings)
 Sets the broker transport settings structure if a broker transport is configured. More...
 
WriterGroupaddWriterGroup (PubSubHeaderLayout headerLayout)
 Adds a WriterGroup with default settings based on the transportFacet of the connection and the headerConfiguration. More...
 
WriterGroupaddWriterGroup_UADP (const UaString &name, bool enabled, OpcUa_UInt16 writerGroupId, OpcUa_Double publishingInterval, OpcUa_Double keepAliveTime, PubSubHeaderLayout headerLayout, OpcUa_Double publishingOffset=-1, OpcUa_Double samplingOffset=-1, OpcUa_UInt32 maxNetworkMessageSize=1400)
 Adds a WriterGroup with passed settings.
 
WriterGroupaddWriterGroup (const UaWriterGroupDataType &writerGroup)
 Adds a WriterGroup with passed configuration structure. More...
 
WriterGroupaddWriterGroup (const OpcUa_WriterGroupDataType &writerGroup)
 Adds a WriterGroup with passed configuration structure. More...
 
OpcUa_UInt32 writerGroupCount () const
 Returns the number of WriterGroups.
 
WriterGroupgetWriterGroup (OpcUa_UInt32 index)
 Returns the WriterGroup at index or NULL if index is outside the valid range.
 
UaStatus removeWriterGroup (WriterGroup *pGroup)
 Removes the passed WriterGroup.
 
ReaderGroupaddReaderGroup ()
 Adds a ReaderGroup with default settings. More...
 
ReaderGroupaddReaderGroup (const UaString &name, bool enabled, OpcUa_UInt32 maxNetworkMessageSize=1400)
 Adds a ReaderGroup with passed settings.
 
ReaderGroupaddReaderGroup (const UaReaderGroupDataType &readerGroup)
 Adds a ReaderGroup with passed configuration structure. More...
 
ReaderGroupaddReaderGroup (const OpcUa_ReaderGroupDataType &readerGroup)
 Adds a ReaderGroup with passed configuration structure. More...
 
OpcUa_UInt32 readerGroupCount () const
 Returns the number of ReaderGroups.
 
ReaderGroupgetReaderGroup (OpcUa_UInt32 index)
 Returns the ReaderGroup at index or NULL if index is outside the valid range.
 
UaStatus removeReaderGroup (ReaderGroup *pGroup)
 Removes the passed ReaderGroup.
 
- Public Member Functions inherited from PubSubBase::PubSubObject
 PubSubObject (PubSubResources *pPubSubResources, TransportFacet transportFacet, ConfigurationState configurationState)
 Creates an instance of the PubSubObject.
 
UaMutexpConfigMutex () const
 Get the shared mutex for the complete configuration.
 
void incrementErrorCounter ()
 Increments the error counter for the PubSub object.
 
void decrementErrorCounter ()
 Decrements the error counter for the PubSub object.
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter ()
 construction
 
virtual ~ReferenceCounter ()
 destruction
 

Protected Member Functions

 PubSubConnection (PubSubConfiguration *pParent, TransportFacet transportFacet, OpcUa_PubSubConnectionDataType *pConfigData, OpcUa_UInt32 configIndex, OpcUa_Int32 stackHandle)
 Creates an instance of the PubSubConnection from central configuration structure tree. More...
 
 PubSubConnection (PubSubConfiguration *pParent, TransportFacet transportFacet, OpcUa_PubSubConnectionDataType *pConfigData)
 Creates an instance of the PubSubConnection with new structure. More...
 
virtual ~PubSubConnection ()
 Destroys the PubSubConnection object.
 
- Protected Member Functions inherited from PubSubBase::PubSubObject
virtual ~PubSubObject ()
 Destroys the PubSubObject object.
 

Additional Inherited Members

- Public Types inherited from PubSubBase::PubSubObject
enum  PubSubObjectType
 PubSub transport facet reflecting the defined TransportProfileUris.
 
enum  TransportFacet {
  TransportFacet_None = 0x0, TransportFacet_PubSub_UDP_UADP = 0x11, TransportFacet_PubSub_ETH_UADP = 0x21, TransportFacet_PubSub_AMQP_UADP = 0x31,
  TransportFacet_PubSub_MQTT_UADP = 0x41, TransportFacet_PubSub_CUSTOM = 0xFF
}
 PubSub transport facet reflecting the defined TransportProfileUris. More...
 
enum  ConfigurationState {
  ConfigurationState_None, ConfigurationState_Deleted, ConfigurationState_InSyncWithStruct, ConfigurationState_New,
  ConfigurationState_Modified
}
 PubSub configuration object state. More...
 
enum  PubSubHeaderLayout { PubSubHeaderLayout_Custom, PubSubHeaderLayout_UADP_PeriodicFixed, PubSubHeaderLayout_UADP_Dynamic }
 PubSub header configuration. More...
 

Detailed Description

Management object for PubSubConnections.

Constructor & Destructor Documentation

PubSubBase::PubSubConnection::PubSubConnection ( PubSubConfiguration pParent,
TransportFacet  transportFacet,
OpcUa_PubSubConnectionDataType *  pConfigData,
OpcUa_UInt32  configIndex,
OpcUa_Int32  stackHandle 
)
protected

Creates an instance of the PubSubConnection from central configuration structure tree.

Parameters
[in]pParentParent configuration
[in]transportFacetTransportFacet for the connection
[in]pConfigDataConfiguration structure for the connection
[in]configIndexIndex of the structure in the list of connections
[in]stackHandleHandle of the connection in the stack. PUBSUB_INVALID_STACKHANDLE if no corresponding stack object exists.
PubSubBase::PubSubConnection::PubSubConnection ( PubSubConfiguration pParent,
TransportFacet  transportFacet,
OpcUa_PubSubConnectionDataType *  pConfigData 
)
protected

Creates an instance of the PubSubConnection with new structure.

Parameters
[in]pParentParent configuration
[in]transportFacetTransportFacet for the connection
[in]pConfigDataConfiguration structure for the connection

Member Function Documentation

ReaderGroup * PubSubBase::PubSubConnection::addReaderGroup ( )

Adds a ReaderGroup with default settings.

The default value for MaxNetworkMessageSize is 1400

ReaderGroup * PubSubBase::PubSubConnection::addReaderGroup ( const UaReaderGroupDataType readerGroup)

Adds a ReaderGroup with passed configuration structure.

Parameters
[in]readerGroupReaderGroup configuration structure
ReaderGroup * PubSubBase::PubSubConnection::addReaderGroup ( const OpcUa_ReaderGroupDataType &  readerGroup)

Adds a ReaderGroup with passed configuration structure.

Parameters
[in]readerGroupReaderGroup configuration structure
WriterGroup * PubSubBase::PubSubConnection::addWriterGroup ( PubSubHeaderLayout  headerLayout)

Adds a WriterGroup with default settings based on the transportFacet of the connection and the headerConfiguration.

The transportFacet of the connection affects the TransportSettings and the MessageSettings The headerConfiguration affects DataSetOrdering and NetworkMessageContentMask if it is not set to custom. The default value for MaxNetworkMessageSize is 1400

WriterGroup * PubSubBase::PubSubConnection::addWriterGroup ( const UaWriterGroupDataType writerGroup)

Adds a WriterGroup with passed configuration structure.

Parameters
[in]writerGroupWriterGroup configuration structure
WriterGroup * PubSubBase::PubSubConnection::addWriterGroup ( const OpcUa_WriterGroupDataType &  writerGroup)

Adds a WriterGroup with passed configuration structure.

Parameters
[in]writerGroupWriterGroup configuration structure
UaStatus PubSubBase::PubSubConnection::setTransportSettingsBroker ( const UaBrokerConnectionTransportDataType brokerTransportSettings)

Sets the broker transport settings structure if a broker transport is configured.

Returns BadInvalidState if another transport mapping is configured

UaStatus PubSubBase::PubSubConnection::transportSettingsBroker ( UaBrokerConnectionTransportDataType brokerTransportSettings) const

Returns the broker transport settings structure if a broker transport is configured.

Returns BadInvalidState if another transport mapping is configured< [out] Broker transport settings structure


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