-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
C++ State Machine Library #56
base: main
Are you sure you want to change the base?
Conversation
|
||
std::vector<std::reference_wrapper<std::type_info const>> types{std::ref(typeid(To))...}; | ||
for(auto const& type : types){ | ||
demangledName = abi::__cxa_demangle(type.get().name(), nullptr, nullptr, &status); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wtf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its c++filt... but in C++ 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unholy. Just have states carry a static member for the name...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unholy is harsh... 😢 but it is p cool 😎
Summary
Closes #34
What features did you add, bugs did you fix, etc?
Added a C++ State Machine Library
Did you add documentation to the wiki?
No
How was this code tested?
Created a test state machine with two states which had non-trivial constructors. They then transitioned between themselves. Made sure all of the static asserts caught invalid states. Updated visualizer.py to interface with multiple state publishers.
Did you test this in sim?
No, sim is not explicitly involved in a state machine
Did you test this on the rover?
No, the rover is not explicitly involved in a state machine
Did you add unit tests?
No