ClusterDuck Protocol
Public Member Functions | List of all members
DuckLink Class Reference
Inheritance diagram for DuckLink:
Duck

Public Member Functions

void run ()
 Provide the DuckLink specific implementation of the base run() method.
 
void setupWithDefaults (String ssid="", String password="")
 Override the default setup method to match DuckLink specific defaults. More...
 
 Duck ()
 Construct a new Duck object.
 
 Duck (String id)
 Construct a new Duck object. More...
 
- Public Member Functions inherited from Duck
 Duck ()
 Construct a new Duck object.
 
 Duck (String id)
 Construct a new Duck object. More...
 
void setupSerial (int baudRate=115200)
 Setup serial connection. More...
 
void setupRadio (float band=CDPCFG_RF_LORA_FREQ, int ss=CDPCFG_PIN_LORA_CS, int rst=CDPCFG_PIN_LORA_RST, int di0=CDPCFG_PIN_LORA_DIO0, int di1=CDPCFG_PIN_LORA_DIO1, int txPower=CDPCFG_RF_LORA_TXPOW)
 Setup the radio component. More...
 
void setupWifi (const char *ap="🆘 DUCK EMERGENCY PORTAL")
 Setup WiFi access point. More...
 
int setupDns ()
 Setup DNS. More...
 
void setupWebServer (bool createCaptivePortal=false, String html="")
 Setup web server. More...
 
void setupInternet (String ssid, String password)
 Setup internet access. More...
 
void setupOTA ()
 
int sendPayloadStandard (String msg="", String topic="", String senderId="", String messageId="", String path="")
 Send a duck LoRa message. More...
 
bool isWifiConnected ()
 Check wifi connection status. More...
 
bool ssidAvailable (String ssid)
 Check if the give access point is available. More...
 
String getSsid ()
 Get the access point ssid. More...
 
String getPassword ()
 Get the wifi access point password. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Duck
int startReceive ()
 Tell the duck radio to start receiving packets from the mesh network. More...
 
int startTransmit ()
 Tell the duck radio to start receiving packets from the mesh network. More...
 
virtual int reconnectWifi (String ssid, String password)
 
void processPortalRequest ()
 Handle request from emergency portal.
 
void handleOtaUpdate ()
 Handle over the air firmware update.
 
- Static Protected Member Functions inherited from Duck
static void toggleReceiveFlag ()
 
static void setReceiveFlag (bool value)
 
static bool getReceiveFlag ()
 
static void onPacketReceived ()
 
static bool imAlive (void *)
 
static bool reboot (void *)
 
- Protected Attributes inherited from Duck
String deviceId
 
DuckLoraduckLora = DuckLora::getInstance()
 
DuckNetduckNet = DuckNet::getInstance()
 
- Static Protected Attributes inherited from Duck
static volatile bool receivedFlag = false
 

Member Function Documentation

◆ Duck()

Duck::Duck

Construct a new Duck object.

Parameters
ida unique id

◆ setupWithDefaults()

void DuckLink::setupWithDefaults ( String  ssid = "",
String  password = "" 
)
virtual

Override the default setup method to match DuckLink specific defaults.

In addition to Serial component, the Radio component is also initialized. When ssid and password are provided the duck will setup the wifi related components.

Parameters
ssidwifi access point ssid (defaults to an empty string if not provided)
passwordwifi password (defaults to an empty string if not provided)

Reimplemented from Duck.


The documentation for this class was generated from the following files: