HMI in non-Photon environment

Hi,

I am trying to write a HMI for an application I’ve writtten on a non-
Photon environment.
The best tool I’ve found is ncurses.

My problem that all the input functions I use (getch(), wgetch() - with
nodelay(), notimeout()) cause my program to be Reply-block with Dev.

  1. Has any of you used ncurses for HMI & can give me a hint?
  2. Perhaps you could recomend a better tool?

Thanks.


Hagai Tunik
NETAFIM Irrigation Equipment & Drip Systems
e-mail : Mailto:htunik@netafim.com
WWW : http://www.netafim.com


Sent via Deja.com http://www.deja.com/
Before you buy.

Look at dev_arm and dev_read documentation.


There is also kbhit() but that’s very bad cause it busy waits.

“Hagai Tunik” <hagai@yours.com> wrote in message
news:8leml4$ov7$1@nnrp1.deja.com

Hi,

I am trying to write a HMI for an application I’ve writtten on a non-
Photon environment.
The best tool I’ve found is ncurses.

My problem that all the input functions I use (getch(), wgetch() - with
nodelay(), notimeout()) cause my program to be Reply-block with Dev.

  1. Has any of you used ncurses for HMI & can give me a hint?
  2. Perhaps you could recomend a better tool?

Thanks.


Hagai Tunik
NETAFIM Irrigation Equipment & Drip Systems
e-mail : Mailto:> htunik@netafim.com
WWW : > http://www.netafim.com


Sent via Deja.com > http://www.deja.com/
Before you buy.

I forgot to mention select()

“Mario Charest” <mcharest@zinformatic.com> wrote in message
news:8les52$ngp$1@inn.qnx.com

Look at dev_arm and dev_read documentation.


There is also kbhit() but that’s very bad cause it busy waits.

“Hagai Tunik” <> hagai@yours.com> > wrote in message
news:8leml4$ov7$> 1@nnrp1.deja.com> …
Hi,

I am trying to write a HMI for an application I’ve writtten on a non-
Photon environment.
The best tool I’ve found is ncurses.

My problem that all the input functions I use (getch(), wgetch() - with
nodelay(), notimeout()) cause my program to be Reply-block with Dev.

  1. Has any of you used ncurses for HMI & can give me a hint?
  2. Perhaps you could recomend a better tool?

Thanks.


Hagai Tunik
NETAFIM Irrigation Equipment & Drip Systems
e-mail : Mailto:> htunik@netafim.com
WWW : > http://www.netafim.com


Sent via Deja.com > http://www.deja.com/
Before you buy.

Hagai Tunik <hagai@yours.com> writes:

I am trying to write a HMI for an application I’ve writtten on a non-
Photon environment.
The best tool I’ve found is ncurses.

My problem that all the input functions I use (getch(), wgetch() - with
nodelay(), notimeout()) cause my program to be Reply-block with Dev.

  1. Has any of you used ncurses for HMI & can give me a hint?

If you put your stdin into raw() mode, and then use select() to
determine whether input is available, then getch() and friends will
not block, at least for the first byte. You can use _select_receive()
with select() to let your application also receive QNX messages and
proxies.

  1. Perhaps you could recomend a better tool?

MGL version 5 beta works reasonably well in QNX 4. It is a little bit
low-level, but you can create pretty good-looking user interfaces with
it.

If the non-Photon constraint is just because the tool is originally
written outside of Photon, you could try creating a Photon interface
that runs your command-line program in a PTY. Your Photon program
just talks to your program, emittting and parsing strings.

Andrew


Andrew Thomas, President, Cogent Real-Time Systems Inc.
2430 Meadowpine Boulevard, Suite 105, Mississauga, Ontario, Canada L5N 6S2
Email: andrew@cogent.ca WWW: http://www.cogent.ca