Skip to main content
Skip table of contents

(v13) Monitor Events

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

Text sent to the RIP's console or monitor window is delivered through a Monitor Event. Together with Timeline events (see (v13) Timeline API ) intercepting monitor events can enhance error reporting, and provide enhanced timing and progress information to OEM code.

NOTE:  In order to use the API with HMR an OEM should create an event-based plugin (for more information see “The Plugin kit Guide For OEMs). The plugin can access the API via RDR (see (v13) The RDR system on how to use the RDR) and, if required, should use IPC to communicate with a separate application, such as, for example, to present a UI to allow the RIP's databases to be manipulated.

The Monitor Event, SWEVT_MONITOR, and the mechanism by which textual messages are sent, filtered, localized, logged and output, is described in HHR in:

The HHR installation:

  • lib/interface/monevent.h header file.

In the Plugin Kit:

  • C:\Installers\Plugin Kit\SWplugkit_20_x_x_br\all\Manual\sdk.chm
  • Go to the File List and select monevent.h.

In the Plugin Kit, there are two example plugins that use monitor events. They are located in the \EventBased\examples\src folder.

In the HHR RIP, there are two examples. One can be found in the

/lib/skinkit/src/progevts.c file. In this file, a progressFilter is implemented, that filters out the progress message types requested by the –n clrip command line option.

Another example can be found in /lib/skintest/pc/src/main.c (for Windows;

/lib/skintest/unix/src/main.c for Unix and macOS). A monitor_color event handler changes the foreground and background colors of the platform's Console according to the type of the monitor event.

You can see the example in action by running the clrip with the -! 3 option. In general, when you get hold of the message:

SWMSG_MONITOR * mon = evt->message;

You can examine mon ->type to check if it is an error or a warning like this:

TEXT
                      static sw_event_result HQNCALL monerrwarn(void *ctx,
                                          sw_event *evt)
                      {
                        SWMSG_MONITOR *mon = (SWMSG_MONITOR *) evt->message ;
                        /* Ignore events which are not recognized */
                          if ( mon == NULL || evt->length < sizeof(SWMSG_MONITOR) ) return SW_EVENT_CONTINUE;
                        /* To handle a message based on its class */
                        if( (mon->type & MON_MASK_CLASS) == MON_CLASS_ERROR )
                        {
                          /* ...Add code here to send mon->text message to DFE... */ return SW_EVENT_HANDLED;
                        }
                        else if( (mon->type & MON_MASK_CLASS) == MON_CLASS_WARNING )
                        {
                          /* Do something with this warning */ return SW_EVENT_HANDLED;
                        }
                        /* Otherwise allow other handlers to be sent this event as normal */ return SW_EVENT_CONTINUE;
                      }

For both HHR and HMR the message ids are defined in the doc folder, in the monitoruids.csv and monitoruids.html files.

For the Plugin kit the message ids are defined fin the C:\Installers\Plugin Kit\SWplugkit_20_x_x_br\all\Manual folder, in the monitoruids.csv and monitoruids.html files.

JavaScript errors detected

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

If this problem persists, please contact our support.