You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MoonAgents is a Lua module for event-driven concurrent programming.
It is designed after the concurrency model of the
ITU-T Specification and Description Language (SDL) and provides functions for the implementation of systems composed of concurrent,
reactive and intercommunicating finite state machines ('agents').
MoonAgents runs on GNU/Linux and on Windows (MSYS2/MinGW) and requires
Lua (>=5.3).
(Note: MoonAgents is derived from LunaSDL, which it supersedes, and which is now discontinued. The major differences with LunaSDL are listed in the design notes document.)
Setup the build environment as described here, then:
$ git clone https://github.com/stetre/moonagents
$ cd moonagents
moonagents$ make
moonagents$ sudo make install
Examples
The example below creates an agent that gives the traditional salute with a little delay
(using a timer) and then stops.
Other examples can be found in the examples/ directory of this repo.
-- Hello World application - hello.lualocalmoonagents=require("moonagents")
-- Create the system agent, from the script 'agent.lua':localsystem=moonagents.create_system("HelloSystem","agent")
-- Enter the event loop:whilemoonagents.trigger() doend