{#-
 # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 # Copyright (C) 2021  UAVCAN Development Team  <uavcan.org>
 # This software is distributed under the terms of the MIT License.
-#}
//
// This is an AUTO-GENERATED UAVCAN DSDL data type implementation. Curious? See https://opencyphal.org.
// You shouldn't attempt to edit this file.
//
// Checking this file under version control is not recommended since metadata in this header will change for each
// build invocation. TODO: add --reproducible option to prevent any volatile metadata from being generated.
//
// Generator:     nunavut-{{ nunavut.version }} (serialization was {{ 'not ' * nunavut.support.omit }}enabled)
// Source file:   {{ T.source_file_path.as_posix() }}
// Generated at:  {{ now_utc }} UTC
// Is deprecated: {{ T.deprecated and 'yes' or 'no' }}
// Fixed port-ID: {{ T.fixed_port_id }}
// Full name:     {{ T.full_name }}
// Type Version:  {{ T.version.major }}.{{ T.version.minor }}
// Support
{%- if nunavut.support.omit %}
//     (support file generation disabled)
{%- else %}
//    Support Namespace: {{ nunavut.support.namespace }}
//    Support Version:   {{ nunavut.support.version }}
{%- endif %}
{%- for template_set in nunavut.template_sets %}
// Template Set ({{ template_set[0] }})
//    priority: {{ loop.index0 }}
//    package:  {{ template_set[1] }}
//    version:  {{ template_set[2] }}
{%- endfor %}
// Platform
{%- for key, value in nunavut.platform_version.items() %}
//     {{ key }}:  {{ value }}
{%- endfor %}
// Language Options
{%- for key, value in options.items() %}
//     {{ key }}:  {{ value }}
{%- endfor %}
// Uses Language Features
//     Uses std_variant: {%- ifuses "std_variant" -%}yes{%- else -%}no{%- endifuses -%}
{%- if T.deprecated and options.std | int < 14 %}
{#- Courtesy http://patorjk.com/software/taag/#p=display&f=Big&t=DEPRECATED #}
{#- [[deprecated]] becomes available in c++14 #}
//           _____  ______ _____  _____  ______ _____       _______ ______ _____
//          |  __ `|  ____|  __ `|  __ `|  ____/ ____|   /`|__   __|  ____|  __ `
//          | |  | | |__  | |__) | |__) | |__ | |       /  `  | |  | |__  | |  | |
//          | |  | |  __| |  ___/|  _  /|  __|| |      / /` ` | |  |  __| | |  | |
//          | |__| | |____| |    | | ` `| |___| |____ / ____ `| |  | |____| |__| |
//          |_____/|______|_|    |_|  `_`______`_____/_/    `_`_|  |______|_____/
//
// WARNING: this data type is deprecated and is nearing the end of its life cycle. Seek replacement.
{%- endif %}
#ifndef {{T.full_name | ln.c.macrofy}}_{{T.version.major}}_{{T.version.minor}}_HPP_INCLUDED
#define {{T.full_name | ln.c.macrofy}}_{{T.version.major}}_{{T.version.minor}}_HPP_INCLUDED
{%- for n in T | includes %}
{% if loop.first -%}

{# Add newline before first include #}
{% endif -%}
#include {{ n }}
{%- endfor %}

{{T.full_namespace | open_namespace}}
{%- if not nunavut.support.omit %}{% for key, value in options.items() %}
{% if loop.first -%}
// +-------------------------------------------------------------------------------------------------------------------+
// | LANGUAGE OPTION ASSERTIONS
// |    These static assertions ensure that the header is being used with
// | Nunavut C++ serialization support that is compatible with the language
// | options in effect when that support code was generated.
// +-------------------------------------------------------------------------------------------------------------------+
{% endif -%}
static_assert( nunavut::support::options::{{ key | id }} == {{ value | ln.c.to_static_assertion_value }},
              "{{ T.source_file_path.as_posix() }} "
              "is trying to use a serialization library that was compiled with "
              "different language options. This is dangerous and therefore not "
              "allowed." );
{%- endfor %}{% endif %}

{% block object %}{% endblock %}

{{T.full_namespace | close_namespace}}

#endif // {{T.full_name | ln.c.macrofy}}_{{T.version.major}}_{{T.version.minor}}_HPP_INCLUDED
