Skip to content

Commit

Permalink
Merge pull request #329 from quasar-team/OPCUA-3228-handle-device-log…
Browse files Browse the repository at this point in the history
…ic-children-with-no-device-logic-parent-classes

modified template to create compiling code in the case that a devicel…
  • Loading branch information
parasxos authored Oct 24, 2024
2 parents 1d2aff9 + 312c300 commit 2625506
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Device/templates/designToDeviceBaseHeader.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
{# Piotr Nikiel <piotr@nikiel.info> #}

{% macro get_parent_struct(class_name) %}
{% set parent = designInspector.get_parent(class_name) %}
{% if parent == None -%}
struct{/*No exact Parent of the class*/}
{%- else -%}
{% set parent_class_name = designInspector.get_parent(class_name) %}
{%- if parent_class_name != None and designInspector.class_has_legit_device_parent(parent_class_name) -%}
D{{parent}}
{%- else -%}
struct{/*No Device Logic for parent {{parent_class_name}} of {{class_name}}*/}
{%- endif -%}
{% endmacro %}

Expand Down

0 comments on commit 2625506

Please sign in to comment.