Discussion:
[jade-develop] New To JADE
crq1
2014-02-19 17:37:03 UTC
Permalink
Hello, I am relatively new to JADE. I have been doing all the tutorials I can
find as well as other resources to learn. I was wondering if anyone had
experience accessing a data file locally (on same computer with JADE). I am
experimenting and would like to use JADE in a project. If you know material
that may help me, I would appreciate any input.

Chris Quesada



--
View this message in context: http://jade.17737.x6.nabble.com/New-To-JADE-tp5002430.html
Sent from the JADE - Dev mailing list archive at Nabble.com.
Walison Jose de Deus
2014-02-19 18:15:35 UTC
Permalink
Good afternoon. Anyone know if the JADE platform provides support for mobility on Android devices? If it is not possible to implement?
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140219/77488c33/attachment.html>
Caire Giovanni
2014-02-19 22:10:22 UTC
Permalink
Hi,

Personally I never tried it.
JadeAndroid provides support for launching a normal container by means of the jade.android.RuntimeService class --> the mobility API (Agent.doMove() ...) are supported.
However the Android VM requires an Android specific byte-code and, honestly speaking, I don't know the effects of loading a class that was compiled for a standard JVM.
If you are going to try I would be interested in having some feedback.

Bye,

Giovanni

Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di Walison Jose de Deus
Inviato: mercoled? 19 febbraio 2014 19:16
A: jade-develop at avalon.tilab.com
Oggetto: [jade-develop] Android mobility

Good afternoon. Anyone know if the JADE platform provides support for mobility on Android devices? If it is not possible to implement?
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140219/4a853976/attachment.html>
Walison Jose de Deus
2014-02-20 14:31:54 UTC
Permalink
Hi, developers

Giovanni

When I try to move an agent running on a normal to another container on an Android device container is returned the following error:

AM jade.core.mobility.AgentMobilityService$CommandSourceSink handleInformMoved
SEVERE: Destination BE-192.168.43.171_1099-1 does not exist or does not support mobility



I am using the following methods to create the container smartphone, and they work correctly:


public void startChat(final String nickname, final String host,
final String port,
final RuntimeCallback<AgentController> agentStartupCallback) {

final Properties profile = new Properties();
profile.setProperty(Profile.MAIN_HOST, host);
profile.setProperty(Profile.MAIN_PORT, port);
profile.setProperty(Profile.MAIN, Boolean.FALSE.toString());
profile.setProperty(Profile.JVM, Profile.ANDROID);

if (AndroidHelper.isEmulator()) {
// Emulator: this is needed to work with emulated devices
profile.setProperty(Profile.LOCAL_HOST, AndroidHelper.LOOPBACK);
} else {
profile.setProperty(Profile.LOCAL_HOST,
AndroidHelper.getLocalIPAddress());
}
// Emulator: this is not really needed on a real device
profile.setProperty(Profile.LOCAL_PORT, "2000");

if (microRuntimeServiceBinder == null) {
serviceConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className,
IBinder service) {
microRuntimeServiceBinder = (MicroRuntimeServiceBinder) service;
//logger.log(Level.INFO, "Gateway successfully bound to MicroRuntimeService");
startContainer(nickname, profile, agentStartupCallback);
};

public void onServiceDisconnected(ComponentName className) {
microRuntimeServiceBinder = null;
//logger.log(Level.INFO, "Gateway unbound from MicroRuntimeService");
}
};
//logger.log(Level.INFO, "Binding Gateway to MicroRuntimeService...");
bindService(new Intent(getApplicationContext(),
MicroRuntimeService.class), serviceConnection,
Context.BIND_AUTO_CREATE);
} else {
//logger.log(Level.INFO, "MicroRumtimeGateway already binded to service");
startContainer(nickname, profile, agentStartupCallback);
}
}

private void startContainer(final String nickname, Properties profile,
final RuntimeCallback<AgentController> agentStartupCallback) {
if (!MicroRuntime.isRunning()) {
microRuntimeServiceBinder.startAgentContainer(profile,
new RuntimeCallback<Void>() {
@Override
public void onSuccess(Void thisIsNull) {
// logger.log(Level.INFO, "Successfully start of the container...");
//startAgent(nickname, agentStartupCallback);
}

@Override
public void onFailure(Throwable throwable) {
//logger.log(Level.SEVERE, "Failed to start the container...");
}
});
} else {
//startAgent(nickname, agentStartupCallback);
}
}


However, my main idea is the possibility of moving an agent between containers that run on android devices, have you ever tried it? If not, think it's possible? I made some attempts using the code below and nothing happened, no error and also no displacement agent for the container "BE-192.168.43.171_1099-1"..

public void moveCont1(){
addBehaviour(new OneShotBehaviour(this) {


@Override
public void action() {
String nome = "BE-192.168.43.171_1099-1";
ContainerID dest = new ContainerID();
dest.setName(nome);

myAgent.doMove(dest);


}

});
}

Any help, opinions and advice are welcome.

Bye
Walison

















From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com; jade-develop at avalon.tilab.com
Date: Wed, 19 Feb 2014 23:10:22 +0100
Subject: R: [jade-develop] Android mobility









Hi,

Personally I never tried it.
JadeAndroid provides support for launching a normal container by means of the jade.android.RuntimeService class
? the mobility API (Agent.doMove() ...) are supported.

However the Android VM requires an Android specific byte-code and, honestly speaking, I don?t know the effects of loading a class that was compiled
for a standard JVM.
If you are going to try I would be interested in having some feedback.

Bye,

Giovanni



Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com]
Per conto di
Walison Jose de Deus

Inviato: mercoled? 19 febbraio 2014 19:16

A: jade-develop at avalon.tilab.com

Oggetto: [jade-develop] Android mobility




Good afternoon.
Anyone know if the
JADE platform provides support for
mobility on Android devices?
If it is
not possible to implement?

Thank you.








Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi
altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.

This e-mail and any attachments is confidential
and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender
by return e-mail, Thanks.

Rispetta l'ambiente. Non stampare questa mail se non ? necessario.






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140220/280932da/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo Ambiente_foglia2.jpg
Type: image/jpeg
Size: 677 bytes
Desc: not available
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140220/280932da/attachment-0001.jpg>
Caire Giovanni
2014-02-21 16:14:22 UTC
Permalink
Hi,

Since you are using the MicroRuntimeService, you are starting a "split-container" inside the Android device. A split-container (see the LEAP user guide or chapter 8 of the book Devloping Multi Agent Systems with JADE) is a special version of the JADE runtime designed for environments where there is limited connectivity and limited resources (which may be the case when dealing with mobile terminals), but DOES NOT support mobility. This is why in my previous eMail I told you to use the RuntimeServive (and not the MicroRuntimeService) that starts a normal container.

Bye,

Giovanni

Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di Walison Jose de Deus
Inviato: gioved? 20 febbraio 2014 15:32
A: jade-develop at avalon.tilab.com
Oggetto: Re: [jade-develop] R: Android mobility

Hi, developers

Giovanni

When I try to move an agent running on a normal to another container on an Android device container is returned the following error:

AM jade.core.mobility.AgentMobilityService$CommandSourceSink handleInformMoved
SEVERE: Destination BE-192.168.43.171_1099-1 does not exist or does not support mobility



I am using the following methods to create the container smartphone, and they work correctly:


public void startChat(final String nickname, final String host,
final String port,
final RuntimeCallback<AgentController> agentStartupCallback) {

final Properties profile = new Properties();
profile.setProperty(Profile.MAIN_HOST, host);
profile.setProperty(Profile.MAIN_PORT, port);
profile.setProperty(Profile.MAIN, Boolean.FALSE.toString());
profile.setProperty(Profile.JVM, Profile.ANDROID);

if (AndroidHelper.isEmulator()) {
// Emulator: this is needed to work with emulated devices
profile.setProperty(Profile.LOCAL_HOST, AndroidHelper.LOOPBACK);
} else {
profile.setProperty(Profile.LOCAL_HOST,
AndroidHelper.getLocalIPAddress());
}
// Emulator: this is not really needed on a real device
profile.setProperty(Profile.LOCAL_PORT, "2000");

if (microRuntimeServiceBinder == null) {
serviceConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className,
IBinder service) {
microRuntimeServiceBinder = (MicroRuntimeServiceBinder) service;
//logger.log(Level.INFO, "Gateway successfully bound to MicroRuntimeService");
startContainer(nickname, profile, agentStartupCallback);
};

public void onServiceDisconnected(ComponentName className) {
microRuntimeServiceBinder = null;
//logger.log(Level.INFO, "Gateway unbound from MicroRuntimeService");
}
};
//logger.log(Level.INFO, "Binding Gateway to MicroRuntimeService...");
bindService(new Intent(getApplicationContext(),
MicroRuntimeService.class), serviceConnection,
Context.BIND_AUTO_CREATE);
} else {
//logger.log(Level.INFO, "MicroRumtimeGateway already binded to service");
startContainer(nickname, profile, agentStartupCallback);
}
}

private void startContainer(final String nickname, Properties profile,
final RuntimeCallback<AgentController> agentStartupCallback) {
if (!MicroRuntime.isRunning()) {
microRuntimeServiceBinder.startAgentContainer(profile,
new RuntimeCallback<Void>() {
@Override
public void onSuccess(Void thisIsNull) {
// logger.log(Level.INFO, "Successfully start of the container...");
//startAgent(nickname, agentStartupCallback);
}

@Override
public void onFailure(Throwable throwable) {
//logger.log(Level.SEVERE, "Failed to start the container...");
}
});
} else {
//startAgent(nickname, agentStartupCallback);
}
}


However, my main idea is the possibility of moving an agent between containers that run on android devices, have you ever tried it? If not, think it's possible? I made some attempts using the code below and nothing happened, no error and also no displacement agent for the container "BE-192.168.43.171_1099-1"..

public void moveCont1(){
addBehaviour(new OneShotBehaviour(this) {


@Override
public void action() {
String nome = "BE-192.168.43.171_1099-1";
ContainerID dest = new ContainerID();
dest.setName(nome);

myAgent.doMove(dest);


}

});
}

Any help, opinions and advice are welcome.

Bye
Walison
















________________________________
From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com; jade-develop at avalon.tilab.com
Date: Wed, 19 Feb 2014 23:10:22 +0100
Subject: R: [jade-develop] Android mobility
Hi,

Personally I never tried it.
JadeAndroid provides support for launching a normal container by means of the jade.android.RuntimeService class --> the mobility API (Agent.doMove() ...) are supported.
However the Android VM requires an Android specific byte-code and, honestly speaking, I don't know the effects of loading a class that was compiled for a standard JVM.
If you are going to try I would be interested in having some feedback.

Bye,

Giovanni

Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di Walison Jose de Deus
Inviato: mercoled? 19 febbraio 2014 19:16
A: jade-develop at avalon.tilab.com
Oggetto: [jade-develop] Android mobility

Good afternoon. Anyone know if the JADE platform provides support for mobility on Android devices? If it is not possible to implement?
Thank you.
Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.
[cid:image001.gif at 01CF2F28.5D3D75E0]Rispetta l'ambiente. Non stampare questa mail se non ? necessario.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140221/751bbd3f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 677 bytes
Desc: image001.gif
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140221/751bbd3f/attachment-0001.gif>
Walison Jose de Deus
2014-02-25 13:59:34 UTC
Permalink
Hi,


Thanks for the clarification.
Unable to successfully
launch a normal container and an agent on an Android device using
RuntimeService class, as you indicated. Then, at test level, I tried
to move an agent of a normal container on a computer for the
container created in android device. But I had two problems, first
when getting out of the agent, which launched an exception of type
ClassNotFoundException and then a UID serial incompatibility between
classes. To solve such problems had to create an identical to that
implemented the mobile agent application in android which was
responsible for launching the main container on the device class. To
solve the problem of serial UID put the same serial UID for the two
classes, both in the android app as the agent m?vel.Resolvendo these
problems, managed to create the container in android device and move
the agent there, but when the agent moves to the container device
cycle execution is paralyzed, probably what you quoted about the
difference between bytecode in JVMs.

Now when I managed to
launch the container and an agent in android device using
RuntimeService had problems accessing the class that implements the
agent created through an interface. The problem is that when I used
to MicroRuntime class, used the getAgent (nameAgent). GetO2AInterface
(ChatClientInterface.class) method to access the methods of the agent
and its execution cycle in an Activity. Now I am unaware an
equivalent method in this class RuntimeService or other form which
allows me to access to the agent class methods, and need to access
the methods of the class of agent to perform for example, the method
of locomotion to another container. What happens is that the agent is
released, but performs no instruction implemented on your setup ()
method.

Do you know any other way to achieve that access to
methods or throw the agent?






public
void
iniciaContainerNormal(final
String nickname, final
String host,final
String port){


final
Profile profile = new
ProfileImpl();
profile.setParameter(Profile.MAIN_HOST,
host);
profile.setParameter(Profile.MAIN_PORT,
port);
//profile.setParameter(Profile.LOCAL_HOST,"192.168.43.171");
profile.setParameter(Profile.MAIN,
Boolean.FALSE.toString());
profile.setParameter(Profile.JVM,
Profile.ANDROID);

if
(AndroidHelper.isEmulator())
{
//
Emulator: this is needed to work with emulated devices

profile.setParameter(Profile.LOCAL_HOST,
AndroidHelper.LOOPBACK);

}
else
{
profile.setParameter(Profile.LOCAL_HOST,
AndroidHelper.getLocalIPAddress());

}
//
Emulator: this is not really needed on a real device

profile.setParameter(Profile.LOCAL_PORT,
"2000");
if
(sd ==
null)
{
serviceConnection
= new
ServiceConnection() {
public
void
onServiceConnected(ComponentName className,
IBinder
service) {
sd
= (RuntimeService) service;

startContainer(nickname,
profile,agentStartupCallback);
};



public
void
onServiceDisconnected(ComponentName className) {
sd
= null;

}


};

bindService(new
Intent(getApplicationContext(),
RuntimeService.class),
serviceConnection,
Context.BIND_AUTO_CREATE);
}
else
{

startContainer(nickname,
profile, agentStartupCallback);
}

}






private
void
startContainer(final
String nickname, Profile profile) {

sd.createAgentContainer(profile,
new
RuntimeCallback<AgentContainerHandler>() {



@Override
public
void
onFailure(Throwable arg0) {
//
TODO
Auto-generated method stub
System.out.println("\n\n
deu erro...");
}






@Override
public
void
onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n
Container criado...");
arg1.createNewAgent(nickname,
olaMundoAgente.class.getName(),
null,
new
RuntimeCallback<AgentHandler>() {
@Override
public
void
onFailure(Throwable arg0) {
//
TODO
Auto-generated method stub
}
@Override
public
void
onSuccess(AgentHandler arg0) {
}
});
}
});
}






Bye



Walison






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140225/d7a0f57a/attachment.html>
Caire Giovanni
2014-02-27 17:08:06 UTC
Permalink
Hi,

In a normal container agent creation and startup are 2 different steps --> When the creation is completed the onSuccess(AgentHandler handler) method is invoked. At this point you still have to call
handler.start(new RuntimeCallback<Void>() {
...
}
to actually start the agent.
Very likely this is why the setup() of your agent is not executed.

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: marted? 25 febbraio 2014 15:00
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: [jade-develop] R: Android mobility - Normal container with RuntimeService

Hi,

Thanks for the clarification.
Unable to successfully launch a normal container and an agent on an Android device using RuntimeService class, as you indicated. Then, at test level, I tried to move an agent of a normal container on a computer for the container created in android device. But I had two problems, first when getting out of the agent, which launched an exception of type ClassNotFoundException and then a UID serial incompatibility between classes. To solve such problems had to create an identical to that implemented the mobile agent application in android which was responsible for launching the main container on the device class. To solve the problem of serial UID put the same serial UID for the two classes, both in the android app as the agent m?vel.Resolvendo these problems, managed to create the container in android device and move the agent there, but when the agent moves to the container device cycle execution is paralyzed, probably what you quoted about the difference between bytecode in JVMs.

Now when I managed to launch the container and an agent in android device using RuntimeService had problems accessing the class that implements the agent created through an interface. The problem is that when I used to MicroRuntime class, used the getAgent (nameAgent). GetO2AInterface (ChatClientInterface.class) method to access the methods of the agent and its execution cycle in an Activity. Now I am unaware an equivalent method in this class RuntimeService or other form which allows me to access to the agent class methods, and need to access the methods of the class of agent to perform for example, the method of locomotion to another container. What happens is that the agent is released, but performs no instruction implemented on your setup () method.

Do you know any other way to achieve that access to methods or throw the agent?


public void iniciaContainerNormal(final String nickname, final String host,final String port){
final Profile profile = new ProfileImpl();
profile.setParameter(Profile.MAIN_HOST, host);
profile.setParameter(Profile.MAIN_PORT, port);
//profile.setParameter(Profile.LOCAL_HOST,"192.168.43.171");
profile.setParameter(Profile.MAIN, Boolean.FALSE.toString());
profile.setParameter(Profile.JVM, Profile.ANDROID);
if (AndroidHelper.isEmulator()) {
// Emulator: this is needed to work with emulated devices
profile.setParameter(Profile.LOCAL_HOST, AndroidHelper.LOOPBACK);
} else {
profile.setParameter(Profile.LOCAL_HOST,
AndroidHelper.getLocalIPAddress());
}
// Emulator: this is not really needed on a real device
profile.setParameter(Profile.LOCAL_PORT, "2000");
if (sd == null) {
serviceConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className,
IBinder service) {
sd = (RuntimeService) service;
startContainer(nickname, profile,agentStartupCallback);
};

public void onServiceDisconnected(ComponentName className) {
sd = null;
}
};
bindService(new Intent(getApplicationContext(),
RuntimeService.class), serviceConnection,
Context.BIND_AUTO_CREATE);
} else {
startContainer(nickname, profile, agentStartupCallback);
}
}


private void startContainer(final String nickname, Profile profile) {
sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {

@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}


@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
arg1.createNewAgent(nickname, olaMundoAgente.class.getName(), null, new RuntimeCallback<AgentHandler>() {
@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
}
@Override
public void onSuccess(AgentHandler arg0) {
}
});
}
});
}


Bye

Walison

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140227/45689ef7/attachment-0001.html>
Walison Jose de Deus
2014-03-05 02:43:57 UTC
Permalink
Hi,



Thanks for the tip, it worked perfectly and the execution of the agent is begining successfully. Now, I'm having trouble trying to move an agent between normal containers on android devices. For this I created another identical application which should create a normal container on a android device. I use the following method to launch normal container and works properly:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {

@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}
@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});

Then run another application on another device, which also throws a normal container and an agent in the same, and whose only action the agent is trying to move into a normal container to another device, the application returns me the following message:...

E/jade.core.mobility.AgentMobility(1067): Destination Container-1 does not exist or does not support mobility


I'm using the following method to move the agent:


public void moveCont1(){
addBehaviour(new OneShotBehaviour(this) {


@Override
public void action() {
String nome = "Container-1";
ContainerID dest = new ContainerID();
dest.setName(nome);
}
});
}


What do you think could be wrong?

Bye,

Walison











-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140304/6b3d146f/attachment.html>
Caire Giovanni
2014-03-07 09:03:59 UTC
Permalink
Hi,

Let me try to recap.
You are now in a situation with:
- The Main Container running somewhere in the fixed Network (likely in your PC)
- Container-1 running in Android device 1
- Container-2 running in Android device 2
- An agent in Container-2 that calls doMove(new ContainerID("Container-1", null));

Is that correct?
If yes, do you actually see the three containers (main, container-1 and container-2) in the RMA GUI?
Are you sure they are all there BEFORE the agent calls doMove()?

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: mercoled? 5 marzo 2014 03:44
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hi,

Thanks for the tip, it worked perfectly and the execution of the agent is begining successfully. Now, I'm having trouble trying to move an agent between normal containers on android devices. For this I created another identical application which should create a normal container on a android device. I use the following method to launch normal container and works properly:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {

@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}
@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});

Then run another application on another device, which also throws a normal container and an agent in the same, and whose only action the agent is trying to move into a normal container to another device, the application returns me the following message:...

E/jade.core.mobility.AgentMobility(1067): Destination Container-1 does not exist or does not support mobility


I'm using the following method to move the agent:

public void moveCont1(){
addBehaviour(new OneShotBehaviour(this) {


@Override
public void action() {
String nome = "Container-1";
ContainerID dest = new ContainerID();
dest.setName(nome);
}
});
}


What do you think could be wrong?

Bye,

Walison







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140307/751a5303/attachment.html>
Walison Jose de Deus
2014-03-07 18:40:34 UTC
Permalink
Hi,



That's it.

The
execution scenario is a PC where the Main Container squeegee and two
androids devices that are connected on the same wifi network.

Initially, I run the RMA GUI on the PC through the command:

java jade.Boot local-host-192.168.43.171-gui



Then run on a android device an application to create a normal container, where the agent moves. This container is successfully created and can view it in the RMA GUI;



Then
in another android device run another application to create another
agent in a normal container ("Container-2") which will move to the
"Container-1". This agent is created successfully and both he and the container "Container-2" are visible in the RMA GUI;



Now
both before and after the implementation of the method for the movement
of the agent for the "Container-1" all containers, as the same agent
are visible in the RMA GUI. In the test I conducted the agent does not move to the "Container-1".



Now
conducting a test using two emulators to represent the two android
devices, so I can monitor the execution was returned to me the
following error when getting out of the agent:



E / jade.core.mobility.AgentMobility (1067): Destination Container-1 does not exist or does not support mobility


I think maybe the problem is in creating the container or in the same communication with the platform. To create the container I'm using this method:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {


@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}



@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});


To set the profile information:

final Properties profile = new Properties();
profile.setProperty(Profile.MAIN_HOST, host);
profile.setProperty(Profile.MAIN_PORT, port);
profile.setProperty(Profile.MAIN, Boolean.FALSE.toString());
profile.setProperty(Profile.JVM, Profile.ANDROID);

if (AndroidHelper.isEmulator()) {
// Emulator: this is needed to work with emulated devices
profile.setProperty(Profile.LOCAL_HOST, AndroidHelper.LOOPBACK);
} else {
profile.setProperty(Profile.LOCAL_HOST,
AndroidHelper.getLocalIPAddress());
}
// Emulator: this is not really needed on a real device

profile.setProperty(Profile.LOCAL_PORT, "2000");


Where host is "192.168.43.171" and port is "1099".


what u think?


Bye


Walison




































From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com; jade-develop at avalon.tilab.com
Date: Fri, 7 Mar 2014 10:03:59 +0100
Subject: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService









Hi,

Let me try to recap.
You are now in a situation with:
- The Main Container running somewhere in the fixed Network (likely in your PC)
- Container-1 running in Android device 1
- Container-2 running in Android device 2
- An agent in Container-2 that calls doMove(new ContainerID(?Container-1?, null));

Is that correct?
If yes, do you actually see the three containers (main, container-1 and container-2) in the RMA GUI?
Are you sure they are all there BEFORE the agent calls doMove()?

Bye,

Giovanni



Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]


Inviato: mercoled? 5 marzo 2014 03:44

A: Caire Giovanni; jade-develop at avalon.tilab.com

Oggetto: RE: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService




Hi,




Thanks for the tip, it worked perfectly and the execution of the agent is begining successfully. Now, I'm having trouble trying to move an agent between normal containers
on android devices. For this I created another identical application which should create a normal container on a android device. I use the following method to launch normal container and works properly:





private void startContainer(final String nickname, Profile profile,

final RuntimeCallback<AgentController> agentStartupCallback) {



sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {



@Override

public void onFailure(Throwable arg0) {

// TODO Auto-generated method stub

System.out.println("\n\n deu erro...");

}

@Override

public void onSuccess(AgentContainerHandler arg1) {

System.out.println("\n\n Container criado...");

}

});



Then
run
another
application on another
device, which
also throws
a normal
container and
an agent
in the same,
and whose
only action
the agent
is
trying to move into
a normal
container
to another device,
the application
returns
me the following
message:...




E/jade.core.mobility.AgentMobility(1067): Destination Container-1 does not exist or does not support mobility





I'm
using the following method
to move
the agent:




public void moveCont1(){

addBehaviour(new OneShotBehaviour(this) {





@Override

public void action() {

String nome = "Container-1";

ContainerID dest = new ContainerID();

dest.setName(nome);

}

});

}








What do you think could be wrong?



Bye,



Walison

































Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi
altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.

This e-mail and any attachments is confidential
and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender
by return e-mail, Thanks.

Rispetta l'ambiente. Non stampare questa mail se non ? necessario.








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140307/bb30f42d/attachment-0001.html>
Caire Giovanni
2014-03-10 09:30:42 UTC
Permalink
Hi,

To investigate the problem you should do the following:
1) Add the misc add-on to the classpath of the Main Container. By doing that, when you launch the Main-Container you should see an additional agent called monitor-Main-Container in the RMA GUI.
2) Launch Container-1 in the first Android device and check that it appears in the RMA GUI.
3) Using the RMA GUI launch a DummyAgent.
4) Use the DummyAgent GUI to inspect the Main Container internal structures by interacting with the monitor-Main-Container agent as shown in the picture below.

[cid:image003.jpg at 01CF3C4B.C967A3A0]

5) Click the Send button.
6) Look at the output of the Main Container: you should see something like that:
-------------------------------------------------------------
Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
-------------------------------------------------------------

7) Check if the AgentMobilityService entry has a slice associated to Container-1

Let me know and bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: venerd? 7 marzo 2014 19:41
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hi,

That's it.
The execution scenario is a PC where the Main Container squeegee and two androids devices that are connected on the same wifi network.
Initially, I run the RMA GUI on the PC through the command:
java jade.Boot local-host-192.168.43.171-gui

Then run on a android device an application to create a normal container, where the agent moves. This container is successfully created and can view it in the RMA GUI;

Then in another android device run another application to create another agent in a normal container ("Container-2") which will move to the "Container-1". This agent is created successfully and both he and the container "Container-2" are visible in the RMA GUI;

Now both before and after the implementation of the method for the movement of the agent for the "Container-1" all containers, as the same agent are visible in the RMA GUI. In the test I conducted the agent does not move to the "Container-1".

Now conducting a test using two emulators to represent the two android devices, so I can monitor the execution was returned to me the following error when getting out of the agent:

E / jade.core.mobility.AgentMobility (1067): Destination Container-1 does not exist or does not support mobility

I think maybe the problem is in creating the container or in the same communication with the platform. To create the container I'm using this method:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {


@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}



@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});


To set the profile information:

final Properties profile = new Properties();
profile.setProperty(Profile.MAIN_HOST, host);
profile.setProperty(Profile.MAIN_PORT, port);
profile.setProperty(Profile.MAIN, Boolean.FALSE.toString());
profile.setProperty(Profile.JVM, Profile.ANDROID);

if (AndroidHelper.isEmulator()) {
// Emulator: this is needed to work with emulated devices
profile.setProperty(Profile.LOCAL_HOST, AndroidHelper.LOOPBACK);
} else {
profile.setProperty(Profile.LOCAL_HOST,
AndroidHelper.getLocalIPAddress());
}
// Emulator: this is not really needed on a real device

profile.setProperty(Profile.LOCAL_PORT, "2000");


Where host is "192.168.43.171" and port is "1099".


what u think?


Bye


Walison




































________________________________
From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com; jade-develop at avalon.tilab.com
Date: Fri, 7 Mar 2014 10:03:59 +0100
Subject: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService
Hi,

Let me try to recap.
You are now in a situation with:
- The Main Container running somewhere in the fixed Network (likely in your PC)
- Container-1 running in Android device 1
- Container-2 running in Android device 2
- An agent in Container-2 that calls doMove(new ContainerID("Container-1", null));

Is that correct?
If yes, do you actually see the three containers (main, container-1 and container-2) in the RMA GUI?
Are you sure they are all there BEFORE the agent calls doMove()?

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: mercoled? 5 marzo 2014 03:44
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hi,

Thanks for the tip, it worked perfectly and the execution of the agent is begining successfully. Now, I'm having trouble trying to move an agent between normal containers on android devices. For this I created another identical application which should create a normal container on a android device. I use the following method to launch normal container and works properly:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {

@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}
@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});

Then run another application on another device, which also throws a normal container and an agent in the same, and whose only action the agent is trying to move into a normal container to another device, the application returns me the following message:...

E/jade.core.mobility.AgentMobility(1067): Destination Container-1 does not exist or does not support mobility


I'm using the following method to move the agent:

public void moveCont1(){
addBehaviour(new OneShotBehaviour(this) {


@Override
public void action() {
String nome = "Container-1";
ContainerID dest = new ContainerID();
dest.setName(nome);
}
});
}

What do you think could be wrong?

Bye,

Walison





Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.
[https://col128.afx.ms/att/GetInline.aspx?messageid=8798cf06-a5d7-11e3-a84d-00215ad9e644&attindex=0&cp=-1&attdepth=0&imgsrc=cid%3a00000000000000000000000000000003%40TI.Disclaimer&cid=0b03c6de3a974c61&hm__login=walisonjose16&hm__domain=hotmail.com&ip=10.48.40.8&d=d4258&mf=0&hm__ts=Fri%2c%2007%20Mar%202014%2018%3a23%3a29%20GMT&st=walisonjose16&hm__ha=01_d09e82c178a9a57ed69fb0435fc5cb5824196cd256ee7a516ab1032bd34a8c09&oneredir=1]Rispetta l'ambiente. Non stampare questa mail se non ? necessario.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140310/96bfaab8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 37843 bytes
Desc: image003.jpg
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140310/96bfaab8/attachment-0001.jpg>
Walison Jose de Deus
2014-03-10 17:27:56 UTC
Permalink
Hello,

Thanks for the instructions. I carried out the instructions and got the following reply, where the words in bold is the class AgentMobilityService.I performed a new test, but now running the normal container on the computer rather than the android device and got the same answer:

Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Container-1
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Container-1
- Class = jade.core.management.AgentManagementProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Container-1
- Class = jade.core.messaging.MessagingProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Container-1
- Class = jade.core.event.NotificationProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Container-1
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container

Bye,

Walison





























From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com
CC: jade-develop at avalon.tilab.com
Date: Mon, 10 Mar 2014 10:30:42 +0100
Subject: R: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hi, To investigate the problem you should do the following:1)
Add the misc add-on to the classpath of the Main Container. By doing
that, when you launch the Main-Container you should see an additional
agent called monitor-Main-Container in the RMA GUI.2) Launch Container-1 in the first Android device and check that it appears in the RMA GUI.3) Using the RMA GUI launch a DummyAgent.4)
Use the DummyAgent GUI to inspect the Main Container internal
structures by interacting with the monitor-Main-Container agent as shown
in the picture below. 5) Click the Send button.6) Look at the output of the Main Container: you should see something like that:-------------------------------------------------------------Platform services DUMP-------------------------------------------------------------Service entry jade.core.mobility.AgentMobility - Name = jade.core.mobility.AgentMobility - Class = jade.core.mobility.AgentMobilityService - Slices: - Slice Main-Container - Class = jade.core.mobility.AgentMobilityProxy - Associated node = Main-Container - Inner node = Main-ContainerService entry jade.core.management.AgentManagement - Name = jade.core.management.AgentManagement - Class = jade.core.management.AgentManagementService - Slices: - Slice Main-Container - Class = jade.core.management.AgentManagementProxy - Associated node = Main-Container - Inner node = Main-ContainerService entry jade.core.messaging.Messaging - Name = jade.core.messaging.Messaging - Class = jade.core.messaging.MessagingService - Slices: - Slice Main-Container - Class = jade.core.messaging.MessagingProxy - Associated node = Main-Container - Inner node = Main-ContainerService entry jade.core.event.Notification - Name = jade.core.event.Notification - Class = jade.core.event.NotificationService - Slices: - Slice Main-Container - Class = jade.core.event.NotificationProxy - Associated node = Main-Container - Inner node = Main-ContainerService entry jade.core.resource.ResourceManagement - Name = jade.core.resource.ResourceManagement - Class = jade.core.resource.ResourceManagementService - Slices: - Slice Main-Container - Class = jade.core.resource.ResourceManagementProxy - Associated node = Main-Container - Inner node = Main-Container------------------------------------------------------------- 7) Check if the AgentMobilityService entry has a slice associated to Container-1 Let me know and bye, Giovanni Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: venerd? 7 marzo 2014 19:41
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService Hi,

That's it.
The
execution scenario is a PC where the Main Container squeegee and two
androids devices that are connected on the same wifi network.
Initially, I run the RMA GUI on the PC through the command:
java jade.Boot local-host-192.168.43.171-gui

Then
run on a android device an application to create a normal container,
where the agent moves. This container is successfully created and can
view it in the RMA GUI;

Then in
another android device run another application to create another agent
in a normal container ("Container-2") which will move to the
"Container-1". This agent is created successfully and both he and the
container "Container-2" are visible in the RMA GUI;

Now
both before and after the implementation of the method for the movement
of the agent for the "Container-1" all containers, as the same agent
are visible in the RMA GUI. In the test I conducted the agent does not
move to the "Container-1".

Now
conducting a test using two emulators to represent the two android
devices, so I can monitor the execution was returned to me the following
error when getting out of the agent:

E / jade.core.mobility.AgentMobility (1067): Destination Container-1 does not exist or does not support mobility

I think maybe the problem is in creating the container or in the same communication with the platform. To create the container I'm using this method:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {


@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}



@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});


To set the profile information:

final Properties profile = new Properties();
profile.setProperty(Profile.MAIN_HOST, host);
profile.setProperty(Profile.MAIN_PORT, port);
profile.setProperty(Profile.MAIN, Boolean.FALSE.toString());
profile.setProperty(Profile.JVM, Profile.ANDROID);

if (AndroidHelper.isEmulator()) {
// Emulator: this is needed to work with emulated devices
profile.setProperty(Profile.LOCAL_HOST, AndroidHelper.LOOPBACK);
} else {
profile.setProperty(Profile.LOCAL_HOST,
AndroidHelper.getLocalIPAddress());
}
// Emulator: this is not really needed on a real device

profile.setProperty(Profile.LOCAL_PORT, "2000");


Where host is "192.168.43.171" and port is "1099".


what u think?


Bye


Walison




































From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com; jade-develop at avalon.tilab.com
Date: Fri, 7 Mar 2014 10:03:59 +0100
Subject: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeServiceHi, Let me try to recap.You are now in a situation with:- The Main Container running somewhere in the fixed Network (likely in your PC)- Container-1 running in Android device 1- Container-2 running in Android device 2- An agent in Container-2 that calls doMove(new ContainerID(?Container-1?, null)); Is that correct?If yes, do you actually see the three containers (main, container-1 and container-2) in the RMA GUI?Are you sure they are all there BEFORE the agent calls doMove()? Bye, Giovanni Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: mercoled? 5 marzo 2014 03:44
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService Hi,

Thanks
for the tip, it worked perfectly and the execution of the agent is
begining successfully. Now, I'm having trouble trying to move an agent
between normal containers on android devices. For this I created another
identical application which should create a normal container on a
android device. I use the following method to launch normal container
and works properly:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {

@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}
@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});

Then run another application on another device, which also throws a normal container and an agent in the same, and whose only action the agent is trying to move into a normal container to another device, the application returns me the following message:...

E/jade.core.mobility.AgentMobility(1067): Destination Container-1 does not exist or does not support mobility


I'm using the following method to move the agent:

public void moveCont1(){
addBehaviour(new OneShotBehaviour(this) {


@Override
public void action() {
String nome = "Container-1";
ContainerID dest = new ContainerID();
dest.setName(nome);
}
});
}

What do you think could be wrong?

Bye,

Walison


Questo
messaggio e i suoi allegati sono indirizzati esclusivamente alle
persone indicate. La diffusione, copia o qualsiasi altra azione
derivante dalla conoscenza di queste informazioni sono rigorosamente
vietate. Qualora abbiate ricevuto questo documento per errore siete
cortesemente pregati di darne immediata comunicazione al mittente e di
provvedere alla sua distruzione, Grazie. This e-mail and any attachments is confidential
and may contain privileged information intended for the addressee(s)
only. Dissemination, copying, printing or use by anybody else is
unauthorised. If you are not the intended recipient, please delete this
message and any attachments and advise the sender by return e-mail,
Thanks. Rispetta l'ambiente. Non stampare questa mail se non ? necessario.

:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140310/7e324925/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 37843 bytes
Desc: not available
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140310/7e324925/attachment-0001.jpg>
Caire Giovanni
2014-03-13 17:47:46 UTC
Permalink
Hi,

Thanks for the additional information. Unfortunately they do not explain the problem you have: as I said I would have expected possible problems in code migration, but not in this point. We have to perform some deeper investigation. I'll let you know as soon as we have some result.

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: luned? 10 marzo 2014 18:28
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hello,

Thanks for the instructions. I carried out the instructions and got the following reply, where the words in bold is the class AgentMobilityService.I performed a new test, but now running the normal container on the computer rather than the android device and got the same answer:

Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Container-1
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Container-1
- Class = jade.core.management.AgentManagementProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Container-1
- Class = jade.core.messaging.MessagingProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Container-1
- Class = jade.core.event.NotificationProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Container-1
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container

Bye,

Walison






























________________________________
From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com
CC: jade-develop at avalon.tilab.com
Date: Mon, 10 Mar 2014 10:30:42 +0100
Subject: R: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService
Hi,

To investigate the problem you should do the following:
1) Add the misc add-on to the classpath of the Main Container. By doing that, when you launch the Main-Container you should see an additional agent called monitor-Main-Container in the RMA GUI.
2) Launch Container-1 in the first Android device and check that it appears in the RMA GUI.
3) Using the RMA GUI launch a DummyAgent.
4) Use the DummyAgent GUI to inspect the Main Container internal structures by interacting with the monitor-Main-Container agent as shown in the picture below.

[cid:image001.jpg at 01CF3EEC.B9593930]

5) Click the Send button.
6) Look at the output of the Main Container: you should see something like that:
-------------------------------------------------------------
Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
-------------------------------------------------------------

7) Check if the AgentMobilityService entry has a slice associated to Container-1

Let me know and bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: venerd? 7 marzo 2014 19:41
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hi,

That's it.
The execution scenario is a PC where the Main Container squeegee and two androids devices that are connected on the same wifi network.
Initially, I run the RMA GUI on the PC through the command:
java jade.Boot local-host-192.168.43.171-gui

Then run on a android device an application to create a normal container, where the agent moves. This container is successfully created and can view it in the RMA GUI;

Then in another android device run another application to create another agent in a normal container ("Container-2") which will move to the "Container-1". This agent is created successfully and both he and the container "Container-2" are visible in the RMA GUI;

Now both before and after the implementation of the method for the movement of the agent for the "Container-1" all containers, as the same agent are visible in the RMA GUI. In the test I conducted the agent does not move to the "Container-1".

Now conducting a test using two emulators to represent the two android devices, so I can monitor the execution was returned to me the following error when getting out of the agent:

E / jade.core.mobility.AgentMobility (1067): Destination Container-1 does not exist or does not support mobility

I think maybe the problem is in creating the container or in the same communication with the platform. To create the container I'm using this method:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {


@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}



@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});


To set the profile information:

final Properties profile = new Properties();
profile.setProperty(Profile.MAIN_HOST, host);
profile.setProperty(Profile.MAIN_PORT, port);
profile.setProperty(Profile.MAIN, Boolean.FALSE.toString());
profile.setProperty(Profile.JVM, Profile.ANDROID);

if (AndroidHelper.isEmulator()) {
// Emulator: this is needed to work with emulated devices
profile.setProperty(Profile.LOCAL_HOST, AndroidHelper.LOOPBACK);
} else {
profile.setProperty(Profile.LOCAL_HOST,
AndroidHelper.getLocalIPAddress());
}
// Emulator: this is not really needed on a real device

profile.setProperty(Profile.LOCAL_PORT, "2000");


Where host is "192.168.43.171" and port is "1099".


what u think?


Bye


Walison



































________________________________
From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com; jade-develop at avalon.tilab.com
Date: Fri, 7 Mar 2014 10:03:59 +0100
Subject: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService
Hi,

Let me try to recap.
You are now in a situation with:
- The Main Container running somewhere in the fixed Network (likely in your PC)
- Container-1 running in Android device 1
- Container-2 running in Android device 2
- An agent in Container-2 that calls doMove(new ContainerID("Container-1", null));

Is that correct?
If yes, do you actually see the three containers (main, container-1 and container-2) in the RMA GUI?
Are you sure they are all there BEFORE the agent calls doMove()?

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: mercoled? 5 marzo 2014 03:44
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hi,

Thanks for the tip, it worked perfectly and the execution of the agent is begining successfully. Now, I'm having trouble trying to move an agent between normal containers on android devices. For this I created another identical application which should create a normal container on a android device. I use the following method to launch normal container and works properly:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {

@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}
@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});

Then run another application on another device, which also throws a normal container and an agent in the same, and whose only action the agent is trying to move into a normal container to another device, the application returns me the following message:...

E/jade.core.mobility.AgentMobility(1067): Destination Container-1 does not exist or does not support mobility


I'm using the following method to move the agent:

public void moveCont1(){
addBehaviour(new OneShotBehaviour(this) {


@Override
public void action() {
String nome = "Container-1";
ContainerID dest = new ContainerID();
dest.setName(nome);
}
});
}
What do you think could be wrong?

Bye,

Walison





Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.
Rispetta l'ambiente. Non stampare questa mail se non ? necessario.


:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140313/b370a1ba/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 37843 bytes
Desc: image001.jpg
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140313/b370a1ba/attachment-0001.jpg>
Caire Giovanni
2014-03-23 10:46:14 UTC
Permalink
Hi,

I created a minimal AndroidMobilityApp (attached the source files) and I executed it in the following environment:

WiFi hot spot


My PC (Main-Container) Android Terminal (AndroidMobilityApp)


The AndroidMobilityApp is composed of a single Android Activity that in its onCreate() method launches a Container with an AndroidMobileAgent on top.
The AndroidMobileAgent (a part from periodically logging a printout) waits for messages: whenever a message is received it tries to migrate to the Main Container (if it is running in the Android container) or back to the Android terminal (if it is running in the Main Container).

Scenario 1: The class of the AndroidMobileAgent is only included in the AndroidMobilityApp (it is not present in the classpath of the Main Conatiner).
When I send a message to the AndroidMobileAgent to trigger its migration to the Main Container, the migration process is initiated correctly (That is: I cannot reproduce the problem you have), but it fails when trying to load the AndroidMobileAgent class in the Main Container. This is not surprising as the AndroidMobileAgent class was compiled for Dalvik VM and therefore cannot be loaded by a standard JVM.

Scenario 2: The class of the AndroidMobileAgent is included both in the AndroidMobilityApp and in the classpath of the Main-Container.
Migration works correctly both from the android terminal to the Main and back from the Main to the Android terminal.

In conclusion: state-only mobility works correctly; state-plus-code mobility does not work.
Is it possible to make state-plus-code mobility work too? Possibly yes, but I am not expert enough in Android stuff to tell that for sure. It would be necessary to modify the jade MobileClassLoader to preprocess on the fly the byte code of classes of a moving agent just before they have to be loaded.

Bye,

Giovanni

P.S. The code of the AndroidMobilityActivity requires a new version of the JadeAndroid Add-on that will be available in a few days.




Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di Caire Giovanni
Inviato: gioved? 13 marzo 2014 18:48
A: Walison Jose de Deus; jade-develop at avalon.tilab.com
Oggetto: [jade-develop] R: R: R: R: R: R: Android mobility - Normal container - Problem with RuntimeService

Hi,

Thanks for the additional information. Unfortunately they do not explain the problem you have: as I said I would have expected possible problems in code migration, but not in this point. We have to perform some deeper investigation. I'll let you know as soon as we have some result.

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: luned? 10 marzo 2014 18:28
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hello,

Thanks for the instructions. I carried out the instructions and got the following reply, where the words in bold is the class AgentMobilityService.I performed a new test, but now running the normal container on the computer rather than the android device and got the same answer:

Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Container-1
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Container-1
- Class = jade.core.management.AgentManagementProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Container-1
- Class = jade.core.messaging.MessagingProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Container-1
- Class = jade.core.event.NotificationProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Container-1
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container

Bye,

Walison





























________________________________
From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com
CC: jade-develop at avalon.tilab.com
Date: Mon, 10 Mar 2014 10:30:42 +0100
Subject: R: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService
Hi,

To investigate the problem you should do the following:
1) Add the misc add-on to the classpath of the Main Container. By doing that, when you launch the Main-Container you should see an additional agent called monitor-Main-Container in the RMA GUI.
2) Launch Container-1 in the first Android device and check that it appears in the RMA GUI.
3) Using the RMA GUI launch a DummyAgent.
4) Use the DummyAgent GUI to inspect the Main Container internal structures by interacting with the monitor-Main-Container agent as shown in the picture below.

[cid:image001.jpg at 01CF4685.B6F30BD0]

5) Click the Send button.
6) Look at the output of the Main Container: you should see something like that:
-------------------------------------------------------------
Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
-------------------------------------------------------------

7) Check if the AgentMobilityService entry has a slice associated to Container-1

Let me know and bye,

Giovanni

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140323/8c02c23a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 37843 bytes
Desc: image001.jpg
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140323/8c02c23a/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AndroidMobilityActivity.java
Type: application/octet-stream
Size: 3594 bytes
Desc: AndroidMobilityActivity.java
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140323/8c02c23a/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AndroidMobileAgent.java
Type: application/octet-stream
Size: 1982 bytes
Desc: AndroidMobileAgent.java
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140323/8c02c23a/attachment-0003.obj>
Walison Jose de Deus
2014-03-26 18:10:33 UTC
Permalink
Hi,

Thank you for your willingness to implement and test. The
results obtained in the execution of scenarios 1 and 2 were already
half that expected, since you had already warned me in previous emails
on this issue of differences between Dalvik VM and a standard JVM.



Now, a third scenario that I am testing your code is mobility between two containers that run on two different android devices. Ie
I run an application on an android device, which should be responsible
for launching a container, for example, "Container-1". Then
I run it on another android device a mobile agent in the form of an
android application, like you developed for scenarios 1 and 2, where
application launches the agent in this device, where their behavior is
to move to the "Container -1 "present in the other android device.



In
my tests, I used the application, and it turns out that the agent can
not move the container to the other device, it just does not move. But when I play the scenarios 1 and 2, I get the same results you described in the previous email.



Now
it is important to point out that I'm still using the old version of
JadeAndroid and I'm waiting for the new version becomes available on the
site to carry out further tests.





Thank you,



Walison


From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com; jade-develop at avalon.tilab.com
Date: Sun, 23 Mar 2014 11:46:14 +0100
Subject: R: [jade-develop] R: R: R: R: R: R: Android mobility - Normal container - Problem with RuntimeService









Hi,

I created a minimal AndroidMobilityApp (attached the source files) and I executed it in the following environment:

WiFi hot spot


My PC (Main-Container) Android Terminal (AndroidMobilityApp)


The AndroidMobilityApp is composed of a single Android Activity that in its onCreate() method launches a Container with an AndroidMobileAgent on
top.
The AndroidMobileAgent (a part from periodically logging a printout) waits for messages: whenever a message is received it tries to migrate to
the Main Container (if it is running in the Android container) or back to the Android terminal (if it is running in the Main Container).

Scenario 1: The class of the AndroidMobileAgent is only included in the AndroidMobilityApp (it is not present in the classpath of the Main Conatiner).
When I send a message to the AndroidMobileAgent to trigger its migration to the Main Container, the migration process is initiated correctly (That
is: I cannot reproduce the problem you have), but it fails when trying to load the AndroidMobileAgent class in the Main Container. This is not surprising as the AndroidMobileAgent class was compiled for Dalvik VM and therefore cannot be loaded by a standard
JVM.

Scenario 2: The class of the AndroidMobileAgent is included both in the AndroidMobilityApp and in the classpath of the Main-Container.
Migration works correctly both from the android terminal to the Main and back from the Main to the Android terminal.

In conclusion: state-only mobility works correctly; state-plus-code mobility does not work.

Is it possible to make state-plus-code mobility work too? Possibly yes, but I am not expert enough in Android stuff to tell that for sure. It would
be necessary to modify the jade MobileClassLoader to preprocess on the fly the byte code of classes of a moving agent just before they have to be loaded.

Bye,

Giovanni

P.S. The code of the AndroidMobilityActivity requires a new version of the JadeAndroid Add-on that will be available in a few days.







Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com]
Per conto di Caire Giovanni

Inviato: gioved? 13 marzo 2014 18:48

A: Walison Jose de Deus; jade-develop at avalon.tilab.com

Oggetto: [jade-develop] R: R: R: R: R: R: Android mobility - Normal container - Problem with RuntimeService



Hi,

Thanks for the additional information. Unfortunately they do not explain the problem you have: as I said I would have expected possible problems
in code migration, but not in this point. We have to perform some deeper investigation. I?ll let you know as soon as we have some result.

Bye,

Giovanni



Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]


Inviato: luned? 10 marzo 2014 18:28

A: Caire Giovanni; jade-develop at avalon.tilab.com

Oggetto: RE: R: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService




Hello,




Thanks for the instructions.
I carried out the instructions
and got
the following reply,
where the words
in bold is the class
AgentMobilityService.I
performed a new test, but now running the normal container on the computer rather than the android device and got the same answer:



Platform services DUMP

-------------------------------------------------------------

Service entry jade.core.mobility.AgentMobility

- Name = jade.core.mobility.AgentMobility

- Class = jade.core.mobility.AgentMobilityService

- Slices:

- Slice Container-1

- Class = jade.core.mobility.AgentMobilityProxy

- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]

- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]

- Slice Main-Container

- Class = jade.core.mobility.AgentMobilityProxy

- Associated node = Main-Container

- Inner node = Main-Container

Service entry jade.core.management.AgentManagement

- Name = jade.core.management.AgentManagement

- Class = jade.core.management.AgentManagementService

- Slices:

- Slice Container-1

- Class = jade.core.management.AgentManagementProxy

- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]

- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]

- Slice Main-Container

- Class = jade.core.management.AgentManagementProxy

- Associated node = Main-Container

- Inner node = Main-Container

Service entry jade.core.messaging.Messaging

- Name = jade.core.messaging.Messaging

- Class = jade.core.messaging.MessagingService

- Slices:

- Slice Container-1

- Class = jade.core.messaging.MessagingProxy

- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]

- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]

- Slice Main-Container

- Class = jade.core.messaging.MessagingProxy

- Associated node = Main-Container

- Inner node = Main-Container

Service entry jade.core.event.Notification

- Name = jade.core.event.Notification

- Class = jade.core.event.NotificationService

- Slices:

- Slice Container-1

- Class = jade.core.event.NotificationProxy

- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]

- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]

- Slice Main-Container

- Class = jade.core.event.NotificationProxy

- Associated node = Main-Container

- Inner node = Main-Container

Service entry jade.core.resource.ResourceManagement

- Name = jade.core.resource.ResourceManagement

- Class = jade.core.resource.ResourceManagementService

- Slices:

- Slice Container-1

- Class = jade.core.resource.ResourceManagementProxy

- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]

- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]

- Slice Main-Container

- Class = jade.core.resource.ResourceManagementProxy

- Associated node = Main-Container

- Inner node = Main-Container



Bye,



Walison
































































From: giovanni.caire at telecomitalia.it

To: walisonjose16 at hotmail.com

CC: jade-develop at avalon.tilab.com

Date: Mon, 10 Mar 2014 10:30:42 +0100

Subject: R: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hi,

To investigate the problem you should do the following:
1) Add the misc add-on to the classpath of the Main Container. By doing that, when you launch the Main-Container you should see an additional agent
called monitor-Main-Container in the RMA GUI.
2) Launch Container-1 in the first Android device and check that it appears in the RMA GUI.
3) Using the RMA GUI launch a DummyAgent.
4) Use the DummyAgent GUI to inspect the Main Container internal structures by interacting with the monitor-Main-Container agent as shown in the
picture below.



5) Click the Send button.
6) Look at the output of the Main Container: you should see something like that:
-------------------------------------------------------------
Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
-------------------------------------------------------------

7) Check if the AgentMobilityService entry has a slice associated to Container-1

Let me know and bye,

Giovanni











Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi
altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.

This e-mail and any attachments is confidential
and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender
by return e-mail, Thanks.

Rispetta l'ambiente. Non stampare questa mail se non ? necessario.






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140326/8437c79c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 37843 bytes
Desc: not available
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140326/8437c79c/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo Ambiente_foglia2.jpg
Type: image/jpeg
Size: 677 bytes
Desc: not available
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140326/8437c79c/attachment-0003.jpg>
Caire Giovanni
2014-03-28 09:59:05 UTC
Permalink
Hi,

OK. I will check. The new version is coming. I'll let you know.

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: mercoled? 26 marzo 2014 19:11
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: [jade-develop] R: R: R: R: R: R: Android mobility - Normal container - Problem with RuntimeService



Hi,
Thank you for your willingness to implement and test. The results obtained in the execution of scenarios 1 and 2 were already half that expected, since you had already warned me in previous emails on this issue of differences between Dalvik VM and a standard JVM.

Now, a third scenario that I am testing your code is mobility between two containers that run on two different android devices. Ie I run an application on an android device, which should be responsible for launching a container, for example, "Container-1". Then I run it on another android device a mobile agent in the form of an android application, like you developed for scenarios 1 and 2, where application launches the agent in this device, where their behavior is to move to the "Container -1 "present in the other android device.

In my tests, I used the application, and it turns out that the agent can not move the container to the other device, it just does not move. But when I play the scenarios 1 and 2, I get the same results you described in the previous email.

Now it is important to point out that I'm still using the old version of JadeAndroid and I'm waiting for the new version becomes available on the site to carry out further tests.


Thank you,

Walison
________________________________
From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com; jade-develop at avalon.tilab.com
Date: Sun, 23 Mar 2014 11:46:14 +0100
Subject: R: [jade-develop] R: R: R: R: R: R: Android mobility - Normal container - Problem with RuntimeService
Hi,

I created a minimal AndroidMobilityApp (attached the source files) and I executed it in the following environment:

WiFi hot spot


My PC (Main-Container) Android Terminal (AndroidMobilityApp)


The AndroidMobilityApp is composed of a single Android Activity that in its onCreate() method launches a Container with an AndroidMobileAgent on top.
The AndroidMobileAgent (a part from periodically logging a printout) waits for messages: whenever a message is received it tries to migrate to the Main Container (if it is running in the Android container) or back to the Android terminal (if it is running in the Main Container).

Scenario 1: The class of the AndroidMobileAgent is only included in the AndroidMobilityApp (it is not present in the classpath of the Main Conatiner).
When I send a message to the AndroidMobileAgent to trigger its migration to the Main Container, the migration process is initiated correctly (That is: I cannot reproduce the problem you have), but it fails when trying to load the AndroidMobileAgent class in the Main Container. This is not surprising as the AndroidMobileAgent class was compiled for Dalvik VM and therefore cannot be loaded by a standard JVM.

Scenario 2: The class of the AndroidMobileAgent is included both in the AndroidMobilityApp and in the classpath of the Main-Container.
Migration works correctly both from the android terminal to the Main and back from the Main to the Android terminal.

In conclusion: state-only mobility works correctly; state-plus-code mobility does not work.
Is it possible to make state-plus-code mobility work too? Possibly yes, but I am not expert enough in Android stuff to tell that for sure. It would be necessary to modify the jade MobileClassLoader to preprocess on the fly the byte code of classes of a moving agent just before they have to be loaded.

Bye,

Giovanni

P.S. The code of the AndroidMobilityActivity requires a new version of the JadeAndroid Add-on that will be available in a few days.




Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di Caire Giovanni
Inviato: gioved? 13 marzo 2014 18:48
A: Walison Jose de Deus; jade-develop at avalon.tilab.com
Oggetto: [jade-develop] R: R: R: R: R: R: Android mobility - Normal container - Problem with RuntimeService

Hi,

Thanks for the additional information. Unfortunately they do not explain the problem you have: as I said I would have expected possible problems in code migration, but not in this point. We have to perform some deeper investigation. I'll let you know as soon as we have some result.

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: luned? 10 marzo 2014 18:28
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hello,

Thanks for the instructions. I carried out the instructions and got the following reply, where the words in bold is the class AgentMobilityService.I performed a new test, but now running the normal container on the computer rather than the android device and got the same answer:

Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Container-1
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Container-1
- Class = jade.core.management.AgentManagementProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Container-1
- Class = jade.core.messaging.MessagingProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Container-1
- Class = jade.core.event.NotificationProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Container-1
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container

Bye,

Walison




























________________________________
From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com
CC: jade-develop at avalon.tilab.com
Date: Mon, 10 Mar 2014 10:30:42 +0100
Subject: R: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService
Hi,

To investigate the problem you should do the following:
1) Add the misc add-on to the classpath of the Main Container. By doing that, when you launch the Main-Container you should see an additional agent called monitor-Main-Container in the RMA GUI.
2) Launch Container-1 in the first Android device and check that it appears in the RMA GUI.
3) Using the RMA GUI launch a DummyAgent.
4) Use the DummyAgent GUI to inspect the Main Container internal structures by interacting with the monitor-Main-Container agent as shown in the picture below.

[cid:image001.jpg at 01CF4A74.BC16DB30]

5) Click the Send button.
6) Look at the output of the Main Container: you should see something like that:
-------------------------------------------------------------
Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
-------------------------------------------------------------

7) Check if the AgentMobilityService entry has a slice associated to Container-1

Let me know and bye,

Giovanni

Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.
[cid:image002.gif at 01CF4A74.BC16DB30]Rispetta l'ambiente. Non stampare questa mail se non ? necessario.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140328/53654054/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 37843 bytes
Desc: image001.jpg
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140328/53654054/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 677 bytes
Desc: image002.gif
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140328/53654054/attachment-0001.gif>
Caire Giovanni
2014-04-03 07:19:36 UTC
Permalink
Hi,

The new version of JadeAndroid (4.3.2) is now available for download.

Bye,

Giovanni

Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di Caire Giovanni
Inviato: venerd? 28 marzo 2014 10:59
A: Walison Jose de Deus; jade-develop at avalon.tilab.com
Oggetto: [jade-develop] R: R: R: R: R: R: R: R: Android mobility - Normal container - Problem with RuntimeService

Hi,

OK. I will check. The new version is coming. I'll let you know.

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: mercoled? 26 marzo 2014 19:11
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: [jade-develop] R: R: R: R: R: R: Android mobility - Normal container - Problem with RuntimeService



Hi,
Thank you for your willingness to implement and test. The results obtained in the execution of scenarios 1 and 2 were already half that expected, since you had already warned me in previous emails on this issue of differences between Dalvik VM and a standard JVM.

Now, a third scenario that I am testing your code is mobility between two containers that run on two different android devices. Ie I run an application on an android device, which should be responsible for launching a container, for example, "Container-1". Then I run it on another android device a mobile agent in the form of an android application, like you developed for scenarios 1 and 2, where application launches the agent in this device, where their behavior is to move to the "Container -1 "present in the other android device.

In my tests, I used the application, and it turns out that the agent can not move the container to the other device, it just does not move. But when I play the scenarios 1 and 2, I get the same results you described in the previous email.

Now it is important to point out that I'm still using the old version of JadeAndroid and I'm waiting for the new version becomes available on the site to carry out further tests.


Thank you,

Walison
________________________________
From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com; jade-develop at avalon.tilab.com
Date: Sun, 23 Mar 2014 11:46:14 +0100
Subject: R: [jade-develop] R: R: R: R: R: R: Android mobility - Normal container - Problem with RuntimeService
Hi,

I created a minimal AndroidMobilityApp (attached the source files) and I executed it in the following environment:

WiFi hot spot


My PC (Main-Container) Android Terminal (AndroidMobilityApp)


The AndroidMobilityApp is composed of a single Android Activity that in its onCreate() method launches a Container with an AndroidMobileAgent on top.
The AndroidMobileAgent (a part from periodically logging a printout) waits for messages: whenever a message is received it tries to migrate to the Main Container (if it is running in the Android container) or back to the Android terminal (if it is running in the Main Container).

Scenario 1: The class of the AndroidMobileAgent is only included in the AndroidMobilityApp (it is not present in the classpath of the Main Conatiner).
When I send a message to the AndroidMobileAgent to trigger its migration to the Main Container, the migration process is initiated correctly (That is: I cannot reproduce the problem you have), but it fails when trying to load the AndroidMobileAgent class in the Main Container. This is not surprising as the AndroidMobileAgent class was compiled for Dalvik VM and therefore cannot be loaded by a standard JVM.

Scenario 2: The class of the AndroidMobileAgent is included both in the AndroidMobilityApp and in the classpath of the Main-Container.
Migration works correctly both from the android terminal to the Main and back from the Main to the Android terminal.

In conclusion: state-only mobility works correctly; state-plus-code mobility does not work.
Is it possible to make state-plus-code mobility work too? Possibly yes, but I am not expert enough in Android stuff to tell that for sure. It would be necessary to modify the jade MobileClassLoader to preprocess on the fly the byte code of classes of a moving agent just before they have to be loaded.

Bye,

Giovanni

P.S. The code of the AndroidMobilityActivity requires a new version of the JadeAndroid Add-on that will be available in a few days.




Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di Caire Giovanni
Inviato: gioved? 13 marzo 2014 18:48
A: Walison Jose de Deus; jade-develop at avalon.tilab.com
Oggetto: [jade-develop] R: R: R: R: R: R: Android mobility - Normal container - Problem with RuntimeService

Hi,

Thanks for the additional information. Unfortunately they do not explain the problem you have: as I said I would have expected possible problems in code migration, but not in this point. We have to perform some deeper investigation. I'll let you know as soon as we have some result.

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:walisonjose16 at hotmail.com]
Inviato: luned? 10 marzo 2014 18:28
A: Caire Giovanni; jade-develop at avalon.tilab.com
Oggetto: RE: R: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hello,

Thanks for the instructions. I carried out the instructions and got the following reply, where the words in bold is the class AgentMobilityService.I performed a new test, but now running the normal container on the computer rather than the android device and got the same answer:

Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Container-1
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Container-1
- Class = jade.core.management.AgentManagementProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Container-1
- Class = jade.core.messaging.MessagingProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Container-1
- Class = jade.core.event.NotificationProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Container-1
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Inner node = [Container-1, 14201479, jicp://191.224.203.80:1099]
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container

Bye,

Walison



























________________________________
From: giovanni.caire at telecomitalia.it
To: walisonjose16 at hotmail.com
CC: jade-develop at avalon.tilab.com
Date: Mon, 10 Mar 2014 10:30:42 +0100
Subject: R: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService
Hi,

To investigate the problem you should do the following:
1) Add the misc add-on to the classpath of the Main Container. By doing that, when you launch the Main-Container you should see an additional agent called monitor-Main-Container in the RMA GUI.
2) Launch Container-1 in the first Android device and check that it appears in the RMA GUI.
3) Using the RMA GUI launch a DummyAgent.
4) Use the DummyAgent GUI to inspect the Main Container internal structures by interacting with the monitor-Main-Container agent as shown in the picture below.

[cid:image001.jpg at 01CF4F1D.D4B4FA70]

5) Click the Send button.
6) Look at the output of the Main Container: you should see something like that:
-------------------------------------------------------------
Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
-------------------------------------------------------------

7) Check if the AgentMobilityService entry has a slice associated to Container-1

Let me know and bye,

Giovanni

Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.
[cid:image002.gif at 01CF4F1D.D4B4FA70]Rispetta l'ambiente. Non stampare questa mail se non ? necessario.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140403/bd078f98/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 37843 bytes
Desc: image001.jpg
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140403/bd078f98/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 677 bytes
Desc: image002.gif
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140403/bd078f98/attachment-0001.gif>
Caire Giovanni
2014-02-19 21:59:26 UTC
Permalink
Hi,

Being jade agents pieces of java codes, accessing a file in the local file system from a Jade agent can be done by means of the classes in the java.io package as you would do from a normal java program. Note in facts that jade does not set any limitations in the usage of normal java API.

Bye,

Giovanni

-----Messaggio originale-----
Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di crq1
Inviato: mercoled? 19 febbraio 2014 18:37
A: jade-develop at avalon.tilab.com
Oggetto: [jade-develop] New To JADE

Hello, I am relatively new to JADE. I have been doing all the tutorials I can find as well as other resources to learn. I was wondering if anyone had experience accessing a data file locally (on same computer with JADE). I am experimenting and would like to use JADE in a project. If you know material that may help me, I would appreciate any input.

Chris Quesada



--
View this message in context: http://jade.17737.x6.nabble.com/New-To-JADE-tp5002430.html
Sent from the JADE - Dev mailing list archive at Nabble.com.
_______________________________________________
jade-develop mailing list
jade-develop at avalon.tilab.com
https://avalon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT
http://jade.tilab.com/community-mailinglist.htm
crq1
2014-03-07 17:28:54 UTC
Permalink
Could anyone assist me with taking a string read from a file and taking
integers? I thought it would be trivial, but I just can't seem to get it. I
can read the the data successfully and assign it to a string, but when I
try to specify a specific piece of the string, it won't let me assign it to
an integer/array/decimal/decimalarray/integerarray, it keeps giving me the
incompatible types error. I would really appreciate any assistance.


On Fri, Mar 7, 2014 at 3:05 AM, Caire Giovanni-2 [via JADE] <
ml-node+s17737n5002446h0 at n6.nabble.com> wrote:

> Hi,
>
>
>
> Let me try to recap.
>
> You are now in a situation with:
>
> - The Main Container running somewhere in the fixed Network (likely in
> your PC)
>
> - Container-1 running in Android device 1
>
> - Container-2 running in Android device 2
>
> - An agent in Container-2 that calls doMove(new ContainerID("Container-1",
> null));
>
>
>
> Is that correct?
>
> If yes, do you actually see the three containers (main, container-1 and
> container-2) in the RMA GUI?
>
> Are you sure they are all there BEFORE the agent calls doMove()?
>
>
>
> Bye,
>
>
>
> Giovanni
>
>
>
> *Da:* Walison Jose de Deus [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=5002446&i=0>]
>
> *Inviato:* mercoled? 5 marzo 2014 03:44
> *A:* Caire Giovanni; [hidden email]<http://user/SendEmail.jtp?type=node&node=5002446&i=1>
>
> *Oggetto:* RE: R: R: [jade-develop] R: Android mobility - Normal
> container - Problem with RuntimeService
>
>
>
> Hi,
>
> Thanks for the tip, it worked perfectly and the execution of the agent is
> begining successfully. Now, I'm having trouble trying to move an agent
> between normal containers on android devices. For this I created another
> identical application which should create a normal container on a android
> device. I use the following method to launch normal container and works
> properly:
>
>
> private void startContainer(final String nickname, Profile profile,
> final RuntimeCallback<AgentController> agentStartupCallback) {
>
> sd.createAgentContainer(profile, new
> RuntimeCallback<AgentContainerHandler>() {
>
> @Override
> public void onFailure(Throwable arg0) {
> // TODO Auto-generated method stub
> System.out.println("\n\n deu erro...");
> }
> @Override
> public void onSuccess(AgentContainerHandler arg1) {
> System.out.println("\n\n Container criado...");
> }
> });
>
> Then run another application on another device, which also throws a normal container
> and an agent in the same, and whose only action the agent is trying to
> move into a normal container to another device, the application returns me
> the following message:...
>
> E/jade.core.mobility.AgentMobility(1067): Destination Container-1 does not
> exist or does not support mobility
>
>
> I'm using the following method to move the agent:
>
> public void moveCont1(){
> addBehaviour(new OneShotBehaviour(this) {
>
>
> @Override
> public void action() {
> String nome = "Container-1";
> ContainerID dest = new ContainerID();
> dest.setName(nome);
> }
> });
> }
>
>
> What do you think could be wrong?
>
> Bye,
>
> Walison
>
>
>
>
>
>
>
> _______________________________________________
> jade-develop mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5002446&i=2>
> https://avalon.cselt.it/mailman/listinfo/jade-develop
> UNSUBSCRIBE INSTRUCTIONS AT
> http://jade.tilab.com/community-mailinglist.htm
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://jade.17737.x6.nabble.com/New-To-JADE-tp5002430p5002446.html
> To unsubscribe from New To JADE, click here<http://jade.17737.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5002430&code=Y3JxMUBzdHVkZW50cy51d2YuZWR1fDUwMDI0MzB8LTM4ODY5MzU1>
> .
> NAML<http://jade.17737.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
Christopher R. Quesada
Electrical Engineering Major (May 2014)
University of West Florida




--
View this message in context: http://jade.17737.x6.nabble.com/Re-R-R-R-Android-mobility-Normal-container-Problem-with-RuntimeService-tp5002447.html
Sent from the JADE - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140307/389efdba/attachment.html>
Caire Giovanni
2014-03-10 09:10:29 UTC
Permalink
Hi,

String str = ?1234?;
int n = Integer.parseInt(str);

That?s it.

Anyway, for the future I would ask you to use this mailing list to post JADE related questions only. For generic Java questions or any other question not specifically related to JADE, this is not the right forum.

Bye,

Giovanni

Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di crq1
Inviato: venerd? 7 marzo 2014 18:29
A: jade-develop at avalon.tilab.com
Oggetto: Re: [jade-develop] R: R: R: Android mobility - Normal container - Problem with RuntimeService

Could anyone assist me with taking a string read from a file and taking integers? I thought it would be trivial, but I just can't seem to get it. I can read the the data successfully and assign it to a string, but when I try to specify a specific piece of the string, it won't let me assign it to an integer/array/decimal/decimalarray/integerarray, it keeps giving me the incompatible types error. I would really appreciate any assistance.

On Fri, Mar 7, 2014 at 3:05 AM, Caire Giovanni-2 [via JADE] <[hidden email]</user/SendEmail.jtp?type=node&node=5002447&i=0>> wrote:
Hi,

Let me try to recap.
You are now in a situation with:
- The Main Container running somewhere in the fixed Network (likely in your PC)
- Container-1 running in Android device 1
- Container-2 running in Android device 2
- An agent in Container-2 that calls doMove(new ContainerID(?Container-1?, null));

Is that correct?
If yes, do you actually see the three containers (main, container-1 and container-2) in the RMA GUI?
Are you sure they are all there BEFORE the agent calls doMove()?

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=5002446&i=0>]
Inviato: mercoled? 5 marzo 2014 03:44
A: Caire Giovanni; [hidden email]<http://user/SendEmail.jtp?type=node&node=5002446&i=1>

Oggetto: RE: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hi,

Thanks for the tip, it worked perfectly and the execution of the agent is begining successfully. Now, I'm having trouble trying to move an agent between normal containers on android devices. For this I created another identical application which should create a normal container on a android device. I use the following method to launch normal container and works properly:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {

@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}
@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});

Then run another application on another device, which also throws a normal container and an agent in the same, and whose only action the agent is trying to move into a normal container to another device, the application returns me the following message:...

E/jade.core.mobility.AgentMobility(1067): Destination Container-1 does not exist or does not support mobility


I'm using the following method to move the agent:

public void moveCont1(){
addBehaviour(new OneShotBehaviour(this) {


@Override
public void action() {
String nome = "Container-1";
ContainerID dest = new ContainerID();
dest.setName(nome);
}
});
}

What do you think could be wrong?

Bye,

Walison






_______________________________________________
jade-develop mailing list
[hidden email]<http://user/SendEmail.jtp?type=node&node=5002446&i=2>
https://avalon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT
http://jade.tilab.com/community-mailinglist.htm
________________________________
If you reply to this email, your message will be added to the discussion below:
http://jade.17737.x6.nabble.com/New-To-JADE-tp5002430p5002446.html
To unsubscribe from New To JADE, click here.
NAML<http://jade.17737.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>



--
Christopher R. Quesada
Electrical Engineering Major (May 2014)
University of West Florida

________________________________
View this message in context: Re: R: R: R: Android mobility - Normal container - Problem with RuntimeService<http://jade.17737.x6.nabble.com/Re-R-R-R-Android-mobility-Normal-container-Problem-with-RuntimeService-tp5002447.html>
Sent from the JADE - Dev mailing list archive<http://jade.17737.x6.nabble.com/JADE-Dev-f4696526.html> at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140310/1b8f47f4/attachment-0001.html>
crq1
2014-03-10 16:00:48 UTC
Permalink
Thank you Caire, and I apologize,

I was searching through the documentation that is included with the
installation of JADE for functions and I was not able to find anything on
parsing. As a general, is it safe to say that I can accomplish in Jade
anything that I can do in Jave? Most of my questions come from 'can I do
this in Jade', because I know what I can do in other programming languages,
it is just doing it in Jade is what troubles me.


On Mon, Mar 10, 2014 at 4:31 AM, Caire Giovanni-2 [via JADE] <
ml-node+s17737n5002451h55 at n6.nabble.com> wrote:

> Hi,
>
>
>
> To investigate the problem you should do the following:
>
> 1) Add the misc add-on to the classpath of the Main Container. By doing
> that, when you launch the Main-Container you should see an additional agent
> called monitor-Main-Container in the RMA GUI.
>
> 2) Launch Container-1 in the first Android device and check that it
> appears in the RMA GUI.
>
> 3) Using the RMA GUI launch a DummyAgent.
>
> 4) Use the DummyAgent GUI to inspect the Main Container internal
> structures by interacting with the monitor-Main-Container agent as shown in
> the picture below.
>
>
>
>
>
> 5) Click the Send button.
>
> 6) Look at the output of the Main Container: you should see something like
> that:
>
> -------------------------------------------------------------
>
> Platform services DUMP
>
> -------------------------------------------------------------
>
> Service entry jade.core.mobility.AgentMobility
>
> - Name = jade.core.mobility.AgentMobility
>
> - Class = jade.core.mobility.AgentMobilityService
>
> - Slices:
>
> - Slice Main-Container
>
> - Class = jade.core.mobility.AgentMobilityProxy
>
> - Associated node = Main-Container
>
> - Inner node = Main-Container
>
> Service entry jade.core.management.AgentManagement
>
> - Name = jade.core.management.AgentManagement
>
> - Class = jade.core.management.AgentManagementService
>
> - Slices:
>
> - Slice Main-Container
>
> - Class = jade.core.management.AgentManagementProxy
>
> - Associated node = Main-Container
>
> - Inner node = Main-Container
>
> Service entry jade.core.messaging.Messaging
>
> - Name = jade.core.messaging.Messaging
>
> - Class = jade.core.messaging.MessagingService
>
> - Slices:
>
> - Slice Main-Container
>
> - Class = jade.core.messaging.MessagingProxy
>
> - Associated node = Main-Container
>
> - Inner node = Main-Container
>
> Service entry jade.core.event.Notification
>
> - Name = jade.core.event.Notification
>
> - Class = jade.core.event.NotificationService
>
> - Slices:
>
> - Slice Main-Container
>
> - Class = jade.core.event.NotificationProxy
>
> - Associated node = Main-Container
>
> - Inner node = Main-Container
>
> Service entry jade.core.resource.ResourceManagement
>
> - Name = jade.core.resource.ResourceManagement
>
> - Class = jade.core.resource.ResourceManagementService
>
> - Slices:
>
> - Slice Main-Container
>
> - Class = jade.core.resource.ResourceManagementProxy
>
> - Associated node = Main-Container
>
> - Inner node = Main-Container
>
> -------------------------------------------------------------
>
>
>
> 7) Check if the AgentMobilityService entry has a slice associated to
> Container-1
>
>
>
> Let me know and bye,
>
>
>
> Giovanni
>
>
>
> *Da:* Walison Jose de Deus [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=0>]
>
> *Inviato:* venerd? 7 marzo 2014 19:41
> *A:* Caire Giovanni; [hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=1>
> *Oggetto:* RE: R: R: R: [jade-develop] R: Android mobility - Normal
> container - Problem with RuntimeService
>
>
>
> Hi,
>
> That's it.
> The execution scenario is a PC where the Main Container squeegee and two
> androids devices that are connected on the same wifi network.
> Initially, I run the RMA GUI on the PC through the command:
> java jade.Boot local-host-192.168.43.171-gui
>
> Then run on a android device an application to create a normal container,
> where the agent moves. This container is successfully created and can view
> it in the RMA GUI;
>
> Then in another android device run another application to create another
> agent in a normal container ("Container-2") which will move to the
> "Container-1". This agent is created successfully and both he and the
> container "Container-2" are visible in the RMA GUI;
>
> Now both before and after the implementation of the method for the
> movement of the agent for the "Container-1" all containers, as the same
> agent are visible in the RMA GUI. In the test I conducted the agent does
> not move to the "Container-1".
>
> Now conducting a test using two emulators to represent the two android
> devices, so I can monitor the execution was returned to me the following
> error when getting out of the agent:
>
> E / jade.core.mobility.AgentMobility (1067): Destination Container-1 does
> not exist or does not support mobility
>
>
> I think maybe the problem is in creating the container or in the same
> communication with the platform. To create the container I'm using this
> method:
>
>
> private void startContainer(final String nickname, Profile profile,
> final RuntimeCallback<AgentController> agentStartupCallback) {
>
> sd.createAgentContainer(profile, new
> RuntimeCallback<AgentContainerHandler>() {
>
>
> @Override
> public void onFailure(Throwable arg0) {
> // TODO Auto-generated method stub
> System.out.println("\n\n deu erro...");
> }
>
>
>
> @Override
> public void onSuccess(AgentContainerHandler arg1) {
> System.out.println("\n\n Container criado...");
> }
> });
>
>
> To set the profile information:
>
> final Properties profile = new Properties();
> profile.setProperty(Profile.MAIN_HOST, host);
> profile.setProperty(Profile.MAIN_PORT, port);
> profile.setProperty(Profile.MAIN, Boolean.FALSE.toString());
> profile.setProperty(Profile.JVM, Profile.ANDROID);
>
> if (AndroidHelper.isEmulator()) {
> // Emulator: this is needed to work with emulated devices
> profile.setProperty(Profile.LOCAL_HOST,
> AndroidHelper.LOOPBACK);
> } else {
> profile.setProperty(Profile.LOCAL_HOST,
> AndroidHelper.getLocalIPAddress());
> }
> // Emulator: this is not really needed on a real device
>
> profile.setProperty(Profile.LOCAL_PORT, "2000");
>
>
> Where host is "192.168.43.171" and port is "1099".
>
>
> what u think?
>
>
> Bye
>
>
> Walison
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------
>
> From: [hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=2>
>
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=5002451&i=3>;
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5002451&i=4>
> Date: Fri, 7 Mar 2014 10:03:59 +0100
> Subject: R: R: R: [jade-develop] R: Android mobility - Normal container -
> Problem with RuntimeService
>
> Hi,
>
>
>
> Let me try to recap.
>
> You are now in a situation with:
>
> - The Main Container running somewhere in the fixed Network (likely in
> your PC)
>
> - Container-1 running in Android device 1
>
> - Container-2 running in Android device 2
>
> - An agent in Container-2 that calls doMove(new ContainerID("Container-1",
> null));
>
>
>
> Is that correct?
>
> If yes, do you actually see the three containers (main, container-1 and
> container-2) in the RMA GUI?
>
> Are you sure they are all there BEFORE the agent calls doMove()?
>
>
>
> Bye,
>
>
>
> Giovanni
>
>
>
> *Da:* Walison Jose de Deus [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=5>]
>
> *Inviato:* mercoled? 5 marzo 2014 03:44
> *A:* Caire Giovanni; [hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=6>
>
> *Oggetto:* RE: R: R: [jade-develop] R: Android mobility - Normal
> container - Problem with RuntimeService
>
>
>
> Hi,
>
> Thanks for the tip, it worked perfectly and the execution of the agent is
> begining successfully. Now, I'm having trouble trying to move an agent
> between normal containers on android devices. For this I created another
> identical application which should create a normal container on a android
> device. I use the following method to launch normal container and works
> properly:
>
>
> private void startContainer(final String nickname, Profile profile,
> final RuntimeCallback<AgentController> agentStartupCallback) {
>
> sd.createAgentContainer(profile, new
> RuntimeCallback<AgentContainerHandler>() {
>
> @Override
> public void onFailure(Throwable arg0) {
> // TODO Auto-generated method stub
> System.out.println("\n\n deu erro...");
> }
> @Override
> public void onSuccess(AgentContainerHandler arg1) {
> System.out.println("\n\n Container criado...");
> }
> });
>
> Then run another application on another device, which also throws a normal container
> and an agent in the same, and whose only action the agent is trying to
> move into a normal container to another device, the application returns me
> the following message:...
>
> E/jade.core.mobility.AgentMobility(1067): Destination Container-1 does not
> exist or does not support mobility
>
>
> I'm using the following method to move the agent:
>
> public void moveCont1(){
> addBehaviour(new OneShotBehaviour(this) {
>
>
> @Override
> public void action() {
> String nome = "Container-1";
> ContainerID dest = new ContainerID();
> dest.setName(nome);
> }
> });
> }
>
> What do you think could be wrong?
>
> Bye,
>
> Walison
>
>
>
>
>
>
>
> Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle
> persone indicate. La diffusione, copia o qualsiasi altra azione derivante
> dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora
> abbiate ricevuto questo documento per errore siete cortesemente pregati di
> darne immediata comunicazione al mittente e di provvedere alla sua
> distruzione, Grazie.
>
> *This e-mail and any attachments **is** confidential and may contain
> privileged information intended for the addressee(s) only. Dissemination,
> copying, printing or use by anybody else is unauthorised. If you are not
> the intended recipient, please delete this message and any attachments and
> advise the sender by return e-mail, Thanks.*
>
>
>
> *[image: rispetta l'ambiente]Rispetta l'ambiente. Non stampare questa mail
> se non ? necessario.*
>
>
>
> _______________________________________________
> jade-develop mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5002451&i=7>
> https://avalon.cselt.it/mailman/listinfo/jade-develop
> UNSUBSCRIBE INSTRUCTIONS AT
> http://jade.tilab.com/community-mailinglist.htm
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://jade.17737.x6.nabble.com/New-To-JADE-tp5002430p5002451.html
> To unsubscribe from New To JADE, click here<http://jade.17737.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5002430&code=Y3JxMUBzdHVkZW50cy51d2YuZWR1fDUwMDI0MzB8LTM4ODY5MzU1>
> .
> NAML<http://jade.17737.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
Christopher R. Quesada
Electrical Engineering Major (May 2014)
University of West Florida




--
View this message in context: http://jade.17737.x6.nabble.com/Re-R-R-R-R-Android-mobility-Normal-container-Problem-with-RuntimeService-tp5002453.html
Sent from the JADE - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140310/925ec212/attachment-0001.html>
Caire Giovanni
2014-03-12 12:43:50 UTC
Permalink
Hi,

Correct: JADE does not set any limitations on the usage of JAVA API. So whatever can be done from a Java program, can be done from a Jade agent.

Bye,

Giovanni

Da: jade-develop-bounces at avalon.tilab.com [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di crq1
Inviato: luned? 10 marzo 2014 17:01
A: jade-develop at avalon.tilab.com
Oggetto: Re: [jade-develop] R: R: R: R: Android mobility - Normal container - Problem with RuntimeService

Thank you Caire, and I apologize,

I was searching through the documentation that is included with the installation of JADE for functions and I was not able to find anything on parsing. As a general, is it safe to say that I can accomplish in Jade anything that I can do in Jave? Most of my questions come from 'can I do this in Jade', because I know what I can do in other programming languages, it is just doing it in Jade is what troubles me.

On Mon, Mar 10, 2014 at 4:31 AM, Caire Giovanni-2 [via JADE] <[hidden email]</user/SendEmail.jtp?type=node&node=5002453&i=0>> wrote:
Hi,

To investigate the problem you should do the following:
1) Add the misc add-on to the classpath of the Main Container. By doing that, when you launch the Main-Container you should see an additional agent called monitor-Main-Container in the RMA GUI.
2) Launch Container-1 in the first Android device and check that it appears in the RMA GUI.
3) Using the RMA GUI launch a DummyAgent.
4) Use the DummyAgent GUI to inspect the Main Container internal structures by interacting with the monitor-Main-Container agent as shown in the picture below.

[http://jade.17737.x6.nabble.com/attachment/5002451/0/image003.jpg]

5) Click the Send button.
6) Look at the output of the Main Container: you should see something like that:
-------------------------------------------------------------
Platform services DUMP
-------------------------------------------------------------
Service entry jade.core.mobility.AgentMobility
- Name = jade.core.mobility.AgentMobility
- Class = jade.core.mobility.AgentMobilityService
- Slices:
- Slice Main-Container
- Class = jade.core.mobility.AgentMobilityProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.management.AgentManagement
- Name = jade.core.management.AgentManagement
- Class = jade.core.management.AgentManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.management.AgentManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.messaging.Messaging
- Name = jade.core.messaging.Messaging
- Class = jade.core.messaging.MessagingService
- Slices:
- Slice Main-Container
- Class = jade.core.messaging.MessagingProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.event.Notification
- Name = jade.core.event.Notification
- Class = jade.core.event.NotificationService
- Slices:
- Slice Main-Container
- Class = jade.core.event.NotificationProxy
- Associated node = Main-Container
- Inner node = Main-Container
Service entry jade.core.resource.ResourceManagement
- Name = jade.core.resource.ResourceManagement
- Class = jade.core.resource.ResourceManagementService
- Slices:
- Slice Main-Container
- Class = jade.core.resource.ResourceManagementProxy
- Associated node = Main-Container
- Inner node = Main-Container
-------------------------------------------------------------

7) Check if the AgentMobilityService entry has a slice associated to Container-1

Let me know and bye,

Giovanni

Da: Walison Jose de Deus [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=0>]
Inviato: venerd? 7 marzo 2014 19:41
A: Caire Giovanni; [hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=1>
Oggetto: RE: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hi,

That's it.
The execution scenario is a PC where the Main Container squeegee and two androids devices that are connected on the same wifi network.
Initially, I run the RMA GUI on the PC through the command:
java jade.Boot local-host-192.168.43.171-gui

Then run on a android device an application to create a normal container, where the agent moves. This container is successfully created and can view it in the RMA GUI;

Then in another android device run another application to create another agent in a normal container ("Container-2") which will move to the "Container-1". This agent is created successfully and both he and the container "Container-2" are visible in the RMA GUI;

Now both before and after the implementation of the method for the movement of the agent for the "Container-1" all containers, as the same agent are visible in the RMA GUI. In the test I conducted the agent does not move to the "Container-1".

Now conducting a test using two emulators to represent the two android devices, so I can monitor the execution was returned to me the following error when getting out of the agent:

E / jade.core.mobility.AgentMobility (1067): Destination Container-1 does not exist or does not support mobility

I think maybe the problem is in creating the container or in the same communication with the platform. To create the container I'm using this method:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {


@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}



@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});


To set the profile information:

final Properties profile = new Properties();
profile.setProperty(Profile.MAIN_HOST, host);
profile.setProperty(Profile.MAIN_PORT, port);
profile.setProperty(Profile.MAIN, Boolean.FALSE.toString());
profile.setProperty(Profile.JVM, Profile.ANDROID);

if (AndroidHelper.isEmulator()) {
// Emulator: this is needed to work with emulated devices
profile.setProperty(Profile.LOCAL_HOST, AndroidHelper.LOOPBACK);
} else {
profile.setProperty(Profile.LOCAL_HOST,
AndroidHelper.getLocalIPAddress());
}
// Emulator: this is not really needed on a real device

profile.setProperty(Profile.LOCAL_PORT, "2000");


Where host is "192.168.43.171" and port is "1099".


what u think?


Bye


Walison



































________________________________
From: [hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=2>

To: [hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=3>; [hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=4>
Date: Fri, 7 Mar 2014 10:03:59 +0100
Subject: R: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService
Hi,

Let me try to recap.
You are now in a situation with:
- The Main Container running somewhere in the fixed Network (likely in your PC)
- Container-1 running in Android device 1
- Container-2 running in Android device 2
- An agent in Container-2 that calls doMove(new ContainerID(?Container-1?, null));

Is that correct?
If yes, do you actually see the three containers (main, container-1 and container-2) in the RMA GUI?
Are you sure they are all there BEFORE the agent calls doMove()?

Bye,

Giovanni

Da: Walison Jose de Deus [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=5>]
Inviato: mercoled? 5 marzo 2014 03:44
A: Caire Giovanni; [hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=6>

Oggetto: RE: R: R: [jade-develop] R: Android mobility - Normal container - Problem with RuntimeService

Hi,

Thanks for the tip, it worked perfectly and the execution of the agent is begining successfully. Now, I'm having trouble trying to move an agent between normal containers on android devices. For this I created another identical application which should create a normal container on a android device. I use the following method to launch normal container and works properly:


private void startContainer(final String nickname, Profile profile,
final RuntimeCallback<AgentController> agentStartupCallback) {

sd.createAgentContainer(profile, new RuntimeCallback<AgentContainerHandler>() {

@Override
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
System.out.println("\n\n deu erro...");
}
@Override
public void onSuccess(AgentContainerHandler arg1) {
System.out.println("\n\n Container criado...");
}
});

Then run another application on another device, which also throws a normal container and an agent in the same, and whose only action the agent is trying to move into a normal container to another device, the application returns me the following message:...

E/jade.core.mobility.AgentMobility(1067): Destination Container-1 does not exist or does not support mobility


I'm using the following method to move the agent:

public void moveCont1(){
addBehaviour(new OneShotBehaviour(this) {


@Override
public void action() {
String nome = "Container-1";
ContainerID dest = new ContainerID();
dest.setName(nome);
}
});
}
What do you think could be wrong?

Bye,

Walison





Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.
[https://col128.afx.ms/att/GetInline.aspx?messageid=8798cf06-a5d7-11e3-a84d-00215ad9e644&attindex=0&cp=-1&attdepth=0&imgsrc=cid%3a00000000000000000000000000000003%40TI.Disclaimer&cid=0b03c6de3a974c61&hm__login=walisonjose16&hm__domain=hotmail.com&ip=10.48.40.8&d=d4258&mf=0&hm__ts=Fri%2c%2007%20Mar%202014%2018%3a23%3a29%20GMT&st=walisonjose16&hm__ha=01_d09e82c178a9a57ed69fb0435fc5cb5824196cd256ee7a516ab1032bd34a8c09&oneredir=1]Rispetta l'ambiente. Non stampare questa mail se non ? necessario.



_______________________________________________
jade-develop mailing list
[hidden email]<http://user/SendEmail.jtp?type=node&node=5002451&i=7>
https://avalon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT
http://jade.tilab.com/community-mailinglist.htm
________________________________
If you reply to this email, your message will be added to the discussion below:
http://jade.17737.x6.nabble.com/New-To-JADE-tp5002430p5002451.html
To unsubscribe from New To JADE, click here.
NAML<http://jade.17737.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>



--
Christopher R. Quesada
Electrical Engineering Major (May 2014)
University of West Florida

________________________________
View this message in context: Re: R: R: R: R: Android mobility - Normal container - Problem with RuntimeService<http://jade.17737.x6.nabble.com/Re-R-R-R-R-Android-mobility-Normal-container-Problem-with-RuntimeService-tp5002453.html>
Sent from the JADE - Dev mailing list archive<http://jade.17737.x6.nabble.com/JADE-Dev-f4696526.html> at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://avalon.cselt.it/pipermail/jade-develop/attachments/20140312/0341b543/attachment-0001.html>
Loading...