Loom_WiFi class
WiFi InternetPlat.
Contents
Base classes
- class LoomInternetPlat
- Abstract internet communication module.
Protected functions
- auto get_client() -> SSLClient& override
- Get the underlying SSLClient implementation, which we will use for all of the other requests.
Protected variables
- const String SSID
- Host WiFi network name.
- const String pass
- Host WiFi network password.
- WiFiClient m_base_client
- SSLClient object for WiFi.
- SSLClient m_client
- Underlying Wifi SSLclient instance.
CONSTRUCTORS / DESTRUCTOR
- Loom_WiFi(LoomManager* manager, const char* ssid = "", const char* pass = "")
- Constructor.
- Loom_WiFi(LoomManager* manager, JsonArrayConst p)
- Constructor that takes Json Array, extracts args and delegates to regular constructor.
- ~Loom_WiFi() defaulted virtual
- Destructor.
OPERATION
- void connect() override
- Connect to internet.
- void disconnect() override
- Disconnect from the internet.
- auto is_connected() const -> bool override
- Whether or not connected to internet.
- auto open_socket(const uint port) -> UDPPtr override
- Open a UDP socket for sending and recieving incoming data.
- void package(JsonObject json) override
- Package IP with ID for MaxMSP implementation.
PRINT INFORMATION
- void print_config() const override
- Display the configuration settings of the module.
- void print_state() const override
- Display current state of the module.
Function documentation
Loom_ WiFi:: Loom_WiFi(LoomManager* manager,
const char* ssid = "",
const char* pass = "")
Constructor.
Parameters | |
---|---|
manager | |
ssid in | WiFi network name |
pass in | WiFi network password. Leave as empty string if network has no password. |
Loom_ WiFi:: Loom_WiFi(LoomManager* manager,
JsonArrayConst p)
Constructor that takes Json Array, extracts args and delegates to regular constructor.
Parameters | |
---|---|
manager | |
p in | The array of constuctor args to expand |
bool Loom_ WiFi:: is_connected() const override
Whether or not connected to internet.
Returns | True if connect, false otherwise |
---|
UDPPtr Loom_ WiFi:: open_socket(const uint port) override
Open a UDP socket for sending and recieving incoming data.
Returns | A UDP socket for transmitting and recieving, remember to close the socket when you are done! |
---|