We need to include time stamp, and error logging on a serial link. I have
heard the term “out of band data” used to refer to info that is not part of
the normal data stream. How do you implement out of band data in a resource
manager.
Pete Eddy
We need to include time stamp, and error logging on a serial link. I have
heard the term “out of band data” used to refer to info that is not part of
the normal data stream. How do you implement out of band data in a resource
manager.
Pete Eddy
And what are the “Standard” function calls a client application should use
to get/send out of band data.
“Pete Eddy” <peter.w.eddy@lmco.com> wrote in message
news:afhnkk$32l$1@inn.qnx.com…
We need to include time stamp, and error logging on a serial link. I have
heard the term “out of band data” used to refer to info that is not part
of
the normal data stream. How do you implement out of band data in a
resource
manager.Pete Eddy
Pete Eddy <peter.w.eddy@lmco.com> wrote:
And what are the “Standard” function calls a client application should use
to get/send out of band data.
Generally, the term “out of band” refers to data that’s not the “main focus”
of the resource manager. For example, a serial port resource manager is
“mainly focussed” on sending and receive character data. Thus, in that case,
the various control functions, like “set baud rate”, “raise DTR”, etc, are
considered “out of band”.
These functions are generally implemented with the ioctl()/devctl() API
and messages…
Cheers,
-RK
“Pete Eddy” <> peter.w.eddy@lmco.com> > wrote in message
news:afhnkk$32l$> 1@inn.qnx.com> …
We need to include time stamp, and error logging on a serial link. I have
heard the term “out of band data” used to refer to info that is not part
of
the normal data stream. How do you implement out of band data in a
resource
manager.Pete Eddy
\
–
Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.
Yes, ioctl/devctl are the user level interface. How do you implement the
"resource manager"to
talk to a ioctl? (Devctl is QNX 6, not posix but if it’s the best solution
mayhaps we’ll use it.)
Pete
“Robert Krten” <nospam88@parse.com> wrote in message
news:afhp5d$3ok$1@inn.qnx.com…
Pete Eddy <> peter.w.eddy@lmco.com> > wrote:
And what are the “Standard” function calls a client application should
use
to get/send out of band data.Generally, the term “out of band” refers to data that’s not the “main
focus”
of the resource manager. For example, a serial port resource manager is
“mainly focussed” on sending and receive character data. Thus, in that
case,
the various control functions, like “set baud rate”, “raise DTR”, etc, are
considered “out of band”.These functions are generally implemented with the ioctl()/devctl() API
and messages…Cheers,
-RK“Pete Eddy” <> peter.w.eddy@lmco.com> > wrote in message
news:afhnkk$32l$> 1@inn.qnx.com> …
We need to include time stamp, and error logging on a serial link. I
have
heard the term “out of band data” used to refer to info that is not
part
of
the normal data stream. How do you implement out of band data in a
resource
manager.Pete Eddy
\Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.
Pete Eddy <peter.w.eddy@lmco.com> wrote:
Yes, ioctl/devctl are the user level interface. How do you implement the
"resource manager"to
talk to a ioctl? (Devctl is QNX 6, not posix but if it’s the best solution
mayhaps we’ll use it.)
You add an io_devctl() handler to your I/O functions structure:
// after this line
iofunc_func_init (_RESMGR_CONNECT_NFUNCS, &connect_func, _RESMGR_IO_NFUNCS, &io_func);
// add
io_func.devctl = io_devctl;
and then handle the messages…
int
io_devctl (resmgr_context_t *ctp, io_devctl_t *msg, iofunc_ocb_t *ocb)
{
int sts;
void *data;
int nbytes;
if ((sts = iofunc_devctl_default (ctp, msg, ocb)) != _RESMGR_DEFAULT) {
return (sts);
}
// 1) assign a pointer to the data area of the message
data = _DEVCTL_DATA (msg);
// 2) preset the number of bytes that we’ll return to zero
nbytes = 0;
// check for all commands, we’ll just show the ones we’re interested in here
switch (msg → i.dcmd) {
// 3) process the SET command
case YOUR_COMMAND: // this shows the example of getting an integer
your_command_handler (* (int *) data);
break;
// 4) process the GET command, this shows the example of returning an integer
case MORE_COMMANDS:
// 5) return data (if any) to the client
memset (&msg → o, 0, sizeof (msg → o));
msg → o.nbytes = nbytes;
SETIOV (ctp → iov, &msg → o, sizeof (msg → o) + nbytes);
return (_RESMGR_NPARTS (1));
}
Pete
“Robert Krten” <> nospam88@parse.com> > wrote in message
news:afhp5d$3ok$> 1@inn.qnx.com> …
Pete Eddy <> peter.w.eddy@lmco.com> > wrote:
And what are the “Standard” function calls a client application should
use
to get/send out of band data.Generally, the term “out of band” refers to data that’s not the “main
focus”
of the resource manager. For example, a serial port resource manager is
“mainly focussed” on sending and receive character data. Thus, in that
case,
the various control functions, like “set baud rate”, “raise DTR”, etc, are
considered “out of band”.These functions are generally implemented with the ioctl()/devctl() API
and messages…Cheers,
-RK“Pete Eddy” <> peter.w.eddy@lmco.com> > wrote in message
news:afhnkk$32l$> 1@inn.qnx.com> …
We need to include time stamp, and error logging on a serial link. I
have
heard the term “out of band data” used to refer to info that is not
part
of
the normal data stream. How do you implement out of band data in a
resource
manager.Pete Eddy
\Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.
–
Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.
Thanks, I’ll give it a try.
Since this is for a serial device driver is there a “standard” set of
devctls under QNX? For example STTY talks to all types of serial devices.
How do I set up Devctls that work with STTY?
(Is the source availible for STTY?)
Pete Eddy
“Robert Krten” <nospam88@parse.com> wrote in message
news:afifmc$jg4$1@inn.qnx.com…
Pete Eddy <> peter.w.eddy@lmco.com> > wrote:
Yes, ioctl/devctl are the user level interface. How do you implement
the
"resource manager"to
talk to a ioctl? (Devctl is QNX 6, not posix but if it’s the best
solution
mayhaps we’ll use it.)You add an io_devctl() handler to your I/O functions structure:
// after this line
iofunc_func_init (_RESMGR_CONNECT_NFUNCS, &connect_func,
_RESMGR_IO_NFUNCS, &io_func);
// add
io_func.devctl = io_devctl;and then handle the messages…
int
io_devctl (resmgr_context_t *ctp, io_devctl_t *msg, iofunc_ocb_t *ocb)
{
int sts;
void *data;
int nbytes;if ((sts = iofunc_devctl_default (ctp, msg, ocb)) != _RESMGR_DEFAULT)
{
return (sts);
}// 1) assign a pointer to the data area of the message
data = _DEVCTL_DATA (msg);// 2) preset the number of bytes that we’ll return to zero
nbytes = 0;// check for all commands, we’ll just show the ones we’re interested
in here
switch (msg → i.dcmd) {
// 3) process the SET command
case YOUR_COMMAND: // this shows the example of getting an integer
your_command_handler (* (int *) data);
break;// 4) process the GET command, this shows the example of returning an
integer
case MORE_COMMANDS:
- (int *) data = your_other_command_handler_here ();
nbytes = sizeof (int);
break;
}// 5) return data (if any) to the client
memset (&msg → o, 0, sizeof (msg → o));
msg → o.nbytes = nbytes;
SETIOV (ctp → iov, &msg → o, sizeof (msg → o) + nbytes);
return (_RESMGR_NPARTS (1));
}Pete
“Robert Krten” <> nospam88@parse.com> > wrote in message
news:afhp5d$3ok$> 1@inn.qnx.com> …
Pete Eddy <> peter.w.eddy@lmco.com> > wrote:
And what are the “Standard” function calls a client application
should
use
to get/send out of band data.Generally, the term “out of band” refers to data that’s not the “main
focus”
of the resource manager. For example, a serial port resource manager
is
“mainly focussed” on sending and receive character data. Thus, in that
case,
the various control functions, like “set baud rate”, “raise DTR”, etc,
are
considered “out of band”.These functions are generally implemented with the ioctl()/devctl() API
and messages…Cheers,
-RK“Pete Eddy” <> peter.w.eddy@lmco.com> > wrote in message
news:afhnkk$32l$> 1@inn.qnx.com> …
We need to include time stamp, and error logging on a serial link.
I
have
heard the term “out of band data” used to refer to info that is not
part
of
the normal data stream. How do you implement out of band data in a
resource
manager.Pete Eddy
\Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.
\Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.
Does anyone know what devctls to use for the STTY interface?
Or is source code availiable for STTY?
Pete Eddy
“Pete Eddy” <peter.w.eddy@lmco.com> wrote in message
news:afpsu8$ss6$1@inn.qnx.com…
Thanks, I’ll give it a try.
Since this is for a serial device driver is there a “standard” set of
devctls under QNX? For example STTY talks to all types of serial devices.
How do I set up Devctls that work with STTY?
(Is the source availible for STTY?)Pete Eddy
“Robert Krten” <> nospam88@parse.com> > wrote in message
news:afifmc$jg4$> 1@inn.qnx.com> …
Pete Eddy <> peter.w.eddy@lmco.com> > wrote:
Yes, ioctl/devctl are the user level interface. How do you implement
the
"resource manager"to
talk to a ioctl? (Devctl is QNX 6, not posix but if it’s the best
solution
mayhaps we’ll use it.)You add an io_devctl() handler to your I/O functions structure:
// after this line
iofunc_func_init (_RESMGR_CONNECT_NFUNCS, &connect_func,
_RESMGR_IO_NFUNCS, &io_func);
// add
io_func.devctl = io_devctl;and then handle the messages…
int
io_devctl (resmgr_context_t *ctp, io_devctl_t *msg, iofunc_ocb_t *ocb)
{
int sts;
void *data;
int nbytes;if ((sts = iofunc_devctl_default (ctp, msg, ocb)) !=
_RESMGR_DEFAULT)
{
return (sts);
}// 1) assign a pointer to the data area of the message
data = _DEVCTL_DATA (msg);// 2) preset the number of bytes that we’ll return to zero
nbytes = 0;// check for all commands, we’ll just show the ones we’re interested
in here
switch (msg → i.dcmd) {
// 3) process the SET command
case YOUR_COMMAND: // this shows the example of getting an
integer
your_command_handler (* (int *) data);
break;// 4) process the GET command, this shows the example of returning
an
integer
case MORE_COMMANDS:
- (int *) data = your_other_command_handler_here ();
nbytes = sizeof (int);
break;
}// 5) return data (if any) to the client
memset (&msg → o, 0, sizeof (msg → o));
msg → o.nbytes = nbytes;
SETIOV (ctp → iov, &msg → o, sizeof (msg → o) + nbytes);
return (_RESMGR_NPARTS (1));
}Pete
“Robert Krten” <> nospam88@parse.com> > wrote in message
news:afhp5d$3ok$> 1@inn.qnx.com> …
Pete Eddy <> peter.w.eddy@lmco.com> > wrote:
And what are the “Standard” function calls a client application
should
use
to get/send out of band data.Generally, the term “out of band” refers to data that’s not the “main
focus”
of the resource manager. For example, a serial port resource manager
is
“mainly focussed” on sending and receive character data. Thus, in
that
case,
the various control functions, like “set baud rate”, “raise DTR”,
etc,
are
considered “out of band”.These functions are generally implemented with the ioctl()/devctl()
API
and messages…Cheers,
-RK“Pete Eddy” <> peter.w.eddy@lmco.com> > wrote in message
news:afhnkk$32l$> 1@inn.qnx.com> …
We need to include time stamp, and error logging on a serial link.
I
have
heard the term “out of band data” used to refer to info that is
not
part
of
the normal data stream. How do you implement out of band data in
a
resource
manager.Pete Eddy
\Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.
\Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.
The terminal control interface can be reached in at least 3 ways…
The best thing to do is have a look at the source code for ioctl.c, which
can be found in the public CVS repository at
http://cvs.qnx.com/cgi-bin/cvsweb.cgi/lib/c/xopen/ioctl.c
dB
“Pete Eddy” <peter.w.eddy@lmco.com> wrote in message
news:afshig$js$1@inn.qnx.com…
Does anyone know what devctls to use for the STTY interface?
Or is source code availiable for STTY?Pete Eddy
“Pete Eddy” <> peter.w.eddy@lmco.com> > wrote in message
news:afpsu8$ss6$> 1@inn.qnx.com> …
Thanks, I’ll give it a try.
Since this is for a serial device driver is there a “standard” set of
devctls under QNX? For example STTY talks to all types of serial
devices.
How do I set up Devctls that work with STTY?
(Is the source availible for STTY?)Pete Eddy
“Robert Krten” <> nospam88@parse.com> > wrote in message
news:afifmc$jg4$> 1@inn.qnx.com> …
Pete Eddy <> peter.w.eddy@lmco.com> > wrote:
Yes, ioctl/devctl are the user level interface. How do you
implement
the
"resource manager"to
talk to a ioctl? (Devctl is QNX 6, not posix but if it’s the best
solution
mayhaps we’ll use it.)You add an io_devctl() handler to your I/O functions structure:
// after this line
iofunc_func_init (_RESMGR_CONNECT_NFUNCS, &connect_func,
_RESMGR_IO_NFUNCS, &io_func);
// add
io_func.devctl = io_devctl;and then handle the messages…
int
io_devctl (resmgr_context_t *ctp, io_devctl_t *msg, iofunc_ocb_t *ocb)
{
int sts;
void *data;
int nbytes;if ((sts = iofunc_devctl_default (ctp, msg, ocb)) !=
_RESMGR_DEFAULT)
{
return (sts);
}// 1) assign a pointer to the data area of the message
data = _DEVCTL_DATA (msg);// 2) preset the number of bytes that we’ll return to zero
nbytes = 0;// check for all commands, we’ll just show the ones we’re
interested
in here
switch (msg → i.dcmd) {
// 3) process the SET command
case YOUR_COMMAND: // this shows the example of getting an
integer
your_command_handler (* (int *) data);
break;// 4) process the GET command, this shows the example of returning
an
integer
case MORE_COMMANDS:
- (int *) data = your_other_command_handler_here ();
nbytes = sizeof (int);
break;
}// 5) return data (if any) to the client
memset (&msg → o, 0, sizeof (msg → o));
msg → o.nbytes = nbytes;
SETIOV (ctp → iov, &msg → o, sizeof (msg → o) + nbytes);
return (_RESMGR_NPARTS (1));
}Pete
“Robert Krten” <> nospam88@parse.com> > wrote in message
news:afhp5d$3ok$> 1@inn.qnx.com> …
Pete Eddy <> peter.w.eddy@lmco.com> > wrote:
And what are the “Standard” function calls a client application
should
use
to get/send out of band data.Generally, the term “out of band” refers to data that’s not the
“main
focus”
of the resource manager. For example, a serial port resource
manager
is
“mainly focussed” on sending and receive character data. Thus, in
that
case,
the various control functions, like “set baud rate”, “raise DTR”,
etc,
are
considered “out of band”.These functions are generally implemented with the ioctl()/devctl()
API
and messages…Cheers,
-RK“Pete Eddy” <> peter.w.eddy@lmco.com> > wrote in message
news:afhnkk$32l$> 1@inn.qnx.com> …
We need to include time stamp, and error logging on a serial
link.
I
have
heard the term “out of band data” used to refer to info that is
not
part
of
the normal data stream. How do you implement out of band data
in
a
resource
manager.Pete Eddy
\Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and
Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.
\Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at > www.parse.com> .
Email my initials at parse dot com.
\