7a903361e6
derived from: https://github.com/Zaretto/Emesary/tree/master/src/Emesary/EmesaryC++ This is a similar implementation to that in Nasal; currently this is only for use in C++ modules as there is no Nasal interface - however this is something that may be added later. The basic premise of the Emesary messaging system is to allow the decoupled operation of the various components that comprise any system - usually within the same process. The basic unit of communication is a Notification, which is passed around to any and or all objects that implement the IReceive interface (pure virtual class). Using Interfaces and ihneritance it is possible to pass around Notifications that have special meanings to certain objects and allow them to perform the appropriate function. Notifications are created and sent via a call to NotifyAll. Any object within the system can inherit from IReceive and register itself with a Transmitter to receive all notifications that are sent out. The underlying concept is that one part of a system knows that something needs to be done without needing to know how to do it. The part of the system that needs something done simply creates a notification and sends it out. Once received by the part of the system that is capable of performing the requested Notification the relevant actions will be carried out and a status of OK or Finished returned. The return code from the Receive method must follow the guidlines as follows: If a notification is not recognised in the recipient must return ReceiptStatusNotProcessed. Normally a recipient will return ReceiptStatusOK, sometimes ReceiptStatusFail to indicate that the recipient could not properly process the notification. The overall result of a call to NotifyAll is a composite of the results of each individual recipient's return value; and generally OK or Fail. It is acceptable to use the return code to ascertain success or failure and take appropriate action. It is generally recommended that more detail specific to the particular purpose be included within the Notification to allow more control. Notifications can be modified during processing to permit a multistage process; however this needs to be designed correctly. * ReceiptStatusOK : Notification processed fine by Receive, transmitter continues with next recipient * ReceiptStatusFail : Notification processed but failed, transmitter continues with next recipient * ReceiptStatusAbort : Notification processed and the receive method declares a fatal error; the transmitter will stop notifying recipients * ReceiptStatusFinished : Notification processed and the recipient declares that the processing is completed, the transmitter will stop notifying recipients * ReceiptStatusNotProcessed : receive method does not recognise the notification These status are for later implmentation. * ReceiptStatusPending : (future ues); notification been sent but the return status cannot be determined as it has been queued for later processing, transmitter continues with next recipient * ReceiptStatusPendingFinished : Message has been definitively handled but the return value cannot be determined. the transmitter will stop notifying recipients |
||
---|---|---|
3rdparty | ||
CMakeModules | ||
simgear | ||
.gitignore | ||
AUTHORS | ||
ChangeLog | ||
CMakeLists.txt | ||
COPYING | ||
Doxyfile | ||
DoxygenMain.cxx | ||
INSTALL | ||
NEWS | ||
README | ||
README.cmake | ||
README.OSG | ||
README.sound | ||
README.zlib | ||
SimGearConfig.cmake.in | ||
Thanks | ||
version |
SimGear - Simulator Construction Tools ====================================== http://www.flightgear.org SimGear is a set of open-source libraries designed to be used as building blocks for quickly assembling 3d simulations, games, and visualization applications. SimGear is developed by the FlightGear project and also provides the base for the FlightGear Flight Simulator. Source code for SimGear is released under the GNU Library General Public License (LGPL) - see COPYING for license details. See INSTALL file for help on building SimGear.