Class BBED549

java.lang.Object
modbustcp.brainbox.BBED549

public class BBED549 extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • close

      public void close()
      Close the connection. Will need to build a new object to reopen the connection.
    • setInputRange

      public ModbusData setInputRange(int channel, int range) throws ModbusTCPException
      Throws:
      ModbusTCPException
    • readRawAnalogChannel

      public short readRawAnalogChannel(int channel) throws ModbusTCPException
      Throws:
      ModbusTCPException
    • readRawAnalogChannels

      public short[] readRawAnalogChannels(int firstChannel, int nChannels) throws ModbusTCPException
      Throws:
      ModbusTCPException
    • hexToEngineering

      public double[] hexToEngineering(int range, short[] data)
      convert integer data array to engineering units.
      Parameters:
      range - range on device, assumed the same for all channels.
      data - data array
      Returns:
      data in engineers units of Volts or Amps (not bothering with mV and mA - stick to SI)
    • hexToEngineering

      public static double hexToEngineering(int range, int data)
      convert integer data to engineering units.
      Parameters:
      range - range on device, assumed the same for all channels.
      data - data array
      Returns:
      data in engineers units of Volts or Amps (not bothering with mV and mA - stick to SI)
    • getBBRangeCode

      public static Integer getBBRangeCode(AnalogRangeData rangeData)
      Find the internal code that matches this rangeData.
      This is super inefficient, so don't call too often !
      Parameters:
      rangeData - PAMGaurd range data
      Returns:
      BB range code. or Null if the range not found
    • getRangeData

      public static AnalogRangeData getRangeData(int range)
      Convert one of the internally used range codes into a standard PAMGuard analog range.
      Parameters:
      range - BrainBox range code
      Returns:
      PAMGuard range object.
    • sayInputRange

      public static String sayInputRange(int rangeCode)