Class FlinkADC

  • All Implemented Interfaces:
    FlinkDefinitions

    public class FlinkADC
    extends Object
    implements FlinkDefinitions
    The flink ADC subdevice realizes analog inputs in a flink device. Its number of channels depends on the actual adc chip used.
    Author:
    Urs Graf
    • Field Detail

      • dev

        public FlinkSubDevice dev
        Handle to the subdevice within our flink device
    • Constructor Detail

      • FlinkADC

        public FlinkADC​(FlinkSubDevice dev)
        Creates a ADC subdevice.
        Parameters:
        dev - handle to the subdevice
    • Method Detail

      • getResolution

        public int getResolution()
        Reads the resolution field of the subdevice. The field denotes the number of resolvable steps, e.g. a 12 bit converter delivers 4096 steps.
        Returns:
        number of resolvable steps
      • getValue

        public int getValue​(int channel)
        Reads the digital value of a channel. Channel number must be smaller than the total number of channels.
        Parameters:
        channel - channel number
        Returns:
        digital value