Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Automation, Robotics?

From: dlhawley:home at: 15-Mar-2001 21:38

Previously, you (Holger Kruse) wrote:
>> Although striping the /dev prefix is somewhat handy it at first
seemed limiting in QNX where a serial port on another node has a node number or name in front of /dev. ie: //4/dev/ser5 refers to serial port 5 on node 4 and can be opened accross the net just like /dev/ser1 on whatever the local node is. Fortunately, QNX allow one to symbolic link (prefix) a remote node into the local namespace. One could thus prefix //4/dev/ser5 -> /dev/ser4.5 and open ser4.5 using REBOL - so REBOL does not to be QNX net aware to benefit.
> At the moment REBOL does not directly support any QNX-specific > features. It accesses QNX through standard Posix functions, which is > why any QNX-specific extensions to the serial mechanism (or other > features) probably won't work.
You miss my point here I think. What I mean is that since QNX allows building symbolic links accross network nodes, REBOL does not need to know about the QNX network features - it just works.
> This is also why some users have problems setting the baud rate from > REBOL in QNX. Apparently some versions of QNX have some bugs in their > Posix emulation code. This is not a bug in REBOL. The same code works > fine for "regular" Unix flavors.
I hope that you'vde reported this to QSSL. I do find it hard to believe though. The GNU stuff I've played with tends to handle the serial ports correctly if it compiles. The QNX 4 posix functions seem to work well in code I've written with the exception that flow control has a funny "lock" bit which is not obvious.
>> The crazy thing that REBOL does is make you open the port with a path name serial://port[N] where N is the index? of the port name in system/ports/serial. Thus in serial-path-to above, I find the index? or append the passed name and use the length? to get port[N]. Of course, REBOL then has to change this back into an open( "/dev/serX", ..) so to me it would make sense to use the port name instead of index. > One of the main goals of /Core is interoperability across platforms. > Introducing a standardized naming scheme for serial ports means that > scripts do not have to be changed when moving them across platforms. > With the current scheme the only part of a script that has to change > is the port number, as opposed to changing full port specs.
How is changing a port number any easier that changing a name? Don't you still need to either edit hard coded port numbers of build some cover function which creates a port spec given a number parameter?
>> and REBOL would figure out that you want 2400 baud, 7 data bits, even parity and 2 stop bits. I don't think that REBOL provides a mechanisim to change the option after an open. > It does. Just change the parameters in the port structure and call > 'update on the port.
Great I had assumed that there must be a method, just hadn't a clue on where to find it. This is probably my biggest gripe re REBOL - it does a lot of cool things, but figuring out how is a mystery. Yes, I've read the official guide, but port coverage is pretty skimpy. Of course serial ports are new so I know that I'm out on a limb there. Dave -- David L. Hawley D.L. Hawley and Associates 1.503.274.2242 Software Engineer [David--L--Hawley--computer--org]