DeviceInfo Class

Namespace: id3.Devices

Definition

Represents a device.
class DeviceInfo
class DeviceInfo implements Finalizable
public partial class DeviceInfo
public class DeviceInfo implements AutoCloseable, Serializable
typedef struct id3DevicesDeviceInfo *ID3_DEVICES_DEVICE_INFO;

Usage

deviceInfoInstance = DeviceInfo()
# ...

Explicit destruction

# ...
del deviceInfoInstance
final deviceInfoInstance = sdk.DeviceInfo();
// ...

Explicit destruction

// ...
deviceInfoInstance.dispose()
using (var deviceInfoInstance = new DeviceInfo())
{
   // ...
}

Explicit destruction

var deviceInfoInstance = new DeviceInfo()
// ...
deviceInfoInstance.Dispose()
try (DeviceInfo deviceInfoInstance = new DeviceInfo()) {
// ...
}

Explicit destruction

DeviceInfo deviceInfoInstance = new DeviceInfo();
// ...
deviceInfoInstance.close();
ID3_DEVICES_DEVICE_INFO hDeviceInfo{};
int err = id3DevicesDeviceInfo_Initialize(&hDeviceInfo);
if (err == ID3_SUCCESS) {
    // ...
    id3DevicesDeviceInfo_Dispose(&hDeviceInfo);
}

Properties

Name

Type

Description

commandCallback

DeviceCommandCallback

(C++) Specifies a callback function for executing commands on the device, applicable only in certain programming environments (e.g., C++).

deviceId

int

An integer identifier for the device, unique within the system to distinguish between devices.

deviceState

DeviceState

Reflects the current operational state of the device, such as active, inactive, or error conditions, and is read-only from the device’s perspective.

deviceType

DeviceType

Enumerated type defining the category or function of the device, such as sensor, actuator, etc., with a default state of Unknown.

lastErrorCode

int

Stores the last error code encountered by the device, useful for debugging and error handling, and is read-only.

link

string

A string representing a connection link or a reference to the device, possibly a URL or a network path.

model

string

A string identifying the device model, providing specific information about the device’s design or capabilities.

mustBeDiscarded

bool

(C++) A boolean flag indicating whether the device should be discarded by the device manager, allowing for dynamic management based on device health or relevance.

name

string

The human-readable name of the device, used for identification and display purposes.

Methods

Name

Description

getCommandCallbackContext

(C++) In environments supporting callbacks (e.g., C++), this function retrieves the context associated with the device’s command callback, facilitating custom command execution.