加入收藏
举报
02-14 20:03
#0
文件名称:
broadcast.md
所在目录:
Openharmony v1.0 / docs / docs-en / api / api-SmartVision-Devices
文件大小:
6.59 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# Broadcast
## **Overview**
Provides data subscription and data push for services.
With this module, the [Service](service.md), [Feature](feature.md), or other modules can broadcast events or data. All services that listen to these events or data can receive these broadcasts.
**Since:**
1.0
**Version:**
1.0
## **Summary**
## Data Structures















Data Structure Name


Description


Consumer


Defines the topic consumer used to receive events and push data. You need to implement this struct for your application.


Provider


Defines the provider of events and data of a topic.


Subscriber


Defines the subscriber for external interfaces to subsribe to events and data of a topic.



## Typedefs









Typedef Name


Description


Topic


typedef uint32


Indicates the topic of an event or data, which is used to distinguish different types of events or data.



## Enumerations









Enumeration Name


Description


BroadcastErrCode { EC_ALREADY_SUBSCRIBED = EC_SUCCESS + 1 }


Enumerates error codes unique to the Broadcast service.



## **Details**
## **Typedef Documentation**
## Topic
```
typedef uint32 [Topic](broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542)
```
**Description:**
Indicates the topic of an event or data, which is used to distinguish different types of events or data.
## **Enumeration Type Documentation**
## BroadcastErrCode
```
enum [BroadcastErrCode](broadcast.md#ga98f7a28020aa045ad049d116e1ca666d)
```
**Description:**
Enumerates error codes unique to the Broadcast service.









Enumerator


Description


EC_ALREADY_SUBSCRIBED

Error code showing that a topic has been subscribed to


点赞 回复
回帖
支持markdown部分语法 ?