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
IConnectionThe SLNet connection to use.
agentId
intThe DataMiner Agent ID of the destination.
elementId
intThe element ID of the destination.
parameterId
intThe 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
orknownTypes
isnull
.- ArgumentException
agentId
orelementId
orparameterId
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
IConnectionThe SLNet connection to use.
agentId
intThe DataMiner Agent ID of the destination.
elementId
intThe element ID of the destination.
parameterId
intThe parameter ID of the destination.
serializer
ISerializerA custom serializer.
Exceptions
- ArgumentNullException
connection
orserializer
isnull
.- ArgumentException
agentId
orelementId
orparameterId
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
IConnectionThe SLNet connection to use.
agentId
intThe DataMiner Agent ID of the destination.
elementId
intThe element ID of the destination.
parameterId
intThe parameter ID of the destination.
timeout
TimeSpanThe 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
orknownTypes
isnull
.- ArgumentException
agentId
orelementId
orparameterId
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
IConnectionThe SLNet connection to use.
agentId
intThe DataMiner Agent ID of the destination.
elementId
intThe element ID of the destination.
parameterId
intThe parameter ID of the destination.
timeout
TimeSpanThe maximum time to wait between each reply. Wait time resets each time a reply is received.
serializer
ISerializerA 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
orserializer
isnull
.- ArgumentException
agentId
orelementId
orparameterId
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
.