Skip to content

The generated C header file of derived types of Struct and Enum types are not right #14

Description

@dreamclass

PLC Code:

Type
BoolStruct_A : Struct
BOOL_A : BOOL;
BoolArray_A: ARRAY [0..2] OF BOOL;
End_Struct;
End_Type

Type MyBoolStruct : BoolStruct_A; END_TYPE

In generated C code:
__DECLARE_STRUCT_TYPE(MYBOOLSTRUCT,
BOOLSTRUCT)

which should be:
__DECLARE_DERIVED_TYPE(MYBOOLSTRUCT, BOOLSTRUCT)

There is a similar issue for the derived type of a Enum type. The generated C code of a derived type of Enum type looks like:
__DECLARE_ENUMERATED_TYPE(MY_MS,
MACHINESTATE)

which should be:
__DECLARE_DERIVED_TYPE(MY_MS, MACHINESTATE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions