Skip navigation.
Home
The QNX Community Portal

View topic - How to outport data to an address on another node ?

How to outport data to an address on another node ?

For the old QNX2 and QNX4 RTOS

How to outport data to an address on another node ?

Postby sieudot » Wed Mar 16, 2016 5:44 am

Hi,

I have some computers connected together via Ethernet, from node 1 to node 3.

Now, on node 1, I want to outport data to an address on node 2, using function outp(), how can I do?

It is
Code: Select all
 system( "on -n2 outp(0x123, 0xFF)" )
, isn't it? Or any clues?
sieudot
Active Member
 
Posts: 45
Joined: Thu Mar 17, 2005 8:14 am
Location: VietNam

Re: How to outport data to an address on another node ?

Postby Tim » Wed Mar 16, 2016 5:11 pm

outp is a C function, not a shell command. You can't execute C functions from the shell.

Make a small program to do what you want like:

Code: Select all
void main()
  {
    outp( 0x123, 0xFF );
  }


Compile this into an executable (say it's called 'foo'). Then you can do:

system( "on -n2 foo" )

Tim

P.S. If you need variable values outputted, you can use argc/argv in main() to acquire the values to put in outp.
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am


Return to QNX2 and QNX4

Who is online

Users browsing this forum: No registered users and 1 guest

cron