java.lang.Object
com.cumulocity.microservice.customdecoders.api.util.ValueTranslator

public class ValueTranslator extends Object
  • Constructor Details

    • ValueTranslator

      public ValueTranslator()
  • Method Details

    • translate

      public static double translate(byte[] raw, REGISTER_DATA_TYPE valueType, boolean signed, boolean reverseBitEndianness, BIT_BYTE_WORD_ORDER order, int multiplier, int divisor, int rightShift)
      Translates the given input byte array based on the provided options
      Parameters:
      raw - the input byte array
      valueType - Enum REGISTER_DATA_TYPE with Integer or Float
      signed - signed or unsigned mode
      reverseBitEndianness - flag for endian mode (Big/Little Endian)
      order - Bits, Bytes, Byte Word or Words
      multiplier - multiplier
      divisor - divisor
      rightShift - - rightShift
      Returns:
      double the translated output