Skip navigation.
Home
The QNX Community Portal

View topic - Question on DCMD values for custom messages..

Question on DCMD values for custom messages..

Discussion about the QNX6 OS.

Question on DCMD values for custom messages..

Postby newbie_learner » Thu Jun 27, 2013 7:49 pm

Hi ,

I have a question on the dcmd value I can use with __DIOTF(_DCMD_MISC, dcmd, data) for my custom messages. I saw the below warning while reading some QNX document on the range of values reserved for QSSL.

/*(Note that the range of dcmd values you can use is limited (0x0000 through 0xfff inclusive is reserved for QSSL). */

What is the safe range of dcmd values I can use to process my custom commands while calling io_devctl() ?

==============================================================================================================
#define MY_CMD_CODE 100 // Is this safe value to use for _DCMD_MISC class ?

#define FPGA_READ __DIOTF(_DCMD_MISC, MY_CMD_CODE + 1, FpgaAccessIPC_ST)
#define FPGA_READ_BLOCK __DIOTF(_DCMD_MISC, MY_CMD_CODE + 2, FpgaAccessIPC_ST)
#define FPGA_READ_BLOCK_SERIES __DIOTF(_DCMD_MISC, MY_CMD_CODE + 3, FpgaAccessIPC_ST)

Let me know if you have any questions on this? Hope I am clear in my question.

Thanks for your time.
newbie_learner
Active Member
 
Posts: 18
Joined: Wed Mar 27, 2013 10:12 pm

Re: Question on DCMD values for custom messages..

Postby mario » Thu Jun 27, 2013 9:48 pm

It`s not, it should be 0x1000 ( 0xfff + 1 ).
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: Question on DCMD values for custom messages..

Postby newbie_learner » Thu Jun 27, 2013 10:16 pm

Thanks Mario. Is there any upper limit for the same ?
newbie_learner
Active Member
 
Posts: 18
Joined: Wed Mar 27, 2013 10:12 pm

Re: Question on DCMD values for custom messages..

Postby maschoen » Fri Jun 28, 2013 1:49 am

newbie_learner wrote:Thanks Mario. Is there any upper limit for the same ?


Yes. Take a look at /usr/include/devctl. The system uses upper bits in the dcmd to indicate which way the data is flowing.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 2 guests