16 #include <sys/neutrino.h>    17 #include <sys/iofunc.h>    18 #include <sys/dispatch.h>    21 #define Jr3DmAddrMask   0x6000    22 #define PAGE_SIZE       0x1000    26 #define SENSOR1         0x80000    27 #define SENSOR2         0x100000    28 #define SENSOR3         0x180000    35 int main(
int argc, 
char **argv) {
    50         while ((c = getopt(argc, argv, 
"n:")) != -1) {
    52                         num = strtol(
optarg, 0, 0);
    57         fd = open(
"/dev/jr3q", O_RDWR);
    59                 fprintf(
stderr, 
"Unable to open server connection: %s\n",
    65         memset(&msg, 0, 
sizeof(msg));
    66         memset(&msg_reply, 0, 
sizeof(msg_reply));
    69         msg.
msg_no = _IO_MAX + num;
    70         snprintf(msg.
msg_data, 254, 
"client %d requesting reply.", 
getpid());
    72         printf(
"client: msg_no: _IO_MAX + %d\n", num);
    78         msg.
msg_no = _IO_MAX + num;
    79         ret = MsgSend(fd, &msg, 
sizeof(msg), msg_reply, 255);
    81                 fprintf(
stderr, 
"Unable to MsgSend() to server: %s\n", strerror(errno));
    86                 memcpy(tmp, msg_reply, 
sizeof(
float) * 12);
    87                 printf(
"client: msg_reply: %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f\n",
    88                                 tmp[0], tmp[1], tmp[2], tmp[3], tmp[4], tmp[5]);
    89                 printf(
"                   %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f\n",
    90                                 tmp[6], tmp[7], tmp[8], tmp[9], tmp[10], tmp[11]);
    92                 printf(
"client: msg_reply:\n%s\n", msg_reply);
 int main(int argc, char **argv)
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
unsigned long MappedAddress
int usleep(useconds_t usec)