Table of Contents

Interface ISmartDataDistributionChannel

Namespace
MASES.DataDistributionManager.Bindings
Assembly
DataDistributionManagerNet.dll

Interface to interact with channel

public interface ISmartDataDistributionChannel : ISmartDataDistributionChannelInfo
Inherited Members

Methods

ChangeChannelDirection(DDM_CHANNEL_DIRECTION)

Changes channel direction

OPERATION_RESULT ChangeChannelDirection(DDM_CHANNEL_DIRECTION direction)

Parameters

direction DDM_CHANNEL_DIRECTION

New DDM_CHANNEL_DIRECTION

Returns

OPERATION_RESULT

OPERATION_RESULT

GetParameter(DDM_GENERAL_PARAMETER)

Set parameter on channel

string GetParameter(DDM_GENERAL_PARAMETER paramId)

Parameters

paramId DDM_GENERAL_PARAMETER

DDM_GENERAL_PARAMETER parameter to set

Returns

string

Parameter value

GetParameter(string)

Set parameter on channel

string GetParameter(string paramName)

Parameters

paramName string

Parameter to set

Returns

string

Parameter value

Lock(uint)

Lock the channel

OPERATION_RESULT Lock(uint timeout)

Parameters

timeout uint

Timeout to acuire lock in ms

Returns

OPERATION_RESULT

OPERATION_RESULT

OnConditionOrError(OPERATION_RESULT, int, string)

Called when an event condition is raised from subsystem

void OnConditionOrError(OPERATION_RESULT errorCode, int nativeCode, string subSystemReason)

Parameters

errorCode OPERATION_RESULT

The error code reported

nativeCode int

The native code associated to the error if available

subSystemReason string

A string with a reason from subsystem

OnDataAvailable(string, byte[])

Called when a data is available

void OnDataAvailable(string key, byte[] buffer)

Parameters

key string

Message key

buffer byte[]

Message buffer

ReadFromChannel(long, long, out byte[])

Reads data from channel

OPERATION_RESULT ReadFromChannel(long offset, long length, out byte[] buffer)

Parameters

offset long

Position where read begins

length long

Number of elements to read

buffer byte[]

Result buffer

Returns

OPERATION_RESULT

OPERATION_RESULT

SeekChannel(DateTime)

Seek the channel to an absolute timestamp

OPERATION_RESULT SeekChannel(DateTime position)

Parameters

position DateTime

Seek timestamp to an absolute poisition

Returns

OPERATION_RESULT

OPERATION_RESULT

SeekChannel(long, DDM_SEEKCONTEXT, DDM_SEEKKIND)

Seek the channel using absolute or relative offset

OPERATION_RESULT SeekChannel(long position, DDM_SEEKCONTEXT context = DDM_SEEKCONTEXT.OFFSET, DDM_SEEKKIND kind = DDM_SEEKKIND.ABSOLUTE)

Parameters

position long

Seek offset poisition

context DDM_SEEKCONTEXT

DDM_SEEKCONTEXT to use. Default is OFFSET

kind DDM_SEEKKIND

DDM_SEEKKIND to use. Default is ABSOLUTE

Returns

OPERATION_RESULT

OPERATION_RESULT

SeekChannel(long, DDM_SEEKKIND)

Seek the channel using absolute or relative offset

OPERATION_RESULT SeekChannel(long position, DDM_SEEKKIND kind = DDM_SEEKKIND.ABSOLUTE)

Parameters

position long

Seek offset poisition

kind DDM_SEEKKIND

DDM_SEEKKIND to use. Default is ABSOLUTE

Returns

OPERATION_RESULT

OPERATION_RESULT

SeekChannel(TimeSpan)

Seek the channel by a relative time expressed as TimeSpan starting from latest known timestamp

OPERATION_RESULT SeekChannel(TimeSpan position)

Parameters

position TimeSpan

Seek timestamp relative poisition

Returns

OPERATION_RESULT

OPERATION_RESULT

SetParameter(DDM_GENERAL_PARAMETER, string)

Set parameter on channel

void SetParameter(DDM_GENERAL_PARAMETER paramId, string paramValue)

Parameters

paramId DDM_GENERAL_PARAMETER

DDM_GENERAL_PARAMETER parameter to set

paramValue string

Value to set

SetParameter(string, string)

Set parameter on channel

void SetParameter(string paramName, string paramValue)

Parameters

paramName string

Parameter to set

paramValue string

Value to set

StartChannel(uint)

Starts the channel

OPERATION_RESULT StartChannel(uint timeout)

Parameters

timeout uint

Timeout in ms

Returns

OPERATION_RESULT

OPERATION_RESULT

StopChannel(uint)

Stops the channel

OPERATION_RESULT StopChannel(uint timeout)

Parameters

timeout uint

Timeout in ms

Returns

OPERATION_RESULT

OPERATION_RESULT

Unlock()

Unlock the channel

OPERATION_RESULT Unlock()

Returns

OPERATION_RESULT

OPERATION_RESULT

WriteOnChannel(byte[], bool, long)

Writes in the channel

OPERATION_RESULT WriteOnChannel(byte[] buffer, bool waitAll = false, long timestamp = -1)

Parameters

buffer byte[]

The data buffer in the channel message

waitAll bool

Wait a complete acknowledge from the peers

timestamp long

timestamp to associated to the message

Returns

OPERATION_RESULT

WriteOnChannel(string, bool, long)

Writes in the channel

OPERATION_RESULT WriteOnChannel(string value, bool waitAll = false, long timestamp = -1)

Parameters

value string

The string to write in the channel

waitAll bool

Wait a complete acknowledge from the peers

timestamp long

timestamp to associated to the message

Returns

OPERATION_RESULT

WriteOnChannel(string, byte[], bool, long)

Writes in the channel

OPERATION_RESULT WriteOnChannel(string key, byte[] buffer, bool waitAll = false, long timestamp = -1)

Parameters

key string

Key to use in the channel message

buffer byte[]

The data buffer in the channel message

waitAll bool

Wait a complete acknowledge from the peers

timestamp long

timestamp to associated to the message

Returns

OPERATION_RESULT

WriteOnChannel(string, string, bool, long)

Writes in the channel

OPERATION_RESULT WriteOnChannel(string key, string value, bool waitAll = false, long timestamp = -1)

Parameters

key string

Key to use in the channel message

value string

The string to write in the channel

waitAll bool

Wait a complete acknowledge from the peers

timestamp long

timestamp to associated to the message

Returns

OPERATION_RESULT

Events

ConditionOrError

Event to receive condition or errors

event EventHandler<ConditionOrErrorEventArgs> ConditionOrError

Event Type

EventHandler<ConditionOrErrorEventArgs>

DataAvailable

Event to receive messages when data are available

event EventHandler<DataAvailableEventArgs> DataAvailable

Event Type

EventHandler<DataAvailableEventArgs>