dio_get_calc_value_c (ul_calc_device)

	status.i4.v = dio_get_calc_value_c(device_index.i4.v,
					   property.i2.v, array_index.u4.v,
					   node.i2,v, data_event.i1a.r,
					   start_time.u4.v, end_time.u4.v,
					   convert_type.i2.v, value.r8.r)

	This routine reads a calculated value.

	device_index	device index
	property	property index
			(PRREAD -> reading property,
			 PRSET -> setting property)
	array_index	index into array device (starts at 0)
	node		data logger source node
			(LOGGER_FASTEST_NODE -> routine picks node which is
						logging this device and
						property at the fastest rate,
			 otherwise -> data logger node value
				      (constants are in 'nodedefs'))
			the fastest periodic data event to read the logged data
			will be taken - if no such the error is returned
	data_event	data event string or NULL, if NULL then the fastest
			logger at the given node is taken
	start_time	starting data acquisition time
			(seconds since January 1, 1970 UTC)
	end_time	ending data acquisition time
			(seconds since January 1, 1970 UTC)
                       if end_time == 0 then start_time=time interval length
			and actual end_time = time now,
			start_time = end_time - time interval.
	convert_type	calculation type
			(DIO_SIMPLE_CALC_TYPE_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
			 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 percentage)		
	value		returned device's calculated value

	This function returns status values as follows:

	OK			success
	DIO_BADARG		unsupported property requested
	DIO_NO_DATA		no data logger points found
	DIO_NO_SUCH     	we have data but no average could be calculated
	DIO_MEMFAIL		memory allocation failure
	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, clib_h, acnet_errors_h

	Related functions:

	dio_get_calc_buffer_device_c, dio_can_calc_buffer_device_c,
	dio_bld_calc_buffer_list_c, dio_get_calc_buffer_list_c,
	dio_can_calc_buffer_lst_c, dio_cancel_all_calc_devices

	C/C++ usage:

	static const char	data_event[] = "p,15000,true";
	short	property = PRREAD;
	short	node = LOGGER_FASTEST_NODE;
	short	convert_type = DIO_COMMON;
	int	status;
	int	device_index = 121387;
	unsigned int	array_index = 0;
	unsigned int	start_time;
	unsigned int	end_time;
	double	value;

	start_time = date_to_clinks("01-JAN-2013 12:00",&status);
	start_time = convert_seconds_c(start_time,DATE_CLINKS_TO_GMT);

	end_time = date_to_clinks("01-FEB-2012 12:00",&status);
	end_time = convert_seconds_c(end_time,DATE_CLINKS_TO_GMT);

	status = dio_get_calc_value_c(device_index,property,array_index,