core

## Class Frame

- java.lang.Object
- - core.Frame

- Direct Known Subclasses:
    FrameA, FrameB

      public abstract class Frame
      extends java.lang.Object

  Base class for all Frames.
  Author:
    David Hudec (dwdization@gmail.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.Map<FieldType,Field>` | `fields`
    `protected Mode` | `mode`
    `protected java.util.List<java.util.Map<DataField,CRCField>>` | `optionalBlocks`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Frame()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract java.util.List<Field>` | `construct()` Calculates all available fields and calls getBytes() on them.
    `AField` | `getAField()`
    `abstract java.util.List<Field>` | `getBlock1Fields()` Fetches fields, belonging the block 1 of this frame
    `abstract java.util.List<Field>` | `getBlock2Fields()` Fetches fields, belonging the block 2 of this frame
    `java.util.List<java.lang.Byte>` | `getBytes()` Calculates all available fields and calls getBytes() on them.
    `java.util.List<java.lang.Byte>` | `getBytes(java.util.List<Field> fields)` Calculates given fields and calls getBytes() on them.
    `(package private) java.util.List<java.lang.Byte>` | `getBytesByClass(java.util.List<java.lang.Class<? extends Field>> fieldTypes)` Calculates given fields and calls getBytes() on them.
    `CField` | `getCField()`
    `CIField` | `getCIField()`
    `CRCField` | `getCrcField(int block)`
    `DataField` | `getDataField()`
    `java.util.Map<FieldType,Field>` | `getFields()`
    `LField` | `getLField()`
    `MField` | `getMField()`
    `Mode` | `getMode()`
    `int` | `getOptionalBlocksCount()`
    `Ambles.Postamble` | `getPostamble()`
    `Ambles.Preamble` | `getPreamble()`
    `void` | `setAField(AField field)`
    `void` | `setCField(CField field)`
    `void` | `setCIField(CIField field)`
    `protected void` | `setDataField(DataField field)`
    `void` | `setMField(MField field)`
    `void` | `setMode(Mode mode)`
    `void` | `setPostamble(Ambles.Postamble postamble)`
    `void` | `setPreamble(Ambles.Preamble preamble)`
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### fields

          protected java.util.Map<FieldType,Field> fields

    - #### mode

          protected Mode mode

    - #### optionalBlocks

          protected java.util.List<java.util.Map<DataField,CRCField>> optionalBlocks

  - ### Constructor Detail

    - #### Frame

          public Frame()

  - ### Method Detail

    - #### construct

          public abstract java.util.List<Field> construct()

      Calculates all available fields and calls getBytes() on them.
      Returns:
        List of Fields in this Frame.

    - #### getAField

          public AField getAField()

    - #### getBlock1Fields

          public abstract java.util.List<Field> getBlock1Fields()

      Fetches fields, belonging the block 1 of this frame
      Returns:
        List of Fields within block 1 of this frame

    - #### getBlock2Fields

          public abstract java.util.List<Field> getBlock2Fields()

      Fetches fields, belonging the block 2 of this frame
      Returns:
        List of Fields within block 2 of this frame

    - #### getBytes

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

      Calculates all available fields and calls getBytes() on them.
      Returns:
        List of Bytes in this Frame.

    - #### getBytes

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

      Calculates given fields and calls getBytes() on them.
      Returns:
        List of Bytes in the given Fields within this Frame.

    - #### getBytesByClass

          java.util.List<java.lang.Byte> getBytesByClass(java.util.List<java.lang.Class<? extends Field>> fieldTypes)

      Calculates given fields and calls getBytes() on them.
      Returns:
        List of Bytes in the given Fields within this Frame.

    - #### getCField

          public CField getCField()

    - #### getCIField

          public CIField getCIField()

    - #### getCrcField

          public CRCField getCrcField(int block)

    - #### getDataField

          public DataField getDataField()

    - #### getFields

          public java.util.Map<FieldType,Field> getFields()

    - #### getLField

          public LField getLField()

    - #### getMField

          public MField getMField()

    - #### getMode

          public Mode getMode()

    - #### getOptionalBlocksCount

          public int getOptionalBlocksCount()

    - #### getPostamble

          public Ambles.Postamble getPostamble()

    - #### getPreamble

          public Ambles.Preamble getPreamble()

    - #### setAField

          public void setAField(AField field)

    - #### setCField

          public void setCField(CField field)

    - #### setCIField

          public void setCIField(CIField field)

    - #### setDataField

          protected void setDataField(DataField field)

    - #### setMField

          public void setMField(MField field)

    - #### setMode

          public void setMode(Mode mode)

    - #### setPostamble

          public void setPostamble(Ambles.Postamble postamble)

    - #### setPreamble

          public void setPreamble(Ambles.Preamble preamble)

    - #### toString

          public java.lang.String toString()

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