need example code

Where can I find example code for the following:

  • multithreading
  • serial I/O communications, including changing baud rate, etc.
  • Ethernet based communications

Are there QNX commands for changing baud rate in a shell?

Is it possible to communicate over two different Ethernet cards?

TF

“TF” <trueforce@trueforce.com> wrote in message
news:94djpe$2vh$1@inn.qnx.com

Where can I find example code for the following:

  • multithreading

Get a book on pthreads. The subject of multi-threading is too large to
cover with a few code samples. I recommend getting both the Butenhof book
and the O’Reilly book.

  • serial I/O communications, including changing baud rate, etc.

If you pick up any Linux based serial comms source it should tell you 99% of
what you need to know.

  • Ethernet based communications

Do you mean Sockets or Qnet ? If you mean Sockets then the same advice as
given for serial comms above applies; if Qnet then you don’t need to know
anything at all (QNX networking is completely transparent).

Are there QNX commands for changing baud rate in a shell?

stty baud=xxxx </dev/ser[x]

where x is the number of the serial device.

hint: “use stty” will give you the info to change a lot more as well.

Is it possible to communicate over two different Ethernet cards?

Do you mean 2 cards redundantly ? If so, then yes; in fact, Qnet let’s you
select the way in which your “redudant” connection behaves (see QoS in the
documentation).

If you simply mean multiple interfaces with routing (as with every other O/S
on the planet, then yes, of course).

Rennie