|
Lucon SDK 1.0.7
|
Implements a DeviceConnection to a Lucon using a RS232 serial port. More...
Public Member Functions | |
| Rs232DeviceConnection (string port, uint baudRate=0, TimeSpan? timeOut=null) | |
| Create a new serial connection. | |
| 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< CommunicationEventArgs > | DataReceived [add, remove] |
| The event is raised, after a ASCII message is received on the connection. | |
| EventHandler< CommunicationEventArgs > | DataSent [add, remove] |
| The event is raised, after a ASCII message is sent on the connection. | |
| EventHandler< HintReceivedEventArgs > | HintReceived [add, remove] |
| The event handler is raised asynchronously, when a hint message from the device is received. | |
Implements a DeviceConnection to a Lucon using a RS232 serial port.
| Gefasoft.LuconV2.Rs232DeviceConnection.Rs232DeviceConnection | ( | string | port, |
| uint | baudRate = 0, | ||
| TimeSpan? | timeOut = null ) |
Create a new serial connection.
The specified baud rate must match the active device setting. If the device setting is changed, a new connection instance must be created. If a baud rate of 0 is specified, the factory default is used.
| port | Name of the serial port, e.g. "COM3" |
| timeOut | |
| baudRate |