HEADS-project / heads_ide

Home Page:http://heads-project.eu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New port names?

kehusa opened this issue · comments

I have problems to bind the ports generated in ThingML after the code generator upgrade.
Before a port configured like this in ThingML:
required port sensor_service
@public "true"
{
sends start_periodic_reading, reading_cancel, read
receives reading, ready
}
was translated to one out port and one in port in kevoree like this:

in_HomeGW_server_sensor_service_in: function (msg) {
...
},
out_HomeGW_server_sensor_service_out: function(msg) {/* This will be overwritten @runtime by Kevore$

With the new code generator this looks like:

in_Hom_sen_reading_in: function (msg) {
this.HomeGW_server.receivereadingOnsensor_service(msg.split(';'));
},
in_Hom_sen_ready_in: function (msg) {
this.HomeGW_server.receivereadyOnsensor_service(msg.split(';'));
}
},
Hom_sen_start_periodic_reading_proxy: function() {this.out_Hom_sen_start_periodic_reading_out(arguments[0]);},
out_Hom_sen_start_periodic_reading_out: function(msg) {/* This will be overwritten @runtime by Kevoree JS /},
Hom_sen_reading_cancel_proxy: function() {this.out_Hom_sen_reading_cancel_out();},
out_Hom_sen_reading_cancel_out: function(msg) {/
This will be overwritten @runtime by Kevoree JS /},
Hom_sen_read_proxy: function() {this.out_Hom_sen_read_out();},
out_Hom_sen_read_out: function(msg) {/
This will be overwritten @runtime by Kevoree JS */},

It seems like I now have a kevoree port generated for every message sent and received from a ThingML port. Is this the way it is supposed to work? My kevscript mappings are then becoming much more complex.

Yes, see my last comment on HEADS-project/forum#14

Basically, since we wanted by default to get rid of any serialization in the messages (so that you are free to wrap things as you want), we just pass the value of the message (e.g. a temperature value), without any more indication (i.e. we do not not that the message is a temperature message, the only way to know it is that it arrives on a Kevoree port related to that particular message)

@kehusa should we close that issue? or?

That is OK, I am able to achieve what I want.

Knut Eilif

2015-10-26 12:35 GMT+01:00 Brice Morin notifications@github.com:

@kehusa https://github.com/kehusa should we close that issue? or?


Reply to this email directly or view it on GitHub
#66 (comment)
.

| Knut Eilif Husa | Tellu AS | Lensmannslia 4, 1386 Asker - NORWAY| Direct:
+47 452 49496 | www.tellu.no |

This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system.