[英]two containers in Jade and communication between different devices
我目前正在學習翡翠。 我發現關於Jade的信息很少。 我可以問兩個問題嗎?
關於容器創建(假設您已經在某處有一個主容器):
Runtime rt = Runtime.instance(); String containerName; ProfileImpl pContainer; ContainerController containerRef; //create the container containerName="Mycontainer1"; pContainer = new ProfileImpl(PLATFORM_IP, PLATFORM_PORT, PLATFORM_ID); pContainer.setParameter(Profile.CONTAINER_NAME,containerName); //link it to the platform System.out.println("Launching container "+pContainer); containerRef = rt.createAgentContainer(pContainer);
對於一個完整的工作示例: https://startjade.gitlab.io/CreatePlatform/
如果設備可以自由通信並且您希望它們成為同一個翡翠實例的一部分,只需在 pi 上部署一個容器(例如),並使其連接到您計算機上的 mainContainer。 然后,平台上的代理將能夠相互通信,無論其位置如何。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.