The xRng register class is used for reading and writing analogue
registers on VXI cards having 2 ranges.
Examples are the Germanium CFD threshold and Test Generator registers.
The class accepts raw data values in hexadecimal format or data in physical units. For example
the class understands 0.1kV, 100V or 100000mV as equivalent.
There is no -w (width) attribute. All VXI accesses are assumed to be 16 bits.
There is no -p (permission) attribute. WO access is assumed to the DAC hardware register and RO access is
assumed to the range control hardware register.
Attributes :-
-s    VXI slot number
specifies the slot number (1-12) within the VXI crate. Manditory - no default value.
-c    channel number
specifies the hardware channel within the VXI card. Optional. By default -c 0 is assumed.
Normally channel 0 is used for the configuration and common registers positioned at the base of
the card address space and channels 1 => n are used for the channel specific registers.
The gain control register is assumed by default to be accessed via the same hardware channel.
-a    channel base address
specifies the address offset of the channel area relative to the base address of the VXI card.
This is the address offset within the card of the base of the channel 0 area. Optional.
By default -a 0 is assumed.
The gain control register is assumed by default to be accessed via the same channel base address.
-z    channel address size
specifies the address space allocated to each channel within the channel area of the VXI card.
Optional. By default -z 256 is assumed.
-o    offset
specifies the address offset of the hardware register relative to the base of the current channel
within the VXI card. Manditory - no default value.
-g    gain offset
specifies the address offset of the gain control hardware register relative to the base of the current channel
within the VXI card.
-G    gain offset
specifies the address offset of the gain control hardware register relative to the base address of the VXI card.
By default it is assumed that the gain control register is addressed in the same manner as the DAC hardware
register but using the -g attribute rather than the -o attribute. However the -G attribute allows the offset of the
gain control register to be specified relative to the base of the card. This is used when the gain control
is common to all channels on the card and is located in the card common area (ie in channel 0).
The -G attribute if used must be specified after the -c and -a attributes.
-g    gain bit
specifies the bit location of the gain control within the 16 bit hardware register addressed by -g or -G.
-u    unit
specifies the SI unit to be used when returning data for read operations.
-q    prefix
specifies the SI prefix to be used when returning data for read operations.
The following prefixes are understood: a (1.0e-18); f (1.0e-15); p (1.0e-12); n (1.0e-9);
u (1.0e-6); m(1.0e-3); c (0.01); d(0.1); h(100.0); k (1.0e3); M (1.0e6); G (1.0e9); T (1.0e12);
P (1.0e15); E (1.0e18).
-d    decimal places
specifies the number of decimal places to be used when returning data for read operations.
Data being supplied for write operations may be in any format understood by the class.
-r    low gain range
specifies the calibration information to be used when converting data between real (physical) units
and digital (electronics) units.
The attribute format is minimum(digital):minimum(real),maximum(digital):maximum(real).
For example an 8 bit DAC may have -r0:0s,0xff:200ns which states that the minimum digital value
(0) is equivalent to 0secs and that the maximum digital value (255) is equivalent to 200 nsecs.
-R    high gain range
identical to the -r attribute for the high range range.
-i    initial value
specifies the data value to be used by the INITIALISE operation.
The data value may be specified in real units. For example -i 100ns.
-I    initial value of the gain control bit
specifies the value to be used by the INITIALISE operation.
All accesses to the register use the low gain range conversion if the gain control bit has the value 0 and
use the high gain range conversion if the gain control bit has the value 1.
The absolute VME address of a register (relative to the card base address allocated by the
Resource Manager) is given by (channel area base address) + (channel number * channel size) + (register offset).
The register containing the gain control bit is given by the same formula if the offset is supplied by the
-g attribute or by just the offset if using the -G attribute.