Permalink
Browse files

improve README, Makefiles for easier startup

  • Loading branch information...
1 parent f419c60 commit e8bc01a4e37af3821dc946fa681a59f0abad3273 @gleber committed Feb 27, 2012
View
4 Makefile
@@ -1,6 +1,10 @@
all:
./rebar compile
+deps:
+ ./rebar get-deps
+ ./rebar compile
+
clean:
./rebar clean
View
67 README.txt
@@ -8,66 +8,31 @@ eXAT Release 1.3 "EYE"
======================
-1. Unpacking and Compiling eXAT
+1. Compiling eXAT
- "cd" to your local dir where you want to install eXAT and issue the
-command:
-
- $ tar zxf <put the pathname of 'eXAT-1.3.tar.gz' here>
-
- A directory eXAT-1.2 will be created. Then issue the following commands
-
- $ cd eXAT-1.3
- $ gmake
+ $ make deps
+ $ make
eXAT now will be compiled.
-
2. Testing eXAT
- You can test eXAT by using the "pingagent" and "pingeragent" provided in
-the package (see sub-dir "src"). To this aim, use the following steps:
-
+ You can test eXAT by using the "simple_pingagent" and
+ "simple_pingeragent" provided in examples/simple. Do the following
+ steps:
a) Check that TCP ports 7779 and 7780 are not used in your PC;
- b) From the "eXAT-1.3" directory, launch the "pingagent" by using the
- following command (this will start the reponder agent):
-
- $ ./exat.sh platform1 -start pingagent
-
- The output will be as follows:
-
-(platform@csanto)1>
- __ __ __ _______
- \ \ / / / \ |__ __|
- ____ \ \ / / / /\ \ | |
- / __ \ \ \/ / | |__| | | |
- | ____/ / /\ \ | __ | | |
- | \____ / / \ \ | | | | | |
- \____/ /_/ \_\ |_| |_| |_|
-***** *****************
-* The erlang eXperimental Agent Tool -- Release 1.3.0-EYE *
-***********************************************************
-eXAT, an erlang eXperimental Agent Tool
-ERESYE, an ERlang Expert SYstem Engine
-Copyright (C) 2003-07 Corrado Santoro (csanto@diit.unict.it)
-Copyright (C) 2005-07 Francesca Gangemi (francesca@erlang-consulting.com)
-Copyright (C) 2011 Gleb Peregud (gleber.p@gmail.com)
-
-['HTTP-MTP'] MTP Started at port 7779
-['ONTOLOGY'] Started
-['AMS'] Staring AMS.
-['ONTOLOGY'] Registering Codec fipa_ontology_sl_codec for ontology FIPA-Agent-Management
-['AMS'] Staring Applications: {pingagent}
-
-
- c) From another shell, reach eXAT-1.3 dir and issue the following
-command (this will start the ping initiator agent):
- $ ./exat.sh plaftform2 -http_port 7780 -start pingeragent -destagent pingagent,http://localhost:7779/acc
+ b) $ cd examples/simple
+ $ make
+
+ b) From one shell issue
- Now you'll see, in both shells, the messages flowing from one agent to
-the other one.
+ $ ./run_first.sh
+
+ c) From another shell run:
---- END OF README --
+ $ ./run_second.sh
+ Now you'll see, in simple_pingerpinger shell, that he can receive
+messages from simple_pingagent.
View
8 examples/Makefile
@@ -2,11 +2,13 @@
# Makefile
#
+DIRS=$(shell echo */)
all:
- @(cd eresye;make)
+ for i in $(DIRS) ; do \
+ (cd $$i; make) ; \
+ done
clean:
+ @(cd simple;make clean)
@(cd eresye;make clean)
-
-
View
9 examples/eresye/Makefile
@@ -2,11 +2,7 @@
# Makefile
#
-EBIN=.
-
-include ../../Makefile.conf
-
-.SUFFIXES: .erl .beam
+BEAM=erlc
OBJS=\
auto.beam \
@@ -18,8 +14,6 @@ prodcons.beam \
sieve.beam
-
-
ERL_OBJS=$(foreach file, $(OBJS), $(file))
OTHER_OBJS=
@@ -38,4 +32,3 @@ clean:
clearbak:
@$(FIND) . -type f -name \*~ -exec rm {} \;
-
View
2 examples/jade/Makefile
@@ -0,0 +1,2 @@
+all:
+ (cd ../../../; erlc -pa exat/ebin/ -I exat/include/ -I exat/src/ exat/examples/jade/exat_agent.erl)
View
1 examples/jade/exat_agent.erl
@@ -2,6 +2,7 @@
-export([extends/0]).
-export([pattern/2,event/2,action/2,on_starting/1,
do_request/4,start/0]).
+
-include_lib("exat/include/acl.hrl").
-include_lib("exat/include/fipa_ontology.hrl").
View
2 examples/original_exat/Makefile
@@ -0,0 +1,2 @@
+all
+ erlc -pa ../../ebin/ -I ../../include/ -I ../../src/ pingagent.erl pingeragent.erl
View
2 examples/simple/simple_pingagent.erl
@@ -28,7 +28,9 @@ stop() ->
% agents callback
handle_acl(#aclmessage{speechact = 'QUERY-REF',
+ sender = Sender,
content = "ping"} = Msg, State) ->
+ io:format("Got ping query from ~p: ~p~n~nInforming that I'm alive!~n~n", [Sender, Msg]),
spawn(fun() -> acl:reply(Msg, 'INFORM', "alive") end),
{noreply, State};
View
4 examples/simple/simple_pingeragent.erl
@@ -28,7 +28,7 @@ stop() ->
% agents callback
handle_acl(#aclmessage{speechact = 'INFORM',
content = "alive"} = Msg, {_, DestAgent} = State) ->
- io:format("~p is alive!~n", [DestAgent]),
+ io:format("~p is alive, since I got: ~p~n~n", [DestAgent, Msg]),
{noreply, State};
handle_acl(#aclmessage{} = Msg, State) ->
@@ -39,7 +39,7 @@ handle_acl(#aclmessage{} = Msg, State) ->
%% gen_server callbacks
init(Name, [DestAgent]) ->
- timer:send_interval(5000, ping),
+ timer:send_interval(500, ping),
{ok, {Name, DestAgent}}.
handle_call(Call, _From, State) ->
View
2 rebar.config
@@ -1,5 +1,5 @@
{deps_dir, ["lib"]}.
%% {sub_dirs, ["examples/simple"]}.
-{erl_opts, [{src_dirs, ["examples/simple"]}]}.
+%% {erl_opts, [{src_dirs, ["examples/simple"]}]}.
{deps, [{misultin, "0.9-dev", {git, "https://github.com/gleber/misultin.git", "master"}}]}.
View
2 src/exat.app.src
@@ -19,7 +19,7 @@
%
{application, exat,
[{ mod, { exat, [] } },
- { vsn, "1.2.0" },
+ { vsn, "1.3.1" },
{ applications, [kernel, stdlib] },
{ description, "erlang eXperimental Agent Tool" },
{ registered, [] }

0 comments on commit e8bc01a

Please sign in to comment.