diolib_h

/*
**	Copyright 1991-2017, Fermi Research Alliance, LLC.  All rights reserved.
*/
/******************************************************************************/
/* diolib.h
**
**	function prototypes and defined constants for argument values for
**	DIO routines
**
**	V0.1	B S Hendricks / Accelerator Controls		29-Oct-92
**	Removed redundant definitions for LEN_EMC and LEN_SSDN
**
**	V0.2	B S Hendricks / Accelerator Controls		01-Jun-94
**	Added function prototype case insensitivity definitions
**
**	V0.3	J. DeVoy / Accelerator Controls			09-Jan-02
**	Modify for new FermiAtom routines.
**
*/
/******************************************************************************/

#ifndef DIOLIB_DEFINED		/* do this only once */
#define	DIOLIB_DEFINED

#include "cnsparam.h"
#include "cns_data_structs.h"
#include "dbprops.h"

/*
* DIO...
*/

    #if FALSE
        #define	DIO_MAX_READ_SIZE	3982		/* maximum number of bytes in a reading request */
    #endif
//    #define	DIO_MAX_READ_SIZE	(8192 + 128)	/* maximum number of bytes in a reading request */
    #define	DIO_MAX_READ_SIZE	(32767)		/* maximum number of bytes in a reading request */

    #define	DIO_MAX_SET_SIZE	8000		/* maximum number of bytes in a setting request */

    #define	DIO_MAX_PROPERTY_SIZE	(MAX_PROPERTY_SIZE)	/* maximum number of bytes for a device property */

    #define	DIO_DEVICE_INDEX_MASK	(0xFFFFF)	/* mask to extract a valid device index */
    #define	DIO_FAMILY_DI_MASK	(0x800000)	/* test for family device */
    #define	DIO_BAD_DEVICE_INDEX_MASK	(0xFF000000)	/* test for invalid device index */

    #define	DIO_INVALID_DEVICE_INDEX	0	/* invalid device index */
    #define	DIO_MINIMUM_VALID_DEVICE_INDEX	2	/* minimum valid device index */
    #define	DIO_MAX_DEVICE_INDEX	1048575	/* maximum possible device index */
    #define	DIO_IS_ILLEGAL_DEVICE_INDEX(di)	(((di) > DIO_INVALID_DEVICE_INDEX) && \
    						 ((di) < DIO_MINIMUM_VALID_DEVICE_INDEX))	/* is event displayed? */

    #define	DIO_MAX_DEVICE_INDEX_LENGTH	7	/* maximum length of a device index */

    #define	DIO_NAME_TYPE_UNKNOWN		(-1)	/* unknown name type */
    #define	DIO_NAME_TYPE_CLASSIC		0	/* classic 8 character name */
    #define	DIO_NAME_TYPE_FULL		1	/* full name */
    #define	DIO_NAME_TYPE_INDEX_NAME	2	/* device index name */
    #define	DIO_NAME_TYPE_DEVICE_INDEX	3	/* simple device index */

    #define	DIO_DEVICE_INDEX_NAME_LEN	(DEVICE_PREFIX_LEN + DIO_MAX_DEVICE_INDEX_LENGTH)
    #define	DIO_LONG_DEVICE_INDEX_NAME_LEN	(DIO_DEVICE_INDEX_NAME_LEN + 4)
    #define	DIO_C_STYLE_DEVICE_INDEX_NAME_LEN	(DIO_DEVICE_INDEX_NAME_LEN + 12)

    #define	DIO_DEVICE_INDEX_CHAR	'0'

    #define	DIO_MAX_FAMILY_SIZE	300	/* maximum family size */

    #define	DIO_MAX_ALARM_BLOCKS	16	/* maximum number of alarm blocks per device */

    #define	DIO_INVALID_LIST_ID	-1	/* invalid list ID value */

    #define	DIO_ALARM_IS_DISPLAYED(flags)	(((flags) >> 15) & 1)	/* is event displayed? */
    #define	DIO_ALARM_IS_LOGGED(flags)	(((flags) >> 14) & 1)	/* is event logged? */
    #define	DIO_ALARM_IS_EVENT(flags)	(((flags) >> 13) & 1)	/* is this an event alarm? */
    #define	DIO_ALARM_IS_HIGH(flags)	(((flags) >> 12) & 1)	/* is this a high alarm? */
    #define	DIO_ALARM_IS_LOW(flags)		(((flags) >> 11) & 1)	/* is this a low alarm? */
    #define	DIO_ALARM_LIMIT_CLASS(flags)	(((flags) >> 8) & 3)	/* extract alarm limit type */
    #define	DIO_ALARM_IS_DIGITAL(flags)	(((flags) >> 7) & 1)	/* is this a digital alarm? */
    #define	DIO_ALARM_LIMIT_SIZE(flags)	(1 << (((flags) >> 5) & 3))	/* extract alarm limit length */
    #define	DIO_ALARM_IS_ABORT_INHIBIT(flags)	(((flags) >> 3) & 1)	/* is abort inhibited? */
    #define	DIO_ALARM_IS_ABORT(flags)	(((flags) >> 2) & 1)	/* is abort inhibited? */
    #define	DIO_ALARM_IS_BAD(flags)		(((flags) >> 1) & 1)	/* is it in alarm? */
    #define	DIO_ALARM_IS_ENABLED(flags)	((flags) & 1)		/* is alarm enabled? */

    #define	DIO_ALARM_LIMITS_BAD	-1	/* both alarm limits are bad */
    #define	DIO_ALARM_LIMITS_OK	0	/* both alarm limits are OK */
    #define	DIO_ALARM_MINIMUM_OK	1	/* only the alarm minimum was returned successfully */
    #define	DIO_ALARM_MAXIMUM_OK	2	/* only the alarm maximum was returned successfully */

/******************************************************************************/
/* 
**	defined constants for argument values
*/
/******************************************************************************/

    #define	DIO_EVENT_TYPE_FTD		0	/* Frequency Type Descriptor */
    #define	DIO_EVENT_TYPE_DATA_EVENT	1	/* full-fledged data event */

    #define	FTD_ONESHOT		0	/* DPM one shot request */
    #define	FTD_DEFAULT		1	/* DPM default request */
    #define	FTD_NOSHOT		2	/* DPM no shot request */
    #define	FTD_INVALID		3	/* DPM invalid request */
    #define	FTD_15HZ		4	/* DPM 15 Hz request */
    #define	FTD_1HZ			60	/* DPM 1 Hz request */
    #define	FTD_2HZ			30	/* DPM 2 Hz request */
    #define	FTD_3HZ			20	/* DPM 3 Hz request */
    #define	FTD_4HZ			15	/* DPM 4 Hz request */
    #define	FTD_5HZ			12	/* DPM 5 Hz request */
    #define	FTD_EVENT_MASK		0x8000	/* mask indicating event-based request */
    #define	FTD_ONESHOT_MASK	0x4000	/* mask indicating one shot request */
    #define	FTD_STATE_MASK		0x2000	/* mask indicating state-based request */
    #define	FTD_IS_ONESHOT(x)	(((x)==(FTD_ONESHOT))||((x)&(FTD_ONESHOT_MASK)))
    #define	FTD_MAX_MOOC_EVENT_DELAY	1270	/* maximum MOOC event delay in milliseconds */
    #define	FTD_MOOC_EVENT_DELAY_RESOLUTION	10	/* MOOC event delay resolution in milliseconds */

    #define	DATA_EVENT_TYPE_CHAR_DEFAULT	'u'	/* default data event */
    #define	DATA_EVENT_TYPE_CHAR_ONCE	'i'	/* one shot data event */
    #define	DATA_EVENT_TYPE_CHAR_PERIODIC	'p'	/* periodic data event */
    #define	DATA_EVENT_TYPE_CHAR_CLOCK	'e'	/* clock event data event */
    #define	DATA_EVENT_TYPE_CHAR_STATE	's'	/* state data event */
    #define	DATA_EVENT_TYPE_CHAR_CLIENT	'c'	/* client data event */

    #define	DATA_EVENT_ONESHOT	"i"	/* one shot data event request */
    #define	DATA_EVENT_DEFAULT	"u"	/* default data event request */
    #define	DATA_EVENT_1HZ		"p,1000,true"	/* 1 Hz data event request */
    #define	DATA_EVENT_2HZ		"p,500,true"	/* 2 Hz data event request */
    #define	DATA_EVENT_5HZ		"p,200,true"	/* 5 Hz data event request */
    #define	DATA_EVENT_15HZ		"p,66,true"	/* 15 Hz data event request */

    #define	DIO_WAIT_FOR_SET	0	/* queue setting and wait for reply */
    #define	DIO_NO_WAIT_SET		1	/* make setting, but don't wait for reply */
    #define	DIO_QUEUE_SET		-1	/* queue for future setting */

    #define	DIO_INVALID_DATA	-1	/* invalid returned data */
    #define	DIO_NOT_SUPPLIED	-3	/* value not supplied */

    #define	DIO_DONT_CARE		-2	/* leave this data in its present state */

    #define	DIO_ANALOG		0	/* analog alarm */
    #define	DIO_DIGITAL		1	/* digital alarm */
    #define	DIO_ANALOG_AND_DIGITAL	3	/* analog or digital alarm */

    #define	DIO_SET_REQUEST		1	/* delete request type */
    #define	DIO_READ_REQUEST	2	/* delete request type */
    #define	DIO_ALL_REQUEST		3	/* delete request type */

    #define	DIO_ALARM_BLOCK_DATA	0	/* requesting entire alarm block */
    #define	DIO_ALARM_FLAGS_DATA	1	/* requesting alarm flag information */
    #define	DIO_ALARM_LIMITS_DATA	2	/* requesting alarm limit information */
    #define	DIO_ALARM_TRIES_DATA	3	/* requesting alarm tries information */
    #define	DIO_ALARM_EVENTS_DATA	4	/* requesting alarm event information */
    #define	DIO_ANALOG_ALARM_LIMITS_DATA	5	/* requesting analog alarm limit information */

    #define	DIO_ALARM_STATE		1	/* want alarm state */
    #define	DIO_ALARM_ENABLE	2	/* want alarm enable status */
    #define	DIO_ALARM_POST_METHOD	4	/* want alarm posting method */
    #define	DIO_ALARM_ABORT_CAPABLE	8	/* want alarm abort capability status */
    #define	DIO_ALARM_ABORT_ENABLE	0x10	/* want alarm abort enable status */
    #define	DIO_ALARM_LIMIT_TYPE	0x20	/* want alarm limit type */
    #define	DIO_ALARM_LIMIT_LENGTH	0x40	/* want alarm limit length */
    #define	DIO_ALARM_HI_LOW	0x80	/* want alarm high/low status */
    #define	DIO_ALARM_MINIMUM	0x100	/* want alarm minimum */
    #define	DIO_ALARM_DIG_NOMINAL	0x200	/* want alarm nominal (digital) */
    #define	DIO_ALARM_MAXIMUM	0x400	/* want alarm maximum */
    #define	DIO_ALARM_MASK		0x800	/* want alarm mask */
    #define	DIO_ALARM_TRIES_NEEDED	0x1000	/* want alarm tries needed */
    #define	DIO_ALARM_TRIES_NOW	0x2000	/* want alarm tries now */
    #define	DIO_ALARM_EVENT		0x4000	/* want alarm event */
    #define	DIO_ALARM_SUBFUNCTION	0x8000	/* want alarm subfunction code */
    #define	DIO_ALARM_DOUBLE_MINIMUM	0x10000	/* want alarm minimum (double) */
    #define	DIO_ALARM_DOUBLE_MAXIMUM	0x20000	/* want alarm maximum (double) */
    #define	DIO_ALARM_NOMINAL	0x40000	/* want alarm nominal (analog) */
    #define	DIO_ALARM_TOLERANCE	0x80000	/* want alarm tolerance */
    #define	DIO_ALARM_DOUBLE_NOMINAL	0x100000	/* want alarm nominal (double) */
    #define	DIO_ALARM_DOUBLE_TOLERANCE	0x200000	/* want alarm tolerance (double) */
    #define	DIO_ALARM_TYPE		0x400000	/* want alarm type */
    #define	DIO_ALARM_DISPLAY_ENABLE	0x800000	/* want alarm display enable status */
    #define	DIO_ALARM_LOG_ENABLE	0x1000000	/* want alarm log enable status */
    #define	DIO_ALARM_LIMIT_DATA_TYPE	0x2000000	/* want alarm limit data type */
    #define	DIO_ALARM_FTD		0x4000000	/* want alarm FTD */
    #define	DIO_ALARM_MINIMUM_PRIMARY	0x8000000	/* want alarm minimum (primary units) */
    #define	DIO_ALARM_MAXIMUM_PRIMARY	0x10000000	/* want alarm maximum (primary units) */
    #define	DIO_ALARM_MINIMUM_RAW	0x20000000	/* want alarm minimum (primary units) */
    #define	DIO_ALARM_MAXIMUM_RAW	0x40000000	/* want alarm maximum (primary units) */
    #define	DIO_ALARM_NOMINAL_PRIMARY	0x80000000	/* want alarm nominal (primary units) */
    #define	DIO_ALARM_TOLERANCE_PRIMARY	0x80000001	/* want alarm tolerance (primary units) */

    #define	DIO_RAW			(-1)	/* raw units */
    #define	DIO_PRIMARY		0	/* primary units */
    #define	DIO_COMMON		1	/* common units */
    #define	DIO_PRIMARY_DOUBLE	2	/* primary units (double precision) */
    #define	DIO_COMMON_DOUBLE	3	/* common units (double precision) */

    #define	DIO_FIELD_NONE			0	/* no field specified */
    #define	DIO_FIELD_ALARM_STATE		1	/* want alarm state */
    #define	DIO_FIELD_ALARM_ENABLE		2	/* want alarm enable status */
    #define	DIO_FIELD_ALARM_ABORT_CAPABLE	3	/* want alarm abort capability status */
    #define	DIO_FIELD_ALARM_ABORT_ENABLE	4	/* want alarm abort enable status */
    #define	DIO_FIELD_ALARM_FLAGS		5	/* want alarm flags word */
    #define	DIO_FIELD_ALARM_MINIMUM		6	/* want alarm minimum */
    #define	DIO_FIELD_ALARM_MAXIMUM		7	/* want alarm maximum */
    #define	DIO_FIELD_ALARM_NOMINAL		8	/* want alarm nominal (analog) */
    #define	DIO_FIELD_ALARM_TOLERANCE	9	/* want alarm tolerance */
    #define	DIO_FIELD_ALARM_DIG_NOMINAL	10	/* want alarm nominal (digital) */
    #define	DIO_FIELD_ALARM_MASK		11	/* want alarm mask */
    #define	DIO_FIELD_ALARM_TRIES_NEEDED	12	/* want alarm tries needed */
    #define	DIO_FIELD_ALARM_TRIES_NOW	13	/* want alarm tries now */
    #define	DIO_FIELD_ALARM_FTD		14	/* want alarm FTD */
    #define	DIO_FIELD_ALARM_BLOCK_DATA	15	/* want entire alarm block */
    #define	DIO_FIELD_TEXT			16	/* want text representation of property */
    #define	DIO_FIELD_ON_STATUS		17	/* want "on" status value */
    #define	DIO_FIELD_READY_STATUS		18	/* want "ready" status value */
    #define	DIO_FIELD_REMOTE_STATUS		19	/* want "remote" status value */
    #define	DIO_FIELD_POSITIVE_STATUS	20	/* want "positive" status value */
    #define	DIO_FIELD_RAMP_STATUS		21	/* want "ramp" status value */

    #define	DIO_STRING_SCALING_TRANSFORM	60	/* transform for raw to string scaling */
    #define	DIO_STRING_SCALING_TRANSFORM_2	84	/* transform for raw to string scaling (with supplemental scaling) */

    #define	DIO_STRING_SCALING_TYPE_INDEX		0	/* string scaling conversion type index (in array of constants) */
    #define	DIO_STRING_SCALING_LENGTH_INDEX		1	/* string scaling conversion length index (in array of constants) */
    #define	DIO_STRING_SCALING_HANDLER_INDEX	2	/* string scaling conversion data handler index (in array of constants) */

    #define	DIO_SCALING_TEXT_LEN	60	/* length of scaling transform text */

    #define	DIO_SHORT_DISPLAY_LEN	6	/* length of a short display */
    #define	DIO_LONG_DISPLAY_LEN	10	/* length of a long display */

    #define	DIO_NUM_SCALING_CONSTANTS	6	/* number of scaling constants */

    #define	DIO_STANDARD_NOTATION	1	/* display in standard notation */
    #define	DIO_SCIENTIFIC_NOTATION	2	/* display in scientific notation */

    #define	DIO_HANDLER_NONE	0	/* no special data handling required */
    #define	DIO_HANDLER_SWAP_BYTES	1	/* swap bytes */
    #define	DIO_HANDLER_SWAP_WORDS	2	/* swap words */
    #define	DIO_HANDLER_IEEE_TO_DEC	4	/* IEEE to DEC floating point conversion */

    #define	DIO_EXT_TEXT_LEN	24	/* length of an extended text string */
    #define	DIO_COND_EXT_TEXT_LEN	7	/* length of a conditional extended text string */
    #define	DIO_MAX_EXT_TEXT	256	/* maximum number of extended text entries */

    #define	DIO_MAX_DIGITAL_ALARM_TEXT	32	/* maximum number of digital alarm text entries */

    #define	DIO_DEVICE_HELP_URL_LENGTH	64	/* maximum length of a device help URL string */
    #define	DIO_ALARM_URL_LENGTH	128	/* maximum length of an alarm URL string */

    #define	DIO_STRUCTURE_NAME_LEN	64	/* maximum length of a property structure name */

    #define	DIO_DEPARTMENT_NAME_LEN	64	/* maximum length of a lab department name */

    #define	DIO_MACHINE_NAME_LEN		32	/* maximum length of a machine name */
    #define	DIO_MACHINE_LONG_NAME_LEN	128	/* maximum length of a machine name (long text) */

    #define	DIO_AREA_NAME_LEN		30	/* maximum length of an area name */

    #define	DIO_OBSOLETE_COMMENT_LEN	80	/* maximum length of a device obsolete comment */

    #define	DIO_DOCUMENT_COMMENT_LEN	80	/* maximum length of a device document comment */

    #define	DIO_EDIT_COMMENT_LEN	255	/* maximum length of a device edit comment */

    #define	DIO_LOCATION_TEXT_LEN	64	/* maximum length of a device location text string */
    #define	DIO_RACK_TEXT_LEN	16	/* maximum length of a device rack text string */

    #define	DIO_MAX_DIGITAL_CONTROL_ENTRIES	256	/* maximum number of digital control entries */

    #define	DIO_MAX_ENUM_VALUE_ENTRIES	256	/* maximum number of enumerated value entries */

    #define	DIO_UNKNOWN_DATA_TYPE	0	/* unknown data type */
    #define	DIO_CHAR		1	/* signed one byte integer */
    #define	DIO_SHORT		2	/* signed two byte integer */
    #define	DIO_LONG		3	/* signed four byte integer */
    #define	DIO_SHORT_SWAPPED	4	/* byte swapped two byte integer */
    #define	DIO_LONG_SWAPPED	5	/* byte swapped four byte integer */
    #define	DIO_UNSIGNED_CHAR	6	/* unsigned one byte integer */
    #define	DIO_UNSIGNED_SHORT	7	/* unsigned two byte integer */
    #define	DIO_UNSIGNED_LONG	8	/* unsigned four byte integer */
    #define	DIO_FLOAT		9	/* four byte DEC floating point value */
    #define	DIO_IEEE_FLOAT		10	/* four byte IEEE floating point value */
    #define	DIO_IEEE_FLOAT_SWAPPED	11	/* byte swapped four byte IEEE floating point value */
    #define	DIO_LOW_BYTE_DATA	12	/* one byte integer extracted from the low order byte of the incoming data */
    #define	DIO_HIGH_BYTE_DATA	13	/* one byte integer extracted from the high order byte of the incoming data */
    #define	DIO_BCD_DATA		14	/* Binary Coded Decimal data */
    #define	DIO_2323_DATA		15	/* 13 bit data from a CAMAC 2323 module */
    #define	DIO_IEEE_FLOAT_0_10	16	/* four byte IEEE floating point value (limited to 0.0 - 10.0) */
    #define	DIO_UNSIGNED_LOW_BYTE	17	/* one byte unsigned integer extracted from the low order byte of the incoming data */
    #define	DIO_UNSIGNED_HIGH_BYTE	18	/* one byte unsigned integer extracted from the high order byte of the incoming data */
    #define	DIO_UNSIGNED_LONG_SWAPPED	19	/* word swapped unsigned four byte integer */
    #define	DIO_IEEE_FLOAT_0_5	20	/* four byte IEEE floating point value (limited to 0.0 - 5.0) */
    #define	DIO_IEEE_FLOAT_M10_10	21	/* four byte IEEE floating point value (limited to -10.24 - 10.235) */

    #define	DIO_SHORT_DEVICE_TEXT	1	/* request short device text */
    #define	DIO_LONG_DEVICE_TEXT	2	/* request long device text */

    #define	DIO_SHORT_DEVICE_TEXT_LEN	12	/* length of short device text */
    #define	DIO_LONG_DEVICE_TEXT_LEN	80	/* length of long device text */

    #define	DIO_CLASS_TEXT_LEN	32	/* length of a device class name */

    #define	DIO_MAX_FOREIGN_DEVICE_ENTRIES	32	/* maximum number of foreign devices mapped to a single ACNET property */

typedef struct DIO_FOREIGN_DEVICE_ENTRY
    {
    int		device_index;
    short	property;
    int		system_type;
    int		field_number;
    char	pv_name[FOREIGN_DEVICE_PV_NAME_LEN+2];
    int		data_type;
    int		start_index;
    int		num_elements;
    int		data_length;
    } __attribute__((packed)) DIO_FOREIGN_DEVICE_ENTRY;

    #define	DIO_NOMTOL		0	/* nominal/tolerance limits */
    #define	DIO_NOMPER		1	/* nominal/percent tolerance limits */
    #define	DIO_MINMAX		2	/* minimum/maximum limits */
    #define	DIO_USER_LIMIT_TYPE	4	/* use database/uer limit type */

    #define	DIO_ALARM_HIGH_LOW_NOT_SUPPORTED	0	/* high/low alarm status is not supported */
    #define	DIO_ALARM_VALUE_IS_LOW			1	/* alarm is low */
    #define	DIO_ALARM_VALUE_IS_HIGH			2	/* alarm is high */

    #define	DIO_NUM_STATUS_TYPES	4	/* number of basic status fields */
    #define	DIO_NUM_CONTROL_TYPES	5	/* number of basic control commands */

    #define	DIO_STATUS_ATTR_TEXT_LEN	4	/* status attribute text length */

    #define	DIO_RESET_COMMAND	1	/* reset command */
    #define	DIO_ON_COMMAND		2	/* on command */
    #define	DIO_OFF_COMMAND		3	/* off command */
    #define	DIO_POS_COMMAND		4	/* positive polarity command */
    #define	DIO_POSITIVE_COMMAND	4	/* positive polarity command */
    #define	DIO_NEG_COMMAND		5	/* negative polarity command */
    #define	DIO_NEGATIVE_COMMAND	5	/* negative polarity command */
    #define	DIO_RAMP_COMMAND	6	/* ramp command */
    #define	DIO_DC_COMMAND		7	/* DC command */

    #define	DIO_RESET		1	/* reset command */
    #define	DIO_ON			2	/* on command */
    #define	DIO_OFF			3	/* off command */
    #define	DIO_POS			4	/* positive polarity command */
    #define	DIO_NEG			5	/* negative polarity command */

    #define	DIO_ENABLE_ALARM	0	/* enable an alarm */
    #define	DIO_DISABLE_ALARM	1	/* disable an alarm */

    #define	DIO_ENABLE_DEV		0	/* enable a device */
    #define	DIO_DISABLE_DEV		1	/* disable a device */

    #define	DIO_CANCEL_ONESHOT	FALSE	/* cancel list only if it's a one shot */
    #define	DIO_CANCEL_LIST		TRUE	/* cancel list */
    #define	DIO_NEVER_CANCEL_LIST	2	/* don't cancel list */

    #define	DIO_BASIC		0	/* basic information (sizes, nodes, FTDs, SSDNs) */
    #define	DIO_NAME		1	/* device name information */
    #define	DIO_FAMILY_ATT		2	/* device family information */
    #define	DIO_SIBLING		3	/* device sibling information */
    #define	DIO_DEVTXT		4	/* descriptive text information */
    #define	DIO_SAVEINFO		5	/* device save/restore information */
    #define	DIO_EMC			6	/* device EMC information */
    #define	DIO_EXTTXT		7	/* device extended text information */
    #define	DIO_AALRMTXT		8	/* device analog alarm text information */
    #define	DIO_DALRMTXT		9	/* device digital alarm text information */
    #define	DIO_NODEINFO		10	/* device node information */
    #define	DIO_SSDR		11	/* device SSDR information */
    #define	DIO_ANALOG_ALARM	12	/* analog alarm block */
    #define	DIO_DIGITAL_ALARM	13	/* digital alarm block */
    #define	DIO_VM_INFO		14	/* device virtual machine information */
    #define	DIO_PROT_MASK		15	/* device protection mask */
    #define	DIO_BROKEN_INFO		16	/* device broken status */
    #define	DIO_DEVICE_TYPE_INFO	17	/* device type information */
    #define	DIO_DEVICE_AUDIT_INFO	18	/* device audit information */
    #define	DIO_SETTING_RECORD_INFO	19	/* setting record information */
    #define	DIO_ADDRESSING_INFO	20	/* property addressing information */
    #define	DIO_DATA_TYPE_INFO	21	/* property data type information */
    #define	DIO_DATA_EVENT_INFO	22	/* data event information */
    #define	DIO_FERMI_NAME_INFO	23	/* FermiName information */
    #define	DIO_ALARM_INFO		24	/* alarm information */
    #define	DIO_CONTROLLED_BY_INFO	25	/* controlling device information */
    #define	DIO_EXPRESSION_INFO	26	/* device expression information */
    #define	DIO_DOWNLOAD_INFO	27	/* device download information */
    #define	DIO_DOWNLOAD_PROP_INFO	28	/* device download property information */
    #define	DIO_BASIC32		29	/* basic information (sizes, nodes, FTDs, SSDNs) */
    #define	DIO_FULL_NAME_INFO	30	/* device full name information */
    #define	DIO_FULL_DESCRIPTION_INFO	31	/* device full description information */
    #define	DIO_PREV_NAME_INFO		32	/* previous device name information */
    #define	DIO_DIGITAL_CONTROL_INFO	33	/* digital control information */
    #define	DIO_CONTROLLED_SETTING_INFO	34	/* controlled setting information */
    #define	DIO_FOREIGN_DEVICE_INFO		35	/* foreign device mapping information */
    #define	DIO_ENUM_VALUE_INFO		36	/* reading/setting enumerated value information */
    #define	DIO_STRUCTURE_NAME_INFO		37	/* reading/setting structure name information */
    #define	DIO_ALARM_MONITOR_USER_INFO	38	/* alarm monitor user information */
    #define	DIO_DEPARTMENT_INFO		39	/* responsible department information */
    #define	DIO_EQUIPMENT_MAINTAINER_INFO	40	/* equipment maintainer information */
    #define	DIO_OBSOLETE_DEVICE_INFO	41	/* obsolete device information */
    #define	DIO_ACTUAL_ALARM_LIST_INFO	42	/* actual alarm list information */
    #define	DIO_ALARM_ACK_MASK_INFO		43	/* device alarm acknowledge mask */
    #define	DIO_ALARM_GROUP_INFO		44	/* device alarm group information */
    #define	DIO_HELP_URL_INFO		45	/* device help URL information */
    #define	DIO_BROKEN_DEVICE_INFO		46	/* device broken/OOS information */
    #define	DIO_LOCATION_INFO		47	/* device location information */
    #define	DIO_PROPERTY_TABLE_INFO		48	/* miscellaneous property table information */
    #define	DIO_DEVICE_TABLE_INFO		49	/* miscellaneous device table information */
    #define	DIO_DEVICE_AUX_TABLE_INFO	50	/* miscellaneous device_aux table information */
    #define	DIO_DEVICE_STATE_INFO		51	/* device state information */
    #define	DIO_PROPERTY_FLAGS_INFO		52	/* property flags information */
    #define	DIO_ENUM_VALUE_SHARED_INFO	53	/* reading/setting enumerated value shared information */
    #define	DIO_ENUM_VALUE_SHARED_DEVICES	54	/* reading/setting enumerated value shared information devices */
    #define	DIO_MACHINE_INFO		55	/* device machine information */
    #define	DIO_AREA_INFO			56	/* device area information */
    #define	DIO_DOCUMENT_DEVICE_INFO	57	/* document device information */
    #define	DIO_PREV_FULL_NAME_INFO		58	/* previous device full name information */
    #define	DIO_STATUS_SCALING_INFO		59	/* status scaling information */
    #define	DIO_SCALING_LENGTH_INFO		60	/* scaling length information */

    #define	DIO_CAMAC		0	/* CAMAC device */
    #define	DIO_CAMAC_DEVICE	0	/* CAMAC device */
    #define	DIO_GAS			1	/* GAS device */
    #define	DIO_GAS_DEVICE		1	/* GAS device */
    #define	DIO_VIRTUAL		2	/* virtual (software) device */
    #define	DIO_VIRTUAL_DEVICE	2	/* virtual (software) device */
    #define	DIO_FE_CALCULATED_DEVICE	3	/* front end calculated device */
    #define	DIO_FRIG_DEVICE		4	/* cryogenic device (not GAS) */
    #define	DIO_LINAC_DEVICE	5	/* Linac device */
    #define	DIO_INSTRUMENTATION_DEVICE	6	/* generic instrumentation device */
    #define	DIO_BPM_DEVICE		7	/* BPM device (not GAS) */
    #define	DIO_QPM_DEVICE		8	/* QPM device (not GAS) */
    #define	DIO_TECAR_DEVICE	9	/* TECAR device */
    #define	DIO_MECAR_DEVICE	10	/* MECAR device */
    #define	DIO_RF_MAC_DEVICE	11	/* Lockheed MAC RF device */
    #define	DIO_RAW_CAMAC_DEVICE	12	/* raw CAMAC device (no high level driver) */
    #define	DIO_D0_DEVICE		13	/* D0 experiment device */
    #define	DIO_MRPS_DEVICE		14	/* Main Ring power supply control device */
    #define	DIO_E811_DEVICE		15	/* E811 device */
    #define	DIO_GPIB_DEVICE		16	/* GPIB device */
    #define	DIO_GAS_GLOBAL_DEVICE	17	/* global GAS device */
    #define	DIO_FRIG_GLOBAL_DEVICE	18	/* global cryogenic device */
    #define	DIO_LLRF_DEVICE		19	/* Low Level RF device */
    #define	DIO_CNSLIDTR_DEVICE	20	/* Consolidator device */
    #define	DIO_MCRMUX_DEVICE	21	/* MCR mux device */
    #define	DIO_MOOC_DEVICE		22	/* MOOC front end device */
    #define	DIO_IRM_DEVICE		23	/* Internet Rack Monitor Device */
    #define	DIO_QXR_DEVICE		24	/* QXR device */
    #define	DIO_CHL_DEVICE		25	/* CHL device */
    #define	DIO_GFSDA_DEVICE	26	/* GFSDA device */
    #define	DIO_OOC_DEVICE		27	/* OOC device */
    #define	DIO_ACCUM_RF_DEVICE	28	/* Accumulator RF device */
    #define	DIO_SWIC_DEVICE		29	/* Swic device */
    #define	DIO_HLRF_DEVICE		30	/* High Level RF device */
    #define	DIO_BULB_DEVICE		31	/* Basic Micro Learning Box device */
    #define	DIO_VACUUM_DEVICE	32	/* Vacuum device */
    #define	DIO_EPICURE_DEVICE	33	/* Epicure (Beamline) device */
    #define	DIO_TWT_DEVICE		34	/* Travelling Wave Tube device */
    #define	DIO_MDAT_DEVICE		35	/* MDAT transmitter device */
    #define	DIO_MOOC_CAMAC_DEVICE	36	/* MOOC CAMAC device */
    #define	DIO_FBI_DEVICE		37	/* Fast Bunch Integrator (FBI) device */
    #define	DIO_STEP_MOTOR_DEVICE	38	/* stepper motor device */
    #define	DIO_BLM_DEVICE		39	/* BLM device (not GAS) */
    #define	DIO_EMITTANCE_DEVICE	40	/* emittance measurement device */
    #define	DIO_ELECTRON_LENS_DEVICE	41	/* electron lens device */
    #define	DIO_ELECTRON_COOLING_DEVICE	42	/* electron cooling device */
    #define	DIO_GMPS_DEVICE		43	/* Booster GMPS device */
    #define	DIO_MINIBOONE_DEVICE	44	/* Mini Boone device */
    #define	DIO_NUMI_DEVICE		45	/* NUMI device */
    #define	DIO_TESLA_DEVICE	46	/* TESLA (A0) device */
    #define	DIO_CLOCK_DEVICE	47	/* clock system device */
    #define	DIO_MUON_COOLING_DEVICE	48	/* muon cooling device */
    #define	DIO_DAMPER_DEVICE	49	/* beam damper device */
    #define	DIO_NTF_DEVICE		50	/* NTF device */
    #define	DIO_RF_TUNING_DEVICE	51	/* RF tuning device */
    #define	DIO_TIMER_DEVICE	52	/* timer device */
    #define	DIO_ACC_STATS_DEVICE	53	/* accelerator statistics device */
    #define	DIO_MOOC_BACK_DOOR_DEVICE	54	/* MOOC back door device */
    #define	DIO_SCHOTTKY_DEVICE	55	/* Schottky interface device */
    #define	DIO_BUNCH_LENGTH_DEVICE	56	/* bunch length monitor device */
    #define	DIO_SMTF_DEVICE		57	/* Superconducting Module Test Facility (SMTF) device */
    #define	DIO_EBL_DEVICE		58	/* external beam line device */
    #define	DIO_HINS_DEVICE		59	/* High Intensity Neutrino Source (HINS) device */
    #define	DIO_HRM_DEVICE		60	/* Hotlink Rack Monitor (HRM) device */
    #define	DIO_EPICS2ACNET_DEVICE	61	/* EPICS interface device */
    #define	DIO_NML_DEVICE		62	/* New Nuon Lab (NML) device */
    #define	DIO_KLYSTRON_INTERLOCK_DEVICE	63	/* klystron interlock device */
    #define	DIO_ACSYS_FEF_DEVICE	64	/* ACSys/FEF front end device */
    #define	DIO_NOVA_DEVICE		65	/* NOvA device */
    #define	DIO_MACH_PROTECT_DEVICE	66	/* machine protection device */
    #define	DIO_DBMANAGER_DEVICE	32767	/* DBMANAGER device reserved for special management in the DB */

    #define	DIO_FRIG_HOUSE_DEVICE	1	/* device which accesses all Tevatron nonzero frig houses */
    #define	DIO_FRIG_COMP_DEVICE	2	/* device which accesses all Tevatron compressor houses */
    #define	DIO_FRIG_ALL_DEVICE	3	/* device which accesses all Tevatron frig houses */
    #define	DIO_FRIG_ALL_COMP_DEVICE	5	/* device which accesses all compressor houses */
    #define	DIO_FRIG_ALL_HOUSE_DEVICE	6	/* device which accesses all noncompressor frig houses */
    #define	DIO_FRIG_ALL_FRIG_DEVICE	7	/* device which accesses all frig houses */

    #define	DIO_ALARM_OK		0	/* not in alarm */
    #define	DIO_ALARM_GOOD		0	/* alarm state is good */
    #define	DIO_ALARM_BAD		1	/* in alarm */
    #define	DIO_ALARM_LOW		2	/* alarming low */
    #define	DIO_ALARM_HIGH		3	/* alarming high */

    #define	DIO_NOT_IN_ALARM	1	/* not in alarm */
    #define	DIO_IN_ALARM		0	/* in alarm */

    #define	DIO_ALARM_BYPASSED	1	/* alarm is bypassed */
    #define	DIO_ALARM_ENABLED	0	/* alarm is enabled */

    #define	DIO_EXCEPTION_ALARM	0	/* exception type alarm */
    #define	DIO_EVENT_ALARM		1	/* event type alarm */

    #define	DIO_NONABORT_ALARM	0	/* alarm does not generate an abort */
    #define	DIO_ABORT_ALARM		1	/* alarm generates an abort */

    #define	DIO_ALARM_ABORT_DISABLED	1	/* alarm abort is bypassed */
    #define	DIO_ALARM_ABORT_ENABLED	0	/* alarm abort is enabled */

    #define	DIO_ALARM_DISPLAY_DISABLED	0	/* alarm display is disabled */
    #define	DIO_ALARM_DISPLAY_ENABLED	1	/* alarm display is enabled */

    #define	DIO_ALARM_LOG_DISABLED	0	/* alarm logging is disabled */
    #define	DIO_ALARM_LOG_ENABLED	1	/* alarm logging is enabled */

    #define	DIO_DEVICE_NOT_BROKEN	FALSE	/* device is not broken */
    #define	DIO_DEVICE_IS_BROKEN	TRUE	/* device is broken */

    #define	DIO_BROKEN_COMMENT_LEN	128	/* maximum length of an OOS/broken comment */

    #define	DIO_SETTINGS_OFF	0	/* disable settings */
    #define	DIO_SETTINGS_ON		1	/* enable settings */

    #define	DIO_CAN_SET_DEVICE	0	/* device can be set */
    #define	DIO_SET_DISABLED	1	/* DIO settings are disabled */
    #define	DIO_CONSOLE_SET_DISABLED	2	/* all console settings are disabled */
    #define	DIO_CLASS_SET_DISABLED	4	/* settings are disabled for this device on this console class */

    #define	DIO_CONTROLLED_SET_MASK	0x10	/* controlled setting bit in PDB */
    #define	DIO_DEC_DISPLAY_MASK	0x20	/* decimal display bit in PDB */
    #define	DIO_LONG_DISPLAY_MASK	0x40	/* long display bit in PDB */
    #define	DIO_MOTOR_MASK		0x80	/* motor bit in PDB */

    #define	DIO_ONOFF_STATUS		1	/* basic status on/off attribute */
    #define	DIO_READYTRIPPED_STATUS		2	/* basic status ready/tripped attribute */
    #define	DIO_REMOTELOCAL_STATUS		3	/* basic status remote/local attribute */
    #define	DIO_POLARITY_STATUS		4	/* basic status polarity attribute */
    #define	DIO_RAMPDC_STATUS		5	/* basic status ramp/DC attribute */

    #define	DIO_STS_MSK_ONOFF		1	/* basic status on/off attribute present mask */
    #define	DIO_STS_MSK_READYTRIPPED	2	/* basic status ready/tripped attribute present mask */
    #define	DIO_STS_MSK_REMOTELOCAL		4	/* basic status remote/local attribute present mask */
    #define	DIO_STS_MSK_POLARITY		8	/* basic status polarity attribute present mask */
    #define	DIO_STS_MSK_RAMPDC		0x10	/* basic status ramp/DC attribute present mask */

    #define	DIO_STS_MSK_INV_ONOFF		1	/* basic status on/off invert data mask */
    #define	DIO_STS_MSK_INV_READYTRIPPED	2	/* basic status ready/tripped invert data mask */
    #define	DIO_STS_MSK_INV_REMOTELOCAL	4	/* basic status remote/local invert data mask */
    #define	DIO_STS_MSK_INV_POLARITY	8	/* basic status polarity invert data mask */

    #define	DIO_STS_MSK_ALTCHR_ONOFF	0x10	/* basic status on/off alternate character mask */
    #define	DIO_STS_MSK_ALTCHR_READYTRIPPED	0x20	/* basic status ready/tripped alternate character mask */
    #define	DIO_STS_MSK_ALTCHR_REMOTELOCAL	0x40	/* basic status remote/local alternate character mask */
    #define	DIO_STS_MSK_ALTCHR_POLARITY	0x80	/* basic status polarity alternate character mask */

    #define	DIO_STS_IDX_ONOFF		0	/* basic status on/off attribute index */
    #define	DIO_STS_IDX_READYTRIPPED	1	/* basic status ready/tripped attribute index */
    #define	DIO_STS_IDX_REMOTELOCAL		2	/* basic status remote/local attribute index */
    #define	DIO_STS_IDX_POLARITY		3	/* basic status polarity attribute index */
    #define	DIO_STS_IDX_RAMPDC		4	/* basic status ramp/DC attribute index */

    #define	DIO_CTL_MSK_RESET		1	/* basic control reset attribute present mask */
    #define	DIO_CTL_MSK_ON			2	/* basic control on attribute present mask */
    #define	DIO_CTL_MSK_OFF			4	/* basic control off attribute present mask */
    #define	DIO_CTL_MSK_POSITIVE		8	/* basic control positive attribute present mask */
    #define	DIO_CTL_MSK_NEGATIVE		0x10	/* basic control negative attribute present mask */
    #define	DIO_CTL_MSK_RAMP		0x20	/* basic control ramp attribute present mask */
    #define	DIO_CTL_MSK_DC			0x40	/* basic control DC attribute present mask */

    #define	DIO_CTL_IDX_RESET		0	/* basic control reset attribute index */
    #define	DIO_CTL_IDX_ON			1	/* basic control on attribute index */
    #define	DIO_CTL_IDX_OFF			2	/* basic control off attribute index */
    #define	DIO_CTL_IDX_POSITIVE		3	/* basic control positive attribute index */
    #define	DIO_CTL_IDX_NEGATIVE		4	/* basic control negative attribute index */
    #define	DIO_CTL_IDX_RAMP		5	/* basic control ramp attribute index */
    #define	DIO_CTL_IDX_DC			6	/* basic control DC attribute index */

    #define	DIO_SSDN_SIZE		8	/* length of an SSDN in bytes */
    #define	SSDN_LEN		8	/* length of an SSDN in bytes */
/* #define	LEN_SSDN		8 */    /* length of an SSDN in bytes */
/* #define	LEN_EMC			8 */    /* length of an EMC in bytes */

    #define	DIO_MAX_EMCS		2	/* maximum number of EMCs per device */

    #define	DIO_MAX_SSDR_LEN	128	/* maximum length of an SSDR in bytes */

    #define	DIO_MAX_TIMER_EVENT	15	/* maximum number of reference events per timer channel */

    #define	DIO_MODEL_TEST		0x01	/* flag for test model available */
    #define	DIO_MODEL_REAL		0x02	/* flag for real model available */

    #define	DIO_DEVICE_EXPRESSION_LEN	512	/* maximum length of a device expression */

/* defined constants for device name parsing */

    #define	DIO_WHOLE_ARRAY		-2	/* whole array device specified */

    #define	DIO_PARSE_DEFAULT	0	/* no special parsing attributes requested */
    #define	DIO_PARSE_VALIDATE_PROPERTY	1	/* check if the indicated property exists */
    #define	DIO_PARSE_VALIDATE_ARRAY_INDEX	2	/* check if the indicated array index exists */
    #define	DIO_PARSE_ALLOW_WHOLE_ARRAY	4	/* allow entire array notation */
    #define	DIO_PARSE_ALLOW_DEVICE_INDEX	8	/* allow device index notation */
    #define	DIO_PARSE_INSERT_DEVICE_PREFIX	0x10	/* insert missing device prefixes */
    #define	DIO_PARSE_FORCE_DEFAULT_PREFIX	0x20	/* force default (:) device prefixes */
    #define	DIO_PARSE_C_STYLE_ARRAY_INDEX	0x40	/* use C style array indices */
    #define	DIO_PARSE_C_STYLE_END_INDEX	0x80	/* look for C style ending array indices */
    #define	DIO_PARSE_ALLOW_OBSOLETE	0x100	/* allow for obsolete devices */
    #define	DIO_PARSE_FULL_NAME		0x200	/* treat as full names */
    #define	DIO_PARSE_ALLOW_PREVIOUS	0x400	/* allow previous device names */
    #define	DIO_PARSE_PRESERVE_ORIGINAL_NAME	0x800	/* preserve the original device names */
    #define	DIO_PARSE_PRESERVE_NAME_CASE	0x1000	/* preserve the case of the original device names */
    #define	DIO_PARSE_ALLOW_FIELD_PARSING	0x2000	/* allow parsing for field/property names */
    #define	DIO_PARSE_DEVICE_INDEX_NAME	0x4000	/* treat as device index names */
    #define	DIO_PARSE_FORCE_CANONICAL_NAME	0x8000	/* return canonical device names */
    #define	DIO_PARSE_ENFORCE_DEFAULT_PREFIX	0x10000	/* enforce default (:) device prefixes are present */

/* defined constants for data sources */

    #define	DIO_SOURCE_NULL		-1	/* null data source */
    #define	DIO_SOURCE_ACCELERATOR	0	/* get data from the accelerator */
    #define	DIO_SOURCE_DATAPOOL	0	/* get data from the datapool */
    #define	DIO_SOURCE_SDA		1	/* get data from SDA */
    #define	DIO_SOURCE_SAVERESTORE	2	/* get data from save/restore */
    #define	DIO_SOURCE_DATABASE	3	/* get data from the device database */
    #define	DIO_SOURCE_DATALOGGER	4	/* get data from a data logger (Lumberjack) */
    #define	DIO_SOURCE_MEMORY	5	/* get data from a memory pool */
    #define	DIO_SOURCE_SNAPMANAGER	6	/* get data from the detached snapshot manager (snapshots only) */
    #define	DIO_SOURCE_MODEL	7	/* get data from a model */
    #define	DIO_SOURCE_TEST_OAC	8	/* get data from a test OAC */

/* defined constants for argument defaulting */

    #define	DIO_SAME_PI		1	/* use the same property index for all entries */
    #define	DIO_SAME_LENGTH		2	/* use the same length for all entries */
    #define	DIO_SAME_OFFSET		4	/* use the same offset for all entries */
    #define	DIO_SAME_ATOMIC		8	/* use the same atomic length for all entries */

/* defined constants for use with DIO_EVENT_CONTROL routine */

    #define	DIO_DISABLE_EVENT	1	/* disable TCLK event */
    #define	DIO_ENABLE_EVENT	2	/* enable TCLK event */
    #define	DIO_TRIGGER_EVENT	3	/* trigger TCLK event */

    #define	DIO_NO_CLOCK		(-2)	/* no clock */
    #define	DIO_UNKNOWN_CLOCK	(-1)	/* clock type unknown */
    #define	DIO_DEFAULT_CLOCK	(-1)	/* default clock event */
    #define	DIO_TCLK		0	/* TCLK event */
    #define	DIO_MRBS		1	/* MRBS event */
    #define	DIO_MIBS		1	/* MIBS event */
    #define	DIO_TVBS		2	/* TVBS event */
    #define	DIO_RRBS		3	/* RRBS event */
    #define	DIO_TEST_CLOCK		4	/* test clock event */
    #define	DIO_HCLK		5	/* HCLK event */
    #define	DIO_PCLK		5	/* special PROJects event */
    #define	DIO_NCLK		6	/* NCLK event */

    #define	DIO_CLOCK_LINAC		10	/* Linac clock event */
    #define	DIO_CLOCK_MTA		11	/* MTA clock event */
    #define	DIO_CLOCK_CMTS		12	/* CMTS clock event */
 
    #define	DIO_FRIG_HOUSE		0	/* normal frig house */
    #define	DIO_COMP_HOUSE		1	/* compressor house */

/* defines to assist in calculating setting request packet sizes */

    #define	DIO_SET_OVERHEAD_LIST	4	/* 4 bytes of header overhead */
    #define	DIO_SET_OVERHEAD_ENTRY	16	/* 16 bytes of entry overhead */

/* defines to assist in calculating reading request packet sizes */

    #define	DIO_READ_OVERHEAD_LIST	6	/* 6 bytes of header overhead */
    #define	DIO_READ_OVERHEAD_ENTRY	16	/* 16 bytes of entry overhead */

/* defines for use with DIO_BUILD_SNAPSHOT_LIST routine */

    #define	DIO_STANDARD_SNAPSHOT_MODE	0	/* standard snapshot acquisition */
    #define	DIO_TRANSIENT_RECORDER_MODE	1	/* snapshot transient recorder mode */

/* defines for use with dio_simulate */

    #define	DIO_AUTOPOP_NONE 1		/* do not auto populate */
    #define	DIO_AUTOPOP_DPM  2		/* use real data pool to populate */
    #define	DIO_AUTOPOP_DBM  3		/* use real database to populate */
    #define	DIO_AUTOPOP_SCR  4		/* use SCR facility to populate */
    #define	DIO_AUTOPOP_SDA  5		/* use SDA facility to populate */
    #define	DIO_AUTOPOP_DL   6		/* use DL facility to populate */

/*
** Table Device...
*/
    #define	DEFAULT_TABLE		0	/* default table type */
    #define	DIO_DEFAULT_TABLE	0	/* default table type */
    #define	TIME_TABLE		1	/* time table type */
    #define	DIO_TIME_TABLE		1	/* time table type */
    #define	MDAT_TABLE		2	/* MDAT table type */
    #define	DIO_MDAT_TABLE		2	/* MDAT table type */
    #define	MDAT_GTABLE		2	/* MDAT table #1 type */
    #define	DIO_MDAT_GTABLE		2	/* MDAT table #1 type */
    #define	MDAT_HTABLE		3	/* MDAT table #2 type */
    #define	DIO_MDAT_HTABLE		3	/* MDAT table #2 type */
    #define	SCALE_FACTOR_TABLE	4	/* scale factor table type */
    #define	DIO_SCALE_FACTOR_TABLE	4	/* scale factor table type */
    #define	CLOCK_TABLE		5	/* clock event table type */
    #define	DIO_CLOCK_TABLE		5	/* clock event table type */
    #define	RAMP_POINTER_TABLE	6	/* ramp table pointer table type */
    #define	DIO_RAMP_POINTER_TABLE	6	/* ramp table pointer table type */
    #define	SCALE_FACTOR_POINTER_TABLE	7	/* scale factor pointer table type */
    #define	DIO_SCALE_FACTOR_POINTER_TABLE	7	/* scale factor pointer table type */
    #define	MDAT_POINTER_TABLE	8	/* MDAT pointer table type */
    #define	DIO_MDAT_POINTER_TABLE	8	/* MDAT pointer table type */
    #define	MDAT_GITABLE		9	/* MDAT current table #1 type */
    #define	DIO_MDAT_GITABLE	9	/* MDAT current table #1 type */
    #define	MDAT_HITABLE		10	/* MDAT current table #2 type */
    #define	DIO_MDAT_HITABLE		10	/* MDAT current table #2 type */
    #define	TIME_TABLE_UNIPOLAR	11	/* special C466/8 time table type */
    #define	DIO_TIME_TABLE_UNIPOLAR	11	/* special C466/8 time table type */
    #define	OFFSET_VALUE_TABLE	12	/* offset value table */
    #define	DIO_OFFSET_VALUE_TABLE	12	/* offset value table */
    #define	DELAY_VALUE_TABLE	13	/* delay value table */
    #define	DIO_DELAY_VALUE_TABLE	13	/* delay value table */
    #define	OFFSET_POINTER_TABLE	14	/* offset pointer table */
    #define	DIO_OFFSET_POINTER_TABLE	14	/* offset pointer table */
    #define	MDAT_SELECTION_TABLE	15	/* main MDAT selection table */
    #define	DIO_MDAT_SELECTION_TABLE	15	/* main MDAT selection table */
    #define	FREQUENCY_VALUE_TABLE	16	/* frequency value table */
    #define	DIO_FREQUENCY_VALUE_TABLE	16	/* frequency value table */
    #define	FREQUENCY_POINTER_TABLE	17	/* frequency pointer table */
    #define	DIO_FREQUENCY_POINTER_TABLE	17	/* frequency pointer table */
    #define	PHASE_VALUE_TABLE	18	/* phase value table */
    #define	DIO_PHASE_VALUE_TABLE	18	/* phase value table */
    #define	PHASE_POINTER_TABLE	19	/* phase pointer table */
    #define	DIO_PHASE_POINTER_TABLE	19	/* phase pointer table */
    #define	LLRF_TABLE		100	/* LLRF table type */
    #define	DIO_LLRF_TABLE		100	/* LLRF table type */
    #define	DIO_SIMPLE_TABLE	101	/* simple table type */

    #define	SLOT_WHOLE		1	/* addressing whole slot */
    #define	SLOT_DEPENDENT		2	/* addressing dependent part of slot */
    #define	SLOT_INDEPENDENT	3	/* addressing independent whole slot */

    #define	DIO_NORMAL_DEVICE		0	/* 'normal' active device */
    #define	DIO_DOCUMENTATION_DEVICE	0x20	/* documentation device */
    #define	DIO_OBSOLETE_DEVICE		0x40	/* obsolete device */
    #define	DIO_DELETED_DEVICE		0x80	/* deleted device */

    #define	DIO_FAMILY_DEVICE_MASK		1	/* mask indicating a family device */
    #define	DIO_PREVIOUS_SIBLING_MASK	2	/* mask indicating the presence of a previous sibling */
    #define	DIO_NEXT_SIBLING_MASK		4	/* mask indicating the presence of a next sibling */
    #define	DIO_ALARM_CONSOLIDATOR_MASK	8	/* mask indicating an alarm consolidator device */
    #define	DIO_DOCUMENTATION_DEVICE_MASK	0x20	/* mask indicating a documentation device */
    #define	DIO_OBSOLETE_DEVICE_MASK	0x40	/* mask indicating an obsolete device */
    #define	DIO_DELETED_DEVICE_MASK		0x80	/* mask indicating a deleted device */

/* defines for use with dio_dbquery_c */

    #define	DIO_DBQ_SLOT_TO_DI		1	/* find all devices in a given slot */
    #define	DIO_DBQ_DEV_TEXT_TO_NAME	2	/* find all devices matching a descriptive text string */
    #define	DIO_DBQ_AUDIT_INFO		3	/* retrieve device audit information */
    #define	DIO_DBQ_SSDN_TO_DI		4	/* find all devices matching an SSDN substring */
    #define	DIO_DBQ_DEVICE_INDEX_COUNT	5	/* find number of device indices and maximum device index */
    #define	DIO_DBQ_MADC_TO_DI		6	/* find all devices in a given MADC */
    #define	DIO_DBQ_TRANSFORM_TO_DIPI	7	/* finds all device/properties having a certain scaling transform */
    #define	DIO_DBQ_SAVELIST_TO_DI		8	/* finds all devices having a given save list ID */
    #define	DIO_DBQ_SAVECODE_TO_DI		9	/* finds all devices having a given set of save/restore handler codes */
    #define	DIO_DBQ_NODE_TO_DI		10	/* find all devices from a given node */
    #define	DIO_DBQ_CRATE_TO_DI		11	/* find all devices in a given crate */
    #define	DIO_DBQ_DRIVER_TO_DI		12	/* find all devices using a given CAMAC driver */
    #define	DIO_DBQ_DRIVER_NODE_TO_DI	13	/* find all devices in a node using a given CAMAC driver */
    #define	DIO_DBQ_VM_TO_DI		14	/* find all devices belonging to a given virtual machine */
    #define	DIO_DBQ_UNITS_TO_DI		15	/* find all devices having a given units text string */
    #define	DIO_DBQ_NODE_PIS_TO_DIPI	16	/* find all devices from a given node having a property in a list of properties */
    #define	DIO_DBQ_STR_TO_NAME		17	/* find all devices whose name matches a search string */
    #define	DIO_DBQ_AUDIT_BY_TIME_INFO	18	/* retrieve audit information for a given time interval */
    #define	DIO_DBQ_DI_TO_NAME		19	/* retrieve device name */
    #define	DIO_DBQ_ALL_FE_NODES		20	/* retrieve all front ends which have devices defined */
    #define	DIO_DBQ_TYPE_NODE_TO_DIPI	21	/* find all devices having a given device type */
    #define	DIO_DBQ_NAME_TO_DI		22	/* retrieve device index */
    #define	DIO_DBQ_CAMAC_MODULE_INFO	23	/* retrieve the locations of CAMAC modules of a given type */
    #define	DIO_DBQ_EMC_TO_DI		24	/* find all devices matching an EMC substring */
    #define	DIO_DBQ_PRIORITY_TO_DIPI	25	/* find all devices matching an alarm priority */
    #define	DIO_DBQ_CLASS_NODE_TO_DIPI	26	/* find all devices having a given device class */
    #define	DIO_DBQ_GAS_MODULE_TO_DI	27	/* find all devices belonging to a given GAS module */
    #define	DIO_DBQ_ALARM_LIST_TO_DI	28	/* finds all devices having a given alarm list ID */
    #define	DIO_DBQ_DI_TO_FAMILY		29	/* finds all family devices having a given device as a member */
    #define	DIO_DBQ_ALL_DEVICES		30	/* finds all active ACNET devices */
    #define	DIO_DBQ_ALL_DIPIS		31	/* finds all active ACNET devices having requested properties */
    #define	DIO_DBQ_WILDCARD_NODE_TO_DI	32	/* find all devices from nodes matching a name pattern */
    #define	DIO_DBQ_WILDCARD_NODE_PIS_TO_DIPI	33	/* find all devices from nodes matching a name pattern having requested properties */
    #define	DIO_DBQ_ALARM_HANDLER_TO_DIPI	34	/* finds all devices having a given alarm handler code */
    #define	DIO_DBQ_ALARM_SUPPRESSED_TO_DIPI	35	/* finds all devices whose alarms are suppressed */
    #define	DIO_DBQ_ALARM_NEVER_USED_TO_DIPI	36	/* finds all devices whose alarms have never been used */
    #define	DIO_DBQ_CONTROLLING_DEVICE_TO_DI	37	/* finds all devices having a given controlling device */
    #define	DIO_DBQ_TYPE_NAME_TO_DIPI	38	/* find all devices with a given name having a given device type */
    #define	DIO_DBQ_EXPR_STR_TO_DI		39	/* find all devices with a given string in their reading expression */
    #define	DIO_DBQ_EXPR_DI_TO_DI		40	/* find all devices with a given device in their reading expression */
    #define	DIO_DBQ_CONSOLE_CLASS_TO_DI	41	/* find all devices which can be set by a console class(es) */
    #define	DIO_DBQ_TEXT_NODE_TO_DI		42	/* find all devices matching a given description string on a node */
    #define	DIO_DBQ_TYPE_TEXT_TO_DIPI	43	/* find all devices having a given device type and description string */
    #define	DIO_DBQ_USER_AUDIT_TO_DI	44	/* find all devices which have been modified by a given user */
    #define	DIO_DBQ_TRUNK_TO_DIPI		45	/* find all devices/properties from a given ACNET trunk */
    #define	DIO_DBQ_DI_TO_COMPOSITE		46	/* finds all composite devices having a given device as a member */
    #define	DIO_DBQ_FULL_TEXT_TO_NAME	47	/* find all devices matching a full descriptive text string */
    #define	DIO_DBQ_STR_TO_FULL_NAME	48	/* find all devices matching a full name string */
    #define	DIO_DBQ_FOREIGN_DEVICE_TO_DIPI	49	/* find all devices having a given foreign device string and description string */
    #define	DIO_DBQ_STRUCT_NAME_TO_DIPI	50	/* find all devices having a given structure name string */
    #define	DIO_DBQ_DEPARTMENT_TO_DI	51	/* find all devices matching a given responsible department name string */
    #define	DIO_DBQ_MAINTAINER_TO_DI	52	/* find all devices matching a given equipment maintainer user name string */
    #define	DIO_DBQ_GENERIC_SEARCH_TO_DIPI	53	/* find all devices having a given set of parameters */
    #define	DIO_DBQ_ACTUAL_ALARM_LIST_TO_DI	54	/* finds all devices actually mapped to a given alarm list ID */
    #define	DIO_DBQ_ALARM_GROUP_TO_DI	55	/* finds all devices mapped to a given alarm group */
    #define	DIO_DBQ_ALARM_CONSOLIDATOR_TO_DI	56	/* finds all devices which are alarm group consolidators */
    #define	DIO_DBQ_BYPASSED_ALARM_TO_DIPI	57	/* finds all devices whose alarms are bypassed */
    #define	DIO_DBQ_DEVICE_RANGE		58	/* finds all devices in a certain range */
    #define	DIO_DBQ_CURRENTLY_ALARMING_TO_DIPI	59	/* finds all devices which are currently alarming according to the database */
    #define	DIO_DBQ_PRIMARY_UNITS_TO_DI	60	/* find all devices having a given primary units text string */
    #define	DIO_DBQ_ABORT_ALARM_TO_DIPI	61	/* finds all devices which can generate an abort according to the database */
    #define	DIO_DBQ_ANALOG_ALARM_TEXT_TO_DI	62	/* finds all devices matching an analog alarm text string */
    #define	DIO_DBQ_DIGITAL_ALARM_TEXT_TO_DI	63	/* finds all devices matching a digital alarm text string */
    #define	DIO_DBQ_LOGGER_DEVICE_TO_DIPI	64	/* finds all data logged devices which match a device name */
    #define	DIO_DBQ_MACHINE_TO_DI		65	/* find all devices matching a given machine */
    #define	DIO_DBQ_AREA_TO_DI		66	/* find all devices matching a given area */
    #define	DIO_DBQ_NOVA_ARCHIVER_TO_NAME	67	/* find all devices matching a given NOvA archiver schema */
    #define	DIO_DBQ_ADDRESSING_MODE_TO_DIPI	68	/* find all devices having a specified addressing mode */

/* defines for use with dio_enable_error_logging */

    #define	DIO_ERROR_LOGGING_DISABLE	0	/* all error logging disabled */
    #define	DIO_ERROR_LOGGING_ENABLE	1	/* enable error logging */
    #define	DIO_ERROR_LOGGING_DUP_OK	2	/* enable, dp duplicates ok */

/* device value format definitions */

    #define	DIO_FORMAT_NO_SPACES		1	/* no leading or trailing blanks */
    #define	DIO_FORMAT_SPACE_PADDED		2	/* blank padded to the default length for that device */
    #define	DIO_FORMAT_UNIFORM_LENGTH	3	/* blank padded to a length of DIO_LONG_DISPLAY_LEN */
    #define	DIO_FORMAT_UNIFORM_FULL_LENGTH	7	/* blank padded to the requested length */

    #define	DIO_FORMAT_RAW			4	/* raw data */
    #define	DIO_FORMAT_SCALED		5	/* scaled data */
    #define	DIO_FORMAT_ASCII		6	/* ASCII data */

/* constants to support ramp/DC status/control for Epicure devices */

    #define	BASIC_STATUS_RAMP_MASK	0x10	/* basic status ramp/DC attribute mask */

    #define	BASIC_STATUS_RAMP_VALUE	0x200	/* basic status ramp value */

    #define	BASIC_CONTROL_RAMP_MASK	0x20	/* basic control ramp/DC attribute mask */

    #define	BASIC_CONTROL_RAMP	5	/* basic control command for ramp mode */
    #define	BASIC_CONTROL_DC	6	/* basic control command for DC mode */

    #define	DIO_OPT_NONE		0	/* no options selected */
    #define	DIO_OPT_RAW_DATA	0	/* use raw data */
    #define	DIO_OPT_SCALED_DATA	1	/* use scaled data */
    #define	DIO_OPT_LONG_TEXT	1	/* return "long" text strings */
    #define	DIO_OPT_SAME_DEVICE	2	/* use the same device for all entries */
    #define	DIO_OPT_SAME_PROPERTY	4	/* use the same property for all entries */
    #define	DIO_OPT_SAME_LENGTH	8	/* use the same length for all entries */
    #define	DIO_OPT_SAME_OFFSET	0x10	/* use the same offset for all entries */
    #define	DIO_OPT_SAME_TYPE	0x20	/* use the same type for all entries */
    #define	DIO_OPT_USE_DEFAULT_SIZE	0	/* use default sizes */
    #define	DIO_OPT_USE_MAX_SIZE	0x40	/* use max sizes */
    #define	DIO_OPT_NULL_TERMINATE	0x80	/* null terminate output string */
    #define	DIO_OPT_NO_POPULATE	0x100	/* don't populate data pool */
    #define	DIO_OPT_ALLOW_OBSOLETE	0x200	/* allow obsolete devices */
    #define	DIO_OPT_SUPPRESS_NO_SUCH_ERRORS	0x400	/* suppress "no such" errors */
    #define	DIO_OPT_TREAT_AS_ATOMIC	0x800	/* treat a value as atomic */

    #define	DIO_NAME_OPT_NONE		0	/* no options selected */
    #define	DIO_NAME_OPT_ALLOW_OBSOLETE	1	/* allow obsolete devices */
    #define	DIO_NAME_OPT_FULL_NAME		2	/* use full names */
    #define	DIO_NAME_OPT_ALLOW_PREVIOUS	4	/* allow previous device names */
    #define	DIO_NAME_OPT_NULL_TERMINATE	0x80	/* null terminate output string */
    #define	DIO_NAME_OPT_TERSE_NAME		0x100	/* use terse names */

    #define	DIO_TEXT_OPT_NONE		0	/* no options selected */
    #define	DIO_TEXT_OPT_ALLOW_OBSOLETE	1	/* allow obsolete devices */
    #define	DIO_TEXT_OPT_FULL_TEXT		2	/* use full text */
    #define	DIO_TEXT_OPT_NULL_TERMINATE	0x80	/* null terminate output string */

    #define	DIO_DISPLAY_OPT_NONE	0	/* no options selected */
    #define	DIO_DISPLAY_OPT_ALLOW_TRUNCATED	1	/* allow truncated display strings */
    #define	DIO_DISPLAY_OPT_LONG_TEXT	2	/* return "long" text strings */
    #define	DIO_DISPLAY_OPT_NULL_TERMINATE	0x80	/* null terminate output string */

    #define	DIO_FTP_OPT_NONE		0	/* no options selected */

    #define	DIO_SNAP_OPT_NONE		0	/* no options selected */
    #define	DIO_SNAP_OPT_INTERPOLATE_TIMES	0x80	/* interpolate timestamps */

    #define	DIO_STEP_OPT_NONE		0	/* no options selected */
    #define	DIO_STEP_OPT_READ_CURRENT_VALUE	1	/* read the current value */

    #define	DIO_DATA_EVENT_MAX_LEN	252	/* maximum length of a data event string */

    #define	DIO_MEMORY_POOL_NAME_LEN	32	/* maximum length of a memory pool name */

    #define	DIO_MEMORY_DEFAULT_POOL_ID	0	/* default memory pool ID */

    #define	DIO_BY_ID		0	/* specify by ID */
    #define	DIO_BY_NAME		1	/* specify by name */

/* digital control options */

    #define	DIO_DIGCON_OPT_NONE		0	/* no options selected */
    #define	DIO_DIGCON_OPT_USER_FUNC_ON_TOP	1	/* put user functions on the top of the menu */
    #define	DIO_DIGCON_OPT_CONTROLLED_SET	2	/* observe controlled setting restrictions */
    #define	DIO_DIGCON_OPT_ALLOW_CREW_CHIEF	4	/* allow the crew chief to make controlled settings */

/* enumerated value setting options */

    #define	DIO_ENUMVAL_OPT_NONE			0	/* no options selected */
    #define	DIO_ENUMVAL_OPT_USER_FUNC_ON_TOP	1	/* put user functions on the top of the menu */
    #define	DIO_ENUMVAL_OPT_CONTROLLED_SET		2	/* observe controlled setting restrictions */
    #define	DIO_ENUMVAL_OPT_ALLOW_CREW_CHIEF	4	/* allow the crew chief to make controlled settings */

/* datanbase table constants */

    #define	DIO_DBTABLE_DEVICE		1	/* device table */
    #define	DIO_DBTABLE_DEVICE_AUX		2	/* device_aux table */
    #define	DIO_DBTABLE_PROPERTY		3	/* property table */
    #define	DIO_DBTABLE_PDB			4	/* pdb table */
    #define	DIO_DBTABLE_DEVICE_SCALING	5	/* device_scaling table */
    #define	DIO_DBTABLE_DIGITAL_CONTROL	6	/* digital_control table */
    #define	DIO_DBTABLE_READ_SET_ENUM	7	/* read_set_enum table */
    #define	DIO_DBTABLE_FAMILY		8	/* family table */
    #define	DIO_DBTABLE_DEVICE_FLAGS	9	/* device_flags table */

/* device edit comment information */

typedef struct DIO_EDIT_COMMENT_DATA
    {
    unsigned int	date;
    char	user_name[USER_NAME_LEN+2];
    char	comment[DIO_EDIT_COMMENT_LEN+1];
    } __attribute__((packed)) DIO_EDIT_COMMENT_DATA;

/* obsolete device information */

typedef struct DIO_OBSOLETE_DEVICE_DATA
    {
    unsigned int	date;
    int		operation;
    char	user_name[USER_NAME_LEN+2];
    char	comment[DIO_OBSOLETE_COMMENT_LEN+2];
    } __attribute__((packed)) DIO_OBSOLETE_DEVICE_DATA;

/* documentation device information */

typedef struct DIO_DOCUMENT_DEVICE_DATA
    {
    unsigned int	date;
    int		operation;
    char	user_name[USER_NAME_LEN+2];
    char	comment[DIO_DOCUMENT_COMMENT_LEN+2];
    } __attribute__((packed)) DIO_DOCUMENT_DEVICE_DATA;

/* broken/OOS device information */

typedef struct DIO_BROKEN_DEVICE_DATA
    {
    int		user_id;			/* user ID of person who marked the device broken/OOS */
    char	process_name[PROCESS_NAME_LEN+2];	/* process used to mark as broken/OOS */
    unsigned int	date;			/* broken/OOS date */
    char	comment[DIO_BROKEN_COMMENT_LEN+2];	/* broken/OOS comment */
    } __attribute__((packed)) DIO_BROKEN_DEVICE_DATA;

/* alarm text support */

#define	DIO_ALARM_TEXT_ENTRY_LEN	25		/* length of an alarm text string (not null terminated) */

typedef struct DIO_ALARM_TEXT_ENTRY_DATA
    {
    int		alarm_type;
    char	text[DIO_ALARM_TEXT_ENTRY_LEN+2];
    unsigned int	timestamp;
    int		raw_data;
    unsigned int	mask;
    } __attribute__((packed)) DIO_ALARM_TEXT_ENTRY_DATA;

/* setting information support */

#define	DIO_SETTING_CONSOLE_NAME_LEN		30
#define	DIO_SETTING_INDEX_PAGE_NAME_LEN		50
#define	DIO_SETTING_TASK_NAME_LEN		20
#define	DIO_SETTING_ENGINE_NODE_NAME_LEN	50
#define	DIO_SETTING_DESKTOP_NAME_LEN		100
#define	DIO_SETTING_USER_ACCOUNT_NAME_LEN	40

typedef struct DIO_RECENT_SETTING_DATA
    {
    int		device_index;
    int		property;
    char	timestamp[DATE_STRING_LEN+2];
    unsigned int	raw_data;
    int		data_length;
    int		data_offset;
    int		status;
    char	console_name[DIO_SETTING_CONSOLE_NAME_LEN+2];
    char	engine_node[DIO_SETTING_ENGINE_NODE_NAME_LEN+2];
    char	desktop_name[DIO_SETTING_DESKTOP_NAME_LEN+2];
    char	index_page[DIO_SETTING_INDEX_PAGE_NAME_LEN+2];
    char	task_name[DIO_SETTING_TASK_NAME_LEN+2];
    int		application_id;
    int		console_user_id;
    char	user_local_account_name[DIO_SETTING_USER_ACCOUNT_NAME_LEN+2];
    } __attribute__((packed)) DIO_RECENT_SETTING_DATA;

/* time reference constants */

#define	DIO_TIME_TYPE_ABSOLUTE		0		/* absolute time */
#define	DIO_TIME_TYPE_RELATIVE		1		/* relative time */

/* snoozed alarms */

typedef struct DIO_ALARM_SNOOZE_INFO
    {
    int		device_index;
    int		property;
    time_t	end_snooze_time;
    time_t	modify_date;
    } __attribute__((packed)) DIO_ALARM_SNOOZE_INFO;

/* device/property structure */

typedef struct DIO_DEVICE_PROPERTY_DATA
    {
    int		device_index;
    short	property;
    } __attribute__((packed)) DIO_DEVICE_PROPERTY_DATA;

/* device/property location information structure */

typedef struct DIO_DEVICE_LOCATION_DATA
    {
    double	x_coord;
    double	y_coord;
    double	z_coord;
    int		crate;
    int		slot;
    int		channel;
    int		madc_number;
    int		madc_channel;
    } __attribute__((packed)) DIO_DEVICE_LOCATION_DATA;

/* device property addressing */

#define	DIO_ADDR_MODE_UNKNOWN		0	/* addressing mode not known */
#define	DIO_ADDR_MODE_ARRAY		2	/* device property is a simple array */
#define	DIO_ADDR_MODE_STRUCTURE		3	/* device property is a structure */
#define	DIO_ADDR_MODE_STRUCT_ARRAY	4	/* device property is an array of structures */
#define	DIO_ADDR_MODE_NONLINEAR		5	/* device property has nonlinear addressing (offset is a block not bytes) */

/* CAMAC 190 MADC plot channel information structure */

#define	DIO_NUM_C190_PLOT_CHANNELS	6

typedef struct DIO_C190_PLOT_CHANNEL_DATA
    {
    short	channel_number;
    short	arm_source;
    short	arm_modifier;
    short	trigger_source;
    short	trigger_modifier;
    short	plot_mode;
    short	rearm_disable;
    unsigned short	arm_delay;
    unsigned short	sample_period;
    } DIO_C190_PLOT_CHANNEL_DATA;

#define	DIO_C190_NUM_ARM_SOURCES	4
#define	DIO_C190_ARM_SOURCE_OFF		0
#define	DIO_C190_ARM_SOURCE_IMMEDIATE	1
#define	DIO_C190_ARM_SOURCE_EVENT	2
#define	DIO_C190_ARM_SOURCE_EXTERNAL	3

#define	DIO_C190_NUM_TRIG_SOURCES	4
#define	DIO_C190_TRIG_SOURCE_INTERNAL	0
#define	DIO_C190_TRIG_SOURCE_IMMEDIATE	1
#define	DIO_C190_TRIG_SOURCE_EVENT	2
#define	DIO_C190_TRIG_SOURCE_EXTERNAL	3

#define	DIO_C190_NUM_PLOT_MODES		4
#define	DIO_C190_PLOT_MODE_UNKNOWN	0
#define	DIO_C190_PLOT_MODE_A		1
#define	DIO_C190_PLOT_MODE_B		2
#define	DIO_C190_PLOT_MODE_C		3

/* CAMAC 190 MADC list information structure */

#define	DIO_NUM_C190_LISTS		8

typedef struct DIO_C190_LIST_DATA
    {
    short	first_channel;
    short	last_channel;
    short	arm_source;
    short	arm_modifier;
    short	trigger_source;
    short	trigger_modifier;
    short	rearm_disable;
    unsigned short	arm_delay;
    } DIO_C190_LIST_DATA;

/* CAMAC 190 MADC clock event information structure */

#define	DIO_NUM_C190_CLOCK_LEVELS	8
#define	DIO_NUM_C190_EVENTS_PER_LEVEL	16

typedef struct DIO_C190_CLOCK_EVENT_DATA
    {
    short	events_per_level[DIO_NUM_C190_CLOCK_LEVELS];
    unsigned short	clock_events[DIO_NUM_C190_CLOCK_LEVELS][DIO_NUM_C190_EVENTS_PER_LEVEL];
    } DIO_C190_CLOCK_EVENT_DATA;

/* CAMAC 290 MADC plot channel information structure */

#define	DIO_NUM_C290_PLOT_CHANNELS	16
#define	DIO_NUM_C290_CLOCK_EVENTS	16

typedef struct DIO_C290_PLOT_CHANNEL_DATA
    {
    short	channel_number;
    unsigned short	sample_period;
    short	num_trigger_events;
    unsigned char	trigger_events[DIO_NUM_C290_CLOCK_EVENTS];
    short	num_arm_events;
    unsigned char	arm_events[DIO_NUM_C290_CLOCK_EVENTS];
    } DIO_C290_PLOT_CHANNEL_DATA;

#define	DIO_NUM_C290_LISTS		15

typedef struct DIO_C290_LIST_DATA
    {
    short	first_channel;
    short	last_channel;
    short	num_trigger_events;
    unsigned char	trigger_events[DIO_NUM_C290_CLOCK_EVENTS];
    short	num_arm_events;
    unsigned char	arm_events[DIO_NUM_C290_CLOCK_EVENTS];
    } DIO_C290_LIST_DATA;

typedef struct DIO_TIMER_EVENT_INFO
    {
    int		max_events;
    int		event_data_length;
    int		has_event_count;
    } __attribute__((packed)) DIO_TIMER_EVENT_INFO;

typedef struct DIO_TIMER_LIST_DATA
    {
    int		num_timers;
    DIO_TIMER_EVENT_INFO	*timer_info;
    unsigned char	*read_buffer;
    int		*lengths;
    int		list_id;
    int		is_one_shot_read;
    } __attribute__((packed)) DIO_TIMER_LIST_DATA;

#define	DIO_MAX_STATUS_SCALING_ENTRIES		32	/* maximum number of status scaling entries */

#define	DIO_STATUS_SCALING_TEXT_LEN		64	/* length of a status scaling text string */
#define	DIO_STATUS_SCALING_SHORT_TEXT_LEN	16	/* length of a short status scaling text string */
#define	DIO_STATUS_SCALING_STATE_TEXT_LEN	16	/* length of a status scaling state text string */

typedef struct DIO_STATUS_SCALING_ENTRY
    {
    int		order_number;			/* menu order number (starts at 0) */
    unsigned long long	mask_value;		/* raw status mask value */
    unsigned long long	match_value;		/* masked match value */
    int		invert_raw_data;		/* flag indicating whether or not to invert the raw data before masking */
    char	short_text[DIO_STATUS_SCALING_SHORT_TEXT_LEN+2];	/* short status type text */
    char	text[DIO_STATUS_SCALING_TEXT_LEN+2];	/* status type text */
    char	match_string[DIO_STATUS_SCALING_STATE_TEXT_LEN+2];	/* status if masked value is matched */
    int		match_color;			/* display color if masked value is matched */
    char	match_char;			/* character to display if masked value is matched */
    char	match_spare;
    char	nonmatch_string[DIO_STATUS_SCALING_STATE_TEXT_LEN+2];	/* status if masked value is not matched */
    int		nonmatch_color;			/* display color if masked value is not matched */
    char	nonmatch_char;			/* character to display if masked value is not matched */
    char	nonmatch_spare;
    } __attribute__((packed)) DIO_STATUS_SCALING_ENTRY;

typedef struct DIO_STATUS_ATTR_VALUE
    {
    int		order_number;			/* menu order number (starts at 0) */
    int		status_value;			/* boolean attribute status value */
    char	status_string[DIO_STATUS_SCALING_STATE_TEXT_LEN+2];	/* status if masked value is not matched */
    int		status_color;			/* status display color */
    char	status_char;			/* status display character */
    char	status_spare;
    } __attribute__((packed)) DIO_STATUS_ATTR_VALUE;

/* status menu options */

    #define	DIO_STSMNU_OPT_NONE		0	/* no options selected */
    #define	DIO_STSMNU_OPT_USER_FUNC_ON_TOP	1	/* put user functions on the top of the menu */

typedef int (*status_menu_user_function)(void *callback_data,
					 int entry_number,
					 int row, int column);	/* status menu user supplied function */


/******************************************************************************/
/* 
**	function prototype typedefs
*/
/******************************************************************************/

typedef int (*dio_raw_reading_function)(void *callback_data, int device_index,
					short property, void *reading,
					int length, int offset,
					char *data_event);	/* raw reading callback function */

typedef int (*dio_raw_setting_function)(void *callback_data, int device_index,
					short property, void *setting,
					int length, int offset,
					int queue_flag);	/* raw setting callback function */

typedef int (*status_menu_user_function)(void *callback_data,
					 int entry_number,
					 int row, int column);	/* status menu user supplied function */


/******************************************************************************/
/*
**	function prototypes for DIO routines
*/
/******************************************************************************/

    #ifdef __cplusplus
extern "C" {
#endif

    int dio_actual_alarm_list_id_c(int const *device_indices,
				   int *alarm_list_ids, short *errors,
				   int num_devices=1);
    int dio_add_timer_events_c(int *device_indices, int *num_events,
                               int *events, short *errors, int num_timers=1);
    int dio_addressing_mode_c(int const *device_indices,
			      short const *properties, int *addr_modes,
			      short *errors, int num_devices=1,
			      unsigned int options=DIO_OPT_NONE);
    int dio_alarm_acknowledge_mask_c(int const *device_indices,
				     unsigned int *masks, short *errors,
				     int num_devices=1);
    int dio_alarm_ancestors_c(int device_index, int *num_ancestors,
			      int **ancestors);
    int dio_alarm_dnom(int *device_index, int *nominal, int *mask, 
                       short *passed_ftd=(short *)NULL,int *passed_start_block=(int *)NULL,
                       int *passed_max_blocks=(int *)NULL,
                       int *ret_num_blocks=(int *)NULL);
    int dio_alarm_dnom_c(int device_index, int *nominal, int *mask, 
                         short ftd = FTD_ONESHOT,int start_block = 0,int max_blocks = 1,int *num_blocks=(int *)NULL);
    int dio_alarm_dnom_lst(int *list_id, int *nominals, int *masks,
                           short *errors);
    int dio_alarm_events(int *device_index, int *alarm_type,
                         int *event_1, int *event_2, 
                         short *passed_ftd=(short *)NULL,int *passed_start_block=(int *)NULL,
                         int *passed_max_blocks=(int *)NULL,
                         int *ret_num_blocks=(int *)NULL);
    int dio_alarm_events_c(int device_index, int alarm_type,
                           int *event_1, int *event_2, 
                           short ftd = FTD_ONESHOT,int start_block = 0,int max_blocks = 1,int *num_blocks=(int *)NULL);
    int dio_alarm_events_lst(int *list_id, int *event_1, int *event_2,
                             short *errors);
    int dio_alarm_flags(int *device_index, int *alarm_type,
                        int *event_flag, int *display_flag,
                        int *logging_flag, 
                        short *passed_ftd=(short *)NULL,int *passed_start_block=(int *)NULL,
                        int *passed_max_blocks=(int *)NULL,
                        int *ret_num_blocks=(int *)NULL);
    int dio_alarm_flags_c(int device_index, int alarm_type,
                          int *event_flag, int *display_flag,
                          int *logging_flag, 
                          short ftd = FTD_ONESHOT,int start_block = 0,int max_blocks = 1,int *num_blocks=(int *)NULL);
    int dio_alarm_flags_list(int *list_id, int *event_flags,
                             int *display_flags, int *logging_flags,
                             short *errors);
    int dio_alarm_ftd_c(int device_index, int alarm_type,
                        unsigned short *alarm_ftd, short ftd, int start_block,
                        int max_blocks, int *ret_num_blocks);
    int dio_alarm_group_info_c(int const *device_indices, int *group_numbers,
			       int *is_consolidator, short *errors,
			       int num_devices=1);
    int dio_alarm_limits(int *device_index, float *minimum,
                         float *maximum, 
                         int *type=(int *)NULL,short *passed_ftd=(short *)NULL,char *units=(char *)NULL,
                         int *passed_start_block=(int *)NULL,int *passed_max_blocks=(int *)NULL,
                         int *ret_num_blocks=(int *)NULL,int *limit_status=(int *)NULL);
    int dio_alarm_limits_c(int device_index, float *minimum, float *maximum, 
                           int *limit_type=(int *)NULL,short ftd=FTD_ONESHOT,char *units=(char *)NULL,
                           int start_block = 0,int max_blocks=1,int *num_blocks=(int *)NULL,int *limit_status=(int *)NULL);
    int dio_alarm_lim_lst(int *list_id, float *minima, float *maxima,
                          short *errors, 
                          int *type=(int *)NULL,char *units=(char *)NULL,int *limit_status=(int *)NULL);
    int dio_alarm_list_id_c(int const *device_indices, int *alarm_list_ids,
                            short *errors, int num_devices);
    int dio_alarm_tries(int *device_index, int *alarm_type,
                        int *tries_now, int *tries_needed, 
                        short *passed_ftd=(short *)NULL,
                        int *passed_start_block=(int *)NULL,
                        int *passed_max_blocks=(int *)NULL,
                        int *ret_num_blocks=(int *)NULL);
    int dio_alarm_tries_c(int device_index, int alarm_type,
                          int *tries_now, int *tries_needed, 
                          short ftd=FTD_ONESHOT,int start_block=0,int max_blocks=1,int *num_blocks=(int *)NULL);
    int dio_alarm_tries_lst(int *list_id, int *tries_now,
                            int *tries_needed, short *errors);
    int dio_alarms_monitored_by_user_c(char const *user_name, int max_return,
				       int *num_alarms=(int *) NULL,
				       int *device_indices=(int *) NULL,
				       int *alarm_types=(int *) NULL);
    int dio_analog_alarm_handling_c(int const *device_indices,
				    int *handler_codes, int *sound_ids,
				    int *speech_ids, short *errors,
				    int num_devices);
    int dio_analog_alarm_text(int const *device_indices, int *priorities,
                              int *text_lengths, char *text, short *errors,
			      int *max_text_len=(int *) NULL,
			      int *num_devices=(int *) NULL);
    int dio_analog_alarm_text_c(int const *device_indices, int *priorities,
                                int *text_lengths, char *text, short *errors,
				int max_text_len=80, int num_devices=1);
    int dio_analog_alarm_url_c(int const *device_indices, char *urls,
			       short *errors, int num_devices=1);
    int dio_array_device_negative_c(int device_index, int num_elements,
                                    int start_element);
    int dio_array_device_off_c(int device_index, int num_elements,
                               int start_element);
    int dio_array_device_on_c(int device_index, int num_elements,
                              int start_element);
    int dio_array_device_positive_c(int device_index, int num_elements,
                                    int start_element);
    int dio_array_device_reset_c(int device_index, int num_elements,
                                 int start_element);
    int dio_audit_info_c(int const *device_indices, int num_devices,
                         short *errors, unsigned int *first_dates,
                         char *first_users, unsigned int *last_dates,
                         char *last_users);
    int dio_bld_alrm_lst(int *list_id, int *num_devices,
                         int *device_indices, short *alarm_type,
                         short *errors, 
                         short *ftd=(short *) NULL,
			 int *data_type=(int *) NULL,
                         int *start_block=(int *) NULL,
                         int *max_blocks=(int *) NULL,
			 int *ret_num_blocks=(int *) NULL);
    int dio_bld_get(int *list_id, int const *num_devices,
                    int const *device_indices, short const *properties,
                    short *errors, short const *ftd=(short *) NULL,
                    short const *lengths=(short *) NULL,
		    short const *offsets=(short *) NULL);
    int dio_bld_get_c(int *list_id, int num_devices, int const *device_indices,
                      short const *properties, short *errors, 
                      short ftd=FTD_ONESHOT,
		      short const *lengths=(short *) NULL,
		      short const *offsets=(short *) NULL);
    int dio_bld_get_raw(int *list_id, int const *num_devices,
                        int const *device_indices, short const *properties,
                        short *errors, 
                        short const *ftd=(short *) NULL,
			short const *lengths=(short *) NULL,
                        short const *offsets=(short *) NULL);
    int dio_bld_get_raw_c(int *list_id, int num_devices,
                          int const *device_indices, short const *properties,
                          short *errors, 
                          short ftd = FTD_ONESHOT,
			  short const *lengths=(short *) NULL,
			  short const *offsets=(short *) NULL);
    int dio_bld_set(int *list_id, int const *num_devices,
                    int const *device_indices, short const *properties,
                    short *errors, short const *offsets=(short *) NULL);
    int dio_bld_set_c(int *list_id, int num_devices, int const *device_indices,
                      short const *properties, short *errors,
		      short const *offsets=(short *) NULL);
    int dio_bld_set_raw(int *list_id, int const *num_devices,
                        int const *device_indices, short const *properties,
                        short *errors, short const *lengths=(short *) NULL,
			short const *offsets=(short *) NULL);
    int dio_bld_set_raw_c(int *list_id, int num_devices,
                          int const *device_indices, short const *properties,
                          short *errors, short const *lengths=(short *) NULL,
			  short const *offsets=(short *) NULL);
    int dio_block_setting_logging(void);
    int dio_broken_info_c(int const *device_indices,
			  DIO_BROKEN_DEVICE_DATA *broken_data,
			  short *errors, int num_devices=1);
    int dio_build_alarm_list_c(int *list_id, int num_devices,
                               int *device_indices,
                               short alarm_type, short *errors,
			       short ftd=FTD_ONESHOT,
                               int data_type=DIO_ALARM_BLOCK_DATA,
			       int start_block=0, int max_blocks=1,
                               int *num_blocks=(int *) NULL);
    int dio_build_ftp_list_c(int *list_id, int num_devices,
                             int *device_indices,
                             short *properties, unsigned int rate,
                             int reference_event, short *errors,
                             unsigned int options=DIO_FTP_OPT_NONE,
			     int *array_indices=(int *) NULL);
    int dio_build_get_array_list_c(int *list_id, int num_devices,
                                   int *device_indices,
                                   short *properties, short *errors,
                                   short ftd, int *num_elements,
                                   int *start_elements);
    int dio_build_get_array_list_raw_c(int *list_id, int num_devices,
				       int *device_indices,
				       short *properties, short *errors,
				       int data_event_type, void *data_event,
				       int *num_elements, int *start_elements,
				       int *device_lengths=(int *) NULL);
    int dio_build_set_array_list_c(int *list_id, int num_devices,
				   int *device_indices, short *properties,
				   short *errors, int *num_elements,
				   int *start_elements);
    int dio_build_snapshot_list_c(int *list_id, int num_devices,
                                  int *device_indices,
                                  short *properties, double period,
                                  char *trigger_events, int num_events,
                                  int delay, short *errors, 
                                  int read_mode=DIO_STANDARD_SNAPSHOT_MODE,char *passed_sample_events=(char *)NULL,
                                  int wait_for_fe=FALSE,int num_points=0);
    int dio_build_status_attribute_value_list_c(int *list_id, int num_devices,
						int const *device_indices,
						short *errors,
						char const *data_event=(char *) NULL,
						int *num_elements=(int *) NULL,
						int *start_elements=(int *) NULL);
    int dio_build_timer_reference_list_c(int num_timers, int *timer_devices,
					 short *errors,
					 DIO_TIMER_LIST_DATA *list_info,
					 char const *data_event=(char *) NULL);
    int dio_cache_device_property_table_info_c(int table,
					       int const *device_indices,
					       short const *properties=(short *) NULL,
					       int num_devices=1);
    int dio_cache_device_table_info_c(int table, int const *device_indices,
				      int num_devices=1);
    int dio_cache_property_info_c(int const *device_indices,
                                  short const *properties, short *errors,
                                  int num_devices);
    int dio_cache_scaling_info_c(int const *device_indices,
                                 short const *properties, short *errors,
                                 int num_devices);
    int dio_calculate_extrema_c(int const *device_indices,
				short const *properties,
				double *minima, unsigned int *raw_minima,
				double *maxima, unsigned int *raw_maxima,
				short *errors, int num_devices=1);
    int dio_calculate_raw_value_c(int const *device_indices,
				  short const *properties,
				  double *scaled_values,
				  unsigned int *raw_values,
				  double *value_deltas,
				  short *errors, int num_devices=1);
    int dio_calculate_step_motor_steps_c(int device_index, double desired_value,
					 double current_value, int *num_steps,
					 unsigned int options=DIO_STEP_OPT_NONE,
					 char const *data_event=(char *) NULL);
    int dio_cancel_alarm(int *device_index, int *alarm_type,
                         short *ftd, int *passed_start_block=(int *)NULL,int *passed_num_blocks=(int *)NULL);
    int dio_cancel_alarm_c(int device_index, int alarm_type, short ftd, int start_block=0,int num_blocks=1);
    int dio_cancel_alarm_lst(int *list_id);
    int dio_cancel_ftp_list_c(int list_id);
    int dio_cancel_get_array_c(int device_index, short property, short ftd,
                               int num_entries, int start_element);
    int dio_cancel_set_array_c(int device_index, short property,
                               int num_entries, int start_element);
    int dio_cancel_snapshot_list_c(int list_id);
    int dio_cancel_timer_reference_list(DIO_TIMER_LIST_DATA *list_info);
    int dio_can_ftp_c(int *device_indices, int *can_ftps, int *ftp_classes,
                      short *errors, int num_devices);
    int dio_can_get(int *device_index, short *property,
                    short *ftd, short *passed_len=(short *)NULL,short *passed_offset=(short *)NULL);
    int dio_can_get_c(int device_index, int property, int ftd, short length=0 ,short offset=0);
    int dio_can_get_lst(int *list_id);
    int dio_can_read_using_ftp_c(int *device_indices, short *properties,
				 int *can_ftps, int *ftp_classes, short *errors,
				 int num_devices);
    int dio_can_read_using_snapshot_c(int *device_indices, short *properties,
				      int *can_snapshots, int *snap_classes,
				      short *errors, int num_devices);
    int dio_can_set(int *device_index, short *property, short *passed_len=(short *)NULL,short *passed_offset=(short *)NULL);
    int dio_can_set_c(int device_index, int property, short len=0,short offset=0);
    int dio_can_set_device_c(int *device_indices, int *can_sets,
                             short *errors, int num_devices);
    int dio_can_set_lst(int *list_id);
    int dio_can_snapshot_c(int *device_indices, int *can_snapshots,
                           short *errors, int num_devices=1,int *snap_classes=(int *)NULL);
    int dio_can_trigger_snapshot_c(int *device_indices, int *can_triggers,
                                   short *errors, int num_devices);
    int dio_change_ftd(int *device_index, short *property,
                       short *ftd, short *passed_len=(short *)NULL,short *passed_offset=(short *)NULL);
    int dio_change_ftd_c(int device_index, short property, short ftd, short length=0 ,short offset=0);
    int dio_change_ftd_lst(int *list_id, short *ftd, short *errors);
    int dio_change_ftd_lst_c(int list_id, short ftd, short *errors);
    int dio_check_read_request_size_c(int num_devices, int *device_indices,
                                      short *properties, short *lengths,
                                      unsigned int options, short *errors,
                                      int *num_fit);
    int dio_check_set_request_size_c(int num_devices, int *device_indices,
                                     short *properties, short *lengths,
                                     unsigned int options, short *errors,
                                     int *num_fit);
    int dio_cntrl_dev(int *device_index, int *command, 
                      int *passed_array_index=(int *) NULL,
		      int *passed_num_elements=(int *) NULL,
                      int *passed_queue_flag=(int *) NULL);
    int dio_cntrl_dev_c(int device_index, int command, int start_element=0,
    			int num_elements=1, int queue_flag=DIO_WAIT_FOR_SET);
    int dio_cntrl_lst(int *list_id, int *commands, short *errors);
    int dio_console_can_acknowledge_alarm_c(int *device_indices,
					    int console_number,
					    int *can_acknowledge, short *errors,
					    int num_devices=1);
    int dio_console_can_display_alarm_c(int *device_indices, int console_number,
					int *can_display, short *errors,
					int num_devices=1);
    int dio_control_scaling_length_c(int const *device_indices,
				     int *scaling_length, short *errors,
				     int num_devices=1);
    int dio_controlling_device_c(int const *device_indices,
				 int *controlling_dis, short *errors,
				 int num_devices);
    int dio_current_alarm_text_c(int num_devices, int *device_indices,
				 int text_type, short *errors,
				 int *num_entries=(int *) NULL,
				 DIO_ALARM_TEXT_ENTRY_DATA **alarm_text=(DIO_ALARM_TEXT_ENTRY_DATA **) NULL);
    int dio_current_xmlrpc_access_c(int device_index, short property,
				    unsigned int options, int *num_nodes,
				    char ***client_nodes=(char ***) NULL,
				    int *num_entries=(int *) NULL,
				    int **num_per_node=(int **) NULL,
				    ARRAY_DEVICE_DATA_EXT **entries=(ARRAY_DEVICE_DATA_EXT **) NULL);
    int dio_current_xmlrpc_client_devices_c(char const *client_node,
					    unsigned int options,
					    int *num_entries=(int *) NULL,
					    ARRAY_DEVICE_DATA_EXT **entries=(ARRAY_DEVICE_DATA_EXT **) NULL);
    int dio_current_xmlrpc_client_nodes_c(unsigned int options, int *num_nodes,
					  char ***client_nodes=(char ***) NULL);
    int dio_data_len(int const *device_indices, short const *properties,
                     short *default_sizes, short *max_sizes, short *errors,
		     int *num_devices=(int *) NULL,
		     int *atomic_size=(int *) NULL,
		     int *addr_modes=(int *) NULL);
    int dio_data_len_c(int const *device_indices, short const *properties,
                       short *default_sizes, short *max_sizes, short *errors,
		       int num_devices=1, int *atomic_size=(int *) NULL,
		       int *addr_modes=(int *) NULL);
    int dio_data_length_c(int const *device_indices, short const *properties,
                          short *default_sizes, int *atomic_sizes,
                          unsigned int *maximum_sizes, short *errors,
                          int num_devices=1, unsigned int options=DIO_OPT_NONE,
			  int *addr_modes=(int *) NULL);
    int dio_data_length_ext_c(int const *device_indices,
			      short const *properties, short *default_sizes,
			      int *atomic_sizes, unsigned int *maximum_sizes,
			      short *errors, int num_devices=1,
			      unsigned int options=DIO_OPT_NONE,
			      int *addr_modes=(int *) NULL);
    int dio_data_type_info_c(int const *device_indices, short const *properties,
                             int num_devices, int passed_max_entries,
                             unsigned int options, int *data_type_ids,
                             int *num_entries, int *raw_offsets,
                             int *data_types, int *scale_lengths,
                             int *num_elements, int *bytes_to_skip,
                             int *primary_indices, char *primary_text,
                             char *descriptions, short *errors);
    int dio_database_mask_to_property_c(unsigned long long property_mask);
    int dio_database_property_to_mask_c(short property,
					unsigned int *property_mask);
    int dio_db_extrema_c(int const *device_indices, short const *properties,
			 double *min_values, double *max_values, short *errors,
			 int num_devices=1, int convert_type=DIO_COMMON);
    int dio_dbquery_c(int type, void const *request_data, int max_return,
                      void *reply_data, unsigned int options=DIO_OPT_NONE);
    int dio_dbquery_alloc_c(int type, void const *request_data,
			    int *num_returned, void **ret_reply_data,
			    unsigned int options=DIO_OPT_NONE);
    int dio_default_data_event_c(int const *device_indices,
                                 short const *properties, char *data_events,
                                 short *errors, int num_devices);
    int dio_default_ftd(int const *device_indices, short const *properties,
                        short *ftds, short *errors,
			int *num_devices=(int *) NULL);
    int dio_delete_all_emc_info(int const *device_index);
    int dio_delete_all_fermi_name_info(char *device_name);
#ifdef __cplusplus
    int dio_delete_all_info(int const *device_index=(int *) NULL);
#else
    int dio_delete_all_info();
#endif
    int dio_delete_all_name_info(void);
#ifdef __cplusplus
    int dio_delete_cache(int const* device_index = (int const*) NULL);
#else
    int dio_delete_cache();
#endif
    int dio_delete_ftp_class_info_c(int device_index=0);
    int dio_delete_info(int const *device_index, short const *property,
                        int *info_type);
    int dio_delete_info_c(int device_index, short property, int info_type);
    int dio_delete_name_info_c(char const *name, int num_devices);
    int dio_delete_pdb(int const *device_indices, short const *properties,
		       short *dev_err=(short *)NULL,
		       int const *passed_numdev=(int *)NULL);
#ifdef __cplusplus
    int dio_delete_pdb_all(int *device_index=(int *) NULL);
#else
    int dio_delete_pdb_all();
#endif
    int dio_delete_pdb_lst(int *list_id, short *dev_err=(short *)NULL);
    int dio_delete_requests_c(int request_type);
    int dio_delete_snapshot_class_info_c(int device_index=0);
    int dio_department_info_c(int const *device_indices, char *departments,
			      short *errors, int num_devices=1);
    int dio_desired_alarm_limit_type(int const *device_indices, int *limit_type,
                                     short *errors, short *sizes=(short *) NULL,
				     int *num_devices=(int *) NULL);
    int dio_device_area_c(int const *device_indices, int *area_ids,
			  short *errors, int num_devices=1);
    int dio_device_expression_c(int const *device_indices, char *expressions,
                                short *errors, int num_devices=1);
    int dio_device_has_expression_c(int const *device_indices,
				    int *has_expression, short *errors,
				    int num_devices=1);
    int dio_device_help_url_c(int const *device_indices, char *urls,
			      short *errors, int num_devices=1,
			      int verify_url=TRUE);
    int dio_device_index(char const *names, int *device_indices, 
                         int const *passed_num_devices=(int *) NULL,
			 short *errors=(short *) NULL,
			 unsigned int const *options=(unsigned int *)NULL);
    int dio_device_index_c(char const *names, int *device_indices, 
                           int num_devices=1, short *errors=(short *) NULL,
			   unsigned int options=DIO_NAME_OPT_NONE);
    int dio_device_location_c(int const *device_indices,
			      short const *properties, int *crates, int *slots,
			      short *errors, int num_devices=1,
			      int *madc_channels=(int *) NULL,
			      int *madc_numbers=(int *) NULL,
			      int *module_indices=(int *) NULL);
    int dio_device_location_info_c(int const *device_indices,
				   short const *properties,
				   DIO_DEVICE_LOCATION_DATA *location_data,
				   short *errors, int num_devices=1);
    int dio_device_location_string_c(int const *device_indices,
				     short const *properties,
				     char *location_text, char *rack_text,
				     short *errors, int num_devices=1);
    int dio_device_machine_c(int const *device_indices, int *machine_ids,
			     short *errors, int num_devices=1);
    int dio_device_madc_location_c(int const *device_indices, int *nodes,
				   int *madc_numbers, int *madc_channels,
				   short *errors, int num_devices=1);
    int dio_device_setting_is_enabled_c(int device_index);
    int dio_device_ssdr(int const *device_indices, int *num_bytes,
                        char *ssdr_data, short *errors, int *max_bytes,
			int *num_devices=(int *) NULL);
    int dio_device_ssdr_c(int const *device_indices, int *num_bytes,
                          char *ssdr_data, short *errors, int max_bytes,
			  int num_devices=1);
    int dio_device_state_c(int num_devices, int const *device_indices,
                           short *device_states, int use_cache=FALSE);
    int dio_device_string_element_length_c(int const *device_indices,
					   short const *properties,
					   int *lengths, short *errors,
					   int num_devices=1,
					   unsigned int options=DIO_DISPLAY_OPT_NONE);
    int dio_dev_emc(int const *device_indices, int *num_emcs, char *emc_data,
                    short *errors, int *num_devices=(int *) NULL);
    int dio_dev_name(int const *device_indices, char *names, short *errors,
    		     int const *num_devices=(int *) NULL,
		     int const *options=(int *) NULL);
    int dio_dev_name_c(int const *device_indices, char *names, short *errors,
    		       int num_devices=1, int options=DIO_NAME_OPT_NONE);
    int dio_dev_node(int const *device_indices, short const *properties,
                     int *nodes, short *errors, int *num_devices=(int *) NULL);
    int dio_dev_ssdn(int const *device_indices, short const *properties,
                     char *ssdns, short *errors, int *num_devices=(int *) NULL);
    int dio_dev_ssdn_c(int const *device_indices, short const *properties,
                       char *ssdns, short *errors, int num_devices=1);
    int dio_dev_text(int const *device_indices, char *text, short *errors,
    		     int const *num_devices=(int *) NULL,
		     unsigned int const *options=(unsigned int *) NULL);
    int dio_dev_text_c(int const *device_indices, char *text, short *errors,
    		       int num_devices=1,
		       unsigned int options=DIO_TEXT_OPT_NONE);
    int dio_dev_type(int const *device_indices, const short *properties,
                     int *device_numbers, int *device_types, short *errors,
		     int *sub_types=(int *) NULL,
		     int *num_devices=(int *) NULL,
		     int *generic_types=(int *) NULL);
    int dio_device_type_c(int const *device_indices, short const *properties,
                          int *device_classes, int *device_types,
                          short *errors, int num_devices);
    int dio_digital_alarm_handling_c(int const *device_indices,
				     int *num_entries, int *masks,
				     int *handler_codes, int *sound_ids,
				     int *speech_ids, short *errors,
				     int max_entries=DIO_MAX_DIGITAL_ALARM_TEXT,
                                     int num_devices=1);
    int dio_digital_alarm_text(int const *device_indices, int *num_entries,
                               int *masks, int *conditions, int *priorities,
                               int *text_lengths, char *text, short *errors,
			       int const *max_entries=(int *) NULL,
			       int const *max_length=(int *) NULL,
			       int const *num_devices=(int *) NULL);
    int dio_digital_alarm_text_c(int const *device_indices, int *num_entries,
                                 int *masks, int *conditions, int *priorities,
                                 int *text_lengths, char *text,
                                 short *errors,
				 int max_entries=DIO_MAX_DIGITAL_ALARM_TEXT,
				 int max_length=80, int num_devices=1);
    int dio_digital_control_c(int device_index, int num_elements,
			      int array_index, char *string, int length);
    int dio_digital_control_info_c(int const *device_indices, int *num_entries,
				   DIO_DIGITAL_CONTROL_ENTRY *control_entries,
				   short *errors,
				   int max_return=DIO_MAX_DIGITAL_CONTROL_ENTRIES,
				   int num_devices=1);
    int dio_digital_control_list_c(int list_id, char *string, int length,
				   short *errors);
    int dio_digital_control_menu_c(int top_row, int left_column, int num_lines,
				   int device_index, int array_index,
				   int num_user=0, int user_text_len=0,
				   char *user_text=(char *) NULL,
				   digital_control_user_function *user_funcs=(digital_control_user_function *) NULL,
				   void **func_data=(void **) NULL,
				   unsigned int options=DIO_DIGCON_OPT_NONE);
    int dio_digital_control_text_to_value_c(int device_index, char *string,
					    int length, int *value);
    int dio_digital_control_text_to_value_list_c(int num_devices,
						 int *device_indices,
						 char *string, int length,
						 short *errors, int *values);
    int dio_disable(int *device_index, int *alarm_type,
    		    int *start_block=(int *) NULL,
		    int *num_blocks=(int *) NULL);
    int dio_disable_c(int device_index, int alarm_type, int start_block=0,
    		      int num_blocks=1);
    int dio_disable_abort(int *device_index, int *alarm_type,
    			  int *passed_start_block=(int *) NULL,
			  int *passed_num_blocks=(int *) NULL);
    int dio_disable_abort_c(int device_index, int alarm_type,
    			    int start_block=0, int num_blocks=1);
    int dio_disable_cache_missing_db_values(void);
    int dio_disable_obsolete_dev_info(void);
    int dio_disable_on_event_retries(void);
    int dio_disable_settings(void);
    int dio_display_attributes_c(int const *device_indices,
                                 short const *properties, int *display_lengths,
                                 int *display_types, short *errors,
                                 int num_devices=1,
				 unsigned int options=DIO_DISPLAY_OPT_NONE);
    int dio_display_conversion_info_c(int const *device_indices,
				      short const *properties,
				      short *errors,
				      int *is_special=(int *) NULL,
				      int *display_types=(int *) NULL,
				      int *display_lengths=(int *) NULL,
				      int *handler_types=(int *) NULL,
				      int num_devices=1,
				      unsigned int options=DIO_DISPLAY_OPT_NONE);
    int dio_display_conversion_type_c(int const *device_indices,
				      short const *properties,
				      int *display_types, short *errors,
				      int num_devices);
    int dio_display_length_c(int const *device_indices, short const *properties,
			     int *display_lengths, short *errors,
			     int num_devices=1,
			     unsigned int options=DIO_DISPLAY_OPT_NONE);
    int dio_dis_abt_lst(int *list_id, short *errors);
    int dio_dis_lst(int *list_id, short *errors);
    int dio_documentation_info_c(int *device_indices,
				 DIO_DOCUMENT_DEVICE_DATA *document_data,
				 short *errors, int num_devices=1);
    int dio_download_info_c(int const *device_indices, short const *properties,
                            int *nodes, int *locations, int *order_numbers,
                            int *need_vmdis, short *errors, int num_devices);
    int dio_download_properties_c(int const *device_indices,
				  int *num_properties, short **properties,
				  short *errors, int num_devices);
    int dio_dpreq_info(int const *device_indices, short const *properties,
                       DBAREQ_INFO **dpreq_info, short *errors,
		       int const *num_devices=(int *) NULL);
    int dio_duplicate_ssdn_properties_c(int device_index, short property,
					unsigned int options=DIO_OPT_NONE,
					int *num_duplicates=(int *) NULL,
					int **device_indices=(int **) NULL,
					short **properties=(short **) NULL);
    int dio_edit_comment_info_c(int device_index, int *num_comments,
				DIO_EDIT_COMMENT_DATA **comment_data=(DIO_EDIT_COMMENT_DATA **) NULL);
    int dio_emc_to_device_index(unsigned char const *emcs, int *device_indices,
                                short *errors,
				int const *num_devices=(int *) NULL);
    int dio_emc_type_c(char const *emcs, int *types, int num_emcs);
    int dio_enable(int *device_index, int *alarm_type,
    		   int *start_block=(int *) NULL,int *num_blocks=(int *) NULL);
    int dio_enable_c(int device_index, int alarm_type, int start_block=0,
    		     int num_blocks=1);
    int dio_enable_abort(int *device_index, int *alarm_type,
    			 int *start_block=(int *) NULL,
			 int *num_blocks=(int *) NULL);
    int dio_enable_abort_c(int device_index, int alarm_type,
    			   int start_block=0, int num_blocks=1);
    int dio_enable_cache_missing_db_values(void);
    int dio_enable_obsolete_dev_info(void);
    int dio_enable_on_event_retries(void);
    int dio_enable_setting_logging(void);
    int dio_enable_settings(void);
    int dio_ena_abt_lst(int *list_id, short *errors);
    int dio_ena_lst(int *list_id, short *errors);
    int dio_enum_value_info_c(int const *device_indices,
			      short const *properties,
			      int *num_entries,
			      DIO_ENUM_VALUE_ENTRY *enum_entries,
			      short *errors, int max_return=256,
			      int num_devices=1);
    int dio_enum_value_setting_menu_c(int top_row, int left_column,
    				      int num_lines, int device_index,
				      int array_index, int num_user=0,
				      int user_text_len=0,
				      char *user_text=(char *) NULL,
				      enum_setting_user_function *user_funcs=(enum_setting_user_function *) NULL,
				      void **func_data=(void **) NULL,
				      unsigned int options=DIO_ENUMVAL_OPT_NONE);
    int dio_enum_value_shared_devices_c(int const *device_indices,
					short const *passed_properties,
					int *num_entries,
					DIO_DEVICE_PROPERTY_DATA **shared_devices,
					short *errors, int num_devices=1);
    int dio_enum_value_text_to_raw_data_c(int const *device_indices,
					  short const *properties,
					  char *enum_value_text, void *raw_data,
					  short *errors, int num_devices=1,
					  int *lengths=(int *) NULL,
					  unsigned int options=0);
    int dio_event_control(int *event, int *command,int *system=(int *) NULL);
    int dio_event_control_c(int event, int command,int system=DIO_TCLK);
    int dio_event_control_list_c(int *events, int command, short *errors,
                                 int num_events, int system=DIO_TCLK);
    int dio_expand_family_c(int device_index, int *num_devices=(int *) NULL,
			    int **device_indices=(int **) NULL);
    int dio_extended_status_menu_c(int top_row, int left_column, int num_lines,
				   int device_index, int array_index=0,
				   void const *raw_data=(void *) NULL,
				   int num_user=0, int user_text_len=0,
				   char const *user_text=(char *) NULL,
				   status_menu_user_function *user_funcs=(status_menu_user_function *) NULL,
				   void **func_data=(void **) NULL,
				   unsigned int options=DIO_STSMNU_OPT_NONE);
    int dio_extract_alarm_info_c(int data_type, void const *alarm_data,
                                 int num_devices, int const *num_blocks,
                                 int const *device_indices, void *return_data,
                                 short *errors);
    int dio_extract_read_list_status_c(int list_id, int overall_status,
				       short *errors,
				       int *num_first=(int *) NULL,
				       int *device_index=(int *) NULL);
    int dio_extract_set_list_status_c(int list_id, int overall_status,
				      short *errors,
				      int *num_first=(int *) NULL,
				      int *device_index=(int *) NULL);
    int dio_extrema(int const *device_indices, short const *properties,
                    void *min_values, void *max_values, short *errors, 
                    int *num_devices=(int *) NULL, char *units=(char *) NULL,
		    int *convert_type=(int *) NULL);
    int dio_extrema_c(int const *device_indices, short const *properties,
                      void *min_values, void *max_values, short *errors, 
                      int num_devices=1, char *units_text=(char *) NULL,
		      int convert_type=DIO_COMMON);
    int dio_extrema_pdb_c(PDB_RS const *pdb, void *min_value, void *max_value,
                          char *units_text, int convert_type);
    int dio_extrema_pdb_ext_c(PDB_RS_EXT const *pdb, void *min_value,
			      void *max_value, char *units_text,
			      int convert_type);
    int dio_ext_text(int const *device_indices, int *num_entries,
                     int *bit_numbers, char *text_if_0, int *color_if_0,
                     char *text_if_1, int *color_if_1, char *text,
                     short *errors, int const *max_entries=(int *) NULL,
		     int const *num_devices=(int *) NULL);
    int dio_ext_text_c(int const *device_indices, int *num_entries,
                       int *bit_numbers, char *text_if_0, int *color_if_0,
                       char *text_if_1, int *color_if_1, char *text,
                       short *errors, int max_entries=256,
		       int num_devices=1);
    int dio_family(int const *device_indices, int *num_members,
		   int **member_dis, short *errors,
		   int const *num_families=(int *) NULL);
    int dio_family_info(int const *device_indices, int *num_members,
                        int *member_dis, short *errors,
			int const *max_members=(int *) NULL,
			int const *num_families=(int *) NULL);
    int dio_family_info_c(int const *device_indices, int *num_members,
                          int *member_dis, short *errors,
			  int max_members=DIO_MAX_FAMILY_SIZE,
			  int num_families=1);
    int dio_fermi_name_c(int *device_indices, int num_devices,
                         int max_names, unsigned int options,
                         int *num_names, char *fermi_names, short *properties,
                         int *atom_indexes, short *errors);
    int dio_fermi_name_to_key_c(char *fermi_name,
                                int *device_key, int *device_index,
                                short *property);
    char *dio_field_to_device_spec_string_c(short property_field,
					    int scaling_type=DIO_COMMON,
					    int *scaling_used=(int *) NULL,
					    short *property=(short *) NULL);
    int dio_find_devices(std::string const & users_text,
                         dio_find_devices_matches_t & matches, bool allow_obsoletes = false);
    int dio_find_name_c(char const *search_string, int string_length,
			int max_names, char *returned_names,
			int options=DIO_NAME_OPT_NONE);
    int dio_find_status_scaling_attr_id_c(int const *device_indices,
					  char const *attribute,
					  int *scaling_ids,
					  short *errors, int num_devices=1,
					  unsigned int options=DIO_OPT_NONE);
    int dio_find_status_scaling_attribute_c(int const *device_indices,
					    char const *attribute,
					    DIO_STATUS_SCALING_ENTRY *scaling_entries,
					    short *errors, int num_devices=1,
					    unsigned int options=DIO_OPT_NONE);
    int dio_find_status_scaling_by_attr_id_c(int const *device_indices,
					     int attr_id,
					     DIO_STATUS_SCALING_ENTRY *scaling_entries,
					     short *errors, int num_devices=1);
    int dio_find_status_scaling_by_mask_c(int const *device_indices,
					  unsigned long long mask,
					  DIO_STATUS_SCALING_ENTRY *scaling_entries,
					  short *errors, int num_devices=1);
    int dio_find_status_scaling_by_state_c(int const *device_indices,
					   char const *state_string,
					   DIO_STATUS_SCALING_ENTRY *scaling_entries,
					   int *is_match, short *errors,
					   int num_devices=1);
    int dio_flush(void);
    int dio_foreign_device_info_c(int *device_indices, short *properties,
				  int *num_entries,
				  DIO_FOREIGN_DEVICE_ENTRY *foreign_device_entries,
				  short *errors,
				  int max_return=DIO_MAX_FOREIGN_DEVICE_ENTRIES,
				  int num_devices=1);
    int dio_frig_houses(char *houses,short *nodes=(short *) NULL,
    			short *trunks=(short *) NULL,
			int *types = (int *) NULL,
			char *prefixes = (char *) NULL);
    int dio_ftp_class_info_c(int *ftp_classes, int num_classes,
			     DIO_FTP_CLASS_DATA *ret_class_info,
			     short *errors);
    int dio_ftp_default_freq_c(int ftp_class, double time_range,
			       unsigned int *default_freq);
    int dio_full_name_to_terse_name_c(char const *full_names, char *terse_names, 
				      int num_devices=1,
				      short *errors=(short *) NULL,
				      unsigned int options=DIO_NAME_OPT_NONE);
    int dio_get_alarm(int *device_index, int *alarm_type,
                      char *alarm_block, short *passed_ftd=(short *)NULL,
                      int *passed_start_block=(int *)NULL,
                      int *passed_max_blocks=(int *)NULL,int *ret_num_blocks=(int *)NULL);
    int dio_get_alarm_c(int device_index, int alarm_type, char *alarm_block, 
                        short ftd=FTD_ONESHOT,int start_block=0,int max_blocks=1,int *num_blocks=(int *)NULL);
    int dio_get_alrm_lst(int *list_id, char *alarm_blocks, short *errors);
    int dio_get_array_device_c(int device_index, short property, float *values,
                               int ftd, int num_elements, int start_element,
                               char *units);
    int dio_get_array_device_double_c(int device_index, short property,
				      double *values, int ftd, int num_elements,
				      int start_element, char *units);
    int dio_get_control_value_c(int *device_indices, int command,
                                unsigned int *control_value, short *errors,
                                int num_devices);
    int dio_get_db_alarm(int *device_indices, int *alarm_type,
                         void *alarm_blocks, short *errors,
			 int *num_devices=(int *) NULL,
			 int *num_blocks=(int *) NULL,
			 int *max_blocks=(int *) NULL,
			 int *no_cache=(int *) NULL);
    int dio_get_db_alarm_c(int *device_indices, int alarm_type,
                           void *alarm_blocks, short *errors,
			   int num_devices=1, int *num_blocks=(int *) NULL,
			   int max_blocks=DIO_MAX_ALARM_BLOCKS,
			   int no_cache=FALSE);
    int dio_get_dev(int const *device_index, short const *property,
		    float *value, short const *ftd=(short *) NULL,
		    short const *length=(short *) NULL,
		    short const *offset=(short *) NULL,
		    char *units=(char *) NULL);
    int dio_get_dev_c(int device_index, int property, float *value, 
                      short ftd=FTD_ONESHOT, short length=0, short offset=0,
		      char *units=(char *) NULL);
    int dio_get_device_c(int device_index, short property, double *value,
                         int ftd, int length, int offset, char *units,
                         unsigned int options=DIO_OPT_NONE);
    int dio_get_device_list_c(int *list_id, double *value, short *errors,
                              char *units, int *same_time, int *values_per_dev,
                              unsigned int options=DIO_OPT_NONE);
    int dio_get_directed_list(int *list_id, float * const *values, short *errors,
                              char *units, int *same_time, int *values_per_dev);
    int dio_get_directed_list_raw_c(int *list_id, void * const *raw_data,
                                    short *errors, int *same_time,
                                    int delete_list);
    int dio_get_extended_pdb_c(int const *device_indices,
			       short const *properties,
			       PDB_RS_EXT *pdbs, short *errors,
			       int num_devices=1);
    int dio_get_ftp_class_c(int *device_indices, short *properties,
			    int num_devices, short *errors,
			    int *ftp_classes=(int *) NULL);
    int dio_get_ftp_list_c(int list_id, int max_points, int *num_points,
                           DIO_FTP_POINT *points, short *errors);
    int dio_get_historic_scaling_c(int device_index, short property,
				   unsigned int clinks, void *scaling_info);
    int dio_get_last_setting(int *device_indices, float *setting,
                             short *errors, char *units_text=(char *) NULL,
			     int *num_devices=(int *) NULL,
			     int *num_elements=(int *) NULL,
			     int *start_elements=(int *) NULL,
			     int *values_per_dev=(int *) NULL);
    int dio_get_last_setting_raw(int const *device_indices,
                                 short const *properties, char *raw_setting,
                                 short *errors,
				 int const *num_devices=(int *) NULL,
				 int const *lengths=(int *) NULL,
				 int const *offsets=(int *) NULL,
				 int *ret_lengths=(int *) NULL);
    int dio_get_lst(int *list_id, float *values, short *errors, 
                    char *units=(char *) NULL, int *same_time=(int *) NULL,
		    int *values_per_dev=(int *) NULL);
    int dio_get_lst_raw(int *list_id, void *raw_data, short *errors,
    			int *same_time=(int *) NULL,
			int const *cancel=(int *) NULL);
    int dio_get_lst_raw_c(int *list_id, void *raw_data, short *errors,
    			  int *same_time=(int *) NULL,
			  int delete_list=DIO_CANCEL_ONESHOT);
    short dio_get_oneshot_ftd(void);
    int dio_get_pdb(int const *device_indices, short const *properties,
		    void *pdbs, short *errors,
		    int const *num_devices=(int *) NULL,
		    int *pdb_lengths=(int *) NULL);
    int dio_get_properties(int *device_indices, int *num_properties,
                           int **properties, short *errors,
			   int *num_devices=(int *) NULL);
    int dio_get_raw(int const *device_index, short const *property,
                    void *raw_data, short const *ftd=(short *) NULL,
		    short const *length=(short *) NULL,
                    short const *offset=(short *) NULL);
    int dio_get_raw_c(int device_index, int property, void *raw_data, 
                      short ftd=FTD_ONESHOT, short len=0, short offset=0);
    int dio_get_raw_device_knob_info_c(int num_devices,
				       int const *device_indices,
				       short *errors,
				       KNOB_RAW_DEVICE_INFO *knob_info);
    int dio_get_raw_ftp_list_c(int list_id, int max_points, int *num_points,
			       DIO_RAW_FTP_POINT *points, short *errors);
    int dio_get_raw_reading_func(dio_raw_reading_function *reading_func,
				 void **func_data=(void **) NULL);
    int dio_get_raw_setting_func(dio_raw_setting_function *setting_func,
				 void **func_data=(void **) NULL);
    int dio_get_raw_snapshot_list_c(int list_id, int num_points,
				    DIO_RAW_SNAPSHOT_POINT *points,
				    short *errors,
				    unsigned int *sample_rates=(unsigned int *) NULL,
				    int *ret_num_points=(int *) NULL,
				    unsigned int options=DIO_SNAP_OPT_NONE);
    int dio_get_read_list_devices_c(int list_id, int *num_devices,
				    int **device_indices=(int **) NULL,
				    short **properties=(short **) NULL);
    int dio_get_recent_setting_info_c(int device_index, short property,
				      int max_return, int *num_returned,
				      DIO_RECENT_SETTING_DATA **setting_info=(DIO_RECENT_SETTING_DATA **) NULL,
				      unsigned int options=0);
    int dio_get_retry(short *irinx, void *indata, short *error,
                      short *iseq, int *wait, 
                      int *num_devices=(int *) NULL,
		      short *lengths=(short *) NULL,
                      unsigned short *mark_delete=(unsigned short *) NULL);
    int dio_get_set_list_devices_c(int list_id, int *num_devices,
				   int **device_indices=(int **) NULL,
				   short **properties=(short **) NULL);
    int dio_get_snapshot_class_c(int *device_indices, short *properties,
				 int num_devices, short *errors,
				 int *snapshot_classes=(int *) NULL);
/* int dio_get_snapshot_list_c(int list_id, int num_points, float *data,
                short *errors); */
    int dio_get_snapshot_list_c(int list_id, int num_points,
                                DIO_SNAPSHOT_POINT *points, short *errors, 
                                unsigned int *sample_rates=(unsigned int *) NULL,
				int *ret_num_points=(int *) NULL,
				unsigned int options=DIO_SNAP_OPT_NONE);
    int dio_get_status_array_device_c(int device_index, int *on, int *ready,
                                      int *remote, int *positive,
                                      XCHAR *status_text, short ftd,
                                      int num_elements, int start_element, 
                                      int *ramping=(int *) NULL,
				      int ret_ramp_dc=FALSE);
    int dio_get_status_ftp_list_c(int list_id, int max_points, int *num_points,
				  DIO_STATUS_FTP_POINT *points, short *errors);
    int dio_get_terse_name_length(void);
    int dio_get_timer_pulse_width_device_c(int *device_indices, int *pw_devices,
					   short *errors, int num_devices=1);
    int dio_get_timer_ref(int *device_indices, int *num_events,
                          int *events, short *errors,
			  int *num_devices=(int *) NULL);
    int dio_get_timer_reference_device_c(int *device_indices, int *ref_devices,
					 short *errors, int num_devices=1);
    int dio_get_timer_reference_list(DIO_TIMER_LIST_DATA *list_info,
				     int *num_events, int *events,
				     short *errors);
    int dio_has_classic_control_attribute_c(int const *device_indices,
					    int control_attr,
					    int *has_attribute,
					    short *errors, int num_devices=1,
					    unsigned int options=DIO_OPT_NONE);
    int dio_has_classic_status_attribute_c(int const *device_indices,
					   int status_attr, int *has_attribute,
					   short *errors, int num_devices=1,
					   unsigned int options=DIO_OPT_NONE);
    int dio_has_enum_value_info_c(int *device_indices, short *properties,
				  int *has_enum_values, short *errors,
				  int num_devices=1);
    int dio_has_property_c(int device_index, short property);
    int dio_has_property_list_c(int const *device_indices,
				short const *properties,
                                int *values, short *errors, int num_devices);
    int dio_has_scaling_info_c(int device_index, short property,
			       int *has_scaling);
    int dio_has_scaling_info_list_c(int const *device_indices,
				    short const *properties, int *has_scaling,
				    short *errors, int num_devices=1);
    int dio_has_setting_record_c(int *device_indices,
                                 short *properties, int *has_record,
                                 short *errors, int num_devices);
    int dio_historic_data_length_c(int const *device_indices,
				   short const *properties, unsigned int clinks,
				   short *default_sizes, int *atomic_sizes,
				   unsigned int *maximum_sizes, short *errors,
				   int num_devices=1,
				   unsigned int options=DIO_OPT_NONE);
    int dio_historic_device_addressing_c(int const *device_indices,
					 short const *properties,
					 unsigned int clinks,
					 int *nodes, unsigned char *ssdns,
					 short *errors, int num_devices=1,
					 unsigned int options=DIO_OPT_NONE);
    int dio_historic_device_name_c(int const *device_indices,
				   unsigned int clinks, char *names,
				   short *errors, int num_devices=1,
				   unsigned int options=DIO_NAME_OPT_NONE);
    int dio_historic_raw_data_type_c(int const *device_indices,
				     short const *properties,
				     unsigned int clinks, int *data_types,
				     short *errors, int num_devices=1);
    int dio_insert_pdb_lst(int const *device_indices, short const *properties,
                           short *errors, int const *num_devices);
    int dio_insert_reqlst(int *device_indices, short *properties,
                          int *num_devices, short *errors,
                          short *ftd=(short *) NULL,
                          short *lengthd=(short *) NULL,
			  short *offsets=(short *) NULL);
    int dio_is_abort(int *device_index, int *alarm_type,
                     int *abort_state, short *ftd=(short *) NULL,
		     int *start_block=(int *) NULL,
                     int *max_blocks=(int *) NULL,
		     int *ret_num_blocks=(int *) NULL);
    int dio_is_abort_c(int device_index, int alarm_type, int *abort_state, 
                       short ftd=FTD_ONESHOT, int start_block=0,
		       int max_blocks=1, int *num_blocks=(int *)NULL);
    int dio_is_abrt_inh(int *device_index, int *alarm_type,
                        int *inhibit_state, short *ftd=(short *) NULL,
			int *start_block=(int *) NULL,
                        int *max_blocks=(int *) NULL,
			int *ret_num_blocks=(int *) NULL);
    int dio_is_abrt_inh_c(int device_index, int alarm_type,
                          int *inhibit_state, short ftd=FTD_ONESHOT,
			  int start_block=0, int max_blocks=1,
			  int *num_blocks=(int *) NULL);
    int dio_is_abtinh_lst(int *list_id, int *inhibit_states, short *errors);
    int dio_is_abt_lst(int *list_id, int *abort_states, short *errors);
    int dio_is_broken_c(int const *device_indices, int unused,
			int *broken_states, short *errors, int num_devices=1);
    int dio_is_byp_lst(int *list_id, int *bypass_states, short *errors);
    int dio_is_bypas(int *device_index, int *alarm_type,
                     int *bypass_state, short *ftd=(short *) NULL,
		     int *start_block=(int *) NULL,
                     int *max_blocks=(int *) NULL,
		     int *ret_num_blocks=(int *) NULL);
    int dio_is_bypas_c(int device_index, int alarm_type, int *bypass_state, 
                       short ftd=FTD_ONESHOT, int start_block=0,
		       int max_blocks=1, int *num_blocks=(int *) NULL);
    int dio_is_bypassed_db_c(int device_index, int alarm_type, int *state, 
			     int start_block=0, int max_blocks=1,
			     int *num_blocks=(int *) NULL, int no_cache=FALSE);
    int dio_is_caching_missing_db_values(void);
    int dio_is_camac_device_c(int const *device_indices,
			      short const *properties, int *is_camac,
			      short *errors, int num_devices=1);
    int dio_is_controlled_set_c(int device_index, int *is_controlled,
				short property=PRSET);
    int dio_is_controlled_set_list(int *device_indices, int *is_controlled,
                                   short *errors,
				   int *num_devices=(int *) NULL,
				   short property=PRSET);
    int dio_is_destructive_read_c(int const *device_indices,
				  short const *properties, int *is_dest_read,
				  short *errors, int num_devices=1);
    int dio_is_display_dec(int const *device_index, short const *property);
    int dio_is_display_dec_c(int device_index, short property);
    int dio_is_display_short(int const *device_index, short const *property);
    int dio_is_display_short_c(int device_index, short property);
    int dio_is_enum_value_info_shared_c(int *device_indices, short *properties,
					unsigned int *shared_count,
					short *errors, int num_devices=1,
					int *enum_ids=(int *) NULL);
    int dio_is_enumerated_property_c(int device_index, short property);
    int dio_is_event_enabled_c(int event, int clock_system, int *is_enabled);
    int dio_is_family(int const *device_index);
    int dio_is_family_list_c(int const *device_indices, int *is_family,
                             short *errors, int num_devices);
    int dio_is_float_raw_data_c(int device_index, short property=PRREAD);
    int dio_is_good(int *device_index, int *alarm_type,
                    int *alarm_state, short *ftd=(short *) NULL,
                    int *hi_low=(int *) NULL, int *start_block=(int *) NULL,
                    int *max_blocks=(int *) NULL,
		    int *ret_num_blocks=(int *) NULL);
    int dio_is_good_c(int device_index, int alarm_type, int *alarm_state, 
                      short ftd=FTD_ONESHOT, int *hi_low=(int *) NULL,
		      int start_block=0, int max_blocks=1,
		      int *num_blocks=(int *) NULL);
    int dio_is_good_lst(int *list_id, int *alarm_states,
                        short *errors, int *hi_low=(int *) NULL);
    int dio_is_knobable_c(int const *device_indices, int *is_knobabale,
			  short *errors, int num_devices=1);
    int dio_is_obsolete_info_enabled(void);
    int dio_is_old_name_c(char const *old_device_name, char *device_name,
			  int *device_index,
			  unsigned int options=DIO_NAME_OPT_NONE);
    int dio_is_on(int *device_index, int *on_status,
    		  char *on_text=(char *) NULL,
    		  short *ftd=(short *) NULL);
    int dio_is_on_c(int device_index, int *on_status,
    		    char *on_text=(char *) NULL, short ftd=FTD_ONESHOT);
    int dio_is_on_event_retry_enabled(void);
    int dio_is_on_lst(int *list_id, int *on_status, short *errors,
    		      char *units=(char *) NULL);
    int dio_is_positive(int *device_index, int *positive_status,
    			char *positive_text=(char *) NULL,
			short *ftd=(short *) NULL);
    int dio_is_positive_c(int device_index, int *positive_status,
    			  char *positive_text=(char *) NULL,
			  short ftd=FTD_ONESHOT);
    int dio_is_pos_lst(int *list_id, int *positive_status,
                       short *errors, char *units=(char *) NULL);
    int dio_is_possible_device_name_c(char *string, int length=0,
				      int allow_index=FALSE,
				      int allow_full_name=FALSE);
    int dio_is_primary_scalable_property_c(int device_index, short property);
    int dio_is_ramping_c(int device_index, int *ramping_status,
                         char *ramping_text, short ftd);
    int dio_is_ramping_list_c(int list_id, int *passed_ramping_status,
                              short *errors, char *ramping_text);
    int dio_is_rdy_lst(int *list_id, int *ready_status, short *errors,
    		       char *units=(char *) NULL);
    int dio_is_ready(int *device_index, int *ready_status,
    		     char *ready_text=(char *) NULL, short *ftd=(short *) NULL);
    int dio_is_ready_c(int device_index, int *ready_status,
    		       char *ready_text=(char *) NULL, short ftd=FTD_ONESHOT);
    int dio_is_remote(int *device_index, int *remote_status,
    		      char *remote_text=(char *) NULL,
		      short *ftd=(short *) NULL);
    int dio_is_remote_c(int device_index, int *remote_status,
    			char *remote_text=(char *) NULL, short ftd=FTD_ONESHOT);
    int dio_is_rem_lst(int *list_id, int *remote_status,
                       short *errors, char *units=(char *)NULL);
    int dio_is_setting_enabled(void);
    int dio_is_snoozed_alarm_c(int device_index, int alarm_type);
    int dio_is_status_attribute_state_value_c(int device_index,
					      char const *state_string,
					      int *attr_status,
					      char const *data_event=(char *) NULL,
					      int num_elements=1,
					      int start_element=0);
    int dio_is_status_attribute_value_c(int device_index, char const *attribute,
					int *attr_status,
					char *attr_string=(char *) NULL,
					char const *data_event=(char *) NULL,
					int num_elements=1,
					int start_element=0);
    int dio_is_status_attribute_value_by_id_c(int device_index,
					      int attribute_id,
					      int *attr_status,
					      char *attr_string=(char *) NULL,
					      char const *data_event=(char *) NULL,
					      int num_elements=1,
					      int start_element=0);
    int dio_is_status_attribute_value_list(int *list_id,
					   char const *attribute,
					   int *attr_status, short *errors,
					   char *attr_strings=(char *) NULL);
    int dio_is_step_motor(int const *device_index);
    int dio_is_string_property_c(int device_index, short property,
				 int *native_string=(int *) NULL);
    bool dio_is_string_transform_c(int transform);
    int dio_is_structure_c(int *device_indices, short *properties,
			   int *is_structure, short *errors,
			   int num_devices=1);
    int dio_is_timer_device_c(int *device_indices, int *is_timer, short *errors,
			      int num_devices=1, int *clock_types=(int *) NULL,
			      int *has_events=(int *) NULL,
			      int *has_status=(int *) NULL);
    int dio_is_timer_pulse_width_device_c(int *device_indices,
					  int *is_pulse_width,
					  short *errors, int num_devices=1);
    int dio_is_timer_reference_c(int *device_indices, int *is_timer_ref,
				 short *errors, int num_devices=1,
				 int *clock_types=(int *) NULL);
    int dio_is_valid_device_name_first_char_c(char chr, int allow_index=FALSE);
    int dio_length_offset_spec_to_drf_string_c(int device_index, short property,
					       int offset, int length,
					       int max_length, char *drf_string,
					       int scaling_type=DIO_COMMON,
					       int property_field=DIO_FIELD_NONE,
					       unsigned int options=DIO_OPT_NONE);
/* void *dio_list_info(int list_id, int *num_devices, ...); */
    int dio_longest_analog_alarm_url(int *length);
    int dio_longest_area_name(int *name_length);
    int dio_longest_default_data_event(int *length);
    int dio_longest_department_name(int *length);
    int dio_longest_device_broken_comment(int *length);
    int dio_longest_device_document_comment(int *length);
    int dio_longest_device_edit_comment(int *length);
    int dio_longest_device_full_name(int *length);
    int dio_longest_device_full_text(int *length);
    int dio_longest_device_help_url(int *length);
    int dio_longest_device_obsolete_comment(int *length);
    int dio_longest_foreign_device_name_c(int *length, int system_type=0);
    int dio_longest_location_string(int *length);
    int dio_longest_machine_name(int *name_length,
				 int *long_name_length=(int *) NULL);
    int dio_longest_structure_name(int *length);
    int dio_madc_clock_events_c(int madc_number, int node, int *madc_type,
				void **clock_event_data);
    int dio_madc_list_info_c(int madc_number, int node, int *madc_type,
			     int *num_lists, void **list_info);
    int dio_madc_location_c(int madc_number, int node, int *crate, int *slot,
			    int *madc_type=(int *) NULL);
    int dio_madc_num_available_clock_levels_c(int madc_number, int node,
					      int *madc_type, int *num_levels);
    int dio_madc_num_available_lists_c(int madc_number, int node,
				       int *madc_type, int *num_lists);
    int dio_madc_num_available_plot_channels_c(int madc_number, int node,
					       int *madc_type,
					       int *num_channels);
    int dio_madc_num_channels_c(int madc_number, int node, int *num_channels,
				int *max_channel=(int *) NULL);
    int dio_madc_number_c(int node, int crate, int slot, int *madc_number);
    int dio_madc_plot_channel_info_c(int madc_number, int node, int *madc_type,
				     int *num_channels, void **channel_info);
    int dio_maintainer_info_c(int *device_indices, char *maintainers,
			      short *errors, int num_devices=1);
    int dio_manage_extended_pdbs_c(int const *device_indices,
				   short const *properties,
				   PDB_RS_EXT const **pdbs,
				   short *errors, int num_devices=1,
				   int want_obsolete=FALSE);
    int dio_manage_front_end_pdbs_c(int const *device_indices,
				    const short *properties,
				    PDB_RS_EXT const **pdbs,
				    short *errors, int num_devices=1,
				    int want_obsolete=FALSE);
    int dio_manage_pdbs_c(int const *device_indices, short const *properties,
			  void **pdb_ptr, short *errors, int num_keys=1,
			  int want_obsolete=FALSE);
    int dio_memory_cancel_c(int num_devices, int const *device_indices,
                            short const *properties, short *errors,
                            unsigned int options);
    int dio_memory_control_c(int num_devices, int const *device_indices,
                             int const *operations, short *errors);
    int dio_memory_get_c(int num_devices, int const *device_indices,
                         short const *properties, short const *lengths,
                         short const *offsets, float *values, char *units_text,
                         short *errors, int *values_per_dev,
                         unsigned int options);
    int dio_memory_get_array_c(int num_devices, int const *device_indices,
                               short const *properties, int const *num_elements,
                               int const *start_elements, float *values,
                               char *units_text, short *errors,
                               int *values_per_dev, unsigned int options);
    int dio_memory_get_raw_c(int num_devices, int const *device_indices,
                             short const *properties, short const *lengths,
                             short const *offsets, void *raw_data,
			     short *errors, unsigned int options);
    int dio_memory_get_directed_raw_c(int num_devices,
				      int const *device_indices,
                                      short const *properties,
                                      short const *lengths,
				      short const *offsets,
                                      void **raw_data, short *errors,
                                      unsigned int options);
    int dio_memory_pool_id_to_name_c(int pool_id, char *pool_name);
    int dio_memory_pool_name_to_id_c(char const *pool_name, int create_it,
                                     int *pool_id);
    int dio_memory_pool_query(char *pool_name, int *pool_id);
    int dio_memory_populate_c(int num_devices, int const *device_indices,
                              short const *properties, short *errors,
                              unsigned int options);
    int dio_memory_populate_query(int *source, void *source_data);
    int dio_memory_read_c(int num_devices, int const *device_indices,
			  short const *properties, int const *lengths,
			  int const *offsets, double *values, char *units_text,
			  short *errors, int *values_per_dev=(int *) NULL,
			  unsigned int options=DIO_OPT_NONE);
    int dio_memory_read_raw_c(int num_devices, int const *device_indices,
			      short const *properties, int const *lengths,
			      int const *offsets, void *raw_data_arg,
			      short *errors, unsigned int options=DIO_OPT_NONE);
    int dio_memory_select_pool_c(void *pool_spec, int type);
    int dio_memory_set_c(int num_devices, int const *device_indices,
                         short const *properties, short const *lengths,
                         short const *offsets, float const *values,
                         short *errors, unsigned int options=DIO_OPT_NONE);
    int dio_memory_set_array_c(int num_devices, int const *device_indices,
                               short const *properties, int const *num_elements,
                               int const *start_elements, float const *values,
                               short *errors,
			       unsigned int options=DIO_OPT_NONE);
    int dio_memory_set_populate_c(int source, void *source_data);
    int dio_memory_set_raw_c(int num_devices, int const *device_indices,
                             short const *properties, short const *lengths,
                             short const *offsets, void const *raw_data,
                             short *errors, unsigned int options=DIO_OPT_NONE);
    int dio_memory_status_c(int num_devices, int const *device_indices,
			    short const *lengths, short const *offsets,
			    int *on_states, int *ready_states,
			    int *remote_states, int *positive_states,
			    int *ramp_states, XCHAR *status_text,
			    short *errors, int *values_per_dev=(int *) NULL,
			    unsigned int options=DIO_OPT_NONE);
    int dio_memory_time_set_c(int num_devices, int const *device_indices,
                              short const *properties, unsigned int *time_set);
    int dio_memory_write_c(int num_devices, int const *device_indices,
			   short const *properties, int const *lengths,
			   int const *offsets, double const *values,
			   short *errors, unsigned int options=DIO_OPT_NONE);
    int dio_memory_write_raw_c(int num_devices, int const *device_indices,
			       short const *properties, int const *lengths,
			       int const *offsets, void const *raw_data_arg,
			       short *errors,
			       unsigned int options=DIO_OPT_NONE);
#ifdef __cplusplus
    int dio_move_step_motor(int *di_motor, int *di_status,
                            float *setval, float *toler,
                            int *iterat, int *on_count, 
                            void_function fun=(void_function) NULL);
#else
    int dio_move_step_motor(int *di_motor, int *di_status,
                            float *setval, float *toler,
                            int *iterat, int *on_count, ...); 
#endif
    int dio_name_to_fermi_name_c(char *device_names, int num_devices,
                                 int max_names, unsigned int options,
                                 int *num_names, char *fermi_names,
                                 int *device_indexes, short *properties,
                                 int *atom_indexes, short *errors);
    int dio_name_to_index(char const *device_name, short *error);
    int dio_negative(int *device_index);
    int dio_neg_lst(int *list_id, short *errors);
    int dio_node(int const *device_indices, int *nodes, short *errors,
    		 int *num_devices=(int *) NULL);
    int dio_node_alarm_limit_type_c(int node, int *limit_type);
    int dio_node_default_alarm_list_c(int node, int *alarm_list);
    int dio_node_default_alarm_list_list_c(int num_nodes, int *nodes,
					   int *alarm_lists, short *errors);
    int dio_num_data_elements_c(int const *device_indices,
				short const *properties,
				int *num_elements, short *errors,
				int num_devices=1,
				unsigned int options=DIO_OPT_NONE);
    int dio_obsolete_info_c(int *device_indices,
			    DIO_OBSOLETE_DEVICE_DATA *obsolete_data,
			    short *errors, int num_devices=1);
    int dio_off(int *device_index);
    int dio_off_lst(int *list_id, short *errors);
    int dio_oldest_setting_log_entry_date_c(unsigned int *oldest_date,
					    int device_index=0,
					    unsigned int *latest_date=(unsigned int *) NULL);
    int dio_on(int *device_index);
    int dio_on_lst(int *list_id, short *errors);
    int dio_parse_generic_long_device_name_c(char const *long_dev_name,
					     char *device_name,
					     int *device_index,
					     int *array_index, short *property,
					     unsigned int parse_attribute,
					     int *end_index=(int *) NULL,
					     int *name_type=(int *) NULL,
					     int ret_name_type=CLIB_DEFAULT_ARG);
    int dio_parse_long_device_name_c(char const *long_dev_names,
                                     char *device_names, int *device_indices,
                                     int *array_indices, short *properties,
                                     short *errors, int num_devices,
                                     unsigned int parse_attribute,
				     int *end_indices=(int *) NULL);
    int dio_pdb_ctl(int const *device_indices, char *attr_defs,
                    unsigned int *reset, unsigned int *on, unsigned int *off,
                    unsigned int *positive, unsigned int *negative,
                    short *errors, int const *num_devices=(int *) NULL,
                    unsigned int  *ramp_attrs=(unsigned int *) NULL,
                    unsigned int *dc_attrs=(unsigned int *) NULL,
		    int const *ret_ramp_dc=(int *) NULL);
    int dio_pdb_sts(int const *device_indices, char *attr_defs,
		    unsigned int *on, unsigned int *ready, unsigned int *remote,
                    unsigned int *polarity, short *errors, 
                    int const *num_devices=(int *) NULL,
		    char *datinv=(char *) NULL,
                    char *altchr=(char *) NULL,
		    XCHAR *default_characters=(XCHAR *) NULL,
                    int *data_lengths=(int *) NULL,
                    unsigned int *ramp_attrs=(unsigned int *)NULL,
		    int const *ret_ramp_dc=(int *)NULL);
    int dio_pdb_to_display_conversion_info_c(int num_pdbs, PDB_RS const *pdbs,
					     short *errors, int *is_special,
					     int *display_types,
					     int *display_lengths,
					     int *handler_types);
    int dio_pdb_to_scaling_info_c(int num_pdbs, PDB_RS const *pdbs,
				  int *primary_transform=(int *) NULL,
				  int *common_transform=(int *) NULL,
				  int *num_constants=(int *) NULL,
				  float *constants=(float *) NULL,
				  char *primary_units=(char *) NULL,
				  char *common_units=(char *) NULL,
				  int *data_lengths=(int *) NULL,
				  int *display_lengths=(int *) NULL,
				  int *display_types=(int *) NULL,
				  int *is_motor=(int *) NULL,
				  int *handler_codes=(int *) NULL,
				  short *errors=(short *) NULL);
    int dio_positive(int *device_index);
    int dio_pos_lst(int *list_id, short *errors);
    int dio_prefix_char_to_property_c(char chr);
    int dio_previous_name_c(int *device_indices, char *device_names,
			    short *errors, int num_devices,
			    unsigned int options);
    int dio_primary_to_scaled_custom_c(void const *primary_values, void *values,
				       short *errors, int num_devices,
				       int convert_type, int const *num_values,
				       int const *common_indices,
				       double const *constants,
				       int const *num_constants,
				       int same_values=FALSE);
    int dio_primary_to_scaled_data_c(int const *device_indices,
                                     short const *properties,
                                     void const *input_values,
				     void *output_values,
                                     short *errors, int num_devices=1,
                                     char *units_text=(char *) NULL,
				     int convert_type=DIO_COMMON,
                                     short const *num_values=(short *) NULL);
    int dio_property_flags_c(int const *device_indices, short const *properties,
			     DIO_PROPERTY_FLAGS_DATA *property_flags,
			     short *errors, int num_devices=1);
    char *dio_property_to_device_spec_string_c(short property);
    int dio_property_to_prefix_char_c(short property);
    int dio_protection_mask_c(int const *device_indices, unsigned int *masks,
                              short *errors, int num_devices=1);
    void dio_query_tuner(int *log, int *read_to, int *set_to, int *dbm_to,
                         int *stale_notify, int *cache_delete=(int *) NULL);
    int dio_raw_data_type(int const *device_indices, short const *properties,
                          int *data_type, short *errors,
			  int const *num_devices=(int *) NULL);
    int dio_raw_element_length_c(int const *device_indices,
				 short const *properties, int *lengths,
				 short *errors, int num_devices=1,
				 unsigned int options=DIO_OPT_NONE);
    int dio_raw_to_control_text_c(int const *device_indices,
				  void const *raw_data, char *control_text,
				  short *errors,  int num_devices=1,
				  int const *lengths=(int *) NULL,
				  int long_text=FALSE,
				  unsigned long long options=DIO_OPT_NONE);
    int dio_raw_to_enum_value_text_c(int const *device_indices,
				     short const *properties,
				     void const *raw_data,
				     char *enum_value_text,
				     short *errors, int num_devices=1,
				     int const *lengths=(int *) NULL,
				     unsigned int options=DIO_OPT_NONE);
    int dio_raw_to_scaled_custom_c(void const *raw_data, void *values,
                                   short *errors, int num_devices,
				   int convert_type, int const *lengths,
				   int const *scaling_lengths,
				   int const *primary_indices,
				   int const *common_indices,
				   double const *constants,
				   int const *num_constants, int same_values);
    int dio_raw_to_scaled_data(int const *device_indices,
			       short const *properties,
                               void const *raw_data, void *values,
                               short *errors,
			       int const *num_devices=(int *) NULL,
                               char *units=(char *) NULL,
                               int const *convert_type=(int *) NULL,
                               short const *lengths=(short *) NULL);
    int dio_raw_to_scaled_data_c(int const *device_indices,
                                 short const *properties, void const *raw_data,
                                 void *values, short *errors, 
                                 int num_devices=1,
				 char *units_text=(char *) NULL,
				 int convert_type=DIO_COMMON,
				 short const *lengths=(short *)NULL);
    int dio_raw_to_scaled_historic_c(int const *device_indices,
				     short const *properties,
				     unsigned int clinks, void const *raw_data,
				     void *value, short *errors, 
				     int num_devices, char *units,
				     int cnv_type,
				     int const *lengths=(int *) NULL);
    int dio_raw_to_status_c(int const *device_indices, void const *raw_data,
                            int *on, int *ready, int *remote, int *positive,
                            short *errors, int num_devices=1,
			    short const *lengths=(short *) NULL,
			    int *ramping=(int *) NULL,
			    char *on_text=(char *) NULL,
			    char *ready_text=(char *) NULL,
			    char *remote_text=(char *) NULL,
			    char *positive_text=(char *) NULL,
			    char *ramping_text=(char *) NULL,
			    unsigned int options=DIO_DISPLAY_OPT_NONE);
    int dio_raw_to_status_attribute_value_by_id_c(int const *device_indices,
						  void const *raw_data,
						  int attribute_id,
						  int *attr_status,
						  char *attr_strings,
						  short *errors,
						  int num_devices=1,
						  int const *lengths=(int *) NULL);
    int dio_raw_to_status_extended_c(int const *device_indices,
				     void const *raw_data, int *num_attrs,
				     DIO_STATUS_ATTR_VALUE *attr_values,
				     short *errors, int num_devices=1,
				     int const *lengths=(int *) NULL,
				     unsigned int options=DIO_DISPLAY_OPT_NONE);
    int dio_raw_to_status_state_value_by_id_c(int const *device_indices,
					      void const *raw_data,
					      int attribute_id, int want_match,
					      int *attr_status,
					      short *errors, int num_devices=1,
					      int const *lengths=(int *) NULL);
    int dio_raw_to_status_text(int const *device_indices, void const *raw_data,
                               XCHAR *status_text, short *errors, 
                               int const *num_devices=(int *) NULL,
			       short const *lengths=(short *) NULL,
			       int const *ret_ramp_dc=(int *) NULL);
    int dio_raw_to_value_text_c(int const *device_indices,
				short const *properties,
                                void const *raw_data, int convert_type,
                                int num_devices, int format,
				char *value_strings, short *errors,
				char *units_text, 
                                int value_length=DIO_LONG_DISPLAY_LEN,
				unsigned int options=DIO_OPT_NONE,
				int raw_length=0);
    int dio_raw_to_status_text_extended_c(int const *device_indices,
					  void const *raw_data,
					  int *chars_filled,
					  XCHAR *status_text, short *errors, 
					  int num_devices=1,
					  int const *lengths=(int *) NULL);
    int dio_raw_to_value_text_custom_c(void const *raw_data,
				       char *value_strings,
				       short *errors, int num_devices,
				       int convert_type, int format,
				       int value_length, int *lengths,
				       int const *scaling_lengths,
				       int const *primary_indices,
				       int const *common_indices,
				       int const *display_lengths,
				       int const *display_types,
				       double const *constants,
				       int const *num_constants,
				       int same_values,
				       unsigned int options=DIO_OPT_NONE);
    int dio_read_db_timeout(void);
    int dio_read_last_setting_c(int *device_indices, double *setting,
				short *errors, char *units=(char *) NULL,
				int num_devices=1,
				int *num_elements=(int *) NULL,
				int *start_elements=(int *) NULL,
				int *values_per_dev=(int *) NULL);
    int dio_read_list_length_c(int list_id, int *raw_length=(int *) NULL);
    int dio_read_list_single_entry_info_c(int list_id, int index,
					  int *device_index=(int *) NULL,
					  short *property=(short *) NULL,
					  int *raw_offset=(int *) NULL,
					  int *raw_length=(int *) NULL,
					  int *start_index=(int *) NULL,
					  int *num_elements=(int *) NULL);
    int dio_rearm_snapshot_list_c(int list_id);
    int dio_remove_all_timer_events_c(int *device_indices,
				      short *errors, int num_timers=1);
    int dio_remove_raw_reading_func(void);
    int dio_remove_raw_setting_func(void);
    int dio_remove_timer_events_c(int *device_indices,
                                  int *num_events, int *events,
                                  short *errors, int num_timers=1);
    int dio_request_info_c(int *device_indices, short *properties,
                           DBAREQ32_INFO **info, short *errors,
			   int num_devices);
    int dio_reset(int *device_index);
    int dio_restore_last_setting(int *device_indices,
                                 short *properties, short *errors,
				 int *num_devices=(int *) NULL);
    int dio_rst_lst(int *list_id, short *errors);
    int dio_salarm_dnom(int *device_index, int *nominal,
                        int *mask, int *start_block=(int *) NULL,
			int *num_blocks=(int *) NULL);
    int dio_salarm_dnom_c(int device_index, int *nominal,
                          int *mask, int start_block=0, int num_blocks=1);
    int dio_salarm_dnom_lst(int *list_id, int *nominals,
                            int *masks, short *errors);
    int dio_salarm_lim(int *device_index, float *minimum,
                       float *maximum, int *start_block=(int *) NULL,
		       int *num_blocks=(int *) NULL,
		       int *limit_type=(int *) NULL);
    int dio_salarm_lim_c(int device_index, float *minimum,
                         float *maximum, int start_block=0,
			 int num_blocks=1, int limit_type=CLIB_DEFAULT_ARG);
    int dio_salarm_lim_lst(int *list_id, float *minima,
                           float *maxima, short *errors,
			   int *limit_type=(int *) NULL);
    int dio_save_info(int const *device_indices, int *list_ids, int *save_masks,
                      int *sr_codes, int *sr_subcodes, int *display_codes,
                      int *display_subcodes, short *errors,
		      int *num_devices=(int *) NULL);
    int dio_scaled_to_primary_data_c(int const *device_indices,
				     short const *properties,
				     void const *input_values,
				     void *output_values,
				     short *errors, int num_devices=1,
				     char *units_text=(char *) NULL,
				     int convert_type=DIO_PRIMARY,
				     int const *num_values=(int *) NULL);
    int dio_scaled_to_raw_custom_c(void const *value, void *raw_data,
				   short *errors, int num_devices,
				   int convert_type, int const *lengths,
				   int const *scaling_lengths,
				   int const *primary_indices,
				   int const *common_indices,
				   double const *constants,
				   int const *num_constants,
				   int same_values=TRUE);
    int dio_scaled_to_raw_data(int const *device_indices,
			       short const *properties,
                               void const *values, void *raw_data,
                               short *errors, 
                               int const *num_devices=(int *) NULL,
                               int const *convert_type=(int *) NULL,
			       short const *lengths=(short *) NULL);
    int dio_scaled_to_raw_data_c(int const *device_indices,
                                 short const *properties, void const *values,
                                 void *raw_data, short *errors, 
                                 int num_devices=1,
				 int convert_type=DIO_COMMON,
				 short const *lengths=(short *) NULL);
    int dio_scaled_to_value_text_c(int const *device_indices,
                                   short const *properties,
                                   void const *scaled_data, int data_type,
                                   int num_devices, int format,
				   char *value_strings,
                                   short *errors,
				   char *units_text=(char *) NULL);
    int dio_scaling(int const *device_indices, short const *properties,
                    int *primary_indices, int *common_indices,
                    float *comm_constants, short *errors, 
                    char *primary_text=(char *) NULL,
		    char *common_text=(char *) NULL,
                    int const *num_devices=(int *) NULL,
		    int *data_lengths=(int *) NULL,
                    int *display_lengths=(int *) NULL,
		    int *display_types=(int *) NULL,
                    int *is_controlled=(int *) NULL,
		    int *is_motor=(int *) NULL,
                    int *num_constants=(int *) NULL,
		    int *handler_codes=(int *) NULL,
		    unsigned int const *options=(unsigned int *) NULL);
    int dio_scaling_constants_c(int const *device_indices,
				short const *properties,
				int *num_constants, double *constants,
				short *errors, int num_devices=1);
    int dio_scaling_info_to_extended_pdb_c(int num_pdbs,
					   int const *primary_transforms,
					   int const *common_transforms,
					   int const *num_constants,
					   double const *constants,
					   char const *primary_units,
					   char const *common_units,
					   int const *scaling_lengths,
					   int const *scaling_offsets,
					   int const *display_lengths,
					   int const *display_types,
					   double const *primary_minima,
					   double const *primary_maxima,
					   double const *common_minima,
					   double const *common_maxima,
					   int const *num_prim_consts,
					   double const *primary_consts,
					   short *errors, PDB_RS_EXT *pdbs);
    int dio_scaling_info_to_pdb_c(int num_pdbs, int const *primary_transforms,
				  int const *common_transforms,
				  int const *num_constants,
				  float const *constants,
				  char const *primary_units,
				  char const *common_units,
				  int const *data_lengths,
				  int const *display_lengths,
				  int const *display_types,
				  int const *controlled_set,
				  int const *is_motor,
				  short *errors, PDB_RS *pdbs);
    int dio_scaling_len(int const *device_index, short const *property,
			unsigned int const *options=(unsigned int *) NULL);
    int dio_scaling_len_c(int device_index, short property,
			  unsigned int options=DIO_OPT_NONE);
    int dio_scaling_length_list_c(int const *device_indices,
                                  short const *properties, short *lengths,
                                  short *errors, int num_devices=1,
				  unsigned int options=DIO_OPT_NONE);
    int dio_scaling_text(int const *index_type, int const *index_number,
                         char *text);
    int dio_scaling_text_c(int index_type, int index_number, char *text);
    int dio_scaling_transforms_c(int const *device_indices,
				 short const *properties,
				 int *primary_indices, int *common_indices,
				 short *errors, int num_devices);
    int dio_select_device(dio_find_devices_matches_t const & candidates,
			  int & selected_di);
    int dio_set_abort_inh_lst(int *list_id, int *values,
                              short *errors);
    int dio_set_alarm_c(int device_index, int alarm_type, char *alarm_block,
			int start_block=0, int num_blocks=1);
    int dio_set_alarm_flags_c(int device_index, int alarm_type, int display,
                              int logging);
    int dio_set_alarm_flags_list_c(int *device_indices, int alarm_type,
                                   int display, int logging, short *errors,
                                   int num_devices);
    int dio_set_alarm_ftd_c(int device_index, int alarm_type,
                            unsigned short *ftd, int start_block,
                            int num_blocks);
    int dio_set_alarm_tries_c(int device_index, int alarm_type,
                              int *num_tries, int start_block,
                              int num_blocks);
    int dio_set_array_device_c(int device_index, float *values,
                               int num_elements, int start_element);
    int dio_set_array_device_double_c(int device_index, double *values,
				      int num_elements, int start_element);
    int dio_set_broken_c(int device_index, int alarm_type, int broken,
    			 char *comment=(char *) NULL);
    int dio_set_bypass_lst(int *list_id, int *values, short *errors);
    int dio_set_dc_mode_c(int device_index);
    int dio_set_dc_mode_list_c(int list_id, short *errors);
    int dio_set_dev(int const *device_index, float const *value, 
                    short const *length=(short *) NULL,
		    short const *offset=(short *) NULL,
		    int const *queue_flag=(int *) NULL);
    int dio_set_dev_c(int device_index, float const *value, 
                      short len=0, short offset=0,
		      int queue_flag=DIO_WAIT_FOR_SET);
    int dio_set_device_c(int device_index, double const *value, int length=0,
			 int offset=0, int queue_flag=DIO_WAIT_FOR_SET);
    int dio_set_device_list_c(int *list_id, double *values, short *errors,
			      int no_reply=DIO_WAIT_FOR_SET);
    int dio_set_for_read(int *on_off);
    int dio_set_for_read_c(int on_off);
    int dio_set_hash_table_size_c(unsigned int table_size);
    int dio_set_list_length_c(int list_id, int *raw_length=(int *) NULL);
    int dio_set_list_single_entry_info_c(int list_id, int index,
					 int *device_index=(int *) NULL,
					 short *property=(short *) NULL,
					 int *raw_offset=(int *) NULL,
					 int *raw_length=(int *) NULL,
					 int *start_index=(int *) NULL,
					 int *num_elements=(int *) NULL);
    int dio_set_lst(int const *list_id, float const *value, short *errors);
    int dio_set_lst_raw(int const *list_id, char const *setting_data,
                        short *errors, int const *no_reply=(int *) NULL);
    int dio_set_lst_raw_c(int const *list_id, char const *setting_data,
                          short *errors, int no_reply=DIO_WAIT_FOR_SET);
    int dio_set_ramp_mode_c(int device_index);
    int dio_set_ramp_mode_list_c(int list_id, short *errors);
    int dio_set_raw(int const *device_index, short const *property,
                    char const *set_data, 
                    short const *length=(short *) NULL,
                    short const *offset=(short *) NULL,
                    int const *queue_flag=(int *) NULL,
                    short *reply_error=(short *) NULL);
    int dio_set_raw_c(int device_index, int property, char const *set_data, 
                      short len=0, short offset=0,
		      int queue_flag=DIO_WAIT_FOR_SET,
		      short *reply_error=(short *) NULL);
    int dio_set_raw_by_user_addressing_c(int device_index, short property,
					 DBAREQ32_INFO *address_info,
					 char *setting_data, int length=0,
					 int offset=0,
					 int queue_flag=DIO_WAIT_FOR_SET,
					 short *reply_errors=(short *) NULL);
    int dio_set_step_motor(int *device_index, float *set_value,
			   char *data_event=(char *) NULL,
			   unsigned int *options=(unsigned int *) NULL);
    int dio_set_step_motor_c(int device_index, double setting_value,
			     char *data_event=(char *) NULL,
			     unsigned int options=0);
    int dio_set_step_motor_steps_c(int device_index, int num_steps);
    int dio_set_terse_name_length_c(int name_length);
    int dio_set_timer_ref(int *device_indices, int *num_events,
                          int *events, short *errors,
			  int *num_devices=(int *) NULL);
    int dio_set_value_text_c(int device_index, int element, char *value_string,
			     int no_queue=DIO_WAIT_FOR_SET,
			     int convert_type=DIO_COMMON);
    int dio_settings_are_enabled(void);
    int dio_siblings(int const *device_indices, int *prevs, int *nexts,
                     short *errors, int *num_devices=(int *) NULL);
    int dio_simulate(int fake, int auto_populate, int  set_read,
                     void *specs); 
    int dio_simulate_query(int *fake, int *autopop_method, int *set_read,
                           void *specs);
/* void *dio_slist_info(int list_id, int *num_devices, ...); */
    int dio_snapshot_class_info_c(int *snap_classes, int num_classes,
				  DIO_SNAPSHOT_CLASS_DATA *ret_class_info,
				  short *errors);
    int dio_snapshot_default_freq_c(int snap_class, double time_range,
				    unsigned int *default_freq);
    int dio_snooze_alarm_c(int device_index, int alarm_type, time_t snooze_time,
			   int time_type=DIO_TIME_TYPE_RELATIVE);
    int dio_snoozed_alarm_info_c(int device_index, int alarm_type,
				 DIO_ALARM_SNOOZE_INFO *snoozed_info);
    int dio_snoozed_alarms(int *num_snoozed,
			   DIO_ALARM_SNOOZE_INFO **snoozed_alarms,
			   int alarm_type=DIO_ANALOG_AND_DIGITAL);
    int dio_spec_to_drf_string_c(int device_index, short property,
				 int array_index, int num_elements,
				 int max_length, char *drf_string,
				 int scaling_type=DIO_COMMON,
				 int property_field=DIO_FIELD_NONE,
				 unsigned int options=DIO_OPT_NONE);
    int dio_specify_raw_reading_func(dio_raw_reading_function reading_func,
				     void *func_data=(void *) NULL);
    int dio_specify_raw_setting_func(dio_raw_setting_function setting_func,
				     void *func_data=(void *) NULL);
    int dio_ssdn_to_device_type_c(char *ssdns, int *nodes,
                                  short *properties, int *device_classes,
                                  int *device_types, short *errors,
                                  int num_devices);
    int dio_ssdn_to_duplicate_ssdn_properties_c(char *ssdn, int node,
						short property,
						unsigned int options=DIO_OPT_NONE,
						int *num_duplicates=(int *) NULL,
						int **device_indices=(int **) NULL,
						short **properties=(short **) NULL);
    int dio_ssdn_to_location_c(char *ssdns, int *nodes,
                               short *properties, int *crates,
                               int *slots, int *channels, short *errors,
                               int num_devices, int *madc_channels,
                               int *madc_numbers);
    int dio_ssdn_to_snapshot_class_c(char *ssdns, int *nodes, short *properties,
				     int num_devices, short *errors,
				     int *snapshot_classes=(int *) NULL);
    int dio_status(int *device_index, int *on, int *ready, int *remote,
                   int *positive, 
                   XCHAR *status_text=(XCHAR *) NULL,
		   short *ftd=(short *) NULL,
                   short *length=(short *) NULL,
		   short *offset=(short *) NULL,
                   int *ramping=(int *) NULL,
		   int *ret_ramp_dc=(int *) NULL);
    int dio_status_c(int device_index, int *on, int *ready, int *remote,
                     int *positive, 
                     XCHAR *status_text=(XCHAR *) NULL,
                     short ftd=FTD_ONESHOT, short length=0,
                     short offset=0, int *ramping=(int *) NULL,
		     int ret_ramp_dc=FALSE);
    int dio_status_attr_to_bit_info_c(int const *device_indices,
				      int status_attr,
				      int *num_entries, int **bit_numbers,
				      char **text_if_0, int **color_if_0,
				      char **text_if_1, int **color_if_1,
				      char **text, short *errors,
				      int num_devices=1,
				      unsigned int options=DIO_OPT_SUPPRESS_NO_SUCH_ERRORS);
    int dio_status_scaling_attributes_c(int const *device_indices,
					int *num_entries, char *status_strings,
					int *attribute_ids, short *errors,
					int max_return=DIO_MAX_STATUS_SCALING_ENTRIES,
					int num_devices=1,
					int short_strings=FALSE);
    int dio_status_scaling_info_c(int const *device_indices, int *num_entries,
				  DIO_STATUS_SCALING_ENTRY *status_entries,
				  short *errors,
				  int max_return=DIO_MAX_STATUS_SCALING_ENTRIES,
				  int num_devices=1);
    int dio_status_scaling_length_c(int const *device_indices,
				    int *scaling_length, short *errors,
				    int num_devices=1);
    int dio_step_motor_is_moving_c(int device_index);
    int dio_structure_name_c(int *device_indices, short *properties,
			     char *struct_names, short *errors,
			     int num_devices=1);
    int dio_sts_lst(int *list_id, int *on, int *ready, int *remote,
                    int *pos, short *errors, XCHAR *status_text=(XCHAR *) NULL,
		    int *ramping=(int *) NULL, int *ret_ramp_dc=(int *) NULL);
    int dio_sts_txt(int *device_index, XCHAR *status_text, 
                    short *ftd=(short *) NULL,
		    int *num_elements=(int *) NULL,
                    int *start_element=(int *) NULL,
		    int *ret_ramp_dc=(int *)NULL);
    int dio_sts_txt_c(int device_index, XCHAR *status_text, 
                      short ftd=FTD_ONESHOT, int num_elements=1,
		      int start_element=0, int ret_ramp_dc=FALSE);
    int dio_sts_txt_lst(int *list_id, XCHAR *status_text, short *errors,
    			int *ret_ramp_dc=(int *) NULL);
    int dio_terse_name_to_full_name_c(char const *terse_names, char *full_names, 
				      int num_devices=1,
				      short *errors=(short *) NULL,
				      unsigned int options=DIO_NAME_OPT_NONE);
    int dio_timer_max_events_c(int *device_indices, short *errors,
			       int *max_events, int num_timers=1);
#ifdef __cplusplus
    void dio_tuner(int *logging=(int *) NULL, int *read_timeout=(int *) NULL,
                   int *set_timeout=(int *) NULL, int *dbm_timeout=(int *) NULL,
                   int *stale_notify=(int *) NULL,
		   int *cache_delete=(int *) NULL);
    void dio_tuner_c(int logging=CLIB_DEFAULT_ARG,
                     int read_timeout=CLIB_DEFAULT_ARG,
                     int set_timeout=CLIB_DEFAULT_ARG,
                     int dbm_timeout=CLIB_DEFAULT_ARG,
                     int stae_notify=CLIB_DEFAULT_ARG,
                     int cache_delete=CLIB_DEFAULT_ARG);
#else
    void dio_tuner();
    void dio_tuner_c();
#endif
    int dio_units_text_c(int const *device_indices, short const *properties,
                         int text_type, char *units_text, short *errors,
                         int num_devices, unsigned int options=DIO_OPT_NONE);
    int dio_unsnooze_alarm_c(int device_index, int alarm_type);
    int dio_users_monitoring_alarm_c(int device_index, int alarm_type,
				     int max_return,
				     int *num_users=(int *) NULL,
				     char *user_names=(char *) NULL);
    int dio_validate_device_name_c(char const *device_name,
				   char const *machine_name=(char *) NULL,
				   unsigned int options=DIO_NAME_OPT_NONE);
    int dio_value_text_c(int device_index, short property, int element, int ftd,
                         int format, char *value_string, char *units,
			 int max_length=DIO_LONG_DISPLAY_LEN,
			 unsigned int options=DIO_DISPLAY_OPT_NONE);
    int dio_value_text_to_raw_data_c(int const *device_indices,
				     short const *properties,
				     int convert_type, int value_length,
				     char const *value_strings, short *errors,
				     void *raw_data, int *lengths=(int *) NULL,
				     int num_devices=1,
				     unsigned int options=DIO_OPT_NONE);
    int dio_virtual_machine_info_c(int *device_indices,
                                   int *vm_device_indices,
                                   unsigned int *property_masks, short *errors,
                                   int num_devices);
    int dio_was_controlled_c(int *device_indices, int command,
                             unsigned int start_time, unsigned int end_time,
                             unsigned int options, int *was_controlled,
                             short *errors, int num_devices);
    int dio_was_set_c(int *device_indices, short *properties,
                      unsigned int start_time, unsigned int end_time,
                      unsigned int options, int *was_set, int num_devices);
    int dio_wildcard_build(int wc_device_index, int num_devices,
                           int *device_indices, short *error, short ftd,
                           int scale_it);
    int dio_wildcard_cancel(int wc_device_index);
    int dio_wildcard_read(int wc_device_index, void *ret_values, short *errors);
    void dstatx_ext_c(void const *raw_data, int num_entries,
		      DIO_STATUS_SCALING_ENTRY const *status_entries,
		      XCHAR *text, int *char_filled=(int *)NULL);
    int mio_cancel(int num_devices, int *device_indices,
                   short *properties, short *errors);
    int mio_control(int num_devices, int *device_indices,
                    int *command, short *errors);
    void mio_dump(int all_of_it);
    int mio_fill_status(int num_devices, int *device_indices,
                        short *properties, short *errors);
    int mio_pool_address(int num_devices, int *device_indices,
                         short *properties, char **raw_addresses);
    int mio_read(int num_devices, int const *device_indices,
                 short const *properties, short const *lengths,
                 short const *offsets, void *raw_data, short *errors);
    int mio_read_directed(int num_devices, int const *device_indices,
                          short const *properties, short const *lengths,
                          short const *offsets, void * const *raw_data,
			  short *errors);
    int mio_select_pool(int pool_id);
    int mio_set(int num_devices, int const *device_indices,
                short const *properties, short const *lengths,
                short const *offsets, void const *raw_data, short *errors);
    int mio_time_set(int num_devices, int *device_indices,
                     short *properties, int *timewas);
    int mng_diopool(int const *device_indices, short const *properties,
                    char **pdb_ptr, int num_keys, short *errors,
		    int want_obsolete=FALSE);
    int read_packeted_data_c(int *device_indices, short *properties,
                             void *raw_data, short *errors, short *lengths,
                             short *offsets, short *atomic_lengths,
                             int num_devices, int data_source,
                             void *specs, int default_flags,
			     short *ret_lengths=(short *) NULL);
    int read_packeted_device_c(int device_index, short property, void *raw_data,
                               short length, short offset, short atomic_length,
                               int data_source, void *specs,
			       short *ret_lengths=(short *) NULL);
    int td_build(int *list_id, int *list_length,
                 int *device_indices, short *table_numbers,
                 short *table_types, short *slot_numbers,
                 short *num_slots, short *slot_uses,
                 int *scale_it, short *errors, 
                 short *ftd=(short *) NULL,
		 int *cancel_list=(int *) NULL);
    int td_build_c(int *list_id, int list_length, int *device_indices,
                   short *table_numbers, short *table_types,
                   short *slot_numbers, short *num_slots,
                   short *slot_uses, int scale_it, short *errors, 
                   short ftd = FTD_ONESHOT, int cancel_list=FALSE);
    int td_cancel(int *list_id, int cancel_td = TRUE);
    int td_extract_list_status_c(int list_id, int overall_status, short *errors,
				 int *num_first=(int *) NULL,
				 int *device_index=(int *) NULL);
    int td_query(int table_di, int table_type, int *num_table, int *num_slot,
                 int *slot_size, int *slot_type);
    int td_read(int *list_id, void *ret_values, short *errors,
    		short *stopit=(short *) NULL);
    int td_read_data_source(int *data_source, void *source_spec=(void *) NULL);
    int td_read_one(int *device_index, short *table_number,
                    short *table_type, short *slot_number,
                    short *num_slots, short *slot_use,
                    int *scale_it, void *ret_values, 
                    short *ftd=(short *) NULL,
		    short *stopit=(short *) NULL);
    int td_read_one_c(int device_index, int table_number, int table_type,
                      int slot_number, int num_slots, int slot_use,
		      int scale_it, void *ret_values, 
                      short ftd=FTD_ONESHOT, short *stop_slot=(short *) NULL);
    int td_set(int *list_id, void *set_values, short *errors, 
               int *no_reply=(int *) NULL, short *stopit=(short *) NULL);
    int td_set_c(int *list_id, void *set_values, short *errors, 
                 int no_reply = DIO_WAIT_FOR_SET,
		 short *stop_slots=(short *) NULL);
    int td_set_data_source_c(int data_source, void *source_spec=(void *) NULL);
    int td_set_one(int *device_index, short *table_number,
                   short *table_type, short *slot_number,
                   short *num_slots, short *slot_use,
                   int *scale_it, void *set_values, 
                   int *no_queue=(int *) NULL, short *stopit=(short *) NULL);
    int td_set_one_c(int device_index, int table_number, int table_type,
                     int slot_number, int num_slots, int slot_use, int scale_it,
                     void *set_values, int no_queue=0, short stop_slot=0);

#ifdef __cplusplus
}
    #endif


/******************************************************************************/
/*
**	equivalent name definitions
*/
/******************************************************************************/

    #define	DIO_ACTUAL_ALARM_LIST_ID_C	dio_actual_alarm_list_id_c
    #define	DIO_ADD_TIMER_EVENTS_C		dio_add_timer_events_c
    #define	DIO_ADDRESSING_MODE_C		dio_addressing_mode_c
    #define	DIO_ALARM_ACKNOWLEDGE_MASK_C	dio_alarm_acknowledge_mask_c
    #define	DIO_ALARM_ANCESTORS_C		dio_alarm_ancestors_c
    #define	DIO_ALARM_DNOM			dio_alarm_dnom
    #define	DIO_ALARM_DNOM_C		dio_alarm_dnom_c
    #define	DIO_ALARM_DNOM_LST		dio_alarm_dnom_lst
    #define	DIO_ALARM_EVENTS		dio_alarm_events
    #define	DIO_ALARM_EVENTS_C		dio_alarm_events_c
    #define	DIO_ALARM_EVENTS_LST		dio_alarm_events_lst
    #define	DIO_ALARM_FLAGS			dio_alarm_flags
    #define	DIO_ALARM_FLAGS_C		dio_alarm_flags_c
    #define	DIO_ALARM_FLAGS_LIST		dio_alarm_flags_list
    #define	DIO_ALARM_FTD_C			dio_alarm_ftd_c
    #define	DIO_ALARM_GROUP_INFO_C		dio_alarm_group_info_c
    #define	DIO_ALARM_LIMITS		dio_alarm_limits
    #define	DIO_ALARM_LIMITS_C		dio_alarm_limits_c
    #define	DIO_ALARM_LIM_LST		dio_alarm_lim_lst
    #define	DIO_ALARM_LIST_ID_C		dio_alarm_list_id_c
    #define	DIO_ALARM_TRIES			dio_alarm_tries
    #define	DIO_ALARM_TRIES_C		dio_alarm_tries_c
    #define	DIO_ALARM_TRIES_LST		dio_alarm_tries_lst
    #define	DIO_ALARMS_MONITORED_BY_USER_C	dio_alarms_monitored_by_user_c
    #define	DIO_ANALOG_ALARM_HANDLING_C	dio_analog_alarm_handling_c
    #define	DIO_ANALOG_ALARM_TEXT		dio_analog_alarm_text
    #define	DIO_ANALOG_ALARM_TEXT_C		dio_analog_alarm_text_c
    #define	DIO_ANALOG_ALARM_URL_C		dio_analog_alarm_url_c
    #define	DIO_ARRAY_DEVICE_NEGATIVE_C	dio_array_device_negative_c
    #define	DIO_ARRAY_DEVICE_OFF_C		dio_array_device_off_c
    #define	DIO_ARRAY_DEVICE_ON_C		dio_array_device_on_c
    #define	DIO_ARRAY_DEVICE_POSITIVE_C	dio_array_device_positive_c
    #define	DIO_ARRAY_DEVICE_RESET_C	dio_array_device_reset_c
    #define	DIO_AUDIT_INFO_C		dio_audit_info_c
    #define	DIO_BLD_ALRM_LST		dio_bld_alrm_lst
    #define	DIO_BLD_GET			dio_bld_get
    #define	DIO_BLD_GET_RAW			dio_bld_get_raw
    #define	DIO_BLD_SET			dio_bld_set
    #define	DIO_BLD_SET_RAW			dio_bld_set_raw
    #define	DIO_BLOCK_SETTING_LOGGING	dio_block_setting_logging
    #define	DIO_BROKEN_INFO_C		dio_broken_info_c
    #define	DIO_BUILD_ALARM_LIST_C		dio_build_alarm_list_c
    #define	DIO_BUILD_FTP_LIST_C		dio_build_ftp_list_c
    #define	DIO_BUILD_GET_ARRAY_LIST_C	dio_build_get_array_list_c
    #define	DIO_BUILD_GET_ARRAY_LIST_RAW_C	dio_build_get_array_list_raw_c
    #define	DIO_BUILD_SET_ARRAY_LIST_C	dio_build_set_array_list_c
    #define	DIO_BUILD_SNAPSHOT_LIST_C	dio_build_snapshot_list_c
    #define	DIO_BUILD_STATUS_ATTRIBUTE_VALUE_LIST_C	dio_build_status_attribute_value_list_c
    #define	DIO_BUILD_TIMER_REFERENCE_LIST_C	dio_build_timer_reference_list_c
    #define	DIO_CACHE_DEVICE_PROPERTY_TABLE_INFO_C	dio_cache_device_property_table_info_c
    #define	DIO_CACHE_DEVICE_TABLE_INFO_C	dio_cache_device_table_info_c
    #define	DIO_CACHE_PROPERTY_INFO_C	dio_cache_property_info_c
    #define	DIO_CACHE_SCALING_INFO_C	dio_cache_scaling_info_c
    #define	DIO_CALCULATE_EXTREMA_C		dio_calculate_extrema_c
    #define	DIO_CALCULATE_RAW_VALUE_C	dio_calculate_raw_value_c
    #define	DIO_CALCULATE_STEP_MOTOR_STEPS_C	dio_calculate_step_motor_steps_c
    #define	DIO_CANCEL_ALARM		dio_cancel_alarm
    #define	DIO_CANCEL_ALARM_C		dio_cancel_alarm_c
    #define	DIO_CANCEL_ALARM_LST		dio_cancel_alarm_lst
    #define	DIO_CANCEL_FTP_LIST_C		dio_cancel_ftp_list_c
    #define	DIO_CANCEL_GET_ARRAY_C		dio_cancel_get_array_c
    #define	DIO_CANCEL_SET_ARRAY_C		dio_cancel_set_array_c
    #define	DIO_CANCEL_SNAPSHOT_LIST_C	dio_cancel_snapshot_list_c
    #define	DIO_CANCEL_TIMER_REFERENCE_LIST	dio_cancel_timer_reference_list
    #define	DIO_CAN_FTP_C			dio_can_ftp_c
    #define	DIO_CAN_GET			dio_can_get
    #define	DIO_CAN_GET_C			dio_can_get_c
    #define	DIO_CAN_GET_LST			dio_can_get_lst
    #define	DIO_CAN_READ_USING_FTP_C	dio_can_read_using_ftp_c
    #define	DIO_CAN_READ_USING_SNAPSHOT_C	dio_can_read_using_snapshot_c
    #define	DIO_CAN_SET			dio_can_set
    #define	DIO_CAN_SET_C			dio_can_set_c
    #define	DIO_CAN_SET_DEVICE_C		dio_can_set_device_c
    #define	DIO_CAN_SET_LST			dio_can_set_lst
    #define	DIO_CAN_SNAPSHOT_C		dio_can_snapshot_c
    #define	DIO_CAN_TRIGGER_SNAPSHOT_C	dio_can_trigger_snapshot_c
    #define	DIO_CHANGE_FTD			dio_change_ftd
    #define	DIO_CHANGE_FTD_C		dio_change_ftd_c
    #define	DIO_CHANGE_FTD_LST		dio_change_ftd_lst
    #define	DIO_CHANGE_FTD_LST_C		dio_change_ftd_lst_c
    #define	DIO_CHECK_READ_REQUEST_SIZE_C	dio_check_read_request_size_c
    #define	DIO_CHECK_SET_REQUEST_SIZE_C	dio_check_set_request_size_c
    #define	DIO_CNTRL_DEV			dio_cntrl_dev
    #define	DIO_CNTRL_DEV_C			dio_cntrl_dev_c
    #define	DIO_CNTRL_LST			dio_cntrl_lst
    #define	DIO_CONSOLE_CAN_ACKNOWLEDGE_ALARM_C	dio_console_can_acknowledge_alarm_c
    #define	DIO_CONSOLE_CAN_DISPLAY_ALARM_C	dio_console_can_display_alarm_c
    #define	DIO_CONTROL_SCALING_LENGTH_C	dio_control_scaling_length_c
    #define	DIO_CONTROLLING_DEVICE_C	dio_controlling_device_c
    #define	DIO_CURRENT_ALARM_TEXT_C	dio_current_alarm_text_c
    #define	DIO_CURRENT_XMLRPC_ACCESS_C	dio_current_xmlrpc_access_c
    #define	DIO_CURRENT_XMLRPC_CLIENT_DEVICES_C	dio_current_xmlrpc_client_devices_c
    #define	DIO_CURRENT_XMLRPC_CLIENT_NODES_C	dio_current_xmlrpc_client_nodes_c
    #define	DIO_DATA_LEN			dio_data_len
    #define	DIO_DATA_LEN_C			dio_data_len_c
    #define	DIO_DATA_LENGTH_C		dio_data_length_c
    #define	DIO_DATA_LENGTH_EXT_C		dio_data_length_ext_c
    #define	DIO_DATA_TYPE_INFO_C		dio_data_type_info_c
    #define	DIO_DATABASE_MASK_TO_PROPERTY_C	dio_database_mask_to_property_c
    #define	DIO_DATABASE_PROPERTY_TO_MASK_C	dio_database_property_to_mask_c
    #define	DIO_DB_EXTREMA_C		dio_db_extrema_c
    #define	DIO_DBQUERY_C			dio_dbquery_c
    #define	DIO_DBQUERY_ALLOC_C		dio_dbquery_alloc_c
    #define	DIO_DEFAULT_DATA_EVENT_C	dio_default_data_event_c
    #define	DIO_DEFAULT_FTD			dio_default_ftd
    #define	DIO_DELETE_ALL_EMC_INFO		dio_delete_all_emc_info
    #define	DIO_DELETE_ALL_FERMI_NAME_INFO	dio_delete_all_fermi_name_info
    #define	DIO_DELETE_ALL_INFO		dio_delete_all_info
    #define	DIO_DELETE_ALL_NAME_INFO	dio_delete_all_name_info
    #define	DIO_DELETE_CACHE		dio_delete_cache
    #define	DIO_DELETE_FTP_CLASS_INFO_C	dio_delete_ftp_class_info_c
    #define	DIO_DELETE_INFO			dio_delete_info
    #define	DIO_DELETE_INFO_C		dio_delete_info_c
    #define	DIO_DELETE_NAME_INFO_C		dio_delete_name_info_c
    #define	DIO_DELETE_PDB			dio_delete_pdb
    #define	DIO_DELETE_PDB_ALL		dio_delete_pdb_all
    #define	DIO_DELETE_PDB_LST		dio_delete_pdb_lst
    #define	DIO_DELETE_REQUESTS_C		dio_delete_requests_c
    #define	DIO_DELETE_SNAPSHOT_CLASS_INFO_C	dio_delete_snapshot_class_info_c
    #define	DIO_DEPARTMENT_INFO_C		dio_department_info_c
    #define	DIO_DESIRED_ALARM_LIMIT_TYPE	dio_desired_alarm_limit_type
    #define	DIO_DEVICE_AREA_C		dio_device_area_c
    #define	DIO_DEVICE_EXPRESSION_C		dio_device_expression_c
    #define	DIO_DEVICE_HAS_EXPRESSION_C	dio_device_has_expression_c
    #define	DIO_DEVICE_HELP_URL_C		dio_device_help_url_c
    #define	DIO_DEVICE_INDEX		dio_device_index
    #define	DIO_DEVICE_LOCATION_C		dio_device_location_c
    #define	DIO_DEVICE_LOCATION_INFO_C	dio_device_location_info_c
    #define	DIO_DEVICE_LOCATION_STRING_C	dio_device_location_string_c
    #define	DIO_DEVICE_MACHINE_C		dio_device_machine_c
    #define	DIO_DEVICE_MADC_LOCATION_C	dio_device_madc_location_c
    #define	DIO_DEVICE_SETTING_IS_ENABLED_C	dio_device_setting_is_enabled_c
    #define	DIO_DEVICE_SSDR			dio_device_ssdr
    #define	DIO_DEVICE_SSDR_C		dio_device_ssdr_c
    #define	DIO_DEVICE_STATE_C		dio_device_state_c
    #define	DIO_DEVICE_STRING_ELEMENT_LENGTH_C	dio_device_string_element_length_c
    #define	DIO_DEV_EMC			dio_dev_emc
    #define	DIO_DEV_NAME			dio_dev_name
    #define	DIO_DEV_NODE			dio_dev_node
    #define	DIO_DEV_SSDN			dio_dev_ssdn
    #define	DIO_DEV_SSDN_C			dio_dev_ssdn_c
    #define	DIO_DEV_TEXT			dio_dev_text
    #define	DIO_DEV_TEXT_C			dio_dev_text_c
    #define	DIO_DEV_TYPE			dio_dev_type
    #define	DIO_DEVICE_TYPE_C		dio_device_type_c
    #define	DIO_DIGITAL_ALARM_HANDLING_C	dio_digital_alarm_handling_c
    #define	DIO_DIGITAL_ALARM_TEXT		dio_digital_alarm_text
    #define	DIO_DIGITAL_ALARM_TEXT_C	dio_digital_alarm_text_c
    #define	DIO_DIGITAL_CONTROL_C		dio_digital_control_c
    #define	DIO_DIGITAL_CONTROL_INFO_C	dio_digital_control_info_c
    #define	DIO_DIGITAL_CONTROL_LIST_C	dio_digital_control_list_c
    #define	DIO_DIGITAL_CONTROL_MENU_C	dio_digital_control_menu_c
    #define	DIO_DIGITAL_CONTROL_TEXT_TO_VALUE_C	dio_digital_control_text_to_value_c
    #define	DIO_DIGITAL_CONTROL_TEXT_TO_VALUE_LIST_C	dio_digital_control_text_to_value_list_c
    #define	DIO_DISABLE			dio_disable
    #define	DIO_DISABLE_C			dio_disable_c
    #define	DIO_DISABLE_ABORT		dio_disable_abort
    #define	DIO_DISABLE_ABORT_C		dio_disable_abort_c
    #define	DIO_DISABLE_CACHE_MISSING_DB_VALUES	dio_disable_cache_missing_db_values
    #define	DIO_DISABLE_OBSOLETE_DEV_INFO	dio_disable_obsolete_dev_info
    #define	DIO_DISABLE_ON_EVENT_RETRIES	dio_disable_on_event_retries
    #define	DIO_DISABLE_SETTINGS		dio_disable_settings
    #define	DIO_DISPLAY_ATTRIBUTES_C	dio_display_attributes_c
    #define	DIO_DISPLAY_CONVERSION_INFO_C	dio_display_conversion_info_c
    #define	DIO_DISPLAY_CONVERSION_TYPE_C	dio_display_conversion_type_c
    #define	DIO_DISPLAY_LENGTH_C		dio_display_length_c
    #define	DIO_DIS_ABT_LST			dio_dis_abt_lst
    #define	DIO_DIS_LST			dio_dis_lst
    #define	DIO_DOCUMENTATION_INFO_C	dio_documentation_info_c
    #define	DIO_DOWNLOAD_INFO_C		dio_download_info_c
    #define	DIO_DOWNLOAD_PROPERTIES_C	dio_download_properties_c
    #define	DIO_DPREQ_INFO			dio_dpreq_info
    #define	DIO_DUPLICATE_SSDN_PROPERTIES_C	dio_duplicate_ssdn_properties_c
    #define	DIO_EDIT_COMMENT_INFO_C		dio_edit_comment_info_c
    #define	DIO_EMC_TO_DEVICE_INDEX		dio_emc_to_device_index
    #define	DIO_EMC_TYPE_C			dio_emc_type_c
    #define	DIO_ENABLE			dio_enable
    #define	DIO_ENABLE_C			dio_enable_c
    #define	DIO_ENABLE_ABORT		dio_enable_abort
    #define	DIO_ENABLE_ABORT_C		dio_enable_abort_c
    #define	DIO_ENABLE_CACHE_MISSING_DB_VALUES	dio_enable_cache_missing_db_values
    #define	DIO_ENABLE_OBSOLETE_DEV_INFO	dio_enable_obsolete_dev_info
    #define	DIO_ENABLE_ON_EVENT_RETRIES	dio_enable_on_event_retries
    #define	DIO_ENABLE_SETTING_LOGGING	dio_enable_setting_logging
    #define	DIO_ENABLE_SETTINGS		dio_enable_settings
    #define	DIO_ENA_ABT_LST			dio_ena_abt_lst
    #define	DIO_ENA_LST			dio_ena_lst
    #define	DIO_ENUM_VALUE_INFO_C		dio_enum_value_info_c
    #define	DIO_ENUM_VALUE_SETTING_MENU_C	dio_enum_value_setting_menu_c
    #define	DIO_ENUM_VALUE_SHARED_DEVICES_C	dio_enum_value_shared_devices_c
    #define	DIO_ENUM_VALUE_TEXT_TO_RAW_DATA_C	dio_enum_value_text_to_raw_data_c
    #define	DIO_EVENT_CONTROL		dio_event_control
    #define	DIO_EVENT_CONTROL_C		dio_event_control_c
    #define	DIO_EVENT_CONTROL_LIST_C	dio_event_control_list_c
    #define	DIO_EXPAND_FAMILY_C		dio_expand_family_c
    #define	DIO_EXTENDED_STATUS_MENU_C	dio_extended_status_menu_c
    #define	DIO_EXTRACT_ALARM_INFO_C	dio_extract_alarm_info_c
    #define	DIO_EXTRACT_READ_LIST_STATUS_C	dio_extract_read_list_status_c
    #define	DIO_EXTRACT_SET_LIST_STATUS_C	dio_extract_set_list_status_c
    #define	DIO_EXTREMA			dio_extrema
    #define	DIO_EXTREMA_C			dio_extrema_c
    #define	DIO_EXTREMA_PDB_C		dio_extrema_pdb_c
    #define	DIO_EXTREMA_PDB_EXT_C		dio_extrema_pdb_ext_c
    #define	DIO_EXT_TEXT			dio_ext_text
    #define	DIO_EXT_TEXT_C			dio_ext_text_c
    #define	DIO_FAMILY			dio_family
    #define	DIO_FAMILY_INFO			dio_family_info
    #define	DIO_FAMILY_INFO_C		dio_family_info_c
    #define	DIO_FERMI_NAME_C		dio_fermi_name_c
    #define	DIO_FERMI_NAME_TO_KEY_C		dio_fermi_name_to_key_c
    #define	DIO_FIELD_TO_DEVICE_SPEC_STRING_C	dio_field_to_device_spec_string_c
    #define	DIO_FIND_NAME_C			dio_find_name_c
    #define	DIO_FIND_STATUS_SCALING_ATTR_ID_C	dio_find_status_scaling_attr_id_c
    #define	DIO_FIND_STATUS_SCALING_ATTRIBUTE_C	dio_find_status_scaling_attribute_c
    #define	DIO_FIND_STATUS_SCALING_BY_ATTR_ID_C	dio_find_status_scaling_by_attr_id_c
    #define	DIO_FIND_STATUS_SCALING_BY_MASK_C	dio_find_status_scaling_by_mask_c
    #define	DIO_FIND_STATUS_SCALING_BY_STATE_C	dio_find_status_scaling_by_state_c
    #define	DIO_FLUSH			dio_flush
    #define	DIO_FOREIGN_DEVICE_INFO_C	dio_foreign_device_info_c
    #define	DIO_FRIG_HOUSES			dio_frig_houses
    #define	DIO_FTP_CLASS_INFO_C		dio_ftp_class_info_c
    #define	DIO_FTP_DEFAULT_FREQ_C		dio_ftp_default_freq_c
    #define	DIO_FULL_NAME_TO_TERSE_NAME_C	dio_full_name_to_terse_name_c
    #define	DIO_GET_ALARM			dio_get_alarm
    #define	DIO_GET_ALARM_C			dio_get_alarm_c
    #define	DIO_GET_ALRM_LST		dio_get_alrm_lst
    #define	DIO_GET_ARRAY_DEVICE_C		dio_get_array_device_c
    #define	DIO_GET_ARRAY_DEVICE_DOUBLE_C	dio_get_array_device_double_c
    #define	DIO_GET_CONTROL_VALUE_C		dio_get_control_value_c
    #define	DIO_GET_DB_ALARM		dio_get_db_alarm
    #define	DIO_GET_DB_ALARM_C		dio_get_db_alarm_c
    #define	DIO_GET_DEV			dio_get_dev
    #define	DIO_GET_DEV_C			dio_get_dev_c
    #define	DIO_GET_DEVICE_C		dio_get_device_c
    #define	DIO_GET_DEVICE_LIST_C		dio_get_device_list_c
    #define	DIO_GET_DIRECTED_LIST		dio_get_directed_list
    #define	DIO_GET_DIRECTED_LIST_RAW_C	dio_get_directed_list_raw_c
    #define	DIO_GET_EXTENDED_PDB_C		dio_get_extended_pdb_c
    #define	DIO_GET_FTP_CLASS_C		dio_get_ftp_class_c
    #define	DIO_GET_FTP_LIST_C		dio_get_ftp_list_c
    #define	DIO_GET_HISTORIC_SCALING_C	dio_get_historic_scaling_c
    #define	DIO_GET_LAST_SETTING		dio_get_last_setting
    #define	DIO_GET_LAST_SETTING_RAW	dio_get_last_setting_raw
    #define	DIO_GET_LST			dio_get_lst
    #define	DIO_GET_LST_RAW			dio_get_lst_raw
    #define	DIO_GET_LST_RAW_C		dio_get_lst_raw_c
    #define	DIO_GET_ONESHOT_FTD		dio_get_oneshot_ftd
    #define	DIO_GET_PDB			dio_get_pdb
    #define	DIO_GET_PROPERTIES		dio_get_properties
    #define	DIO_GET_RAW			dio_get_raw
    #define	DIO_GET_RAW_C			dio_get_raw_c
    #define	DIO_GET_RAW_DEVICE_KNOB_INFO_C	dio_get_raw_device_knob_info_c
    #define	DIO_GET_RAW_FTP_LIST_C		dio_get_raw_ftp_list_c
    #define	DIO_GET_RAW_READING_FUNC	dio_get_raw_reading_func
    #define	DIO_GET_RAW_SETTING_FUNC	dio_get_raw_setting_func
    #define	DIO_GET_RAW_SNAPSHOT_LIST_C	dio_get_raw_snapshot_list_c
    #define	DIO_GET_READ_LIST_DEVICES_C	dio_get_read_list_devices_c
    #define	DIO_GET_RECENT_SETTING_INFO_C	dio_get_recent_setting_info_c
    #define	DIO_GET_RETRY			dio_get_retry
    #define	DIO_GET_SET_LIST_DEVICES_C	dio_get_set_list_devices_c
    #define	DIO_GET_SNAPSHOT_CLASS_C	dio_get_snapshot_class_c
    #define	DIO_GET_SNAPSHOT_LIST_C		dio_get_snapshot_list_c
    #define	DIO_GET_STATUS_ARRAY_DEVICE_C	dio_get_status_array_device_c
    #define	DIO_GET_STATUS_FTP_LIST_C	dio_get_status_ftp_list_c
    #define	DIO_GET_TERSE_NAME_LENGTH	dio_get_terse_name_length
    #define	DIO_GET_TIMER_PULSE_WIDTH_DEVICE_C	dio_get_timer_pulse_width_device_c
    #define	DIO_GET_TIMER_REF		dio_get_timer_ref
    #define	DIO_GET_TIMER_REFERENCE_DEVICE_C	dio_get_timer_reference_device_c
    #define	DIO_GET_TIMER_REFERENCE_LIST	dio_get_timer_reference_list
    #define	DIO_HAS_CLASSIC_CONTROL_ATTRIBUTE_C	dio_has_classic_control_attribute_c
    #define	DIO_HAS_CLASSIC_STATUS_ATTRIBUTE_C	dio_has_classic_status_attribute_c
    #define	DIO_HAS_ENUM_VALUE_INFO_C	dio_has_enum_value_info_c
    #define	DIO_HAS_PROPERTY_C		dio_has_property_c
    #define	DIO_HAS_PROPERTY_LIST_C		dio_has_property_list_c
    #define	DIO_HAS_SCALING_INFO_C		dio_has_scaling_info_c
    #define	DIO_HAS_SCALING_INFO_LIST_C	dio_has_scaling_info_list_c
    #define	DIO_HAS_SETTING_RECORD_C	dio_has_setting_record_c
    #define	DIO_HISTORIC_DATA_LENGTH_C	dio_historic_data_length_c
    #define	DIO_HISTORIC_DEVICE_ADDRESSING_C	dio_historic_device_addressing_c
    #define	DIO_HISTORIC_DEVICE_NAME_C	dio_historic_device_name_c
    #define	DIO_HISTORIC_RAW_DATA_TYPE_C	dio_historic_raw_data_type_c
    #define	DIO_INSERT_PDB_LST		dio_insert_pdb_lst
    #define	DIO_INSERT_REQLST		dio_insert_reqlst
    #define	DIO_IS_ABORT			dio_is_abort
    #define	DIO_IS_ABORT_C			dio_is_abort_c
    #define	DIO_IS_ABRT_INH			dio_is_abrt_inh
    #define	DIO_IS_ABRT_INH_C		dio_is_abrt_inh_c
    #define	DIO_IS_ABTINH_LST		dio_is_abtinh_lst
    #define	DIO_IS_ABT_LST			dio_is_abt_lst
    #define	DIO_IS_BROKEN_C			dio_is_broken_c
    #define	DIO_IS_BYP_LST			dio_is_byp_lst
    #define	DIO_IS_BYPAS			dio_is_bypas
    #define	DIO_IS_BYPAS_C			dio_is_bypas_c
    #define	DIO_IS_BYPASSED_DB_C		dio_is_bypassed_db_c
    #define	DIO_IS_CACHING_MISSING_DB_VALUES	dio_is_caching_missing_db_values
    #define	DIO_IS_CAMAC_DEVICE_C		dio_is_camac_device_c
    #define	DIO_IS_CONTROLLED_SET_C		dio_is_controlled_set_c
    #define	DIO_IS_CONTROLLED_SET_LIST	dio_is_controlled_set_list
    #define	DIO_IS_DESTRUCTIVE_READ_C	dio_is_destructive_read_c
    #define	DIO_IS_DISPLAY_DEC		dio_is_display_dec
    #define	DIO_IS_DISPLAY_DEC_C		dio_is_display_dec_c
    #define	DIO_IS_DISPLAY_SHORT		dio_is_display_short
    #define	DIO_IS_DISPLAY_SHORT_C		dio_is_display_short_c
    #define	DIO_IS_ENUM_VALUE_INFO_SHARED_C	dio_is_enum_value_info_shared_c
    #define	DIO_IS_ENUMERATED_PROPERTY_C	dio_is_enumerated_property_c
    #define	DIO_IS_EVENT_ENABLED_C		dio_is_event_enabled_c
    #define	DIO_IS_FAMILY			dio_is_family
    #define	DIO_IS_FAMILY_LIST_C		dio_is_family_list_c
    #define	DIO_IS_FLOAT_RAW_DATA_C		dio_is_float_raw_data_c
    #define	DIO_IS_GOOD			dio_is_good
    #define	DIO_IS_GOOD_C			dio_is_good_c
    #define	DIO_IS_GOOD_LST			dio_is_good_lst
    #define	DIO_IS_KNOBABLE_C		dio_is_knobable_c
    #define	DIO_IS_OBSOLETE_INFO_ENABLED	dio_is_obsolete_info_enabled
    #define	DIO_IS_OLD_DEVICE_NAME_C	dio_is_old_device_name_c
    #define	DIO_IS_ON			dio_is_on
    #define	DIO_IS_ON_C			dio_is_on_c
    #define	DIO_IS_ON_EVENT_RETRY_ENABLED	dio_is_on_event_retry_enabled
    #define	DIO_IS_ON_LST			dio_is_on_lst
    #define	DIO_IS_POSITIVE			dio_is_positive
    #define	DIO_IS_POSITIVE_C		dio_is_positive_c
    #define	DIO_IS_POS_LST			dio_is_pos_lst
    #define	DIO_IS_POSSIBLE_DEVICE_NAME_C	dio_is_possible_device_name_c
    #define	DIO_IS_PRIMARY_SCALABLE_PROPERTY_C	dio_is_primary_scalable_property_c
    #define	DIO_IS_RAMPING_C		dio_is_ramping_c
    #define	DIO_IS_RAMPING_LIST_C		dio_is_ramping_list_c
    #define	DIO_IS_RDY_LST			dio_is_rdy_lst
    #define	DIO_IS_READY			dio_is_ready
    #define	DIO_IS_READY_C			dio_is_ready_c
    #define	DIO_IS_REMOTE			dio_is_remote
    #define	DIO_IS_REMOTE_C			dio_is_remote_c
    #define	DIO_IS_REM_LST			dio_is_rem_lst
    #define	DIO_IS_SETTING_ENABLED		dio_is_setting_enabled
    #define	DIO_IS_SNOOZED_ALARM_C		dio_is_snoozed_alarm_c
    #define	DIO_IS_STATUS_ATTRIBUTE_STATE_VALUE_C	dio_is_status_attribute_state_value_c
    #define	DIO_IS_STATUS_ATTRIBUTE_VALUE_C	dio_is_status_attribute_value_c
    #define	DIO_IS_STATUS_ATTRIBUTE_VALUE_BY_ID_C	dio_is_status_attribute_value_by_id_c
    #define	DIO_IS_STATUS_ATTRIBUTE_VALUE_LIST	dio_is_status_attribute_value_list
    #define	DIO_IS_STEP_MOTOR		dio_is_step_motor
    #define	DIO_IS_STRING_PROPERTY_C	dio_is_string_property_c
    #define	DIO_IS_STRING_TRANSFORM_C	dio_is_string_transform_c
    #define	DIO_IS_STRUCTURE_C		dio_is_structure_c
    #define	DIO_IS_TIMER_DEVICE_C		dio_is_timer_device_c
    #define	DIO_IS_TIMER_PULSE_WIDTH_DEVICE_C	dio_is_timer_pulse_width_device_c
    #define	DIO_IS_TIMER_REFERENCE_C	dio_is_timer_reference_c
    #define	DIO_IS_VALID_DEVICE_NAME_FIRST_CHAR_C	dio_is_valid_device_name_first_char_c
    #define	DIO_LENGTH_OFFSET_SPEC_TO_DRF_STRING_C	dio_length_offset_spec_to_drf_string_c
    #define	DIO_LIST_INFO			dio_list_info
    #define	DIO_LONGEST_ANALOG_ALARM_URL	dio_longest_analog_alarm_url
    #define	DIO_LONGEST_AREA_NAME		dio_longest_area_name
    #define	DIO_LONGEST_DEFAULT_DATA_EVENT	dio_longest_default_data_event
    #define	DIO_LONGEST_DEPARTMENT_NAME	dio_longest_department_name
    #define	DIO_LONGEST_DEVICE_BROKEN_COMMENT	dio_longest_device_broken_comment
    #define	DIO_LONGEST_DEVICE_DOCUMENT_COMMENT	dio_longest_device_document_comment
    #define	DIO_LONGEST_DEVICE_EDIT_COMMENT	dio_longest_device_edit_comment
    #define	DIO_LONGEST_DEVICE_FULL_NAME	dio_longest_device_full_name
    #define	DIO_LONGEST_DEVICE_FULL_TEXT	dio_longest_device_full_text
    #define	DIO_LONGEST_DEVICE_HELP_URL	dio_longest_device_help_url
    #define	DIO_LONGEST_DEVICE_OBSOLETE_COMMENT	dio_longest_device_obsolete_comment
    #define	DIO_LONGEST_FOREIGN_DEVICE_NAME_C	dio_longest_foreign_device_name_c
    #define	DIO_LONGEST_LOCATION_STRING	dio_longest_location_string
    #define	DIO_LONGEST_MACHINE_NAME	dio_longest_machine_name
    #define	DIO_LONGEST_STRUCTURE_NAME	dio_longest_structure_name
    #define	DIO_MADC_CLOCK_EVENTS_C		dio_madc_clock_events_c
    #define	DIO_MADC_LIST_INFO_C		dio_madc_list_info_c
    #define	DIO_MADC_LOCATION_C		dio_madc_location_c
    #define	DIO_MADC_NUM_AVAILABLE_CLOCK_LEVELS_C	dio_madc_num_available_clock_levels_c
    #define	DIO_MADC_NUM_AVAILABLE_LISTS_C	dio_madc_num_available_lists_c
    #define	DIO_MADC_NUM_AVAILABLE_PLOT_CHANNELS_C	dio_madc_num_available_plot_channels_c
    #define	DIO_MADC_NUM_CHANNELS_C		dio_madc_num_channels_c
    #define	DIO_MADC_NUMBER_C		dio_madc_number_c
    #define	DIO_MADC_PLOT_CHANNEL_INFO_C	dio_madc_plot_channel_info_c
    #define	DIO_MAINTAINER_INFO_C		dio_maintainer_info_c
    #define	DIO_MANAGE_EXTENDED_PDBS_C	dio_manage_extended_pdbs_c
    #define	DIO_MANAGE_FRONT_END_PDBS_C	dio_manage_front_end_pdbs_c
    #define	DIO_MANAGE_PDBS_C		dio_manage_pdbs_c
    #define	DIO_MEMORY_CANCEL_C		dio_memory_cancel_c
    #define	DIO_MEMORY_CONTROL_C		dio_memory_control_c
    #define	DIO_MEMORY_GET_C		dio_memory_get_c
    #define	DIO_MEMORY_GET_ARRAY_C		dio_memory_get_array_c
    #define	DIO_MEMORY_GET_RAW_C		dio_memory_get_raw_c
    #define	DIO_MEMORY_GET_DIRECTED_RAW_C	dio_memory_get_directed_raw_c
    #define	DIO_MEMORY_POOL_ID_TO_NAME_C	dio_memory_pool_id_to_name_c
    #define	DIO_MEMORY_POOL_NAME_TO_ID_C	dio_memory_pool_name_to_id_c
    #define	DIO_MEMORY_POOL_QUERY		dio_memory_pool_query
    #define	DIO_MEMORY_POPULATE_C		dio_memory_populate_c
    #define	DIO_MEMORY_POPULATE_QUERY	dio_memory_populate_query
    #define	DIO_MEMORY_READ_C		dio_memory_read_c
    #define	DIO_MEMORY_READ_RAW_C		dio_memory_read_raw_c
    #define	DIO_MEMORY_SELECT_POOL_C	dio_memory_select_pool_c
    #define	DIO_MEMORY_SET_C		dio_memory_set_c
    #define	DIO_MEMORY_SET_ARRAY_C		dio_memory_set_array_c
    #define	DIO_MEMORY_SET_POPULATE_C	dio_memory_set_populate_c
    #define	DIO_MEMORY_SET_RAW_C		dio_memory_set_raw_c
    #define	DIO_MEMORY_STATUS_C		dio_memory_status_c
    #define	DIO_MEMORY_TIME_SET_C		dio_memory_time_set_c
    #define	DIO_MEMORY_WRITE_C		dio_memory_write_c
    #define	DIO_MEMORY_WRITE_RAW_C		dio_memory_write_raw_c
    #define	DIO_MOVE_STEP_MOTOR		dio_move_step_motor
    #define	DIO_NAME_TO_FERMI_NAME_C	dio_name_to_fermi_name_c
    #define	DIO_NAME_TO_INDEX		dio_name_to_index
    #define	DIO_NEGATIVE			dio_negative
    #define	DIO_NEG_LST			dio_neg_lst
    #define	DIO_NODE			dio_node
    #define	DIO_NODE_ALARM_LIMIT_TYPE_C	dio_node_alarm_limit_type_c
    #define	DIO_NODE_DEFAULT_ALARM_LIST_C	dio_node_default_alarm_list_c
    #define	DIO_NODE_DEFAULT_ALARM_LIST_LIST_C	dio_node_default_alarm_list_list_c
    #define	DIO_NUM_DATA_ELEMENTS_C		dio_num_data_elements_c
    #define	DIO_OBSOLETE_INFO_C		dio_obsolete_info_c
/* #define	DIO_OFF				dio_off */  /* would redefine a macro having the same name */
    #define	DIO_OFF_LST			dio_off_lst
    #define	DIO_OLDEST_SETTING_LOG_ENTRY_DATE_C	dio_oldest_setting_log_entry_date_c
/* #define	DIO_ON				dio_on */   /* would redefine a macro having the same name */
    #define	DIO_ON_LST			dio_on_lst
    #define	DIO_PARSE_GENERIC_LONG_DEVICE_NAME_C	dio_parse_generic_long_device_name_c
    #define	DIO_PARSE_LONG_DEVICE_NAME_C	dio_parse_long_device_name_c
    #define	DIO_PDB_CTL			dio_pdb_ctl
    #define	DIO_PDB_STS			dio_pdb_sts
    #define	DIO_PDB_TO_DISPLAY_CONVERSION_INFO_C	dio_pdb_to_display_conversion_info_c
    #define	DIO_PDB_TO_SCALING_INFO_C	dio_pdb_to_scaling_info_c
    #define	DIO_POSITIVE			dio_positive
    #define	DIO_POS_LST			dio_pos_lst
    #define	DIO_PREFIX_CHAR_TO_PROPERTY_C	dio_prefix_char_to_property_c
    #define	DIO_PREVIOUS_NAME_C		dio_previous_name_c
    #define	DIO_PRIMARY_TO_SCALED_CUSTOM_C	dio_primary_to_scaled_custom_c
    #define	DIO_PRIMARY_TO_SCALED_DATA_C	dio_primary_to_scaled_data_c
    #define	DIO_PROPERTY_FLAGS_C		dio_property_flags_c
    #define	DIO_PROPERTY_TO_DEVICE_SPEC_STRING_C	dio_property_to_device_spec_string_c
    #define	DIO_PROPERTY_TO_PREFIX_CHAR_C	dio_property_to_prefix_char_c
    #define	DIO_PROTECTION_MASK_C		dio_protection_mask_c
    #define	DIO_QUERY_TUNER			dio_query_tuner
    #define	DIO_RAW_DATA_TYPE		dio_raw_data_type
    #define	DIO_RAW_ELEMENT_LENGTH_C	dio_raw_element_length_c
    #define	DIO_RAW_TO_CONTROL_TEXT_C	dio_raw_to_control_text_c
    #define	DIO_RAW_TO_ENUM_VALUE_TEXT_C	dio_raw_to_enum_value_text_c
    #define	DIO_RAW_TO_SCALED_CUSTOM_C	dio_raw_to_scaled_custom_c
    #define	DIO_RAW_TO_SCALED_DATA		dio_raw_to_scaled_data
    #define	DIO_RAW_TO_SCALED_DATA_C	dio_raw_to_scaled_data_c
    #define	DIO_RAW_TO_SCALED_HISTORIC_C	dio_raw_to_scaled_historic_c
    #define	DIO_RAW_TO_STATUS_C		dio_raw_to_status_c
    #define	DIO_RAW_TO_STATUS_ATTRIBUTE_VALUE_BY_ID_C	dio_raw_to_status_attribute_value_by_id_c
    #define	DIO_RAW_TO_STATUS_EXTENDED_C	dio_raw_to_status_extended_c
    #define	DIO_RAW_TO_STATUS_STATE_VALUE_BY_ID_C	dio_raw_to_status_state_value_by_id_c
    #define	DIO_RAW_TO_STATUS_TEXT		dio_raw_to_status_text
    #define	DIO_RAW_TO_STATUS_TEXT_EXTENDED_C	dio_raw_to_status_text_extended_c
    #define	DIO_RAW_TO_VALUE_TEXT_C		dio_raw_to_value_text_c
    #define	DIO_RAW_TO_VALUE_TEXT_CUSTOM_C	dio_raw_to_value_text_custom_c
    #define	DIO_READ_DB_TIMEOUT		dio_read_db_timeout
    #define	DIO_READ_LAST_SETTING_C		dio_read_last_setting_c
    #define	DIO_READ_LIST_LENGTH_C		dio_read_list_length_c
    #define	DIO_READ_LIST_SINGLE_ENTRY_INFO_C	dio_read_list_single_entry_info_c
    #define	DIO_REARM_SNAPSHOT_LIST_C	dio_rearm_snapshot_list_c
    #define	DIO_REMOVE_ALL_TIMER_EVENTS_C	dio_remove_all_timer_events_c
    #define	DIO_REMOVE_RAW_READING_FUNC	dio_remove_raw_reading_func
    #define	DIO_REMOVE_RAW_SETTING_FUNC	dio_remove_raw_setting_func
    #define	DIO_REMOVE_TIMER_EVENTS_C	dio_remove_timer_events_c
    #define	DIO_REQUEST_INFO_C		dio_request_info_c
/* #define	DIO_RESET			dio_reset */    /* would redefine a macro having the same name */
    #define	DIO_RESTORE_LAST_SETTING	dio_restore_last_setting
    #define	DIO_RST_LST			dio_rst_lst
    #define	DIO_SALARM_DNOM			dio_salarm_dnom
    #define	DIO_SALARM_DNOM_C		dio_salarm_dnom_c
    #define	DIO_SALARM_DNOM_LST		dio_salarm_dnom_lst
    #define	DIO_SALARM_LIM			dio_salarm_lim
    #define	DIO_SALARM_LIM_C		dio_salarm_lim_c
    #define	DIO_SALARM_LIM_LST		dio_salarm_lim_lst
    #define	DIO_SAVE_INFO			dio_save_info
    #define	DIO_SCALED_TO_PRIMARY_DATA_C	dio_scaled_to_primary_data_c
    #define	DIO_SCALED_TO_RAW_CUSTOM_C	dio_scaled_to_raw_custom_c
    #define	DIO_SCALED_TO_RAW_DATA		dio_scaled_to_raw_data
    #define	DIO_SCALED_TO_RAW_DATA_C	dio_scaled_to_raw_data_c
    #define	DIO_SCALED_TO_VALUE_TEXT_C	dio_scaled_to_value_text_c
    #define	DIO_SCALING			dio_scaling
    #define	DIO_SCALING_CONSTANTS_C		dio_scaling_constants_c
    #define	DIO_SCALING_INFO_TO_EXTENDED_PDB_C	dio_scaling_info_to_extended_pdb_c
    #define	DIO_SCALING_INFO_TO_PDB_C	dio_scaling_info_to_pdb_c
    #define	DIO_SCALING_LEN			dio_scaling_len
    #define	DIO_SCALING_LEN_C		dio_scaling_len_c
    #define	DIO_SCALING_LENGTH_LIST_C	dio_scaling_length_list_c
    #define	DIO_SCALING_TEXT		dio_scaling_text
    #define	DIO_SCALING_TEXT_C		dio_scaling_text_c
    #define	DIO_SCALING_TRANSFORMS_C	dio_scaling_transforms_c
    #define	DIO_SET_ABORT_INH_LST		dio_set_abort_inh_lst
    #define	DIO_SET_ALARM_C			dio_set_alarm_c
    #define	DIO_SET_ALARM_FLAGS_C		dio_set_alarm_flags_c
    #define	DIO_SET_ALARM_FLAGS_LIST_C	dio_set_alarm_flags_list_c
    #define	DIO_SET_ALARM_FTD_C		dio_set_alarm_ftd_c
    #define	DIO_SET_ALARM_TRIES_C		dio_set_alarm_tries_c
    #define	DIO_SET_ARRAY_DEVICE_C		dio_set_array_device_c
    #define	DIO_SET_ARRAY_DEVICE_DOUBLE_C	dio_set_array_device_double_c
    #define	DIO_SET_BROKEN_C		dio_set_broken_c
    #define	DIO_SET_BYPASS_LST		dio_set_bypass_lst
    #define	DIO_SET_DC_MODE_C		dio_set_dc_mode_c
    #define	DIO_SET_DC_MODE_LIST_C		dio_set_dc_mode_list_c
    #define	DIO_SET_DEV			dio_set_dev
    #define	DIO_SET_DEV_C			dio_set_dev_c
    #define	DIO_SET_DEVICE_C		dio_set_device_c
    #define	DIO_SET_DEVICE_LIST_C		dio_set_device_list_c
    #define	DIO_SET_FOR_READ		dio_set_for_read
    #define	DIO_SET_FOR_READ_C		dio_set_for_read_c
    #define	DIO_SET_HASH_TABLE_SIZE_C	dio_set_hash_table_size_c
    #define	DIO_SET_LIST_LENGTH_C		dio_set_list_length_c
    #define	DIO_SET_LIST_SINGLE_ENTRY_INFO_C	dio_set_list_single_entry_info_c
    #define	DIO_SET_LST			dio_set_lst
    #define	DIO_SET_LST_RAW			dio_set_lst_raw
    #define	DIO_SET_LST_RAW_C		dio_set_lst_raw_c
    #define	DIO_SET_RAMP_MODE_C		dio_set_ramp_mode_c
    #define	DIO_SET_RAMP_MODE_LIST_C	dio_set_ramp_mode_list_c
    #define	DIO_SET_RAW			dio_set_raw
    #define	DIO_SET_RAW_C			dio_set_raw_c
    #define	DIO_SET_RAW_BY_USER_ADDRESSING_C	dio_set_raw_by_user_addressing_c
    #define	DIO_SET_STEP_MOTOR		dio_set_step_motor
    #define	DIO_SET_STEP_MOTOR_C		dio_set_step_motor_c
    #define	DIO_SET_STEP_MOTOR_STEPS_C	dio_set_step_motor_steps_c
    #define	DIO_SET_TERSE_NAME_LENGTH_C	dio_set_terse_name_length_c
    #define	DIO_SET_TIMER_REF		dio_set_timer_ref
    #define	DIO_SET_VALUE_TEXT_C		dio_set_value_text_c
    #define	DIO_SETTINGS_ARE_ENABLED	dio_settings_are_enabled
    #define	DIO_SIBLINGS			dio_siblings
    #define	DIO_SIMULATE			dio_simulate
    #define	DIO_SIMULATE_QUERY		dio_simulate_query
    #define	DIO_SLIST_INFO			dio_slist_info
    #define	DIO_SNAPSHOT_CLASS_INFO_C	dio_snapshot_class_info_c
    #define	DIO_SNAPSHOT_DEFAULT_FREQ_C	dio_snapshot_default_freq_c
    #define	DIO_SNOOZE_ALARM_C		dio_snooze_alarm_c
    #define	DIO_SNOOZED_ALARM_INFO_C	dio_snoozed_alarm_info_c
    #define	DIO_SNOOZED_ALARMS		dio_snoozed_alarms
    #define	DIO_SPEC_TO_DRF_STRING_C	dio_spec_to_drf_string_c
    #define	DIO_SPECIFY_RAW_READING_FUNC	dio_specify_raw_reading_func
    #define	DIO_SPECIFY_RAW_SETTING_FUNC	dio_specify_raw_setting_func
    #define	DIO_SSDN_TO_DEVICE_TYPE_C	dio_ssdn_to_device_type_c
    #define	DIO_SSDN_TO_DUPLICATE_SSDN_PROPERTIES_C	dio_ssdn_to_duplicate_ssdn_properties_c
    #define	DIO_SSDN_TO_LOCATION_C		dio_ssdn_to_location_c
    #define	DIO_SSDN_TO_SNAPSHOT_CLASS_C	dio_ssdn_to_snapshot_class_c
    #define	DIO_STATUS			dio_status
    #define	DIO_STATUS_C			dio_status_c
    #define	DIO_STATUS_ATTR_TO_BIT_INFO_C	dio_status_attr_to_bit_info_c
    #define	DIO_STATUS_SCALING_ATTRIBUTES_C	dio_status_scaling_attributes_c
    #define	DIO_STATUS_SCALING_INFO_C	dio_status_scaling_info_c
    #define	DIO_STATUS_SCALING_LENGTH_C	dio_status_scaling_length_c
    #define	DIO_STEP_MOTOR_IS_MOVING_C	dio_step_motor_is_moving_c
    #define	DIO_STRUCTURE_NAME_C		dio_structure_name_c
    #define	DIO_STS_LST			dio_sts_lst
    #define	DIO_STS_TXT			dio_sts_txt
    #define	DIO_STS_TXT_C			dio_sts_txt_c
    #define	DIO_STS_TXT_LST			dio_sts_txt_lst
    #define	DIO_TERSE_NAME_TO_FULL_NAME_C	dio_terse_name_to_full_name_c
    #define	DIO_TIMER_MAX_EVENTS_C		dio_timer_max_events_c
    #define	DIO_TUNER			dio_tuner
    #define	DIO_TUNER_C			dio_tuner_c
    #define	DIO_UNITS_TEXT_C		dio_units_text_c
    #define	DIO_UNSNOOZE_ALARM_C		dio_unsnooze_alarm_c
    #define	DIO_USERS_MONITORING_ALARM_C	dio_users_monitoring_alarm_c
    #define	DIO_VALIDATE_DEVICE_NAME_C	dio_validate_device_name_c
    #define	DIO_VALUE_TEXT_C		dio_value_text_c
    #define	DIO_VALUE_TEXT_TO_RAW_DATA_C	dio_value_text_to_raw_data_c
    #define	DIO_VIRTUAL_MACHINE_INFO_C	dio_virtual_machine_info_c
    #define	DIO_WAS_CONTROLLED_C		dio_was_controlled_c
    #define	DIO_WAS_SET_C			dio_was_set_c
    #define	DIO_WILDCARD_BUILD		dio_wildcard_build
    #define	DIO_WILDCARD_CANCEL		dio_wildcard_cancel
    #define	DIO_WILDCARD_READ		dio_wildcard_read
    #define	DSTATX_EXT_C			dstatx_ext_c
    #define	MIO_CANCEL			mio_cancel
    #define	MIO_CONTROL			mio_control
    #define	MIO_FILL_STATUS			mio_fill_status
    #define	MIO_POOL_ADDRESS		mio_pool_address
    #define	MIO_READ			mio_read
    #define	MIO_READ_DIRECTED		mio_read_directed
    #define	MIO_SELECT_POOL			mio_select_pool
    #define	MIO_SET				mio_set
    #define	MIO_TIME_SET			mio_time_set
    #define	MNG_DIOPOOL			mng_diopool
    #define	READ_PACKETED_DATA_C		read_packeted_data_c
    #define	READ_PACKETED_DEVICE_C		read_packeted_device_c
    #define	TD_BUILD			td_build
    #define	TD_BUILD_C			td_build_c
    #define	TD_CANCEL			td_cancel
    #define	TD_EXTRACT_LIST_STATUS_C	td_extract_list_status_c
    #define	TD_QUERY			td_query
    #define	TD_READ				td_read
    #define	TD_READ_DATA_SOURCE		td_read_data_source
    #define	TD_READ_ONE			td_read_one
    #define	TD_READ_ONE_C			td_read_one_c
    #define	TD_SET				td_set
    #define	TD_SET_C			td_set_c
    #define	TD_SET_DATA_SOURCE_C		td_set_data_source_c
    #define	TD_SET_ONE			td_set_one
    #define	TD_SET_ONE_C			td_set_one_c

#endif