RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
...
...
Code Block |
---|
IARM_Result_t IARM_Bus_Init(const char name); |
...
IARM_Result_t IARM_Bus_Connect(void); |
Code Block |
---|
...
IARM_Result_t IARM_Bus_RegisterEvent(IARM_EventId_t maxEventId); |
...
Code Block |
---|
IARM_Result_t IARM_Bus_BroadcastEvent(const char *ownerName, IARM_EventId_t eventId, void *data, size_t len); |
...
Code Block |
---|
...
IARM_Result_t IARM_Bus_Init(const char *name); |
...
IARM_Result_t IARM_Bus_Connect(void); |
...
Code Block |
---|
IARM_Result_t IARM_Bus_RegisterEventHandler(const char *ownerName, IARM_EventId_t eventId, IARM_EventHandler_t handler); |
...
Since all the RPC methods published by the application are tied to its well-known name, the application must make its well-known name available to other applications that wish to use its service. The well-known name can be thought of as the Namespace within which the application's events and RPC methods live. This name must be declared in the application's public header file. In our example, this file is irMgr.h
Code Block |
---|
#define IARM_BUS_IRMGR_NAME "IRMgr" |
...
Naming Convention: IARM_BUS_<Manager>_NAME "Manager" |
When the application initialize with IARM-Bus, it provides its well-known name:
Code Block |
---|
IARM_Bus_Init(IARM_BUS_IRMGR_NAME); |
...
IARM_Bus_Connect(); |
...
Applications should use macro of the well-known name (IARM_BUS_IRMGR_NAME in this example) when invoking the RPC method.
...