def check_rule_fragmentation(self, rule):
    ' fragmentation rule check '
    if ((not ('fragmentation' in rule)) or ('compression' in rule)):
        raise ValueError('{} Invalid rule'.format(self._nameRule(rule)))
    if ('fragmentation' in rule):
        fragRule = rule['fragmentation']
        if (not ('FRMode' in fragRule)):
            raise ValueError('{} Fragmentation mode must be specified'.format(self._nameRule(rule)))
        mode = fragRule['FRMode']
        if (not (mode in ('noAck', 'ackAlways', 'ackOnError'))):
            raise ValueError('{} Unknown fragmentation mode'.format(self._nameRule(rule)))
        if (not ('FRModeProfile' in fragRule)):
            fragRule['FRModeProfile'] = {}
        profile = fragRule['FRModeProfile']
        if (not ('dtagSize' in profile)):
            profile['dtagSize'] = 0
        if (not ('WSize' in profile)):
            if (mode == 'noAck'):
                profile['WSize'] = 0
            elif (mode == 'ackAlways'):
                profile['WSize'] = 1
            elif (mode == 'ackOnError'):
                profile['WSize'] = 5
        if (not ('FCNSize' in profile)):
            if (mode == 'noAck'):
                profile['FCNSize'] = 1
            elif (mode == 'ackAlways'):
                profile['FCNSize'] = 3
            elif (mode == 'ackOnError'):
                profile['FCNSize'] = 3
        if ('windowSize' in profile):
            if ((profile['windowSize'] > ((1 << profile['FCNSize']) - 1)) or (profile['windowSize'] < 0)):
                raise ValueError('{} illegal windowSize'.format(self._nameRule(rule)))
        else:
            profile['windowSize'] = ((1 << profile['FCNSize']) - 1)
        if (mode == 'ackOnError'):
            if (not ('ackBehavior' in profile)):
                raise ValueError('Ack on error behavior must be specified (afterAll1 or afterAll0)')
            if (not ('tileSize' in profile)):
                profile['tileSize'] = 64
fragmentation rule check
def check_rule_fragmentation(self, rule):
    '  '
    if ((not ('fragmentation' in rule)) or ('compression' in rule)):
        raise ValueError('{} Invalid rule'.format(self._nameRule(rule)))
    if ('fragmentation' in rule):
        fragRule = rule['fragmentation']
        if (not ('FRMode' in fragRule)):
            raise ValueError('{} Fragmentation mode must be specified'.format(self._nameRule(rule)))
        mode = fragRule['FRMode']
        if (not (mode in ('noAck', 'ackAlways', 'ackOnError'))):
            raise ValueError('{} Unknown fragmentation mode'.format(self._nameRule(rule)))
        if (not ('FRModeProfile' in fragRule)):
            fragRule['FRModeProfile'] = {}
        profile = fragRule['FRModeProfile']
        if (not ('dtagSize' in profile)):
            profile['dtagSize'] = 0
        if (not ('WSize' in profile)):
            if (mode == 'noAck'):
                profile['WSize'] = 0
            elif (mode == 'ackAlways'):
                profile['WSize'] = 1
            elif (mode == 'ackOnError'):
                profile['WSize'] = 5
        if (not ('FCNSize' in profile)):
            if (mode == 'noAck'):
                profile['FCNSize'] = 1
            elif (mode == 'ackAlways'):
                profile['FCNSize'] = 3
            elif (mode == 'ackOnError'):
                profile['FCNSize'] = 3
        if ('windowSize' in profile):
            if ((profile['windowSize'] > ((1 << profile['FCNSize']) - 1)) or (profile['windowSize'] < 0)):
                raise ValueError('{} illegal windowSize'.format(self._nameRule(rule)))
        else:
            profile['windowSize'] = ((1 << profile['FCNSize']) - 1)
        if (mode == 'ackOnError'):
            if (not ('ackBehavior' in profile)):
                raise ValueError('Ack on error behavior must be specified (afterAll1 or afterAll0)')
            if (not ('tileSize' in profile)):
                profile['tileSize'] = 64