Una red liviana de malla Lora escrita en C ++
Para enviar un mensaje a todos, abran tu serie y escriba
send 0xFFFFFFFF "hello world"
Obtiene una lista de comandos
help
Envía un desorden a la dirección de destino
send <address> <message>
Ejemplos
sendex 0x01234567 "hello"
Envía un mensaje al 0x01234567
sendex 0xFFFFFFFF "hello everyone"
Envía un mensaje a todos
Envía un mensaje a la dirección de destino con algunas opciones adicionales
sendex <address> <message> <type> <service> <flags>
Ejemplos
sendex 0x01234567 "hello" 0 0 0b00000000
Envía un mensaje al 0x01234567 (igual que 'Enviar 0x01234567 "Hello"')
sendex 0x01234567 "ping" 0 1 0b00000000
Envía un comando remoto al 0x01234567
sendex 0xFFFFFFFF "hello everyone" 0 0 0b00000000
Envía un mensaje a todos (igual que 'Enviar 0xffffffff "Hola a todos"')
sendex 0xFFFFFFFF "hello neighbors" 0 0 0b10000000
Envía un mensaje a los nodos vecinos
Envía un mensaje a la dirección de destino con algunas opciones adicionales y base64
send64 <address> <base64> <type> <service> <flags>
Ejemplo
send64 0x01234567 "aGVsbG8=" 0 0 0b00000000
Envía un mensaje al 0x01234567 (esto es sendex con base64)
Para enviar un comando remoto, debe usar sendx
sendex <address> "<command> <args>" 0 1 0b00000000
ping
Volverá "Pong"
uptime
Devolverá el tiempo de actividad de los nodos en "HH: MM: SS"
En src/commands.cpp crea una función llamada rcmd_yourCommandName
void rcmd_yourcommandname (MyRemoteCommandParser::Argument *args, char *res) {
char * response = " hello world " ;
strlcpy (res, response, MyRemoteCommandParser::MAX_RESPONSE_SIZE);
} Luego agregue esto en la parte inferior de void registerRemoteCommands() {}
remoteParser.registerCommand( " yourcommandname " , " " , &rcmd_yourcommandname); Por último, agregue esto antes de #endif en src/commands.h
void rcmd_yourcommandname (MyRemoteCommandParser::Argument *args, char *res);