2022-10-16 19:24:37 +00:00
|
|
|
{{ constants.GPL2_HEADER_SH_LIKE }}
|
|
|
|
{{ constants.GENERATED_HEADER_SH_LIKE }}
|
2022-07-17 22:04:35 +00:00
|
|
|
class XAPRouteError(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2022-07-17 21:02:18 +00:00
|
|
|
class XAPRoutes():
|
2023-03-06 19:56:18 +00:00
|
|
|
{% for id, route in xap.routes | dictsort %}
|
|
|
|
{% if route.routes %}
|
2022-07-17 21:02:18 +00:00
|
|
|
# {{route.define}}
|
2023-03-06 19:56:18 +00:00
|
|
|
{% for subid, subroute in route.routes | dictsort %}
|
2022-07-17 21:02:18 +00:00
|
|
|
{{route.define}}_{{subroute.define}} = b'\x{{ '%02d' % id|int(base=16) }}\x{{ '%02d' % subid|int(base=16) }}'
|
2023-03-06 19:56:18 +00:00
|
|
|
{% if subroute.routes %}
|
|
|
|
{% for subsubid, subsubroute in subroute.routes | dictsort %}
|
2022-09-26 00:09:15 +00:00
|
|
|
{{route.define}}_{{subroute.define}}_{{subsubroute.define}} = b'\x{{ '%02d' % id|int(base=16) }}\x{{ '%02d' % subid|int(base=16) }}\x{{ '%02d' % subsubid|int(base=16) }}'
|
2023-03-06 19:56:18 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
# noqa: W391
|