# Module `ammosreader.AmmosIFDataBody`

I provide an AMMOS data body for IF data.

I manage multiple IF data blocks

Expand source code

    """
    I provide an AMMOS data body for IF data.

    I manage multiple IF data blocks
    """

    class AmmosIFDataBody:
        """I implement an AMMOS data body for IF data."""
        def __init__(self, data_blocks=None):
            if data_blocks is None:
                self.__data_blocks = []
            else:
                self.__data_blocks = data_blocks

        @property
        def data_blocks(self):
            return self.__data_blocks

        def add_data_block(self, a_data_block):
            self.__data_blocks.append(a_data_block)

        @property
        def payload(self):
            return b"".join([each.payload for each in self.data_blocks])

## Classes

`class AmmosIFDataBody (data_blocks=None)`

  I implement an AMMOS data body for IF data.

  Expand source code

      class AmmosIFDataBody:
          """I implement an AMMOS data body for IF data."""
          def __init__(self, data_blocks=None):
              if data_blocks is None:
                  self.__data_blocks = []
              else:
                  self.__data_blocks = data_blocks

          @property
          def data_blocks(self):
              return self.__data_blocks

          def add_data_block(self, a_data_block):
              self.__data_blocks.append(a_data_block)

          @property
          def payload(self):
              return b"".join([each.payload for each in self.data_blocks])

  ### Instance variables

  `var data_blocks`
    Expand source code

        @property
        def data_blocks(self):
            return self.__data_blocks

  `var payload`
    Expand source code

        @property
        def payload(self):
            return b"".join([each.payload for each in self.data_blocks])

  ### Methods

  `def add_data_block(self, a_data_block)`
    Expand source code

        def add_data_block(self, a_data_block):
            self.__data_blocks.append(a_data_block)