@@ -36,4 +36,62 @@ public interface DeviceInfo {
36
36
* @return the table of information on this device, or <code>null</code>.
37
37
*/
38
38
Map <String , String > getDeviceInfo ();
39
+
40
+ /**
41
+ * Recommended list of key values for the device info table.
42
+ * <p/>
43
+ * You are strongly encouraged to at least define <code>class</code>, <code>description</code>,
44
+ * <code>vendor</code> and <code>product</code>, to allow a more homogenous experience for the
45
+ * end-user reading this information via a script.
46
+ * <p/>
47
+ * Feel free to be somewhat... flexible with the designated uses of these fields. For example,
48
+ * the capacity and size fields have differing meaning depending on the device in OpenComputers
49
+ * itself (e.g. they're used for maximum number of characters for graphics cards, width is
50
+ * used for bit depth on graphics cards, etc.), just try to stick with what's somewhat logical.
51
+ */
52
+ final class DeviceAttribute {
Has a conversation. Original line has a conversation.
53
+ public static final String Class = "class" ; // device's class (see below), e.g. "processor"
54
+ public static final String Description = "description" ; // human-readable description of the hardware node, e.g. "Ethernet interface"
55
+ public static final String Vendor = "vendor" ; // vendor/manufacturer of the device, e.g. "Minecorp Inc."
56
+ public static final String Product = "product" ; // product name of the device, e.g. "ATY Raderps 4200X"
57
+ public static final String Version = "version" ; // version/release of the device, e.g. "2.1.0"
58
+ public static final String Serial = "serial" ; // serial number of the device
59
+ public static final String Capacity = "capacity" ; // maximum capacity reported by the device, e.g. unformatted size of a disk
60
+ public static final String Size = "size" ; // actual size of the device, e.g. actual usable space on a disk
61
+ public static final String Clock = "clock" ; // bus clock (in Hz) of the device, e.g. call speed(s) of a component
62
+ public static final String Width = "width" ; // address width of the device, in the broadest sense
63
+
64
+ private DeviceAttribute () {
65
+ }
66
+ }
67
+
68
+ /**
69
+ * Recommended list of values for the <code>class</code> attribute (see above).
70
+ * <p/>
71
+ * Again, feel free to be somewhat creative with those. When in doubt, use <code>generic</code>.
72
+ */
73
+ final class DeviceClass {
74
+ public static final String System = "system" ; // used to refer to the whole machine, e.g. "Computer", "Server", "Robot"
75
+ public static final String Bridge = "bridge" ; // internal bus converter, maybe useful for some low-level archs?
76
+ public static final String Memory = "memory" ; // memory bank that can contain data, executable code, e.g. RAM, EEPROM
77
+ public static final String Processor = "processor" ; // execution processor, e.g. CPU, cryptography support
78
+ public static final String Address = "address" ; // memory address range, e.g. video memory (again, low-level archs maybe?)
79
+ public static final String Storage = "storage" ; // storage controller, e.g. IDE controller (low-level...)
80
+ public static final String Disk = "disk" ; // random-access storage device, e.g. floppies
81
+ public static final String Tape = "tape" ; // sequential-access storage device, e.g. cassette tapes
82
+ public static final String Bus = "bus" ; // device-connecting bus, e.g. USB
83
+ public static final String Network = "network" ; // network interface, e.g. ethernet, wlan
84
+ public static final String Display = "display" ; // display adapter, e.g. graphics cards
85
+ public static final String Input = "input" ; // user input device, e.g. keyboard, mouse
86
+ public static final String Printer = "printer" ; // printing device, e.g. printer, 3D-printer
87
+ public static final String Multimedia = "multimedia" ; // audio/video device, e.g. sound cards
88
+ public static final String Communication = "communication" ; // line communication device, e.g. modem, serial ports
89
+ public static final String Power = "power" ; // energy source, e.g. battery, power supply
90
+ public static final String Volume = "volume" ; // disk volume, e.g. file system
91
+ public static final String Generic = "generic" ; // generic device (used when no other class is suitable)
92
+
93
+ private DeviceClass () {
94
+ }
95
+ }
96
+
39
97
}