Show EOL distros:
Package Summary
Provides a signal/slot mechanism (in the same vein as qt sigslots, boost::signals etc. for intra-process communication. These include some improvements - they do not need a preprocessor, are fully type safe, allow for simple connections via a posix style string identifier and are multithread-safe.
- Author: Daniel Stonier
- License: BSD
- External website: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
- Source: svn https://embedded-control-library.googlecode.com/svn/trunk/ecl_core
Package Summary
Provides a signal/slot mechanism (in the same vein as qt sigslots, boost::signals etc. for intra-process communication. These include some improvements - they do not need a preprocessor, are fully type safe, allow for simple connections via a posix style string identifier and are multithread-safe.
- Author: Daniel Stonier
- License: BSD
- External website: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
- Source: svn https://embedded-control-library.googlecode.com/svn/tags/ecl_core/fuerte
Package Summary
Provides a signal/slot mechanism (in the same vein as qt sigslots, boost::signals etc for intra-process communication. These include some improvements - they do not need a preprocessor, are fully type safe, allow for simple connections via a posix style string identifier and are multithread-safe.
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: groovy-devel)
Package Summary
Provides a signal/slot mechanism (in the same vein as qt sigslots, boost::signals etc for intra-process communication. These include some improvements - they do not need a preprocessor, are fully type safe, allow for simple connections via a posix style string identifier and are multithread-safe.
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: hydro-devel)
Package Summary
Provides a signal/slot mechanism (in the same vein as qt sigslots, boost::signals etc for intra-process communication. These include some improvements - they do not need a preprocessor, are fully type safe, allow for simple connections via a posix style string identifier and are multithread-safe.
- Maintainer status: maintained
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.61-indigo-kinetic)
Package Summary
Provides a signal/slot mechanism (in the same vein as qt sigslots, boost::signals etc for intra-process communication. These include some improvements - they do not need a preprocessor, are fully type safe, allow for simple connections via a posix style string identifier and are multithread-safe.
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: devel)
Package Summary
Provides a signal/slot mechanism (in the same vein as qt sigslots, boost::signals etc for intra-process communication. These include some improvements - they do not need a preprocessor, are fully type safe, allow for simple connections via a posix style string identifier and are multithread-safe.
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.61-indigo-kinetic)
Package Summary
Provides a signal/slot mechanism (in the same vein as qt sigslots, boost::signals etc for intra-process communication. These include some improvements - they do not need a preprocessor, are fully type safe, allow for simple connections via a posix style string identifier and are multithread-safe.
- Maintainer status: maintained
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.62-melodic)
Package Summary
Provides a signal/slot mechanism (in the same vein as qt sigslots, boost::signals etc for intra-process communication. These include some improvements - they do not need a preprocessor, are fully type safe, allow for simple connections via a posix style string identifier and are multithread-safe.
- Maintainer status: maintained
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.62-noetic)
Contents
Overview
Signals and slots provide a means for intra-process communication. The classes here let you have a many-to-many relationship (unlike most event callback techniques), and also templatise the data transfer to allow the coder to customise the event data that is communicated from signal to slot. It also implements a few conditional (event) related classes.
Background - non-essential historical notes.
Comparisons - ecl_sigslots vs nodelets vs ecto.
Features
Lightweight - implements only the necessary features for practical usage.
Fully typesafe - signal-slot pairs must have the same type, loaded functions must also agree.
Convenient slot loading - global/static and member functions can be loaded with the same api.
Naming - can use posix style names to identify and perform convenient connections/disconnections.
Thread safe - slots can disconnect/self-destruct without worrying about segfaulting across threads.
Definitions
Signals
Anywhere that triggers an event requiring a callback to be executed can be implemented with a signal. These can be placed anywhere in your code and can be connected to one or many slots.
Slots
Anywhere that a callback function is required can be implemented with a slot. These can be placed anywhere in your code and are initialised with either a static (global) function, or a member function. Once initialised, they can be hooked up to a signal.
Message Data
The signal-slot pairs developed here only ever accept one template argument representing the data to be transmitted from signal to slot. It would be easy to extend this to more (aka SigSlot/Boost) but I have yet to find a need for it - if you wish multiple arguments, simply wrap up your data in a single struct/class. Conceptually, this makes the code more readable anyway.
The data class itself could be as simple as an error id or as complicated as the current state in a fsm. Note that both signal and slot must use the same type.
Compiling & Linking
Include the following at the top of any translation unit:
You will also need to link to ecl_sigslots.
Tutorials
Introduction to Sigslots - creating, connecting and triggering signals and slots.
Relaying Signals - relaying data from one signaller to the next.
Debugging Sigslots - tools to help debug sigslots problems.