Serial Device Level 1
The NetCharDevEnum and NetCharDevGetInfo functions use the following data
structure when the sLevel parameter is 1:
struct chardev_info_1 {
unsigned char ch1_dev[DEVLEN+1];
unsigned char ch1_pad1;
unsigned short ch1_status;
unsigned char ch1_username[UNLEN+1];
unsigned char ch1_pad2;
unsigned long ch1_time;
};
where:
- ch1_dev is an ASCIIZ string specifying the
device name associated with the serial device.
- ch1_pad1 word-aligns the data structure components.
- ch1_status specifies the status of the device.
ch1_status is defined as follows: ┌───────┬──────────────────────────────────────────────────────────────────────┐
│ BIT │ MEANING │
├───────┼──────────────────────────────────────────────────────────────────────┤
│ 0 │ Reserved, with a value of 0. │
├───────┼──────────────────────────────────────────────────────────────────────┤
│ 1 │ If 0, the device is idle; if 1, the device is open and presumably
in │
│ │ use by some application. │
├───────┼──────────────────────────────────────────────────────────────────────┤
│ 2 │ If 0, the device has encountered no errors; if 1, the device has
│
│ │ encountered an error. │
├───────┼──────────────────────────────────────────────────────────────────────┤
│ 3-15 │ Reserved, with a value of 0. │
└───────┴──────────────────────────────────────────────────────────────────────┘
- ch1_username is an ASCIIZ string specifying
the current user of the device.
- ch1_pad2 word-aligns the data structure components.
- ch1_time specifies the number of seconds the
current application has been connected to the serial device.
[Back: Serial Device Level 0]
[Next: Serial Device Queue Level 0]