shuai132 / rpc_core

a tiny rpc core library, support c++11、rust.
MIT License
41 stars 4 forks source link

大佬,我有几个问题想问一下 #1

Open aitck opened 1 year ago

aitck commented 1 year ago

1.这边有命令行上位机(或者python通讯库)了吗? 2.如果用stm32或者esp32应该怎么使用该项目? 是否有例子工程? 3.技术有交流群吗

shuai132 commented 1 year ago

本仓库只提供协议层和api,传输层需要自己对接。不过也提供了开箱即用的(需要依赖asio)。

  1. 基于TCP,这里有开箱即用的库(见RPC章节),也包含例子:https://github.com/shuai132/asio_net 另外没有python的。

  2. 因为需要asio,单片机一般不能用。不过esp32支持asio,所以可以。 工程例子:https://github.com/shuai132/platformio_demo/tree/net/rpc PS: 其实不需要用这个例子,asio_net里面有例子。

  3. 群的话,我建一个也好~

shuai132 commented 1 year ago

建了个QQ群:249240861 方便以后交流。

david-drinn commented 8 months ago

I, too, did not find asio support in the STM32 libraries. (Perhaps in FreeRTOS? I don't know.) However, by using the STM32 HAL libraries for UART, it is not too difficult to create a streaming connection that rpc_core can use with a bit of extra parsing logic to handle possibly split up packets.

shuai132 commented 8 months ago
  1. STM32资源有限,目前很少有移植使用asio的,它也没有统一的TCP/IP支持,只能自行实现connection。推荐ESP32它可以直接使用这个仓库:https://github.com/shuai132/asio_net

  2. stream_connection可以解决粘包的问题,UART也容易使用。上位机使用相同的连接方式即可。

  3. 上位机目前提供了c++和rust的基于TCP连接的直接支持(见README.md)。 @david-drinn