C# Class Atmo.Daq.Win32.BaseDaqUsbConnection

Inheritance: IDisposable
Afficher le fichier Open project: wind101net/atmo

Méthodes publiques

Méthode Description
Connect ( ) : bool

Forces a connection if possible.

Dispose ( ) : void

Closes and disposes the connection.

Méthodes protégées

Méthode Description
BaseDaqUsbConnection ( Atmo.Daq.Win32.PicHidUsbConnection usbConn ) : System

Constructs a new connection wrapping the given connection object.

BaseDaqUsbConnection ( string deviceId ) : System

Constructs a new connection for the given device ID.

ClearPacket ( byte data ) : void

Clears an array formatted as a new data packet.

The first byte will have the value 0 while the remaining bytes will have the value 255. The 0 value appears to be required while the other values are set to 255 to supposedly reduce the power required to transmit the packet.

Dispose ( bool disposing ) : void

Closes and disposes the connection.

DisposeComm ( ) : void

Closes and disposes the connection.

GenerateEmptyPacketData ( ) : byte[]

Generates 65 bytes which have been cleared using ClearPacket.

GenerateEmptyPacketData ( int dataSize ) : byte[]

Generates bytes which have been cleared using ClearPacket.

Method Details

BaseDaqUsbConnection() protected méthode

Constructs a new connection wrapping the given connection object.
protected BaseDaqUsbConnection ( Atmo.Daq.Win32.PicHidUsbConnection usbConn ) : System
usbConn Atmo.Daq.Win32.PicHidUsbConnection The USB connection to use.
Résultat System

BaseDaqUsbConnection() protected méthode

Constructs a new connection for the given device ID.
protected BaseDaqUsbConnection ( string deviceId ) : System
deviceId string The device ID to connect to.
Résultat System

ClearPacket() protected static méthode

Clears an array formatted as a new data packet.
The first byte will have the value 0 while the remaining bytes will have the value 255. The 0 value appears to be required while the other values are set to 255 to supposedly reduce the power required to transmit the packet.
protected static ClearPacket ( byte data ) : void
data byte The data to clear.
Résultat void

Connect() public méthode

Forces a connection if possible.
public Connect ( ) : bool
Résultat bool

Dispose() public méthode

Closes and disposes the connection.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Closes and disposes the connection.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

DisposeComm() protected méthode

Closes and disposes the connection.
protected DisposeComm ( ) : void
Résultat void

GenerateEmptyPacketData() protected static méthode

Generates 65 bytes which have been cleared using ClearPacket.
protected static GenerateEmptyPacketData ( ) : byte[]
Résultat byte[]

GenerateEmptyPacketData() protected static méthode

Generates bytes which have been cleared using ClearPacket.
protected static GenerateEmptyPacketData ( int dataSize ) : byte[]
dataSize int
Résultat byte[]