tags:

views:

145

answers:

1

Hi stackoverflow,

I am soon going to start a project where I'm required to program a Modbus driver. My initial approach was to want to do it in Java, however my boss has had contact with a company that has experience in Modbus, and they said C is the better language to approach Modbus. So my boss pretty much demanded it to be in C. My C knowledge is not really big, so it would require me to learn enough to get the Modbus driver working in proper and stable order.

So, my question to you stackoverflow people with some experience in Modbus: how important could the choice of C vs Java be? The modbus site seems to have Java libraries, if C was so superior to Java in every way, why would they have those libraries? Would it be useful to learn C properly for the advantages that might give?

+1  A: 

I only used some implementations of Modbus in C/C++ (in house implementations), but there are some open source implementations of modbus. I believe they can be used if the license suits you. You can implement it also in Java - it's a matter of choice; in that case you'll have to justify your choice.

LATER: this implementation is under BSD license. You should be able do anything with it - but don't forget to mention the source.

Iulian Şerbănoiu
What is the reason you're using C/C++ internally? I know about the open source implementations, and the licenses are certainly ok, we're not "afraid" of having that part of the code known to the enduser and to give credits to the person who made the library. The only consideration I'm making is the time-to-learn-decent-c versus stability, speed, resource usage...
cpf
Developing high safety applications forces you to have deterministic running times and a lot of control over the application (memory, files opened, etc). This is easier to achieve in low/medium-level languages that let us have more control: C/C++. The garbage collector from java is according to our standards out of this category.I agree that C is not easy to learn in a short time but we have to admit that it has some advantages over Java when it comes to strict control over the resources.
Iulian Şerbănoiu