Subject:
|
Re: RCX comunications - UDP/IP???
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Thu, 5 Dec 2002 04:29:33 GMT
|
Original-From:
|
Steve Baker <sjbaker1@airmail.#nospam#net>
|
Viewed:
|
822 times
|
| |
 | |
Jeff Wood wrote:
> Is the RCX capable of broadcasting a message without handshaking similar to
> UDP/IP using NQC? For those that arent familar, UDP simply broadcast a
> packet and doesn't require a confirmation that the packet was recieved
> unlike its brother TCP/IP
THe simple 'SendMessage(c)' command in NQC doesn't do any handshaking
- and (of course) it broadcasts.
> This is for a race car on the discussion that I would like the car to
> broadcast an Identifier, lap time or otherwise for "pit board" type
> communications between the multiple cars and a separate RCX trackside.
THe 'SendMessage' command only sends a single byte - and one problem
with this is that if you want to send a multi-byte message, it may
be only partially recieved.
There are also problems if multiple RCX's send data at the same time -
the results will be horribly mangled and probably rejected by the
computer that's reading them.
This would make sending something complex quite difficult - but it's
certainly not impossible. You just need to be sure that some of the
bits out of every byte you send identify what part of the message this
is - and who it's from.
> any code example would be great.
The NQC documentation for SendMessage/ClearMessage/Message is
quite clear. I don't think you'll need an example.
However, I have some code that sends and recieves messages here:
http://www.sjbaker.org/steve/lego/master_slave/
You may want to consider a 'master/slave' setup where the
trackside computer polls cars as they break an optical beam at
the start/finish line. That way you can be reasonably certain
that you'll be in a position to hear their reply - and by telling
each car in turn to report, you can prevent them from all talking
at once - which eliminates one cause of data corruption.
---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@airmail.net> WorkEmail: <sjbaker@link.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net http://tuxaqfh.sf.net
http://tuxkart.sf.net http://prettypoly.sf.net
|
|
Message is in Reply To:
 | | RCX comunications - UDP/IP???
|
| Is the RCX capable of broadcasting a message without handshaking similar to UDP/IP using NQC? For those that arent familar, UDP simply broadcast a packet and doesn't require a confirmation that the packet was recieved unlike its brother TCP/IP This (...) (22 years ago, 5-Dec-02, to lugnet.robotics)
|
3 Messages in This Thread:   
  
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|