How to use path with resource manager

I’ve gotten as far as being able to open a resource manager using
‘cat /dev/sample’ (for example)
and I can set it to respond to /dev/sample/extpath or
/dev/sample/extpaht/morepath and it is relatively easy to extract the path info in the open callback. What is less clear is how to associate this path with subsequent read or write calls … how to make cat /dev/sample/funca do something different from cat /dev/sample/funcb. Are there any examples floating around out there?

Doug Owens

Rob Krten has great examples (including source code) of working resource maangers in his latest book. Take a look at - if you are writing resource managers, they are worth buying.


Yes, Rob’s Getting Started with QNX Neutrino 2 – A Guide for Realtime Programmers is definitely helpful.

I have access to a copy of the book but we are sharing it among several people (more books on order). I did get a copy of atoz.c which I think shows how to do what I am asking about.