Loading...
Searching...
No Matches
IDataDistributionChannelBase Class Referenceabstract

Base interface to be implemented from channel manager. More...

#include <DataDistributionManager.h>

Inheritance diagram for IDataDistributionChannelBase:
IDataDistributionTransport IDataDistributionSubsystem

Public Member Functions

virtual CHANNEL_HANDLE CreateChannel (const char *channelName, IDataDistributionChannelCallback *dataCb, DDM_CHANNEL_DIRECTION direction=DDM_CHANNEL_DIRECTION::ALL, const char *arrayParams[]=NULL, int len=0)=0
 Creates a new channel.
 
virtual OPERATION_RESULT StartChannel (CHANNEL_HANDLE_PARAMETER, unsigned long timeout)=0
 Starts the channel.
 
virtual OPERATION_RESULT StopChannel (CHANNEL_HANDLE_PARAMETER, unsigned long timeout)=0
 Stops the channel.
 
virtual void SetParameter (CHANNEL_HANDLE_PARAMETER, const char *paramName, const char *paramValue)=0
 Sets a parameter at run-time.
 
virtual void SetParameter (CHANNEL_HANDLE_PARAMETER, DDM_GENERAL_PARAMETER paramId, const char *paramValue)=0
 Sets a parameter at run-time.
 
virtual const char * GetParameter (CHANNEL_HANDLE_PARAMETER, const char *paramName)=0
 Reads a parameter at run-time.
 
virtual const char * GetParameter (CHANNEL_HANDLE_PARAMETER, DDM_GENERAL_PARAMETER paramId)=0
 Reads a parameter at run-time.
 
virtual OPERATION_RESULT Lock (CHANNEL_HANDLE_PARAMETER, unsigned long timeout)=0
 Locks the channel.
 
virtual OPERATION_RESULT Unlock (CHANNEL_HANDLE_PARAMETER)=0
 Unlock the channel.
 
virtual OPERATION_RESULT SeekChannel (CHANNEL_HANDLE_PARAMETER, int64_t position, DDM_SEEKCONTEXT context=DDM_SEEKCONTEXT::OFFSET, DDM_SEEKKIND kind=DDM_SEEKKIND::ABSOLUTE)=0
 Seeks the channel.
 
virtual OPERATION_RESULT DeleteChannel (CHANNEL_HANDLE_PARAMETER)=0
 Deletes the channel.
 
virtual OPERATION_RESULT WriteOnChannel (CHANNEL_HANDLE_PARAMETER, const char *key, size_t keyLen, void *buffer, size_t bufferLen, const BOOL waitAll=FALSE, const int64_t timestamp=DDM_NO_TIMESTAMP)=0
 Writes data on the channel.
 
virtual OPERATION_RESULT ReadFromChannel (CHANNEL_HANDLE_PARAMETER, int64_t offset, size_t *bufferLen, void **buffer)=0
 Reads data from the channel.
 
virtual OPERATION_RESULT ChangeChannelDirection (CHANNEL_HANDLE_PARAMETER, DDM_CHANNEL_DIRECTION direction)=0
 Change the DDM_CHANNEL_DIRECTION of the channel.
 

Detailed Description

Base interface to be implemented from channel manager.

Base interface to be implemented from channel manager

Member Function Documentation

◆ ChangeChannelDirection()

virtual OPERATION_RESULT IDataDistributionChannelBase::ChangeChannelDirection ( CHANNEL_HANDLE_PARAMETER ,
DDM_CHANNEL_DIRECTION direction )
pure virtual

Change the DDM_CHANNEL_DIRECTION of the channel.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel direction DDM_CHANNEL_DIRECTION direction

Returns
the OPERATION_RESULT of the operation

◆ CreateChannel()

virtual CHANNEL_HANDLE IDataDistributionChannelBase::CreateChannel ( const char * channelName,
IDataDistributionChannelCallback * dataCb,
DDM_CHANNEL_DIRECTION direction = DDM_CHANNEL_DIRECTION::ALL,
const char * arrayParams[] = NULL,
int len = 0 )
pure virtual

Creates a new channel.

channelName the name of the channel dataCb IDataDistributionChannelCallback pointer to receive data, condition or errors direction DDM_CHANNEL_DIRECTION direction, default is DDM_CHANNEL_DIRECTION::ALL arrayParams an array of string in the form key=value to override parameters passed into IDataDistribution::Initialize len length of arrayParams

Returns
the new CHANNEL_HANDLE or NULL if there was an error

◆ DeleteChannel()

virtual OPERATION_RESULT IDataDistributionChannelBase::DeleteChannel ( CHANNEL_HANDLE_PARAMETER )
pure virtual

Deletes the channel.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel

Returns
the OPERATION_RESULT of the operation

◆ GetParameter() [1/2]

virtual const char * IDataDistributionChannelBase::GetParameter ( CHANNEL_HANDLE_PARAMETER ,
const char * paramName )
pure virtual

Reads a parameter at run-time.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel paramName the parameter name

Returns
parameter value

◆ GetParameter() [2/2]

virtual const char * IDataDistributionChannelBase::GetParameter ( CHANNEL_HANDLE_PARAMETER ,
DDM_GENERAL_PARAMETER paramId )
pure virtual

Reads a parameter at run-time.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel paramId the DDM_GENERAL_PARAMETER parameter id

Returns
parameter value

◆ Lock()

virtual OPERATION_RESULT IDataDistributionChannelBase::Lock ( CHANNEL_HANDLE_PARAMETER ,
unsigned long timeout )
pure virtual

Locks the channel.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel timeout the operation timeout in milliseconds

Returns
the OPERATION_RESULT of the operation

◆ ReadFromChannel()

virtual OPERATION_RESULT IDataDistributionChannelBase::ReadFromChannel ( CHANNEL_HANDLE_PARAMETER ,
int64_t offset,
size_t * bufferLen,
void ** buffer )
pure virtual

Reads data from the channel.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel offset offset to read info from dataLen pointer will receive length of data read buffer the buffer to receive data from the channel, it cannot be NULL

Returns
the OPERATION_RESULT of the operation

◆ SeekChannel()

virtual OPERATION_RESULT IDataDistributionChannelBase::SeekChannel ( CHANNEL_HANDLE_PARAMETER ,
int64_t position,
DDM_SEEKCONTEXT context = DDM_SEEKCONTEXT::OFFSET,
DDM_SEEKKIND kind = DDM_SEEKKIND::ABSOLUTE )
pure virtual

Seeks the channel.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel position the new channel position context the DDM_SEEKCONTEXT to use kind the DDM_SEEKKIND to use

Returns
the OPERATION_RESULT of the operation

◆ SetParameter() [1/2]

virtual void IDataDistributionChannelBase::SetParameter ( CHANNEL_HANDLE_PARAMETER ,
const char * paramName,
const char * paramValue )
pure virtual

Sets a parameter at run-time.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel paramName the parameter name paramValue the parameter value

◆ SetParameter() [2/2]

virtual void IDataDistributionChannelBase::SetParameter ( CHANNEL_HANDLE_PARAMETER ,
DDM_GENERAL_PARAMETER paramId,
const char * paramValue )
pure virtual

Sets a parameter at run-time.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel paramId the DDM_GENERAL_PARAMETER parameter id paramValue the parameter value

◆ StartChannel()

virtual OPERATION_RESULT IDataDistributionChannelBase::StartChannel ( CHANNEL_HANDLE_PARAMETER ,
unsigned long timeout )
pure virtual

Starts the channel.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel timeout the operation timeout in milliseconds

Returns
the OPERATION_RESULT of the operation

◆ StopChannel()

virtual OPERATION_RESULT IDataDistributionChannelBase::StopChannel ( CHANNEL_HANDLE_PARAMETER ,
unsigned long timeout )
pure virtual

Stops the channel.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel timeout the operation timeout in milliseconds

Returns
the OPERATION_RESULT of the operation

◆ Unlock()

virtual OPERATION_RESULT IDataDistributionChannelBase::Unlock ( CHANNEL_HANDLE_PARAMETER )
pure virtual

Unlock the channel.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel

Returns
the OPERATION_RESULT of the operation

◆ WriteOnChannel()

virtual OPERATION_RESULT IDataDistributionChannelBase::WriteOnChannel ( CHANNEL_HANDLE_PARAMETER ,
const char * key,
size_t keyLen,
void * buffer,
size_t bufferLen,
const BOOL waitAll = FALSE,
const int64_t timestamp = DDM_NO_TIMESTAMP )
pure virtual

Writes data on the channel.

channelHandle the CHANNEL_HANDLE of the channel return from IDataDistributionChannelBase::CreateChannel key the key of the message to write, it can be NULL keyLen the length of the key buffer the buffer to write on the channel, it cannot be NULL bufferLen the length of the buffer to write waitAll set to TRUE to wait a complete message dispatch, default is FALSE.

Remarks
it depends on underlying implementation timestamp a timestamp associable to the message, default is DDM_NO_TIMESTAMP and means no timestamp written
Returns
the OPERATION_RESULT of the operation

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