REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
Persistent user-defined ethernet settings which is mostly relevant only during startup as the information is subsequently hold by the QNEthernet library objects. More...
#include <ethernet.h>


Public Member Functions | |
void | reset_defaults () |
std::string | name () const |
StartupConfig () | |
Initializes with default values which are always valid and serve as a fallback if invalid options are given. | |
int | begin_ip () |
Calls net::Ethernet.begin, sets IP address. | |
void | begin_mdns () |
Calls net::MDNS.begin. | |
void | fromJson (JsonObjectConst src, nvmconfig::Context c=nvmconfig::Context::Flash) override |
void | toJson (JsonObject target, nvmconfig::Context c=nvmconfig::Context::Flash) const override |
![]() | |
virtual void | clear () |
Clear local memory in order to save RAM if an object is not needed during runtime but only at startup. | |
Public Attributes | |
bool | enable_ethernet |
Turn on/off networking completely. | |
bool | enable_dhcp |
DHCP client vs static IP configuration. | |
bool | enable_jsonl |
Enable the JSONL TCP/IP server. | |
bool | enable_webserver |
Enable embedded webserver for REST access. | |
bool | enable_websockets |
Enable websocket server ontop of webserver. | |
bool | enable_mdns |
Enable mDNS/zeroconf multicast service discovery. | |
int | jsonl_port |
TCP port for jsonl server. | |
int | webserver_port |
TCP port for webserver. | |
MacAddress | mac |
Custom MAC address. Defaults to original permanent system Mac. | |
std::string | hostname |
used only for DHCP client. Maximum 250 characters. | |
IPAddress | static_ipaddr |
own ip address, used only when use_dhcp=false | |
IPAddress | static_netmask |
netmask; used only when use_dhcp=false | |
IPAddress | static_gw |
gateway address; used only when use_dhcp=false | |
IPAddress | static_dns |
DNS server address; used only when use_dhcp=false. | |
uint32_t | connection_timeout_ms |
(Runtime-changable) Time after idling connections time out. | |
uint8_t | max_connections |
(Runtime-changable) Maximum number of parallel connections accepted | |
Additional Inherited Members | |
![]() | |
static StartupConfig & | get () |
Detailed Description
Persistent user-defined ethernet settings which is mostly relevant only during startup as the information is subsequently hold by the QNEthernet library objects.
Definition at line 40 of file ethernet.h.
Constructor & Destructor Documentation
◆ StartupConfig()
|
inline |
Initializes with default values which are always valid and serve as a fallback if invalid options are given.
Default values are defined at build time in the code.
Definition at line 48 of file ethernet.h.
References reset_defaults().
Member Function Documentation
◆ begin_ip()
FLASHMEM int net::StartupConfig::begin_ip | ( | ) |
Calls net::Ethernet.begin, sets IP address.
Definition at line 100 of file ethernet.cpp.
References LOG, LOG2, LOG4, LOG_ALWAYS, LOG_ERROR, utils::toString(), and utils::valid().
◆ begin_mdns()
FLASHMEM void net::StartupConfig::begin_mdns | ( | ) |
Calls net::MDNS.begin.
Definition at line 156 of file ethernet.cpp.
◆ fromJson()
|
overridevirtual |
Implements nvmconfig::PersistentSettings.
Definition at line 61 of file ethernet.cpp.
References JSON_GET, JSON_GET_AS, and src.
◆ name()
|
inlinevirtual |
Implements nvmconfig::PersistentSettings.
Definition at line 44 of file ethernet.h.
◆ reset_defaults()
|
virtual |
< In Firmware version 1.0, this feature is by default deactivated
< In Firmware version 1.0, this feature is by default deactivated
@TODO test timeout.
Implements nvmconfig::PersistentSettings.
Definition at line 19 of file ethernet.cpp.
References connection_timeout_ms, enable_dhcp, enable_ethernet, enable_jsonl, enable_mdns, enable_webserver, enable_websockets, hostname, jsonl_port, LOG_ALWAYS, mac, max_connections, utils::MacAddress::reset(), static_dns, static_gw, static_ipaddr, static_netmask, and webserver_port.
Referenced by StartupConfig().
◆ toJson()
|
overridevirtual |
Implements nvmconfig::PersistentSettings.
Definition at line 83 of file ethernet.cpp.
References JSON_SET.
Member Data Documentation
◆ connection_timeout_ms
uint32_t net::StartupConfig::connection_timeout_ms |
(Runtime-changable) Time after idling connections time out.
Definition at line 70 of file ethernet.h.
Referenced by reset_defaults().
◆ enable_dhcp
bool net::StartupConfig::enable_dhcp |
DHCP client vs static IP configuration.
Definition at line 51 of file ethernet.h.
Referenced by reset_defaults().
◆ enable_ethernet
bool net::StartupConfig::enable_ethernet |
Turn on/off networking completely.
Definition at line 50 of file ethernet.h.
Referenced by reset_defaults().
◆ enable_jsonl
bool net::StartupConfig::enable_jsonl |
Enable the JSONL TCP/IP server.
Definition at line 52 of file ethernet.h.
Referenced by reset_defaults().
◆ enable_mdns
bool net::StartupConfig::enable_mdns |
Enable mDNS/zeroconf multicast service discovery.
Definition at line 55 of file ethernet.h.
Referenced by reset_defaults().
◆ enable_webserver
bool net::StartupConfig::enable_webserver |
Enable embedded webserver for REST access.
Definition at line 53 of file ethernet.h.
Referenced by reset_defaults().
◆ enable_websockets
bool net::StartupConfig::enable_websockets |
Enable websocket server ontop of webserver.
Definition at line 54 of file ethernet.h.
Referenced by reset_defaults().
◆ hostname
std::string net::StartupConfig::hostname |
used only for DHCP client. Maximum 250 characters.
Definition at line 61 of file ethernet.h.
Referenced by reset_defaults().
◆ jsonl_port
int net::StartupConfig::jsonl_port |
TCP port for jsonl server.
Definition at line 57 of file ethernet.h.
Referenced by reset_defaults().
◆ mac
MacAddress net::StartupConfig::mac |
Custom MAC address. Defaults to original permanent system Mac.
Definition at line 60 of file ethernet.h.
Referenced by reset_defaults().
◆ max_connections
uint8_t net::StartupConfig::max_connections |
(Runtime-changable) Maximum number of parallel connections accepted
Definition at line 71 of file ethernet.h.
Referenced by reset_defaults().
◆ static_dns
IPAddress net::StartupConfig::static_dns |
DNS server address; used only when use_dhcp=false.
Definition at line 66 of file ethernet.h.
Referenced by reset_defaults().
◆ static_gw
IPAddress net::StartupConfig::static_gw |
gateway address; used only when use_dhcp=false
Definition at line 65 of file ethernet.h.
Referenced by reset_defaults().
◆ static_ipaddr
IPAddress net::StartupConfig::static_ipaddr |
own ip address, used only when use_dhcp=false
Definition at line 63 of file ethernet.h.
Referenced by reset_defaults().
◆ static_netmask
IPAddress net::StartupConfig::static_netmask |
netmask; used only when use_dhcp=false
Definition at line 64 of file ethernet.h.
Referenced by reset_defaults().
◆ webserver_port
int net::StartupConfig::webserver_port |
The documentation for this class was generated from the following files:
- lib/communication/src/net/ethernet.h
- lib/communication/src/net/ethernet.cpp