# Path: coolamqp/framing/base.py
# BASIC_TYPES = {u'bit': (None, None, "0", None),  # special case
#                u'octet': (1, 'B', "b'\\x00'", 1),
#                u'short': (2, 'H', "b'\\x00\\x00'", 2),
#                u'long': (4, 'I', "b'\\x00\\x00\\x00\\x00'", 4),
#                u'longlong': (
#                    8, 'Q', "b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'", 8),
#                u'timestamp': (
#                    8, 'Q', "b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'", 8),
#                u'table': (None, None, "b'\\x00\\x00\\x00\\x00'", 4),
#                # special case
#                u'longstr': (None, None, "b'\\x00\\x00\\x00\\x00'", 4),
#                # special case
#                u'shortstr': (None, None, "b'\\x00'", 1),  # special case
#                }
# 
# DYNAMIC_BASIC_TYPES = (u'table', u'longstr', u'shortstr')


import copy
import logging
import math
from compile_definitions.xml_fields import *
from coolamqp.framing.base import BASIC_TYPES, DYNAMIC_BASIC_TYPES
        _docs,
        ChildField('fields', 'field', Field),
        ChildField('response', 'response', lambda e: e.attrib['name']),
        ChildField('sent_by_client', 'chassis',
                   lambda e: e.attrib.get('name', '') == 'client',
                   post_exec=any),
        ChildField('sent_by_server', 'chassis',
                   lambda e: e.attrib.get('name', '') == 'server',
                   post_exec=any),
        ChildField('constant', 'field', lambda e: Field(e).reserved,
                   post_exec=all)
    ]

    def get_static_body(self):  # only arguments part
        body = []
        bits = 0
        for field in self.fields:

            if bits > 0 and field.basic_type != 'bit':
                body.append(b'\x00' * math.ceil(bits / 8))
                bits = 0

            if field.basic_type == 'bit':
                bits += 1
            else:
                body.append(eval(BASIC_TYPES[field.basic_type][2]))
        return b''.join(body)

    def is_static(self, domain_to_type=None):  # is size constant?
        return not any(

# Path: coolamqp/framing/base.py
# BASIC_TYPES = {u'bit': (None, None, "0", None),  # special case
#                u'octet': (1, 'B', "b'\\x00'", 1),
#                u'short': (2, 'H', "b'\\x00\\x00'", 2),
#                u'long': (4, 'I', "b'\\x00\\x00\\x00\\x00'", 4),
#                u'longlong': (
#                    8, 'Q', "b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'", 8),
#                u'timestamp': (
#                    8, 'Q', "b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'", 8),
#                u'table': (None, None, "b'\\x00\\x00\\x00\\x00'", 4),
#                # special case
#                u'longstr': (None, None, "b'\\x00\\x00\\x00\\x00'", 4),
#                # special case
#                u'shortstr': (None, None, "b'\\x00'", 1),  # special case
#                }
# 
# DYNAMIC_BASIC_TYPES = (u'table', u'longstr', u'shortstr')


# Path: compile_definitions/xml_tags.py
import copy
import logging
import math
from compile_definitions.xml_fields import *
from coolamqp.framing.base import BASIC_TYPES, DYNAMIC_BASIC_TYPES

        _docs,
        ChildField('fields', 'field', Field),
        ChildField('response', 'response', lambda e: e.attrib['name']),
        ChildField('sent_by_client', 'chassis',
                   lambda e: e.attrib.get('name', '') == 'client',
                   post_exec=any),
        ChildField('sent_by_server', 'chassis',
                   lambda e: e.attrib.get('name', '') == 'server',
                   post_exec=any),
        ChildField('constant', 'field', lambda e: Field(e).reserved,
                   post_exec=all)
    ]

    def get_static_body(self):  # only arguments part
        body = []
        bits = 0
        for field in self.fields:

            if bits > 0 and field.basic_type != 'bit':
                body.append(b'\x00' * math.ceil(bits / 8))
                bits = 0

            if field.basic_type == 'bit':
                bits += 1
            else:
                body.append(eval(BASIC_TYPES[field.basic_type][2]))
        return b''.join(body)

    def is_static(self, domain_to_type=None):  # is size constant?
        return not any(

            field.basic_type in DYNAMIC_BASIC_TYPES for field in self.fields)