Nedap.HandheldApi
Public Member Functions | Properties | Events
Nedap.HandheldApi.CommunicationQueue.ICommunicationPort Interface Reference

Interface to communication port. More...

Inheritance diagram for Nedap.HandheldApi.CommunicationQueue.ICommunicationPort:
Nedap.HandheldApi.CommunicationPort.BluetoothCommunicationPort Nedap.HandheldApi.CommunicationPort.SerialCommunicationPort

List of all members.

Public Member Functions

bool Connect ()
 Connect to port.
bool Disconnect ()
 Disconnect from port.
int WriteData (byte[] buffer, int offset, int length)
 Writes data to port.
int ReadData (byte[] buffer, int offset, int length)
 Reads data from port, if no data is available it should return with 0 result.

Properties

bool Connected [get]
 Defines if port is connected.

Events

EventHandler OnDataReceived
 Event thrown when data is available to read.

Detailed Description

Interface to communication port.


Member Function Documentation

bool Nedap.HandheldApi.CommunicationQueue.ICommunicationPort.Connect ( )
bool Nedap.HandheldApi.CommunicationQueue.ICommunicationPort.Disconnect ( )
int Nedap.HandheldApi.CommunicationQueue.ICommunicationPort.ReadData ( byte[]  buffer,
int  offset,
int  length 
)

Reads data from port, if no data is available it should return with 0 result.

Parameters:
bufferBuffer to read into
offsetPosition where to start writing
lengthMaximum number of bytes to read
Returns:
Actual read bytes, which is possible to be 0 if no data is available

Implemented in Nedap.HandheldApi.CommunicationPort.BluetoothCommunicationPort, and Nedap.HandheldApi.CommunicationPort.SerialCommunicationPort.

int Nedap.HandheldApi.CommunicationQueue.ICommunicationPort.WriteData ( byte[]  buffer,
int  offset,
int  length 
)

Writes data to port.

Parameters:
bufferData buffer
offsetPosition where to start writing
lengthNumber of bytes to write
Returns:

Implemented in Nedap.HandheldApi.CommunicationPort.BluetoothCommunicationPort, and Nedap.HandheldApi.CommunicationPort.SerialCommunicationPort.


Property Documentation

bool Nedap.HandheldApi.CommunicationQueue.ICommunicationPort.Connected [get]

Event Documentation

EventHandler Nedap.HandheldApi.CommunicationQueue.ICommunicationPort.OnDataReceived