Click or drag to resize
S101Client Class
Provides methods to communicate with S101-encoded messages over a given connection.
Inheritance Hierarchy
SystemObject
  Lawo.EmberPlusSharp.S101S101Client

Namespace: Lawo.EmberPlusSharp.S101
Assembly: Lawo.EmberPlusSharp (in Lawo.EmberPlusSharp.dll) Version: 1.4.1707.27006
Syntax
C#
public sealed class S101Client : IMonitoredConnection, 
	IDisposable

The S101Client type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyKeepAliveRequestSlot
Gets or sets the value to set the Slot property to for a message containing a KeepAliveRequest command.
Top
Methods
  NameDescription
Public methodDispose
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSendMessageAsync(S101Message)
Public methodSendMessageAsync(S101Message, Byte)
Sends message followed by payload.
Public methodSendOutOfFrameByteAsync
Sends value as an out-of-frame byte.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventConnectionLost
Occurs when the connection to the provider has been lost.
Public eventEmberDataReceived
Occurs when the client has received the full payload of a message with an EmberData command.
Public eventOutOfFrameByteReceived
Occurs when an out-of-frame byte has been received.
Top
Remarks

See the "Ember+ Specification"[1] , chapter "Message Framing".

Automatically answers any message containing a KeepAliveRequest command with a message containing a KeepAliveResponse command.

Automatically sends messages containing a KeepAliveRequest command according to the value passed to S101Client(IDisposable, ReadAsyncCallback, WriteAsyncCallback, IS101Logger, Int32, Int32) for the timeout parameter. If no bytes are received from the remote party for half the timeout period then a message containing a KeepAliveRequest is sent. If no message of any kind is received during the second half of the timeout period, the ConnectionLost event is raised with an S101Exception.

This class requires that Current returns a context that executes all continuations on a single thread. For an S101Client object constructed on the GUI thread of a Windows Forms, WPF or Windows Store App this already the case. Other environments, e.g. Console Applications, ASP.net applications or unit test environments either do not have a synchronization context (Current equals null) or do not guarantee execution on a single thread. For such environments it is the responsibility of the client to set Current appropriately before constructing a S101Client object. Run(FuncTask) provides an easy way to do that.

Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Bibliography
[1] Marius Keuck and Philip Boger, Ember+ Specification, L-S-B Broadcast Technologies GmbH, https://github.com/Lawo/ember-plus/raw/master/documentation/Ember%2B%20Documentation.pdf
See Also