SlippyMesh
1.0.0
用C ++編寫的輕量級Lora網絡網絡
向所有人發送消息,打開您的序列號並輸入
send 0xFFFFFFFF "hello world"
獲取命令列表
help
將一團糟發送到目標地址
send <address> <message>
例子
sendex 0x01234567 "hello"
將消息發送到0x01234567
sendex 0xFFFFFFFF "hello everyone"
向所有人發送消息
將消息發送到目標地址,並帶有一些額外的選項
sendex <address> <message> <type> <service> <flags>
例子
sendex 0x01234567 "hello" 0 0 0b00000000
將消息發送到0x01234567(與'send 0x01234567“ hello”'相同)
sendex 0x01234567 "ping" 0 1 0b00000000
將遠程命令發送到0x01234567
sendex 0xFFFFFFFF "hello everyone" 0 0 0b00000000
向所有人發送消息(與'send 0xffffffff“你好所有人”相同)
sendex 0xFFFFFFFF "hello neighbors" 0 0 0b10000000
向相鄰節點發送消息
通過一些額外的選項和base64將消息發送到目標地址
send64 <address> <base64> <type> <service> <flags>
例子
send64 0x01234567 "aGVsbG8=" 0 0 0b00000000
將消息發送到0x01234567(這是帶有base64的sendex)
要發送遠程命令,您需要使用sendx
sendex <address> "<command> <args>" 0 1 0b00000000
ping
會返回“乒乓球”
uptime
將在“ HH:MM:SS”中返回節點正常運行時間
在src/commands.cpp中創建一個名為rcmd_yourcommandname的函數
void rcmd_yourcommandname (MyRemoteCommandParser::Argument *args, char *res) {
char * response = " hello world " ;
strlcpy (res, response, MyRemoteCommandParser::MAX_RESPONSE_SIZE);
}然後在void registerRemoteCommands() {}的底部添加它
remoteParser.registerCommand( " yourcommandname " , " " , &rcmd_yourcommandname);最後將其添加到#endif in src/commands.h中
void rcmd_yourcommandname (MyRemoteCommandParser::Argument *args, char *res);