mirror of
https://github.com/markqvist/reticulum-cpp.git
synced 2025-09-22 05:14:39 -04:00
WIP: Exposed Interface mode for setting
This commit is contained in:
parent
9e0fb02581
commit
9f0e71bb81
3 changed files with 6 additions and 3 deletions
|
@ -96,6 +96,7 @@ namespace RNS {
|
||||||
inline std::string name() const { assert(_object); return _object->_name; }
|
inline std::string name() const { assert(_object); return _object->_name; }
|
||||||
inline const Bytes& ifac_identity() const { assert(_object); return _object->_ifac_identity; }
|
inline const Bytes& ifac_identity() const { assert(_object); return _object->_ifac_identity; }
|
||||||
inline Type::Interface::modes mode() const { assert(_object); return _object->_mode; }
|
inline Type::Interface::modes mode() const { assert(_object); return _object->_mode; }
|
||||||
|
inline void mode(Type::Interface::modes mode) { assert(_object); _object->_mode = mode; }
|
||||||
inline uint32_t bitrate() const { assert(_object); return _object->_bitrate; }
|
inline uint32_t bitrate() const { assert(_object); return _object->_bitrate; }
|
||||||
inline double announce_allowed_at() const { assert(_object); return _object->_announce_allowed_at; }
|
inline double announce_allowed_at() const { assert(_object); return _object->_announce_allowed_at; }
|
||||||
inline float announce_cap() const { assert(_object); return _object->_announce_cap; }
|
inline float announce_cap() const { assert(_object); return _object->_announce_cap; }
|
||||||
|
|
|
@ -60,8 +60,8 @@ bool UDPInterface::start(const char* wifi_ssid, const char* wifi_password, int p
|
||||||
extreme("UDPInterface: wifi ssid: " + _wifi_ssid);
|
extreme("UDPInterface: wifi ssid: " + _wifi_ssid);
|
||||||
extreme("UDPInterface: wifi password: " + _wifi_password);
|
extreme("UDPInterface: wifi password: " + _wifi_password);
|
||||||
extreme("UDPInterface: local host: " + _local_host);
|
extreme("UDPInterface: local host: " + _local_host);
|
||||||
extreme("UDPInterface: local port: " + std::to_string(_remote_port));
|
extreme("UDPInterface: local port: " + std::to_string(_local_port));
|
||||||
extreme("UDPInterface: remote host: " + _local_host);
|
extreme("UDPInterface: remote host: " + _remote_host);
|
||||||
extreme("UDPInterface: remote port: " + std::to_string(_remote_port));
|
extreme("UDPInterface: remote port: " + std::to_string(_remote_port));
|
||||||
|
|
||||||
#ifdef ARDUINO
|
#ifdef ARDUINO
|
||||||
|
|
|
@ -259,15 +259,17 @@ void setup_reticulum() {
|
||||||
RNS::Transport::register_interface(ininterface);
|
RNS::Transport::register_interface(ininterface);
|
||||||
RNS::Transport::register_interface(loopinterface);
|
RNS::Transport::register_interface(loopinterface);
|
||||||
#ifdef UDP_INTERFACE
|
#ifdef UDP_INTERFACE
|
||||||
|
udp_interface.mode(RNS::Type::Interface::MODE_GATEWAY);
|
||||||
RNS::Transport::register_interface(udp_interface);
|
RNS::Transport::register_interface(udp_interface);
|
||||||
#endif
|
#endif
|
||||||
#ifdef LORA_INTERFACE
|
#ifdef LORA_INTERFACE
|
||||||
|
lora_interface.mode(RNS::Type::Interface::MODE_GATEWAY);
|
||||||
RNS::Transport::register_interface(lora_interface);
|
RNS::Transport::register_interface(lora_interface);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef UDP_INTERFACE
|
#ifdef UDP_INTERFACE
|
||||||
RNS::head("Starting UDPInterface...", RNS::LOG_EXTREME);
|
RNS::head("Starting UDPInterface...", RNS::LOG_EXTREME);
|
||||||
udp_interface.start("some_ssid", "some_password");
|
udp_interface.start("some_ssid", "some_password", 2424);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LORA_INTERFACE
|
#ifdef LORA_INTERFACE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue