When a printer problem occurs, the gateway must perform two actions:
When the PSM creates a printer agent, it also creates six abstract event objects. The PSM uses these objects to inform users what notification can be provided. The PSM also uses them as triggering mechanisms for generating event notifications. The PSM populates these abstract event objects with the events for which it will generate notification. The gateway can also add attributes to the abstract event objects to indicate those events for which it will generate notifications.
For example, assume that the gateway has added paper jam to the printer error abstract event object and that the printer has just jammed. The gateway needs to report the event. The gateway does this by filling out the JPMReportXferStruct and passing the information to the PSM (opcode JPM_OP_REPORT_EVENT). (See the ReportEvent function in psmcomm.c in the example code.)
In addition to generating an event, it is usually necessary to update the ndps-att-printer-state-reasons attribute in the MOD. The ndps-att-printer-state-reasons attribute is a multi-valued attribute used by the PSM to set the printer agent's severity and is referenced in setting the printer agent state. The ndps-att-printer-state-reasons attribute also gives additional information about the printer's state.
The ndps-att-printer-state-reasons attribute contains the following information: