Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Want to connect with my resource manager: (3 Items)
   
Want to connect with my resource manager  
I wrote a resource manager for I2C.  The documents say a resource manager must run as 'root'. How do I assign it to root
?

In a thread I want to open my I2C resource manager and send writes and reads to it.  The document says to open with an 
'open' function.

fd = open("/dev/ser1/",O_RDWR);

How do I address my I2C resource manager?
fd = open("/dev/I2C/",O_RDWR);  ??  How do I give my resource manager a name the 'open' function can find?

I used the same code for all resource manager function opens in QNX.

int i2c_open(resmgr_context_t *ctp, io_open_t *msg, RESMGR_HANDLE_T *handle, void *extra)
{
	return(iofunc_open_default(ctp, msg, handle, extra));
}

Makes no sense!  Can anyone advise?
Re: Want to connect with my resource manager  
It is wrong forum, and I am not sure what you asking, If you want to 
send "message" to resmgr you usually use "write" system call,
i.e
write(fd,buf,l);
On 24/01/2012 6:28 PM, Ralph Sweitzer wrote:
> I wrote a resource manager for I2C.  The documents say a resource manager must run as 'root'. How do I assign it to 
root?
>
> In a thread I want to open my I2C resource manager and send writes and reads to it.  The document says to open with an
 'open' function.
>
> fd = open("/dev/ser1/",O_RDWR);
>
> How do I address my I2C resource manager?
> fd = open("/dev/I2C/",O_RDWR);  ??  How do I give my resource manager a name the 'open' function can find?
>
> I used the same code for all resource manager function opens in QNX.
>
> int i2c_open(resmgr_context_t *ctp, io_open_t *msg, RESMGR_HANDLE_T *handle, void *extra)
> {
> 	return(iofunc_open_default(ctp, msg, handle, extra));
> }
>
> Makes no sense!  Can anyone advise?
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post91113
>
Re: Want to connect with my resource manager  
As Elena says, wrong group for driver/resource manager questions.  Probably best suited for the BSP and Drivers Forum 
section.

From your questions, it is probably best to start by reading a bit about resource managers and what they do.  Have a 
look at the documentation online (also ships as part of QNX Momentics v6.5.0).

Online:

http://www.qnx.com/developers/docs/6.5.0/index.jsp

QNX Neutrino Realtime Operating System 
-> Getting Started with QNX Neutrino: A Guide for Realtime Programmers 
-> Resource Managers