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

Implements a virtual DeviceConnection, which the behavior of a Lucon. It might be used to provide a connection in the absence of real Lucon hardware, for example for development and testing. More...

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

Public Member Functions

 FakeDeviceConnection ()
 Create a FakeDeviceConnection with a default request timeout.
 FakeDeviceConnection (TimeSpan timeOut)
 Create a FakeDeviceConnection with a custom 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 virtual DeviceConnection, which the behavior of a Lucon. It might be used to provide a connection in the absence of real Lucon hardware, for example for development and testing.


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