First, context: We're developing some applications using QP Framework from quantum leaps. QP is basically an event manager for state machines.
Our approach: Since we're using QP, our modules interact with events and signals (classes/structs and enums) except some very specific modules that interact by methods.
Problem: For those last modules, interfaces are easy, just a collection of all the public methods in said module, however, how about the others? Can we say an interface is a composition of other classes and enumerations?
Since the modules interact by sending/receiving events, both should know what kind of data packets (events) can travel through that interface.
Can we represent an interface like this? or should an interface only be a collection of methods?
edit 1:
Replying to the comments below, I don't want to say the interface had nested classes, but that the interface would define said classes so they could be used as events, but from your answers, seems using signals
would be a better approach. (The ADC:: prefix and the name of the interface are not the same, just some bad naming choices, as the package name was ADC and so was the interface)
edit 2:
From the comments and answers below, I had no knowledge of the signal
stereotype, so updating the question, I think it would become something like this?
This solves the classes and signals problem, however, the enum
remain...
My intention was to say the interface would define this keywords, i.e. the module that implements the interface, should define this enum
and their values.
Is this the correct approach?