[cups.development] How are the command filters supposed to return data?
Reinhold Kainhofer
reinhold at kainhofer.com
Tue Jul 13 16:43:46 PDT 2010
Hi Tim,
Thanks a lot for your help. Things seem much clearer now.
Am Dienstag, 13. Juli 2010, um 18:05:20 schrieb Tim Waugh:
> On Tue, 2010-07-13 at 05:41 -0700, Reinhold Kainhofer wrote:
> > However, I could not find any documentation how this response will be
> > handled by CUPS... What do I have to do to properly implement the
> > ReportLevels?
>
> The filter needs to interpret the response from the printer and
> communicate the ink levels to CUPS like this:
>
> fprintf (stderr, "ATTR: marker-names=%s,%s,%s\n", names);
> fprintf (stderr, "ATTR: marker-colors=%s,%s,%s\n", colors);
> fprintf (stderr, "ATTR: marker-levels=%d,%d,%d\n", levels);
> etc.
Okay, that makes sense (unfortunately, it's not documented in the command
filter docs at all... Now that you point it out, I found it in the general
filter docs, but without any mention of the value format being a comma-
separated list).
To get the response of the printer, I have to call cupsBackChannelRead, right?
Is the data written by the command filter sent to the printer immediately by
the backend, or do I need to select some non-zero timeout?
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, reinhold at kainhofer.com, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org
More information about the cups-devel
mailing list