Volttron - 对象没有属性 'vip'

Volttron - object has no attribute 'vip'

尝试从我的一个代理(smartstripui_srv.agent)调用另一个代理(pricepoint.agent)的 RPC 方法时,出现错误 - “信息:'SmartStripUI_Srv' 对象没有属性 'vip'"

smartstripui_srv.agent正在继承PublishMixin、BaseAgent。

我已经测试过从一个简单的代理调用 pricepoint.agent 的 RPC 方法并且它正在工作。

在代理继承 PublishMixin、BaseAgent 的情况下,似乎我可能缺少设置某些参数。

PublishMixin 和 BaseAgent 以及 volttron.platform.agent.base 中的所有其他内容都是为了支持与 VOLTTRON 2.0 代理的向后兼容性。

不要使用它们。

从 volttron.platform.vip.agent.Agent 继承将为您提供发布、订阅和进行 RPC 调用所需的一切,并充分利用 VOLTTRON 3.0 功能,并将在您的代理中提供 vip 对象。

不幸的是,当我们发布 VOLTTRON 3.0 时,我们未能将所有不是为了向后兼容的内容移出 volttron.platform.agent。里面有些东西对 3.0 Agent 来说仍然很重要,比如 utils 模块。