SubscriberCallback

Overview

Related Modules:

Core

Description:

Called when the driver subscribes to other driver services.

The callback is used in the service subscription mechanism. After the driver is registered with the HDF, the HDF proactively invokes the callback after the subscribed-to driver is loaded.

Since:

1.0

Summary

Data Fields

Variable Name

Description

deviceObject

struct HdfDeviceObject 

OnServiceConnected )(struct HdfDeviceObjectdeviceObject, const struct HdfObjectservice)

int32_t( 

Called by the HDF when the subscribed-to driver service is loaded.

Details

Field Documentation

deviceObject

  1. struct[HdfDeviceObject]($api-api-SmartVision-Devices-HdfDeviceObject.md)*SubscriberCallback::deviceObject

Description:

Driver object of the subscriber

OnServiceConnected

  1. int32_t(*SubscriberCallback::OnServiceConnected)(struct[HdfDeviceObject]($api-api-SmartVision-Devices-HdfDeviceObject.md)*[deviceObject]($api-api-SmartVision-Devices-SubscriberCallback.md#af8640bdb30eb50c1d69781940b62c20d), const struct [HdfObject]($api-api-SmartVision-Devices-HdfObject.md) *service)

Description:

Called by the HDF when the subscribed-to driver service is loaded.

Parameters:

Name

Description

deviceObjectIndicates the pointer to the variable of the HdfDeviceObject type. This variable is generated by the HDF and passed to the driver.
serviceIndicates the pointer to the service object.

Returns:

Returns 0 if the operation is successful; returns a non-zero value otherwise.