【问题标题】:VOLTTRON RPC call to agent from outside VOLTTRON从 VOLTTRON 外部对代理的 VOLTTRON RPC 调用
【发布时间】:2021-12-23 15:32:03
【问题描述】:

您可以从 VOLTTRON 外部调用 RPC 端点吗?如果是这样,调用 VOLTTRON 代理 RPC 端点需要什么身份验证?

例如,当向导工具生成代理时,我创建了一个agent with the agent creation wizard,其中包含这样的 RPC 端点方法:

@RPC.export
def rpc_method(self, arg1, arg2, kwarg1=None, kwarg2=None):
    """
    RPC method
    May be called from another agent via self.core.rpc.call
    """
    return self.setting1 + arg1 - arg2

这是另一篇关于如何使用 RPC 的 SO 帖子,但我认为此 RPC 调用是在框架本身内部,而不是来自外部的 RPC 调用: How to use RPC with Volttron

有没有我可以使用的 RPC 测试工具,例如 REST API 测试工具或 python 包?我是否需要“vctl auth add”以在 VOLTTRON 之外进行身份验证?

【问题讨论】:

    标签: volttron


    【解决方案1】:

    为了从外部 volttron 调用,必须建立代理连接才能使用 rpc 功能。一个很好的例子是examples/StandaloneListener。一旦与 volttron 建立连接,您就可以调用允许的 rpc 函数。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-27
      • 1970-01-01
      • 2018-12-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多