GTPin
Public Member Functions
gtpin::IGtEventHandler Class Reference

Interface of the GTPin event handler. More...

#include <igt_event.h>

Public Member Functions

virtual GtEventReaction OnEvent (const IGtEvent &event)=0
 Handle the specified event.
virtual GtEventReaction OnEvent (const IGtKernelEvent &event)=0
virtual GtEventReaction OnEvent (const IGtInternalEvent &event)=0

Detailed Description

Interface of the GTPin event handler.

This class defines methods intended for handling asynchronous GTPin events. Unlike errors in tool APIs that can be retrieved by the IGtCore::LastError() function, asynchronous GTPin events are not a direct result of the API invocation. These events can't be reported on return from the API call because there are no active API calls at the time when they occur.
To monitor and handle asynchronous GTPin events, the tool can provide its own implementation of the IGtEventHandler interface and register it using the IGtCore::RegisterEventHandler function. If no tool-specific handler is registered, GTPin performs default event handling, as indicated by the IGtEvent::DefaultReaction() function.

 * =============================================================================================================================== *
 *                                            Asynchronous  GTPin events                                                           *
 * =============================================================================================================================== *
 *            Description               |             Status                      | Default [possible] reaction |      Type        *
 * =============================================================================================================================== *
 * The kernel is filtered out           | GTPIN_STATUS_WARNING_KERNEL_FILTERED    | CONTINUE  [TERMINATE]       | IGtKernelEvent   *
 * Broken communication with the driver | GTPIN_STATUS_ERROR_NO_DRIVER            | CONTINUE  [TERMINATE]       | IGtEvent         *
 * The kernel CFG is too complex        | GTPIN_STATUS_ERROR_UNSUPPORTED_CFG      | CONTINUE  [TERMINATE]       | IGtKernelEvent   *
 * Register allocation failed           | GTPIN_STATUS_ERROR_REG_ALLOC_FAILURE    | CONTINUE  [TERMINATE]       | IGtKernelEvent   *
 * Instrumentation failed               | GTPIN_STATUS_ERROR_INSTRUMENT_FAILURE   | CONTINUE  [RETRY, TERMINATE]| IGtKernelEvent   *
 * GTPin/tool API version mismatch      | GTPIN_STATUS_ERROR_API_VERSION_MISMATCH | CONTINUE  [TERMINATE]       | IGtEvent         *
 * Invalid API argument                 | GTPIN_STATUS_ERROR_INVALID_API_ARGUMENT | CONTINUE  [TERMINATE]       | IGtEvent         *
 * Generic access error                 | GTPIN_STATUS_ERROR_ACCESS_DENIED        | CONTINUE  [TERMINATE]       | IGtEvent         *
 * API is not available in this context | GTPIN_STATUS_ERROR_INVALID_API_CALL     | CONTINUE  [TERMINATE]       | IGtEvent         *
 * Memory buffer is too small           | GTPIN_STATUS_ERROR_BUFFER_OVERFLOW      | CONTINUE  [TERMINATE]       | IGtEvent         *
 * HLI module compilation failed        | GTPIN_STATUS_ERROR_HLI_COMPILE_FAILURE  | CONTINUE  [TERMINATE]       | IGtEvent         *
 * HLI binary module build failed       | GTPIN_STATUS_ERROR_HLI_BUILD_FAILURE    | CONTINUE  [TERMINATE]       | IGtKernelEvent   *
 * GFX runtime error                    | GTPIN_STATUS_ERROR_GFX_RUNTIME_FAILURE  | CONTINUE  [TERMINATE]       | IGtEvent         *
 * Unsupported feature/API              | GTPIN_STATUS_ERROR_UNSUPPORTED_FEATURE  | CONTINUE  [TERMINATE]       | IGtEvent         *
 * Binary link failed                   | GTPIN_STATUS_ERROR_BIN_LINK_FAILURE     | CONTINUE  [TERMINATE]       | IGtEvent         *
 * Internal error                       | GTPIN_STATUS_ERROR_INTERNAL             | TERMINATE []                | IGtInternalEvent *
 * Internal warning                     | GTPIN_STATUS_WARNING_INTERNAL           | CONTINUE  [TERMINATE]       | IGtInternalEvent *
 * Gfx driver version mismatch          | GTPIN_STATUS_ERROR_GFX_DRIVER_VERSION   | TERMINATE [SHUTDOWN_GTPIN]  | IGtEvent         *
 * =============================================================================================================================== *

Member Function Documentation

virtual GtEventReaction gtpin::IGtEventHandler::OnEvent ( const IGtEvent event) [pure virtual]

Handle the specified event.

Parameters:
[in]eventThe event to be handled
Returns:
GTPin action requested by the handler
virtual GtEventReaction gtpin::IGtEventHandler::OnEvent ( const IGtInternalEvent event) [pure virtual]

Handle the specified event.

Parameters:
[in]eventThe event to be handled
Returns:
GTPin action requested by the handler
virtual GtEventReaction gtpin::IGtEventHandler::OnEvent ( const IGtKernelEvent event) [pure virtual]

Handle the specified event.

Parameters:
[in]eventThe event to be handled
Returns:
GTPin action requested by the handler
 All Data Structures Functions Variables Typedefs Enumerations Enumerator


  Copyright (C) 2013-2025 Intel Corporation
SPDX-License-Identifier: MIT