Skip to main content
Skip table of contents

(v13) Asynchronous actions and PostScript device plugins

This page applies to Harlequin v13.1r0 and later; and to Harlequin MultiRIP but not Harlequin Core

The RIP no longer uses the DEVICETYPE tickle function, but it is still possible to request the RIP to exe‐ cute a PostScript language procedure asynchronously with the normal processing of a job, or to cause a PostScript language interrupt or time out. With the new thread RIP architecture, it is no longer possible to temporarily halt the RIP and give all the processing time to the PostScript language device.

An asynchronous PostScript language procedure is requested by sending an event. For more information see the Harlequin API Reference Manual . The asynchronous PostScript language action event message specifies the number of the PostScript language procedure in the serviceinterrupt dictionary, defined in execdict , to be run. The number must be in the range 0 to 31 . For example, an asynchronous PostScript language action can be requested with the following code:

TEXT
    {
      SWMSG_ASYNC_PS async_ps;
      ...
      async_ps.id = ps_action;
      (void)SwEvent(SWEVT_ASYNC_PS, &async_ps, sizeof(async_ps));
      ...
    }

Where ps_action is the number of the PostScript language procedure to execute, which must have been defined in the serviceinterrupt dictionary.

Note: The procedure numbers 2 and 3 are normally reserved in GUI RIPs for its own use and should not be used by OEM code.

Note: The return value from the call to SwEvent() can be ignored since it will be acted upon in a normal system. This is also true for all the sample code in this section.

Asynchronous PostScript language actions are run in the order they are requested.

Multiple requests to run an asynchronous PostScript language action that occurs before it can be run are treated as a single request the asynchronous PostScript language action will not be run multiple times. Requests to run an asynchronous PostScript language action with an id greater than 31 will be ignored.

The entries in the serviceinterrupt dictionary are defined by a startup file; for example, this file is HqnProduct in the GUI RIP. For variants of the core RIP there is no predefined content for the serviceinterrupt dictionary; the values (procedure actions) are highly dependent on the skin and best determined by the OEM.

An interrupt event is available that takes a timeline reference. In order to interrupt a specific job, the timeline reference must be set to the job's SWTLT_JOB_STREAM timeline reference or any descendant thereof. Alternatively, all jobs can be interrupted by setting the timeline reference to 0 .

For example, to interrupt all jobs:

TEXT
    SWMSG_INTERRUPT msg;
    msg.timeline = 0;
    (void)SwEvent(SWEVT_INTERRUPT_USER, &msg, sizeof(msg));

A time out interrupt is caused with very similar code:

TEXT
    {
      SWMSG_INTERRUPT msg;
      ...
      timeout.timeline = job_tl_ref; (void)SwEvent(SWEVT_INTERRUPT_TIMEOUT, &timeout, sizeof(timeout));
      ...
    }

Note: You cannot pass a zero-timeline reference with SWEVT_INTERRUPT_TIMEOUT . (It will be ignored.)

While interrupts are now signaled using events, OEM code should not register event handlers to detect when an interrupt has been signaled and abort their PSDEV processing. The Harlequin Multi‐ RIP does not always immediately process an interrupt and requires PostScript devices to continue working normally until it handles the interrupt.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.