DeviceInfo Class

2/27/2008

The DeviceInfo class supplies POS applications with information about POS devices and the Service Objects associated with them. The PosExplorer methods, GetDevice and GetDevices return instances of DeviceInfo.

DeviceInfo Properties

The following table shows the DeviceInfo properties.

Property Type Description

Compatibility

DeviceCompatibilities

Lists the valid compatibility levels for a POS device (an OLE for Point of Service (OPOS) or .NET Service Object).

Description

string

Describes the Service Object.

HardwareDescription

string

Describes the physical device.

HardwareId

string

Provides the ID of the physical device.

HardwarePath

string

Provides the physical hardware path of the device.

IsDefault

bool

Returns true if the device is the default for its type.

LogicalNames

strings[]

Provides the alternative name(s) assigned to the device in the global configuration file by POS Device Manager (POSDM).

ManufacturerName

string

Provides the physical device manufacturer name.

ServiceObjectName

string

Provides the name of the Service Object.

ServiceObjectVersion

Version

Provides the Service Object version.

DeviceType

string

Provides the physical device type.

UposVersion

Version

Provides the UPOS version number.

DeviceInfo Methods

The following table shows the DeviceInfo methods.

Method Return Type Description

IsDeviceInfoOf

bool

Returns true if the Service Object corresponds to the DeviceInfo class properties.

ToString

string

Returns a string that describes the properties of the device.

Populating DeviceInfo Properties

The following table provides the sources for the information used by the PosExplorer methods GetDevice(System.String), and GetDevices when populating and returning instances of DeviceInfo. The table describes how PosExplorer populates DeviceInfo properties for three types of devices:

  • POS for .NET devices using Plug and Play
  • POS for .NET devices that are not using Plug and Play
  • Legacy OLE for Point of Service (OPOS) devices

Numbered lists show the sequence in which information sources are accessed. Iteration through the sequence stops when the sought-after data is first acquired.

DeviceInfo Property Information Source(s) for POS for .NET Plug and Play Devices Information Source(s) for POS for .NET Non-Plug and Play Devices Information Source(s) for Legacy OPOS Devices

Compatibility

PosExplorer sets to CompatibilityLevel1.

PosExplorer sets to CompatibilityLevel1.

PosExplorer sets to Opos.

Description

ServiceObject attribute in a Service Object assembly.

ServiceObject attribute in Service Object assembly.

  1. OPOS registry Description value under Device Name Key.
  2. OPOS registry Device Name Key subkey under Device Class Key.

HardwareDescription

Windows Plug and Play subsystem.

Blank.

Blank.

HardwareId

  1. HardwareId attribute in a Service Object assembly.
  2. XML configuration file in location specified by the ControlConfigs registry key.

Blank.

Blank.

HardwarePath

Windows Plug and Play subsystem.

  • Blank, or
  • POS Device Manager (POSDM) global configuration file as specified by adddevice or setpath.

Blank.

IsDefault

POSDM global configuration file as specified by setdefault.

POSDM global configuration file as specified by setdefault.

POSDM global configuration file as specified by setdefault.

LogicalNames

POSDM global configuration file as specified by addname.

POSDM global configuration file as specified by addname.

  1. POSDM global configuration file as specified by addname.
  2. The logical device name(s) as defined in the OPOS registry.

ManufacturerName

PosAssembly attribute in a Service Object assembly.

PosAssembly attribute in Service Object assembly.

Blank.

ServiceObjectName

ServiceObject attribute in a Service Object assembly.

ServiceObject attribute in Service Object assembly.

OPOS registry Device Name Key subkey under Device Class Key.

ServiceObjectVersion

Service Object AssemblyVersion attribute.

Service Object AssemblyVersion attribute.

OPOS registry Version value under Device Name Key.

DeviceType

ServiceObject attribute in a Service Object assembly.

ServiceObject attribute in Service Object assembly.

OPOS registry Device Class Key.

UposVersion

ServiceObject attribute in a Service Object assembly.

ServiceObject attribute in Service Object assembly.

OPOS registry Version value under Device Name Key.

See Also

Concepts

PosExplorer Class
Exception Classes

Other Resources

Developing a POS Application
POS for .NET API Support
POS Device Manager