Table of Contents

Method Send

Namespace
Skyline.DataMiner.Core.InterAppCalls.Common.CallSingle
Assembly
Skyline.DataMiner.Core.InterAppCalls.Common.dll

Send(IConnection, int, int, int, IEnumerable<Type>)

Sends this message using a default serializer and SLNet communication to a specific DataMiner Agent ID/element ID/parameter ID without waiting on a reply.

public void Send(IConnection connection, int agentId, int elementId, int parameterId, IEnumerable<Type> knownTypes)

Parameters

connection IConnection

The SLNet connection to use.

agentId int

The DataMiner Agent ID of the destination.

elementId int

The element ID of the destination.

parameterId int

The parameter ID of the destination.

knownTypes IEnumerable<Type>

A list of all the possible Message classes, necessary for the default background serializer.

Exceptions

ArgumentNullException

connection or knownTypes is null.

ArgumentException

agentId or elementId or parameterId is invalid.

InvalidOperationException

The state of the element specified by the return address is not "Active".

Send(IConnection, int, int, int, ISerializer)

Sends this message using SLNet communication to a specific DataMiner Agent ID/element ID/parameter ID without waiting on a reply.

public void Send(IConnection connection, int agentId, int elementId, int parameterId, ISerializer serializer)

Parameters

connection IConnection

The SLNet connection to use.

agentId int

The DataMiner Agent ID of the destination.

elementId int

The element ID of the destination.

parameterId int

The parameter ID of the destination.

serializer ISerializer

A custom serializer.

Exceptions

ArgumentNullException

connection or serializer is null.

ArgumentException

agentId or elementId or parameterId is invalid.

InvalidOperationException

The state of the element specified by the return address is not "Active".

Send(IConnection, int, int, int, TimeSpan, IEnumerable<Type>, bool)

Sends this message using SLNet communication to a specific DataMiner Agent ID/element ID/parameter ID and waits on a reply.

public Message Send(IConnection connection, int agentId, int elementId, int parameterId, TimeSpan timeout, IEnumerable<Type> knownTypes, bool allowBroker = true)

Parameters

connection IConnection

The SLNet connection to use.

agentId int

The DataMiner Agent ID of the destination.

elementId int

The element ID of the destination.

parameterId int

The parameter ID of the destination.

timeout TimeSpan

The maximum time to wait between each reply. Wait time resets each time a reply is received.

knownTypes IEnumerable<Type>

A list of all the possible Message classes, necessary for the default background serializer.

allowBroker bool

(Optional) A boolean value indicating whether to allow replies via the broker. Messages replied via the broker have lower latency, but are limited in length, See MaxMessageSize. Default is true.

Returns

Message

The reply response to this command.

Exceptions

ArgumentNullException

connection or knownTypes is null.

ArgumentException

agentId or elementId or parameterId is invalid.

ArgumentOutOfRangeException

timeout is negative.

InvalidOperationException

The state of the element specified by the return address is not "Active".

InvalidOperationException

ReturnAddress is not optional (see ReturnAddress).

TimeoutException

No reply was received within the specified timeout.

Send(IConnection, int, int, int, TimeSpan, ISerializer, bool)

Sends this message using SLNet communication to a specific DataMiner Agent ID/element ID/parameter ID and waits on a reply.

public Message Send(IConnection connection, int agentId, int elementId, int parameterId, TimeSpan timeout, ISerializer serializer, bool allowBroker = true)

Parameters

connection IConnection

The SLNet connection to use.

agentId int

The DataMiner Agent ID of the destination.

elementId int

The element ID of the destination.

parameterId int

The parameter ID of the destination.

timeout TimeSpan

The maximum time to wait between each reply. Wait time resets each time a reply is received.

serializer ISerializer

A custom serializer that can be used in the background.

allowBroker bool

(Optional) A boolean value indicating whether to allow replies via the broker. Messages replied via the broker have lower latency, but are limited in length, See MaxMessageSize. Default is true.

Returns

Message

The reply response to this command.

Exceptions

ArgumentNullException

connection or serializer is null.

ArgumentException

agentId or elementId or parameterId is invalid.

ArgumentOutOfRangeException

timeout is negative.

InvalidOperationException

The state of the element specified by the return address is not "Active".

InvalidOperationException

ReturnAddress is not optional (see ReturnAddress).

TimeoutException

No reply was received within the specified timeout.