Devices
UOS hardware devices consist of three items:
Type indicates the type of device. Controller is a number between 0 and 25, indicating which hardware controller, of the type. Unit is the device index on that controller.
The HAL keeps a list of devices, and can be queried for information about these devices by using an index (index 0 is the first device). The TDevice_Info structure is how this information is communicated back from the HAL.
The TDevice_Info structure is used to return information about a given device:
type TDevice_Info = packed record
Device_Type : word ;
Controller : word ;
Device_Unit : word ;
Disabled : boolean ;
Media_Present : boolean ;
end ;
The items in this structure are described in this table:
Item |
Description |
Device_Type |
Type of device. See Device types, below. |
Controller |
Controller index |
Device_Unit |
Unit number of the device |
Disabled |
True if the device is disabled |
Media_Present |
True if media is present in the device. |
Device types have the following values:
Value |
Mnuemonic |
Description |
0 |
DT_Non_Existant |
Invalid device index |
1 |
DT_Unknown |
Type not otherwise included here |
2 |
DT_Serial |
Serial (stream) device |
3 |
DT_Store |
Data store |