New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is it possible to instantiate multiple Elevators classes, using the same elevator.hpp and .cpp? #35
Labels
Comments
duplicate of #3 |
Hi Alex,
Thanks for your reply. The multiple switches make sense at compile time.
But how do I declare all those 'defectiveswitches' at runtime?
FSM_INITIAL_STATE(DefectiveSwitch<2>, Off<2> )
I would like to use this for a warning system (and based on the user input
the warnings will move to different states). However, at the start I
wouldn't know how many warnings would I recieve. I could recieve 1000s or
more warnings as the system runs/continues or none at all.
Appreciate your help with this.
Thanks.
Kind regards,
Husnain Malik
…On Tuesday, July 5, 2022, Axel Burri ***@***.***> wrote:
Closed #35 <#35> as completed.
—
Reply to this email directly, view it on GitHub
<#35 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AU4QRYFJR3LXKQSVTOPIUYLVSM3NHANCNFSM52SGZDXQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Or,
If somehow I wrap the state machine's struct/class (i.e. warning),
struct warning : tinyfsm::fsm<warning>
, in another class 'like MyWarning'
And then create multiple instances of MyWarning class. Would that create
multiple MyWarnings, each containing a seperate tinyfsm's 'warning state
machine'?
Or since everything is static, multiple Mywarning instances would all be
using one tinyfsm's warning state machine?
Thanks
…On Tuesday, July 5, 2022, Husnain Malik ***@***.***> wrote:
Hi Alex,
Thanks for your reply. The multiple switches make sense at compile time.
But how do I declare all those 'defectiveswitches' at runtime?
FSM_INITIAL_STATE(DefectiveSwitch<2>, Off<2> )
I would like to use this for a warning system (and based on the user input
the warnings will move to different states). However, at the start I
wouldn't know how many warnings would I recieve. I could recieve 1000s or
more warnings as the system runs/continues or none at all.
Appreciate your help with this.
Thanks.
Kind regards,
Husnain Malik
On Tuesday, July 5, 2022, Axel Burri ***@***.***> wrote:
> Closed #35 <#35> as completed.
>
> —
> Reply to this email directly, view it on GitHub
> <#35 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AU4QRYFJR3LXKQSVTOPIUYLVSM3NHANCNFSM52SGZDXQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
is it possible to instantiate multiple Elevators classes, using the same elevator.hpp and .cpp? if so, how?
Thanks
The text was updated successfully, but these errors were encountered: