Clara Holoscan Deploy 0.8.1 EA
0.8.1

8.10. Clara Pipeline Driver Callbacks

Provided by application code to the driver when calling clara.Driver constructor, and called by the driver once driver initialization has completed. Application code is expected to perform any preparation or setup steps necessary when this function is called.

Providing a preparation callback handler to the driver is optional. When no callback handler is provided, the driver will move directly from initialization to waiting for inputs for execution.

Parameters

  • driver

    type: clara.Driver

    Reference to the Clara Pipeline Driver instance which is calling this method.

Return

Returns True if successful; otherwise a False value.

see also: Clara Pipeline Driver

Copy
Copied!
            

lambda driver: True

Provided by application code to the driver when calling clara.Driver constructor, and called by the driver once inputs are ready for consumption. Application code will be provided a clara.Payload pointer which can be used to obtain information about the payload.

Providing an execution callback handler to the driver is optional. When no callback handler is provided, the driver will move directly from waiting for inputs to clean-up.

see also: Clara Pipeline Driver

Parameters

  • driver

    type: clara.Driver

    Reference to the Clara Pipeline Driver instance which is calling this method.

  • payload

    type: clara.Payload

    Reference to the current stage’s payload.

Return

Returns True if successful; otherwise a False value.

Copy
Copied!
            

lambda driver, payload: True

Provided by application code to the driver when calling clara.Driver constructor, and called by the driver after execution is complete and internal driver clean up has completed. The application is expected to perform any clean or finalization steps during this callback event.

Providing a clean-up callback handler to the driver is optional. When no callback handler is provided, the driver will move directly from clean-up to internal finalization.

see also: Clara Pipeline Driver

Parameters

  • driver

    type: clara.Driver

    Reference to the Clara Pipeline Driver instance which is calling this method.

Return

Returns True if successful; otherwise a False value.

Copy
Copied!
            

lambda driver: True

Provided by application code to the driver when calling clara.Driver constructor, and called by the driver when any noteworthy event happens. This includes internal errors.

Providing a notification callback handler to the driver is optional. When no callback handler is provided, the driver will be unable to notify application code of any internal errors or critical state changes.

see also: Clara Pipeline Driver

Parameters

  • driver

    type: clara.Driver

    Reference to the Clara Pipeline Driver instance which is calling this method.

  • result

    type: int

    The result, or return code, of the event calling this method.

  • message

    type: string

    The detailed information about the event causing the notification event.

  • is_fatal

    type: bool

    True when the event generating the notification is fatal; otherwise False.

Return

Copy
Copied!
            

lambda driver, result, message, is_fatal: None

© Copyright 2018-2020, NVIDIA Corporation. All rights reserved.. Last updated on Feb 1, 2023.