CVB.Net 14.0
DeviceControl Class Reference

Implementation of the IDeviceControl interface. More...

Inherits DeviceInterfaceBase, and IDeviceControl.

Public Member Functions

 DeviceControl (Device device)
 Ctor. More...
 
void SendCommand (DeviceControlCommand command, string value, out string result)
 Sends the given command value to the driver. More...
 
void SendCommand< Tin, Tout > (DeviceControlCommand command, Tin value, out Tout result)
 Sends the given command value to the driver. More...
 
void SendCommand (DeviceControlCommand command, IntPtr inputBuffer, int inputBufferSize, IntPtr outputBuffer, ref int outputBufferSize)
 Sends the given command buffer. More...
 
void SendCommand (DeviceControlCommand command, IntPtr inputBuffer, long inputBufferSize, IntPtr outputBuffer, ref long outputBufferSize)
 Sends the given command buffer. More...
 
- Public Member Functions inherited from DeviceInterfaceBase
 DeviceInterfaceBase (Device device)
 Ctor. More...
 
void SendCommand (DeviceControlCommand command, string value, out string result)
 Sends the given command value to the driver. More...
 
void SendCommand< Tin, Tout > (DeviceControlCommand command, Tin value, out Tout result)
 Sends the given command value to the driver. More...
 
void SendCommand (DeviceControlCommand command, IntPtr inputBuffer, int inputBufferSize, IntPtr outputBuffer, ref int outputBufferSize)
 Sends the given command buffer. More...
 
void SendCommand (DeviceControlCommand command, IntPtr inputBuffer, long inputBufferSize, IntPtr outputBuffer, ref long outputBufferSize)
 Sends the given command buffer. More...
 

Additional Inherited Members

- Properties inherited from DeviceInterfaceBase
Device Parent [get]
 The Device this interface works on.
 
- Properties inherited from IDeviceInterface
Device Parent [get]
 The Device this interface works on.
 

Detailed Description

Implementation of the IDeviceControl interface.

Constructor & Destructor Documentation

◆ DeviceControl()

DeviceControl ( Device  device)

Ctor.

Parameters
device

Member Function Documentation

◆ SendCommand() [1/3]

void SendCommand ( DeviceControlCommand  command,
IntPtr  inputBuffer,
int  inputBufferSize,
IntPtr  outputBuffer,
ref int  outputBufferSize 
)

Sends the given command buffer.

The inputBufferSize and outputBufferSize are given in bytes.

Parameters
commandCommand to execute.
inputBufferPointer to input buffer to send.
inputBufferSizeSize of inputBuffer data.
outputBufferPointer to buffer to received command data; IntPtr.Zero to query size in outputBufferSize .
outputBufferSizeSize of the outputBuffer data if not IntPtr.Zero; will receive the minimal necessary size otherwise.

Implements IDeviceControl.

◆ SendCommand() [2/3]

void SendCommand ( DeviceControlCommand  command,
IntPtr  inputBuffer,
long  inputBufferSize,
IntPtr  outputBuffer,
ref long  outputBufferSize 
)

Sends the given command buffer.

The inputBufferSize and outputBufferSize are given in bytes.

Parameters
commandCommand to execute.
inputBufferPointer to input buffer to send.
inputBufferSizeSize of inputBuffer data.
outputBufferPointer to buffer to received command data; IntPtr.Zero to query size in outputBufferSize .
outputBufferSizeSize of the outputBuffer data if not IntPtr.Zero; will receive the minimal necessary size otherwise.

Implements IDeviceControl.

◆ SendCommand() [3/3]

void SendCommand ( DeviceControlCommand  command,
string  value,
out string  result 
)

Sends the given command value to the driver.

Parameters
commandCommand to execute.
valueValue to send.
resultCommand answer string.

Implements IDeviceControl.

◆ SendCommand< Tin, Tout >()

void SendCommand< Tin, Tout > ( DeviceControlCommand  command,
Tin  value,
out Tout  result 
)

Sends the given command value to the driver.

Template Parameters
TinValue type (non-reference type).
ToutValue type (non-reference type).
Parameters
commandCommand to execute.
valueValue to send.
resultCommand answer.

Implements IDeviceControl.

Type Constraints
Tin :struct 
Tout :struct