# Provider ## **Overview** **Related Modules:** [Broadcast](Broadcast.md) **Description:** Defines the provider of events and data of a topic. ## **Summary** ## Data Fields

Variable Name

Description

Publish )(IUnknown *iUnknown, const Topic *topic, uint8 *data, int16 len)

BOOL(* 

Publishes events and data of a specified topic.

## **Details** ## **Field Documentation** ## Publish ``` BOOL(* Provider::Publish) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, uint8 *data, int16 len) ``` **Description:** Publishes events and data of a specified topic. The events or data is published by the publisher, sent to all consumers who have subscribed to the topic, and processed by the consumers. **Parameters:**

Name

Description

iUnknown Indicates external interface of the pub/sub feature.
topic Indicates the pointer to the topic to publish.
data Indicates the pointer to the data to publish.
len Indicates the length of the data to be published. The length must be the same as the data length. The caller must ensure the validity of this parameter.
**Returns:** Returns **TRUE** if the topic is successfully published; returns **FALSE** otherwise.