fields

## Class DataRecord

- java.lang.Object
- - fields.DataRecord

- All Implemented Interfaces:
    Field
  Direct Known Subclasses:
    EncryptedDataRecord

      public class DataRecord
      extends java.lang.Object
      implements Field

  Model for the WM-Bus Data record Keeps one DIF, one VIF, a list of DIFEs, a list of VIFEs and a list of Bytes for data (payload).
  Author:
    David Hudec (dwdization@gmail.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DataRecord.DataRecordHeaderBase` Base for DIFs, VIFs, DIFEs and VIFEs.
    `class` | `DataRecord.DIF` Model for the WM-Bus DIF.
    `class` | `DataRecord.DIFE` Model for the WM-Bus DIFE.
    `class` | `DataRecord.VIF` Model for the WM-Bus VIF.
    `class` | `DataRecord.VIFE` Model for the WM-Bus VIFE.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.List<java.lang.Byte>` | `data`
    `private DataRecord.DIF` | `dif`
    `private java.util.List<DataRecord.DIFE>` | `difes`
    `private DataRecord.VIF` | `vif`
    `private java.util.List<DataRecord.VIFE>` | `vifes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataRecord()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDIFE(DataRecord.DIFE dife)`
    `void` | `addVIFE(DataRecord.VIFE vife)`
    `void` | `fluctuate()` Randomly changes the value of this DataRecord's payload.
    `java.util.List<java.lang.Byte>` | `getBytes()` Fetches all parts of the field and constructs it into a List of Bytes by WM-Bus standard, MSB first.
    `java.util.List<java.lang.Byte>` | `getBytesInTxOrder()` Fetches all parts of the field and constructs it into a List of Bytes by WM-Bus standard, LSB first.
    `java.util.List<java.lang.Byte>` | `getData()`
    `DataRecord.DIF` | `getDif()`
    `java.util.List<DataRecord.DIFE>` | `getDIFEs()`
    `DataRecord.VIF` | `getVif()`
    `java.util.List<DataRecord.VIFE>` | `getVIFEs()`
    `void` | `setData(java.lang.Byte[] data)`
    `void` | `setDIF(DataRecord.DIF dif)`
    `void` | `setVIF(DataRecord.VIF vif)`
    `java.lang.String` | `toString()`
    `static boolean` | `validateData(java.lang.String data)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### data

          private java.util.List<java.lang.Byte> data

    - #### dif

          private DataRecord.DIF dif

    - #### difes

          private java.util.List<DataRecord.DIFE> difes

    - #### vif

          private DataRecord.VIF vif

    - #### vifes

          private java.util.List<DataRecord.VIFE> vifes

  - ### Constructor Detail

    - #### DataRecord

          public DataRecord()

  - ### Method Detail

    - #### addDIFE

          public final void addDIFE(DataRecord.DIFE dife)

    - #### addVIFE

          public final void addVIFE(DataRecord.VIFE vife)

    - #### fluctuate

          public final void fluctuate()

      Randomly changes the value of this DataRecord's payload. The actual difference the payload will suffer, as well as its polarity, is decided randomly in the range of (-0x40, 0x40).

    - #### getBytes

          public java.util.List<java.lang.Byte> getBytes()

      Description copied from interface: `Field`
      Fetches all parts of the field and constructs it into a List of Bytes by WM-Bus standard, MSB first.
      Specified by:
        `getBytes` in interface `Field`
      Returns:
        List of Bytes representing this field, MSB first

    - #### getBytesInTxOrder

          public java.util.List<java.lang.Byte> getBytesInTxOrder()

      Description copied from interface: `Field`
      Fetches all parts of the field and constructs it into a List of Bytes by WM-Bus standard, LSB first.
      Specified by:
        `getBytesInTxOrder` in interface `Field`
      Returns:
        List of Bytes representing this field, LSB first

    - #### getData

          public java.util.List<java.lang.Byte> getData()

    - #### getDif

          public DataRecord.DIF getDif()

    - #### getDIFEs

          public java.util.List<DataRecord.DIFE> getDIFEs()

    - #### getVif

          public DataRecord.VIF getVif()

    - #### getVIFEs

          public java.util.List<DataRecord.VIFE> getVIFEs()

    - #### setData

          public final void setData(java.lang.Byte[] data)

    - #### setDIF

          public final void setDIF(DataRecord.DIF dif)

    - #### setVIF

          public final void setVIF(DataRecord.VIF vif)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### validateData

          public static boolean validateData(java.lang.String data)