-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi people,
I hope you still there, mailing list isn't exactly active.
I get an assertion using visualizer when there is in_state_reaction in orthogonal state.
test.cpp:
#include <stdio.h> #include <boost/statechart/event.hpp> #include <boost/statechart/state_machine.hpp> #include <boost/statechart/simple_state.hpp> #include <boost/statechart/transition.hpp> #include <boost/statechart/in_state_reaction.hpp>
namespace sc = boost::statechart; namespace mpl = boost::mpl;
struct Active; struct Keyboard: sc::state_machine<Keyboard, Active> { };
struct EvSome: sc::event<EvSome>{};
struct NumLockOff; struct CapsLockOff;
struct Active: sc::simple_state<Active, Keyboard, mpl::list<NumLockOff, CapsLockOff> > { void somefunction(const EvSome&) { printf("Some function\n"); } };
struct NumLockOff: sc::simple_state<NumLockOff, Active::orthogonal<0> > { typedef mpl::list<> reactions; };
struct CapsLockOff: sc::simple_state<CapsLockOff, Active::orthogonal<1> > { typedef sc::in_state_reaction<EvSome, Active, &Active::somefunction> reactions; };
int main() { Keyboard a; a.initiate(); a.process_event(EvSome()); return 0; }
clang++ -Xclang -load -Xclang /home/slava/install/sources/boost-statechart-viewer/src/visualizer.so -Xclang -plugin -Xclang visualize-statechart test.cpp
... clang: visualizer.cpp:420: void Visitor::HandleReaction(const clang::Type*, clang::SourceLocation, clang::CXXRecordDecl*): Assertion `s' failed.
Any advice how to proceed?
With best regards, Slava
Hi Slava,
On Fri, Oct 11 2013, Viatcheslav.Sysoltsev wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi people,
I hope you still there, mailing list isn't exactly active.
Yes, we're still here :)
I get an assertion using visualizer when there is in_state_reaction in orthogonal state.
test.cpp:
#include <stdio.h> #include <boost/statechart/event.hpp> #include <boost/statechart/state_machine.hpp> #include <boost/statechart/simple_state.hpp> #include <boost/statechart/transition.hpp> #include <boost/statechart/in_state_reaction.hpp>
namespace sc = boost::statechart; namespace mpl = boost::mpl;
struct Active; struct Keyboard: sc::state_machine<Keyboard, Active> { };
struct EvSome: sc::event<EvSome>{};
struct NumLockOff; struct CapsLockOff;
struct Active: sc::simple_state<Active, Keyboard, mpl::list<NumLockOff, CapsLockOff> > { void somefunction(const EvSome&) { printf("Some function\n"); } };
struct NumLockOff: sc::simple_state<NumLockOff, Active::orthogonal<0> > { typedef mpl::list<> reactions; };
struct CapsLockOff: sc::simple_state<CapsLockOff, Active::orthogonal<1> > { typedef sc::in_state_reaction<EvSome, Active, &Active::somefunction> reactions; };
int main() { Keyboard a; a.initiate(); a.process_event(EvSome()); return 0; }
clang++ -Xclang -load -Xclang /home/slava/install/sources/boost-statechart-viewer/src/visualizer.so -Xclang -plugin -Xclang visualize-statechart test.cpp
... clang: visualizer.cpp:420: void Visitor::HandleReaction(const clang::Type*, clang::SourceLocation, clang::CXXRecordDecl*): Assertion `s' failed.
Any advice how to proceed?
I've looked into this and orthogonal states are not yet properly supported. It would be necessary to modify handleSimpleState() to handle mpl::list<> as initial state and modify the state machine model to support multiple initial states. I've tried to do this but I'd need more time, which I don't have right now. If you want to help here, I will support you.
Best regards, -Michal
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Michal
On 14.10.2013 19:30, Michal Sojka wrote:
Hi Slava,
I've looked into this and orthogonal states are not yet properly supported. It would be necessary to modify handleSimpleState() to handle mpl::list<> as initial state and modify the state machine model to support multiple initial states. I've tried to do this but I'd need more time, which I don't have right now. If you want to help here, I will support you.
Best regards, -Michal
Tried to hack on this, but get lost in clang AST traverse... I have to give up now, maybe return to it later. I let you know if I get some results.
Regards, Slava
On Tue, Oct 15 2013, Viatcheslav.Sysoltsev wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Michal
On 14.10.2013 19:30, Michal Sojka wrote:
Hi Slava,
I've looked into this and orthogonal states are not yet properly supported. It would be necessary to modify handleSimpleState() to handle mpl::list<> as initial state and modify the state machine model to support multiple initial states. I've tried to do this but I'd need more time, which I don't have right now. If you want to help here, I will support you.
Best regards, -Michal
Tried to hack on this, but get lost in clang AST traverse... I have to give up now, maybe return to it later. I let you know if I get some results.
Yes, that happend in my case as well :)
Thanks, -Michal
boost-statechart-viewer@rtime.felk.cvut.cz