Skip to content
This repository was archived by the owner on Jan 5, 2021. It is now read-only.
This repository was archived by the owner on Jan 5, 2021. It is now read-only.

Rework interface hierarchy #1489

Open
Open
@BeckmaR

Description

@BeckmaR

In the C++- and Java generators, the interfaces are somewhat weird.

C++

In the C++ generator, a TimedStatemachineInterface is generated additionally to the regular StatemachineInterface. While all statemachines inherit from StatemachineInterface, the timed ones also inherit from TimedStatemachineInterface - instead of TimedStatemachineInterface inheriting from StatemachineInterface. This makes it impossible to call runCycle() on a TimedStatemachineInterface instance, while in practice all TSI do have a runCycle.

Also, the TimedStatemachineInterface contains two different aspects - one are functions for the user of the statemachine to attach a TimerService to it, the other is the raiseTimeEvent that will be called by said TimerService.

Java

In Java, the function setTimer(ITimer timer) isn't mentioned in any interface at all. Even better.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions