Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Dvelopment Environment

Dvelopment Environment 11 years 11 months ago #3690

  • abella
  • abella's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 42
  • Karma: 0
Hello,

I want to test some changes in Modbus TCP communications source code, because I think there is a minor bug if it's not working in reliable network (my case, it's a horrible and crowded network...). Sometimes I receive erroneous data and network packages are perfect in wireshark.I want to test if it's really a bug and contribute a fix to the code.

I know there are people compiling sources, but is somebody programing with a complete development environment? I mean, I usually use eclipse to program and build c++, but I have no idea if it's posible to use it with proview source code. Maybe other IDE.

I can compile sources following guides and the article in the wiki (Thanks Marc!, perfect), but testing each change I made in the code takes me a complete morning...

Thnaks!
The administrator has disabled public write access.

Re: Dvelopment Environment 11 years 11 months ago #3691

  • marc
  • marc's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 710
  • Thank you received: 70
  • Karma: 24
Hi Abella,

The build scripts will give problems when you want to use an IDE.
Did you found pwrsrc_4.8.4-1/src/doc/man/en_us/man_pwre.pdf ?
In pwrsrc_4.8.4-1/src/doc/man/en_us/man_io.pdf are examples as well.

Please can you drop me your mail:
This email address is being protected from spambots. You need JavaScript enabled to view it. I want to ask you something
Please, use the Wiki if you succeeded your project or solved your problem. Share your work, so we can learn from each other.
The administrator has disabled public write access.

Re: Dvelopment Environment 11 years 11 months ago #3692

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Abella,

Here are some hints to speed up the development.

1) Edit $pwra_db/pwr_projectlist.dat and add the build root as a base realase

%base X4.8.4 /home/pwrp/pwrsrc_4.8.4-1/rls

Then set this version to your project in the same file. Now you don't have to build new packages for each modification.

2) After editing the source file, instead of building with pwre build_all_modules, just build the otherio rt archive:

> pwre module otherio
> pwre build lib rt src
> pwre merge

3) Force a build of your node (first time you have to attach the project again to redirect to the new version).

/Claes
The administrator has disabled public write access.

Re: Dvelopment Environment 11 years 11 months ago #3693

  • abella
  • abella's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 42
  • Karma: 0
Hi Marc and Claes.

I'm just starting to get used to proview commands in the development environment. I'll tell you how can i get from that.

Thanks both!

PS: Marc, you have an email ;).
The administrator has disabled public write access.

Re: Dvelopment Environment 11 years 11 months ago #3704

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hi Abella,

This sounds interesting. I'm sure there is more than one bug so all improvements are of course welcomed. There are some other open source libraries for Modbus TCP which might be interesting to have a look at.

Good luck !

-Robert
The administrator has disabled public write access.

Re: Dvelopment Environment 11 years 11 months ago #3705

  • abella
  • abella's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 42
  • Karma: 0
Hi Robert,

I've found a pair of details and I'm right now tracing the received data. I'm quite sure there is a bug in the way the data is received from the socket. The problem apears in crowded networks "frecuently". But I have to test it a bit more before saying anything serious.

In a standalone development I used libmodbus github.com/stephane/libmodbus . Comparing with this one I think there is a bug in the reception, but i have to test.

I'll wrote a document about what I found and a fix. I don't know if it makes sense to put the info about the bug on the forum.

Thank you Robert!
Last Edit: 11 years 11 months ago by abella. Reason: typos...
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 9.106 seconds