شبكة Lora Lora خفيفة الوزن مكتوبة في C ++
لإرسال رسالة إلى كل شخص يفتح المسلسل الخاص بك ونوعك
send 0xFFFFFFFF "hello world"
يحصل على قائمة بالأوامر
help
يرسل messsage إلى العنوان المستهدف
send <address> <message>
أمثلة
sendex 0x01234567 "hello"
يرسل رسالة إلى 0x01234567
sendex 0xFFFFFFFF "hello everyone"
يرسل رسالة إلى الجميع
يرسل رسالة إلى العنوان الهدف مع بعض الخيارات الإضافية
sendex <address> <message> <type> <service> <flags>
أمثلة
sendex 0x01234567 "hello" 0 0 0b00000000
يرسل رسالة إلى 0x01234567 (مثل "إرسال 0x01234567" Hello "')
sendex 0x01234567 "ping" 0 1 0b00000000
يرسل الأمر عن بُعد إلى 0x01234567
sendex 0xFFFFFFFF "hello everyone" 0 0 0b00000000
يرسل رسالة إلى الجميع (مثل "إرسال 0xfffffffff" مرحبا الجميع ")
sendex 0xFFFFFFFF "hello neighbors" 0 0 0b10000000
يرسل رسالة إلى العقد المجاورة
يرسل رسالة إلى العنوان الهدف مع بعض الخيارات الإضافية و BASE64
send64 <address> <base64> <type> <service> <flags>
مثال
send64 0x01234567 "aGVsbG8=" 0 0 0b00000000
يرسل رسالة إلى 0x01234567 (هذا هو sendex مع base64)
لإرسال أمر بعيد ، تحتاج إلى استخدام 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 في src/commands.h
void rcmd_yourcommandname (MyRemoteCommandParser::Argument *args, char *res);