dio_get_calc_buffer_device_c (ul_calc_device)

	status.i4.v = dio_get_calc_buffer_device_c(device_index.i4.v,
						   property.i2.v,
						   array_index.u4.v,
						   convert_type.i2.v,
						   start_interval.u4.v,
						   end_interval.u4.v,
						   value.r8.r
						   [,data_event.i1a.r]
						   [,options.u4.v])

	This routine reads a device calculation value request values

	device_index	device index
	property	property index
			(PRREAD -> reading property,
			 PRSET -> setting property)
	array_index	index into array device (starts at 0)
	convert_type    calculation type
			(DIO_CALC_TYPE_SIMPLE_AVERAGE -> arithmetic average
			 DIO_CALC_TYPE_PRIMARY_SIMPLE_AVERAGE -> arithmetic
								 average
								 (primary value)
			 DIO_COMMON units only:
			 DIO_CALC_TYPE_INTEGRAL_AVERAGE -> integral average		
			 DIO_CALC_TYPE_INTEGRAL -> integral value of F(x)	
		  	 DIO_CALC_TYPE_INTEGRAL_ABSOLUTE -> integral value of
							    abs(F(x))
			 DIO_CALC_TYPE_RMS  -> Root Mean Square 
			 DIO_CALC_TYPE_INTEGRAL_RMS  -> integral Root Mean Square 
		  	 DIO_CALC_TYPE_STANDARD_DEVIATION -> standard deviation
			 DIO_CALC_TYPE_SPEED_IN_PERCENT -> speed in percents)
	start_interval	start of time interval in seconds
			from now to past
	end_interval	end of time interval in seconds
			from now to past
	value		returned calculated value
	[data_event]	data event string (to define the update frequency)
			(default is "p,5000,true") 
	[options]	0, not in use at the moment

	This function returns status values as follows:

	DIO_OK			success
	DIO_MEMFAIL		memory allocation failure
	DIO_NOT_OPEN		no value because of no buffer existed but
				it has been created successfully
	negative value		other ACNET format error
	positive value		number of devices in error
				indicating partial success

	This function requires the following include files:

	ul_calc_device_h:calclib_h, dbprops_h, diolib_h, acnet_errors_h

	Related functions:

	dio_can_calc_buffer_device_c, dio_get_calc_value_c,
	dio_bld_calc_buffer_list_c,  dio_get_calc_buffer_list_c,
	dio_can_calc_buffer_list_c, dio_cancel_all_calc_devices

	C/C++ usage:

	static const char	data_event[] = "p,5000,true";
	short	property = PRREAD;
	short	convert_type = DIO_COMMON;
	int	status;
	int	device_index = 131563;
	unsigned int	array_indices = 0;
	unsigned int	start_interval = 3600;
	unsigned int	end_interval = 1800;
	unsigned int	options = 0;
	double	value;

	status = dio_get_calc_buffer_device_c(device_index,property,array_index,
					      convert_type,start_interval,
					      end_interval,&value,data_event,
					      options);