Lucon SDK 1.0.7
Loading...
Searching...
No Matches
Gefasoft.LuconV2.UdpDeviceConnection Class Reference

Implements a DeviceConnection to a Lucon using UDP. More...

Inheritance diagram for Gefasoft.LuconV2.UdpDeviceConnection:
Gefasoft.LuconV2.DeviceConnection Gefasoft.LuconV2.Infrastructure.InteropObject

Public Member Functions

 UdpDeviceConnection (string remote, TimeSpan? timeOut=null, ushort localPort=0, string localAddress=null)
 Create a UdpDeviceConnection
 UdpDeviceConnection (IPAddress remote, TimeSpan? timeOut=null, ushort localPort=0, IPAddress localAddress=null)
 Create a UdpDeviceConnection with a user defined request-timeout.
Public Member Functions inherited from Gefasoft.LuconV2.DeviceConnection
string GetInfo ()
 Compose a human-readable descriptive string which contains information on the configuration and state of the connection.
void Open ()
 Open the connection to the device. Once opened, connection, the connection listens for incoming messages and may be used for communication.
void Close ()
 Close the connection to the device. The call blocks, until the related OS resources are freed.
string SendCommand (string commandWithParams, int maxResponseLength=255)
 Sends a command-string to the LUCON and waits for a device response. Throws a LuconException, if the request times out or an error is received.
Public Member Functions inherited from Gefasoft.LuconV2.Infrastructure.InteropObject
void Dispose ()
 Dispose the object and free all related resources.

Additional Inherited Members

Protected Member Functions inherited from Gefasoft.LuconV2.DeviceConnection
 DeviceConnection (IntPtr handle, uint timeoutMilliseconds=0)
 create a new instance using a Lucon handle
override void Dispose (bool disposing)
 Implements the IDisposable pattern.
Properties inherited from Gefasoft.LuconV2.DeviceConnection
bool IsOpened [get]
 Indicates, whether the connection is opened and ready for communication.
Events inherited from Gefasoft.LuconV2.DeviceConnection
EventHandler< CommunicationEventArgsDataReceived [add, remove]
 The event is raised, after a ASCII message is received on the connection.
EventHandler< CommunicationEventArgsDataSent [add, remove]
 The event is raised, after a ASCII message is sent on the connection.
EventHandler< HintReceivedEventArgsHintReceived [add, remove]
 The event handler is raised asynchronously, when a hint message from the device is received.

Detailed Description

Implements a DeviceConnection to a Lucon using UDP.

Constructor & Destructor Documentation

◆ UdpDeviceConnection() [1/2]

Gefasoft.LuconV2.UdpDeviceConnection.UdpDeviceConnection ( string remote,
TimeSpan? timeOut = null,
ushort localPort = 0,
string localAddress = null )

Create a UdpDeviceConnection

Parameters
remote
timeOutThe timespan to wait for successful responses to host requests
localPortOptional fixed local port to receive device messages. 0 indicate automatic internal choice.
localAddressOptional address of the network interface to use. It is chosen automatically, if nothing is specified.

◆ UdpDeviceConnection() [2/2]

Gefasoft.LuconV2.UdpDeviceConnection.UdpDeviceConnection ( IPAddress remote,
TimeSpan? timeOut = null,
ushort localPort = 0,
IPAddress localAddress = null )

Create a UdpDeviceConnection with a user defined request-timeout.

Parameters
remote
timeOutThe timespan to wait for successful responses to host requests
localPortOptional fixed local port to receive device messages. 0 indicate automatic internal choice.
localAddressOptional address of the network interface to use. It is chosen automatically, if nothing is specified.

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