Beispiel #1
0
    def __door_adr_sequences(PWState):
        result = ["{\n"]
        length = 0
        for path_id, door_id_sequence in enumerate(
                PWState.door_id_sequence_list):
            # NOTE: For all states in the path the 'from_state_index, to_state_index' can
            #       be determined, **except** for the FIRST state in the path. Thus for
            #       this state the 'door' cannot be determined in case that it is
            #       "not uniform_doors_f()".
            #
            #       However, the only occasion where the FIRST state in the path may be
            #       used is reload during the FIRST state. The reload adapts the positions
            #       and acceptances are not changed. So, we can use the common entry
            #       to the first state as a reference here.
            ## print "#DoorID, Adr:", [(door_id, Lng.ADDRESS_BY_DOOR_ID(door_id)) for door_id in door_id_sequence]
            result.append("        ")
            result.append("/* Padding */0x0, ")
            for door_id in door_id_sequence:
                PWState.entry.dial_db.mark_address_as_routed(
                    door_id.related_address)
                result.append(
                    "%s, " %
                    Lng.ADRESS_LABEL_REFERENCE(door_id.related_address))
            result.append("\n")

            length += len(door_id_sequence) + 1  # 1 padding element

        result.append("    }")
        return length, result
Beispiel #2
0
 def quex_label(DoorId, LastF):
     dial_db.mark_address_as_routed(DoorId.related_address)
     label_str = "%s" % Lng.ADRESS_LABEL_REFERENCE(DoorId.related_address)
     if not LastF: return "%s, " % label_str
     else: return "%s " % label_str