在实践中,我想定期交换数据(即:传感器读数)以及事件数据(GPIO状态).我每100毫秒交换大约100-200字节.
有人知道协议或库来完成这种任务吗?
现在,我看到protobuf和nano protobuff?还有别的吗?
如果我可以在UART上添加软件层并使用“虚拟数据流”,如果它是与N端口的TCP / IP连接,那将是很好的.
任何的想法 ?
谢谢
The eRPC (Embedded Remote Procedure Call) is a Remote Procedure Call (RPC) system created by NXP. An RPC is a mechanism used to invoke a software routine on a remote system using a simple local function call. The remote system may be any CPU connected by an arbitrary communications channel: a server across a network, another CPU core in a multicore system, and so on. To the client, it is just like calling a function in a library built into the application. The only difference is any latency or unreliability introduced by the communications channel.
我在一个双处理器嵌入式系统中使用它,一个带有Context-M4 MCU的cortext-A9 CPU,它们通过SPI / GPIO相互通信.
Erpc可以在UART,SPI,rpmsg和网络(tcp)上运行.即使使用串行或SPI作为传输隧道,也可以进行双向传输 呼叫,占用空间极小.