All notable changes to project will be documented in this file.
- fixed handling of xi:include tags during code generation (transition targets were getting double prefix which was breaking the build)
- STD dispatcher incorrectly schedules repeating timer event (#8)
- Race condition when starting timers with Qt Dispatcher (used invalid context for lambda function)
- Add libc version check for test_memory_footprint test application
- add activeStates argument to failedTransition callback
- optimize HSM::impl::isSubstateOf()
- overriding HSM and dispatcher callbacks didn't work
- made logHsmAction() thread-safe
- added new constructors for Variant class (initialization from vector, list and map)
- signifficantly improved performance of Variant container by removing unnecesary memory copy/reallocations
- debug traces were not fully disabled by default
- HierarchicalStateMachine::dispatcher() method
- support for enqued actions in dispatcher (see IHsmEventDispatcher::enqueueAction())
- deleting HSM instance while it still had pending events sometimes cased crash
- Fixed clang-tidy warnings
- Reduced complexity of some large methods in HsmImpl
- Moved private enums and structs from HsmImpl to a separate file
- Moved HistoryType, TransitionType, StateActionTrigger, StateAction enums from HierarchicalStateMachine class to HsmTypes.hpp (breaks interface)
- update Coverity tools to 2022.12.2
- Support for custom types in Variant container
- New Variant::clear() method
- New Variant::isEmpty() method
- Implemented bool,string to number conversion in toInt64(), toUInt64(), toDouble()
- Implemented string to bool conversion in toBool()
- Implemented vector,list to bytearray conversion in toByteArray()
- New Variant's methods getByteArray(), getVector(), getList(), getMap(), getPair() for type-safe fast access to internal data
- scxml2gen now generates timers if it finds events with "ON_TIMER_" prefix (before it generated timers only if they were used in state actions)
- Removed unsafe memory management in Variant class
- Variant's toByteArray(), toVector(), toList(), toMap(), toPair() methods replaced with type-safe versions
- Removed unsafe Variant::value() method
- Refactoring and coverage increase of unit tests for Variant class.
- VariantDict_t renamed to VariantMap_t
- Variant::Type::DICTIONARY renamed to Variant::Type::MAP
- Varaint::make() and constructor for PAIR type replaced with a template version
- Variant's logic for comparing double values
- Variant's logic for comparing numeric values of different types
- added version.hpp with library version
- improved behavior of Final States when working with Parallel states
- unit-tests refactoring (added BaseAsyncHsm class and removed AsyncHsm)
- improved async logic in unit-tests (multithreaded, parallel)
- Coverity issue in HierarchicalStateMachine::Impl::initialize (unhandled exception when calling shared_from_this(), but it was not possible due to Impl always being created as a shared pointer)
- rare dead-lock in HsmEventDispatcherSTD destructor
- wait_for() in std based ConditionVariable was not working correctly without stopWaiting callback
- isTimerRunning API
- added thread safety for Dispatcher timer API
- Deleting HSM before dispatcher was able to process all pending events resulted in a crash
- Deleting dispatcher resulted in undefined behavior
- Enabled arduino-lint in CI
- HSM now does not take ownership of dispatcher instance
- ArduinoIDE support
- scxml2gen: changed generated event, state, timer values from const to constexpr
- dispatcher timer APIs were not thread-safe
- Variant::toPair() method
- Variant::isPair() method
- calling HsmEventDispatcherGLibmm::start() multiple times is now safe
- calling transition() or similar API before initialize() or after release() caused a crash
- documentation for all public classes
- removed template from HierarchicalStateMachine and separated implementaion (BREAKS INTERFACE)
- state, event and timer enums were replaced with integer type (no extra work is needed if scxml generation is used)
- Arudino examples
- removed ArduinoLog dependency
- scxml2gen: generation of PlantUML diagrams was broken when state machine had conditional entry transition without event
- fixed FreeRTOS build
- timers support for std, glib dispatchers
- interrupts safety for Arduino dispatcher
- std dispatcher didn't wake up when events were emited from interrupts
- CriticalSection was renamed into InterruptsFreeSection
- added a new CriticalSection class
- applied clang format to all code
- scxml2gen: fixed MISRA warnings in template code
- scxml2gen: changed template to reduce stack consumption during HSM initialization on Arduino
- interrupts support for std, glib, glibmm and qt dispatchers
- updated build logic based on HSMBUILD_PLATFORM. "windows" and "posix" values added
- MISRA warnings
- lock issue in async tests (01-30)
- onEntry and onState callbacks of initial HSM state are not called
- scxml2gen: new generate_code and generate_diagram API for usage from Python scripts
- change getStateName, getEventName to be const
- scxml2gen: generation of entry transitions with condition but without an event
- CI scripts and github actions
- PlatformIO build integration
- Arduino support
- upgraded gtest to 1.13.0
- unit tests description (states)
- scxml2gen: generation of self-transitions
- support for internal/external self-transitions
- improved handling of parent states:
- parent states are now kept active when activating substates
- parent state's enter/exit callbacks are called correctly during transitions
- hsmdebugger was not generating diagrams after update to scxml2gen api
- support for final states in scxml2gen
- install missing os headers after build
- timers support for Qt dispatcher
- support for Qt6
- bool type support in hsmcpp::variant (for compilers where bool is treated as int)
- build fix for hsm timers in FreeRTOS
- FreeRTOS support
- abstraction layer for platform specific features (threading)
- support for transitions from signals/interrupts (FreeRTOS)
- unit tests bringup for FreeRTOS
- hsm initialization
- fixed dispatcher test for Qt platform
- new API to interact with timers (start, stop, restart)
- support for final states & exit points (library only)
- scxml2gen is now correctly installed after build
- improved cmake and pkg-config usability
- added better CMake script examples
- fixed support for C++11
- incorrect code generation from scxml
- support for condition callbacks in entry transitions
- scxml2gen: multiple conditional entry transitions were not handled correctly
- new state action: transition. It makes possible go initiate HSM transitions from within HSM.
- new Variant constructors
- Variant unit-tests (basic)
- recursive lock in GLib base dispatcher
- support for vector and list types to Variant (VariantVector_t, VariantList_t)
- deadlock in GLib dispatcher
- fixed build with enabled traces
- Variant::toMap()
- Variant::isMap()
- improved dispatcher emit logic when used with multiple HSM instances
- fixed 05_timers_generated example
- added posibility to set expected condition value for transitions
- improved internal HSM traces
- Variant::make to convert std::map to VariantMap_t
- improve VariantMap_t to accept Variant as a key
- callback for notifications about failed transitions
- timers support to hsmcpp
- timers support in GLibmm dispatcher
- scxml2gen: support of timers
- scxml2gen: improve state description format when generating plantuml diagram
- hsmdebugger: support of timers
- added namespace for hsmcpp
- BYTEARRAY type to Variant
- fix build issue related with no default constructor for TransitionInfo
- fix build warnings
- renamed trace macroses to avoid potential name conflicts
- memory footprint test
- add new template to use hsmcpp directly from GitHub
- diagrams for wiki (history)
- fix build script to explicitly use python 3
- fix variables export
- support for history states in scxml2gen
- example for history usage
- generateHsmDiagram() CMake function
- hsmdebugger: selecting jar file for plantuml wasn't working on Ubuntu
- support for history states (not supported in generator yet)
- handle scenario when initial state of HSM has substates (from now on initialize() API must be called after defining HSM structure)
- HSMBUILD_DEBUGGING build option
- diagrams for wiki
- crash in hsmdebugger while quickly switching frames
- support for Windows build
- simple build scripts
- scxml2gen: added support of Python 3 versions before 3.8 (due to a bug in XML parser)
- hsmdebugger: app icon
- hsmdebugger: setting to set plantuml path
- hsmdebugger: startup scripts for Windows and Linux
- hsmdebugger: Windows support
- hsmdebugger: search frames feature
- hsmdebugger: settings
- hsmdebugger: caching of generated images
- crash caused by mistake in enableHsmDebugging()
- add configurable hsm dump path
- scxml2gen: add support to blocks generation
- scxml2gen: update template
- scxml2gen: add generation of getStateName(), getEventName() functions
- hsmdebugger: add recent files
- examples: simplify 03_debugging
- initial version of hsmdebugger
- support for parallel states and transitions
- scxml2gen: support for parallel states and transitions
- support for conditional entrypoints in states
- scxml2gen: support for include of external files
- scxml2gen: PlantUML state diagrams generator (from SCXML)
- scxml2gen: support for uppercase generator variables in templates
- SCXML based code generator
- CMake function to use code generation from CMakeLists
- Example of generator usage (02_generated)
- Qt based event dispatcher
- Qt based example
- improve log macroses
- rename emit() -> emitEvent() in IHsmEventDispatcher (due to name collision with Qt)
- cmake templates showing how to include hsmcpp in a project
- new examples
- HsmEventDispatcherSTD::join()
- HsmEventDispatcherSTD::stop()
- improved build configuration
- rename build options: HSMBUILD_VERBOSE, HSMBUILD_STRUCTURE_VALIDATION, HSMBUILD_THREAD_SAFETY, HSMBUILD_DISPATCHER_GLIB, HSMBUILD_DISPATCHER_GLIBMM, HSMBUILD_DISPATCHER_STD, HSMBUILD_TESTS, HSMBUILD_EXAMPLES
- dispatchers are now compiled into separate modules (with own pkg-config files)
- examples and tests are compiled based on enabled dispatchers
- move pkg-config templates to a subfolder (/pkgconfig)
- glib based event dispatcher
- reduce output from gtests
- improve gtest CMakeLists
- improve thread safety in all available dispatchers
- assigning same Variant object to itself
- move dispatchers creation to main thread in gtests
- new CMake build option: DISPATCHER_GLIBMM
- add timeout to sync transitions
- add transitionSync() API for convenience
- remove HsmHandlerClass from HierarchicalStateMachine class template parameters
- rename HsmEventDispatcherGLib -> HsmEventDispatcherGLibmm
- thread safety for HSM
- New CMake build options: THREAD_SAFETY
- std::thread based event dispatcher
- Dispatchers should now be set using initialize() methond of HSM. If dispatcher is not running yet it will be automatically started.
- Fix a race-condition bug in AsyncHsm (unittests).
- New CMake build options: DISPATCHER_STD, BUILD_TESTS, BUILD_EXAMPLES
- Unittests are now compiled into two separate binaries: GLib and STD based.
- Support for custom event dispatchers. Allows integration of HSM with any event dispatching mechanism used on the project.
- GLibmm event dispatcher
- Remov unnecessary event emit during transition
- CMake build options: VERBOSE, STRUCTURE_VALIDATION, DISPATCHER_GLIB
- Support for substate entry points
- Conditional transitions
- Lambda functors can now be used as callbacks
- Initial commit of HSMCPP. This version is usable, but requires some code cleanup.