LINXx firmware
Extensions to LINX toolkit
Public Member Functions | Public Attributes | List of all members
LinxWiFi101Listener Class Reference
Inheritance diagram for LinxWiFi101Listener:
LinxListener

Public Member Functions

virtual int SetSsid (const char ssid[])
 
virtual int SetSecurity (SecurityType securityType)
 
virtual int SetPassphrase (const char pw[])
 
virtual int Start (LinxDevice *linxDev)
 Start With IP And Port Saved In NVS. More...
 
virtual int Start (LinxDevice *linxDev, unsigned char ip3, unsigned char ip2, unsigned char ip1, unsigned char ip0, unsigned short port)
 Start using network config set in firmware sketch. More...
 
virtual int Restart ()
 Start With IP And Port Saved In RAM. More...
 
virtual int PrintWifiInfo ()
 Debug network information. More...
 
virtual int Init ()
 This case will be called repeatedly until the device connects to the network and starts listening. More...
 
virtual int Listen ()
 
virtual int Available ()
 Check for client. More...
 
virtual int Accept ()
 Connect to client. More...
 
virtual int Connected ()
 Handle packets if available. More...
 
virtual int Close ()
 Close client connection. More...
 
virtual int Exit ()
 Restart wifi stack. More...
 
virtual int CheckForCommands ()
 Periodic handler. More...
 
- Public Member Functions inherited from LinxListener
virtual int Start ()
 
virtual int Listen ()
 
virtual int Available ()
 
virtual int Accept ()
 
virtual int Connected ()
 
virtual int Close ()
 
virtual int Exit ()
 
void AttachCustomCommand (unsigned short commandNumber, int(*function)(unsigned char, unsigned char *, unsigned char *, unsigned char *))
 
void AttachPeriodicTask (int(*function)(unsigned char *, unsigned char *))
 
virtual int CheckForCommands ()
 Runs listener state machine; to be called in sketch loop() More...
 
int ProcessCommand (unsigned char *recBuffer, unsigned char *sendBuffer)
 Handles command packets. More...
 
void PacketizeAndSend (unsigned char *commandPacketBuffer, unsigned char *responsePacketBuffer, unsigned int dataSize, int status)
 Sends response packet. More...
 
void StatusResponse (unsigned char *commandPacketBuffer, unsigned char *responsePacketBuffer, int status)
 Sends status only as response (no data) More...
 
void DataBufferResponse (unsigned char *commandPacketBuffer, unsigned char *responsePacketBuffer, const unsigned char *dataBuffer, unsigned char dataSize, int status)
 Format byte array and send as LINX packet. Does not include data length byte. More...
 
unsigned char ComputeChecksum (unsigned char *packetBuffer)
 
bool ChecksumPassed (unsigned char *packetBuffer)
 

Public Attributes

LinxListenerState State
 
WifiStartState wifiState
 
int LinxWifiConnectStatus
 
unsigned long LinxWifiIp
 
unsigned short LinxWifiPort
 
unsigned char LinxWifiSsidSize
 
char LinxWifiSsid [32]
 
SecurityType LinxWifiSecurity
 
unsigned char LinxWifiPwSize
 
char LinxWifiPw [64]
 
unsigned char wifiServerFail
 
unsigned int LinxWifiStartTime
 
unsigned int LinxWifiTimeout
 
- Public Attributes inherited from LinxListener
LinxDeviceLinxDev
 
LinxListenerState State
 
LinxListenerInterface Interface
 
unsigned char ListenerChan
 
unsigned char * recBuffer
 
unsigned char * sendBuffer
 
unsigned int PrevPacket =0
 
int(* customCommands [16])(unsigned char, unsigned char *, unsigned char *, unsigned char *)
 
int(* periodicTasks [1])(unsigned char *, unsigned char *)
 

Member Function Documentation

◆ Accept()

int LinxWiFi101Listener::Accept ( )
virtual

Connect to client.

Returns
int

Reimplemented from LinxListener.

◆ Available()

int LinxWiFi101Listener::Available ( )
virtual

Check for client.

Returns
int

Reimplemented from LinxListener.

◆ CheckForCommands()

int LinxWiFi101Listener::CheckForCommands ( )
virtual

Periodic handler.

Returns
int

Reimplemented from LinxListener.

◆ Close()

int LinxWiFi101Listener::Close ( )
virtual

Close client connection.

Returns
int

Reimplemented from LinxListener.

◆ Connected()

int LinxWiFi101Listener::Connected ( )
virtual

Handle packets if available.

Returns
int

Reimplemented from LinxListener.

◆ Exit()

int LinxWiFi101Listener::Exit ( )
virtual

Restart wifi stack.

Returns
int

Reimplemented from LinxListener.

◆ Init()

int LinxWiFi101Listener::Init ( )
virtual

This case will be called repeatedly until the device connects to the network and starts listening.

Returns
int
Todo:
other security types

◆ Listen()

int LinxWiFi101Listener::Listen ( )
virtual
Returns
int

Reimplemented from LinxListener.

◆ PrintWifiInfo()

int LinxWiFi101Listener::PrintWifiInfo ( )
virtual

Debug network information.

Returns
int

◆ Restart()

int LinxWiFi101Listener::Restart ( void  )
virtual

Start With IP And Port Saved In RAM.

Returns
int

◆ Start() [1/2]

int LinxWiFi101Listener::Start ( LinxDevice linxDev)
virtual

Start With IP And Port Saved In NVS.

Parameters
linxDev
Returns
int

◆ Start() [2/2]

int LinxWiFi101Listener::Start ( LinxDevice linxDev,
unsigned char  ip3,
unsigned char  ip2,
unsigned char  ip1,
unsigned char  ip0,
unsigned short  port 
)
virtual

Start using network config set in firmware sketch.

Parameters
linxDev
ip3
ip2
ip1
ip0
port
Returns
int

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