@Override
    public byte[] getBytes() {
        byte[] bytes = {(byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF};
        if (this.value != null) {
            long value = (long) (this.value * 1000.0d + 0.5d);
            for (int n = 0; n < 4; n++) {
                bytes[n] = (byte) ((value >> (n * 8)) & 0xFF);
            }
        }
        return bytes;
    }
Energy 32 characteristic

@param energy Energy in units of kilowatt-hours.
mesh/src/main/java/no/nordicsemi/android/mesh/sensorutils/Energy32.java