CanEasy COM-Help
CanEasy::ISerialPort Interface Reference

Inherits IDispatch.

Detailed Description

Allows to read/write data to a serial (COM) port

interface ISerialPort : IDispatch
{
HRESULT Write([in] VARIANT vData, [in] long lTimeout, [out, retval] long*);
HRESULT Read([in] long lLength, [in] long lTimeout, [out, retval] VARIANT*);
HRESULT Open([out, retval] VARIANT_BOOL*);
HRESULT Close();
HRESULT Baudrate([out, retval] long* pBaudrate);
HRESULT Baudrate([in] long lBaudrate);
HRESULT DataBits([out, retval] long* pDataBits);
HRESULT DataBits([in] long lDataBits);
HRESULT StopBits([out, retval] long* pStopBits);
HRESULT StopBits([in] long oStopBits);
HRESULT Parity([out, retval] long* pParity);
HRESULT Parity([in] long lParity);
HRESULT Port([out, retval] long* pPort);
HRESULT Port([in] long lPort);
};

Definition at line 7433 of file cand_tlb.idl.

Member Function Documentation

◆ Close()

HRESULT CanEasy::ISerialPort::Close ( )

Closes the port

◆ Open()

HRESULT CanEasy::ISerialPort::Open ( [out, retval] VARIANT_BOOL *  )

Opens the port

Returns
True on success

◆ Read()

HRESULT CanEasy::ISerialPort::Read ( [in] long  lLength,
[in] long  lTimeout,
[out, retval] VARIANT *   
)

Reads data from a COM port

Parameters
lLengthAmount of bytes to read
lTimeoutMaximum time to wait in milliseconds
Returns
Read data

◆ Write()

HRESULT CanEasy::ISerialPort::Write ( [in] VARIANT  vData,
[in] long  lTimeout,
[out, retval] long *   
)

Writes data to a COM port

Parameters
vDataData to write
lTimeoutMaximum time to wait in milliseconds
Returns
Amount of bytes written

Property Documentation

◆ Baudrate

long CanEasy::ISerialPort::Baudrate
getset

Baudrate used to init the port

◆ DataBits

long CanEasy::ISerialPort::DataBits
getset

Data bits used to init the port

◆ Parity

long CanEasy::ISerialPort::Parity
getset

Parity bits used to init the port

◆ Port

long CanEasy::ISerialPort::Port
getset

COM port used to init the port

◆ StopBits

long CanEasy::ISerialPort::StopBits
getset

Stop bits used to init the port

CanEasy::ISerialPort::Open
HRESULT Open([out, retval] VARIANT_BOOL *)
CanEasy::ISerialPort::StopBits
long StopBits
CanEasy::ISerialPort::Close
HRESULT Close()
CanEasy::ISerialPort::Baudrate
long Baudrate
CanEasy::ISerialPort::Read
HRESULT Read([in] long lLength, [in] long lTimeout, [out, retval] VARIANT *)
CanEasy::ISerialPort::Parity
long Parity
CanEasy::ISerialPort::Port
long Port
CanEasy::ISerialPort::DataBits
long DataBits
CanEasy::ISerialPort::Write
HRESULT Write([in] VARIANT vData, [in] long lTimeout, [out, retval] long *)