Cicode Programming Reference > Cicode Function Categories > I/O Device Functions Introduction > DriverInfo

DriverInfo

Provides information about the driver for a specified I/O device. Select the device using the IODevice argument, and the information to be returned using the Type argument.

This function can only be used if the I/O Server is on the current machine. When the I/O Server is not in the calling process, this function will become blocking and cannot be called from a foreground task. In this case, the return value will be undefined and a Cicode hardware alarm will be raised.

Syntax

DriverInfo(IODevice, Type [, ClusterName] [, ServerName] )

IODevice:

The name of the I/O device.

Type:

The type of information returned about the driver. Specify one of the following:

0 - Driver Name

1 - Driver Title

2 - Block constant

3 - Max Retrys

4 - Transmit Delay

5 - Receive Timeout

6 - Polltime

7 - Watchtime (milliseconds

Note: The DISKDRV driver name is returned as "Disk" instead of "DISKDRV". If the Polltime is set as "Interrupt", the function returns "0".

ClusterName:

Specifies the name of the cluster in which the I/O Server resides. This is optional if you have one cluster or are resolving the I/O server via the current cluster context. The argument is enclosed in quotation marks "".

ServerName:

Specifies the name of the the I/O Server. This parameter is only required if you are running more than one I/O server process from the same cluster on the same computer and need to instruct the system which process to redirect to. The argument is enclosed in quotation marks "".

Return Value

The driver information as a string. In the case of an error the return value is an empty string.

Example

// Using the IODevice Number
sName = DriverInfo(20, 0); ! Get the name of the driver used with I/O device 20
sName = DriverInfo(2, 1); ! Get the title of the driver used with I/O device 2
// Using the IODevice Name
sName = DriverInfo("IODev",3); ! Get the Max Retrys value of the driver used with IODev
sName = DriverInfo("IODev1",5); ! Get the Receive Timeout value of the driver used with IODev1

See Also

I/O Device Functions