Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » About RS232
Re: About RS232 [message #39476 is a reply to message #3788] Wed, 20 March 2013 15:22 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

Thanks for all those explanations, Pavel !

I globally agree with you. I'm studying all that, but as I'm doing several things in the same time, so I cannot be very fast...

I already studied more jerson's code, and as I said there is incompatibilities between Linux and Windows versions. There is surely solutions, but it seems that the approach is different (not same functions/methods...), so it will not be as easy as I thought first to make a package working as well under W$ as under Linux.

I'll try your code, Mindtraveller. I already had a look on the crossplatserial code, and finally it seems clear, well done and really cross-platforms ! I'll make as soon as possible a small program to test it or more exactly to have a better understanding of your approch that seems very interresting.

Re: About RS232 [message #39883 is a reply to message #39460] Thu, 09 May 2013 08:58 Go to previous messageGo to next message
deep is currently offline  deep
Messages: 197
Registered: July 2011
Location: Bangalore
Experienced Member
Hi Pavel,

Mindtraveller wrote on Sun, 17 March 2013 13:26


2. Datagramms <-> values (protocol stuff).
Actually the main code should work with data. Not with actual bytes you send through serial port. I achieved it with my BNF library which is responsible for using protocols.
That is how it works:
You have external file defining a protocol. BNF takes plain bytes and returns Vector<Value> and back. For example:
***modbus   (crc_start byte byte word_be word_be crc_end crc_modbus) 
          | (crc_start byte byte byte    word_be crc_end crc_modbus);
***icp_din_clear_request   "$" HEX:2 "C" "\0D";
***icp_din_clear_answer    (("!" arg:1 HEX:2)  | ("?" arg:0 HEX:2)) "\0D";


....

Here are the most of the concepts I propose. If you find them too comlicated, you may just use attached library. If you consider using all these levels of abstraction in U++, we may discuss it further.


I would like to use all these ideas in U++. I want to begin with modbus-rtu or modbus-ascii.

Can you give further info about BNF?

Thanks and regards.

Deepak


Warm Regards

Deepak
Re: About RS232 [message #39914 is a reply to message #39883] Sat, 11 May 2013 00:38 Go to previous message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Heelo, Deepak!

BNF is very well known around:
http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form

As of Modbus RTU, you may see my version of it in example above.
Previous Topic: templated callback
Next Topic: Memory Mapped Files
Goto Forum:
  


Current Time: Wed Nov 20 18:28:02 CET 2019

Total time taken to generate the page: 0.01238 seconds