Need your advice

6 posts / 0 new
Last post
Offline
Last seen: 5 years 11 months ago
Joined: 12/03/2017
Posts: 6
Need your advice

Hello,

I'm working on master thesis project where I need to apply DDS with existing CPS system for smart buildings. CSP system's source code written with modeling language called ThingML. After compiling program runs as Java application.

Simple version of this CPS receive temperature from one or more thermometers. After that CPS sends signal to turn on/off heater switcher.

So my question is how/where to start?

Offline
Last seen: 2 months 2 weeks ago
Joined: 02/11/2016
Posts: 144

Hello,

First off: sounds like an interesting thing, although CSP (or is it CPS?) is an acronym used for many things, would be nice to know what it means.

Now for my questions:

1. Why do you NEED to apply DDS (in particular)?

I mean, DDS may be the right tool for the job but now that you're starting it may be the time to verify this.

2. "After compiling program runs as Java application" - do you mean that it is complied into bytecode and then run by the jvm?

If so, it would be quite difficult (or rather impossible) to make use of the java api for RTI Connext DDS.

If you mean that it is actually turned into java code (*.java files) and then turned into classes to be run by jvm, you can make use of the java api.

 

I am not familiar with ThingML but my guess is that there's no directly linked rti api for it.

There are options for you to create some application in another language (that is supported by rti) and have your ThingML interact with abovementioned application (using a networking solution that is supported by ThingML and gives you the performance you need).

(solutions like this are usually used by monitoring tools where fully integrating them into all the various languages is difficult but creating agents that can be run locally and using a simple api to allow people to make use of the monitoring tools using any language).

 

In short:

If you realize you really need DDS:

   If you have java files, you can use the java api.

   Otherwise I recommend creating an agent-like application (using a supported language) with a simple api and connecting it to your ThingML app.

 

Good luck,

Roy.

Offline
Last seen: 5 years 11 months ago
Joined: 12/03/2017
Posts: 6

Hello Roy, appreciate your reply.

My bad not to give a clear definition of CPS. It stands for Cyber-Physical System in my case. 

Back to questions:

1) I need to use DDS because I and my professor agreed that it would be interesting to evaluate such technology whit CPS system he is using in his course. My work is to apply DDS standard and evaluate results in different scopes including evaluation versus another framework. 

2) After compiling .java files is generated. It is also possible to compile towards other languages, but I was using Java. 

Should I use "Code Generator" or should I code everything from scratch using Java API?

 

 

Offline
Last seen: 2 months 2 weeks ago
Joined: 02/11/2016
Posts: 144

Hey,

That does sound cool.

1. Sounds like a good enough reason, maybe if you explain what you'll be trying to do with dds it can help me in helping you?

3. both the code generator and rti dds generator are nice tools to use. I would use rti dds generator no matter what to generate better performing data types but regarding the code generator have less experience so I can't say for sure if it's good or not (especially since I don't know what your use-case is, exactly).

 

Good luck,

Roy.

Offline
Last seen: 5 years 11 months ago
Joined: 12/03/2017
Posts: 6

Roy, 

I hope composite structure I upload with this post can explain my CPS system more precisely then I can. Currently, this system consists of PSM(platform-specific module) and PIM(platform-independent module). As you can see from composite structure "The Room" receives temperature from specific thermometers and sends commands to specific switchers(TeldusSrtcik). 

I need to modify the system in the way it can use and benefit from DDS. I understand the concept of how it can be coded, but not sure how to use it with language like Thingml. It may be just me who just can't see an obvious solution. 

I continue reading documentation and trying to code something that works )

 

File Attachments: 
Offline
Last seen: 2 months 2 weeks ago
Joined: 02/11/2016
Posts: 144

Hey,

im not sure about the thingml portion, is it possible to use some form of dependency injection so that your thingml uses an interface to communicate? And after compiling it into java, inject a Java implementation of your interface (based on the rti dds Java api)?

 

regarding how to utilize dds:

1. Decide on relevant data types (thermometers: location, measured temperature, time of measurement, maybe some indicator of the quality / a brand for the theremometer. I'm not sure what kind of data you're sending switchers).

2. If you control the code for the theremometers/switchers, modify it to utilize dds. If not, create some bridging app that translates the external language to dds.

3. Use keys and qos options fitting your use case