supla-device
Loading...
Searching...
No Matches
Supla::Network Class Referenceabstract
Inheritance diagram for Supla::Network:
Collaboration diagram for Supla::Network:

Public Types

enum class  IntfType { Unknown = 0 , Ethernet = 1 , WiFi = 2 }
 

Public Member Functions

 Network (uint8_t ip[4])
 
virtual void onLoadConfig ()
 
virtual void setup ()=0
 
virtual void disable ()=0
 
virtual void uninit ()
 
virtual void setConfigMode ()
 
virtual void setNormalMode ()
 
virtual bool getMacAddr (uint8_t *)
 
virtual void setHostname (const char *, int macSize)
 
void generateHostname (const char *prefix, int macSize, char *output)
 
virtual bool isIpSetupTimeout ()
 
virtual uint32_t getIP ()
 
virtual Supla::ClientcreateClient ()
 
virtual bool isReady ()=0
 
virtual bool iterate ()
 
virtual void fillStateData (TDSC_ChannelState *channelState)
 
virtual bool isWifiConfigRequired ()
 
virtual void setSsid (const char *wifiSsid)
 
virtual void setPassword (const char *wifiPassword)
 
void clearTimeCounters ()
 
void setSuplaDeviceClass (SuplaDeviceClass *)
 
void setSetupNeeded ()
 
bool popSetupNeeded ()
 
enum IntfType getIntfType () const
 
virtual const char * getIntfName () const
 
bool isIntfDisabledInConfig () const
 

Static Public Member Functions

static NetworkInstance ()
 
static NetworkFirstInstance ()
 
static NetworkNextInstance (Network *instance)
 
static NetworkGetInstanceByIP (uint32_t ip)
 
static int GetNetIntfCount ()
 
static void DisconnectProtocols ()
 
static void Setup ()
 
static void Disable ()
 
static void Uninit ()
 
static bool IsReady ()
 
static bool Iterate ()
 
static void SetConfigMode ()
 
static void SetNormalMode ()
 
static void SetSetupNeeded ()
 
static bool PopSetupNeeded ()
 
static bool GetMainMacAddr (uint8_t *)
 
static void SetHostname (const char *prefix, int macSize)
 
static bool IsIpSetupTimeout ()
 
static void LoadConfig ()
 
static void printData (const char *prefix, const void *buf, const int count)
 
static void setSSLEnabled (bool enabled)
 

Protected Attributes

NetworknextNetIntf = nullptr
 
SuplaDeviceClasssdc = nullptr
 
const char * rootCACert = nullptr
 
unsigned int rootCACertSize = 0
 
unsigned char localIp [4]
 
char hostname [32] = {}
 
enum IntfType intfType = IntfType::Unknown
 
bool setupNeeded = false
 
bool useLocalIp = false
 
bool intfDisabledInConfig = false
 

Static Protected Attributes

static NetworknetIntf = nullptr
 
static NetworkfirstNetIntf = nullptr
 
static enum DeviceMode mode = DEVICE_MODE_NORMAL
 

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