Closed rherrmannr closed 4 years ago
By using the IdentifierSettings feature, the iface names disappear in the generated C code. Operations are affected.
Define an interface like this:
interface named: operation someOp()
results the following prototype in the required header:
extern void myXsmIfaceNamed_someOp(const MyXsm* handle);
Turning on the IdentifierSettings feature like this:
GeneratorModel for yakindu::c { statechart myXsm { feature Outlet { targetProject = "test" targetFolder = "src-gen" libraryTargetFolder = "src" } feature IdentifierSettings { moduleName = "MyXsm_SM" statemachinePrefix = "MyXsm_SM" separator = "_" } } }
results this function prototype:
extern void MyXsm_SM_someOp(const MyXsm_SM* handle);
where the name of the iface named is missing.
named
However, by defining an operation with the same name in another unnamed iface like this:
interface: operation someOp() interface named: operation someOp()
results:
extern void myXsmIface_someOp(const MyXsm* handle); extern void myXsmIfaceNamed_someOp(const MyXsm* handle);
The generated functions should "stable" and not change by adding operations in different interfaces.
This was introduced with https://github.com/Yakindu/statecharts/issues/1239
The easiest way is always using the iface name. Thus, there will be no duplicate names.
By using the IdentifierSettings feature, the iface names disappear in the generated C code. Operations are affected.
Define an interface like this:
results the following prototype in the required header:
Turning on the IdentifierSettings feature like this:
results this function prototype:
where the name of the iface
named
is missing.However, by defining an operation with the same name in another unnamed iface like this:
results:
The generated functions should "stable" and not change by adding operations in different interfaces.