From 1aa79a6340538f49db7ba4761e1fcd35c04fac1a Mon Sep 17 00:00:00 2001 From: annie_wangli Date: Fri, 7 Jan 2022 18:01:31 +0800 Subject: [PATCH] update docs Signed-off-by: annie_wangli --- en/application-dev/connectivity/ipc-rpc-overview.md | 4 ++-- en/application-dev/connectivity/subscribe-remote-state.md | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/en/application-dev/connectivity/ipc-rpc-overview.md b/en/application-dev/connectivity/ipc-rpc-overview.md index 2c8e177b40..02b7c2b6f0 100755 --- a/en/application-dev/connectivity/ipc-rpc-overview.md +++ b/en/application-dev/connectivity/ipc-rpc-overview.md @@ -6,9 +6,9 @@ The inter-process communication \(IPC\) and remote procedure call \(RPC\) mechan ## Limitations and Constraints -Currently, cross-device RPC communication is not supported. +The data transmitted for cross-process communication on a device cannot exceed 1 MB. If more data needs to be transmitted, use the anonymous shared memory. +The cross-device proxy object cannot be passed to the device hosting the stub object pointed by this proxy object. ## Related Modules Distributed Scheduler subsystem - diff --git a/en/application-dev/connectivity/subscribe-remote-state.md b/en/application-dev/connectivity/subscribe-remote-state.md index 96855a6b6d..fa70738556 100755 --- a/en/application-dev/connectivity/subscribe-remote-state.md +++ b/en/application-dev/connectivity/subscribe-remote-state.md @@ -1,8 +1,6 @@ # Subscribing to State Changes of a Remote Object -IPC/RPC allows you to subscribe to the state changes of a remote stub object. When the remote stub object dies, a death notification will be sent to your local proxy object. You can also unsubscribe from the state changes if they are no longer needed. Such subscription and unsubscription are controlled by APIs. To be specific, you need to implement the **IRemoteObject.DeathRecipient** interface and the **onRemoteDied** method to clear resources. This callback is invoked when the process accommodating the remote stub object dies, or the device accommodating the remote stub object leaves the network. It is worth noting that these APIs should be called in the following order: The proxy object must first subscribe to death notifications of the stub object. If the stub object does not die, the proxy object can cancel the subscription when it is no longer required. If the stub object dies, subsequent operations customized by the proxy object will be automatically triggered, and the subscription does not need to be manually canceled. - -Currently, IPC supports death notifications for anonymous objects, but RPC does not. That is, you can only subscribe to death notifications of services that have been registered with SAMgr. +IPC/RPC allows you to subscribe to the state changes of a remote stub object. When the remote stub object dies, a death notification will be sent to your local proxy object. You can also unsubscribe from the state changes if they are no longer needed. Such subscription and unsubscription are controlled by APIs. To be specific, you need to implement the **IRemoteObject.DeathRecipient** interface and the **onRemoteDied** method to clear resources. This callback is invoked when the process accommodating the remote stub object dies, or the device accommodating the remote stub object leaves the network. It is worth noting that these APIs should be called in the following order: The proxy object must first subscribe to death notifications of the stub object. If the stub object is in the normal state, the proxy object can cancel the subscription as required. If the process of the stub object exits or the device hosting the stub object goes offline, subsequent operations customized by the proxy object will be automatically triggered. **Development Using Native APIs** @@ -25,4 +23,3 @@ sptr deathRecipient (new TestDeathRecipient()); / bool result = proxy->AddDeathRecipient(deathRecipient); // Add the recipient to the proxy. result = proxy->RemoveDeathRecipient(deathRecipient); // Remove the recipient. ``` - -- GitLab