RSeries astromech firmware
WifiSerialBridgeBase< maxClients > Class Template Reference

#include <wifi/WifiSerialBridge.h>

Detailed Description

template<unsigned maxClients = 1>
class WifiSerialBridgeBase< maxClients >

Base template of automatic forwarder from i2c to CommandEvent.

Create an instance of this template to automatically forward i2c string commands to CommandEvent. A convenience type of I2CReceiver is provided that uses the default buffer size of 32 bytes. Only a single instance of I2CReceiver should be created per sketch.

WifiSerialBridge wifiSerialBridge(2000);

To support more than one client (for example) use:

WifiSerialBridgeBase<2> wifiSerialBridge(2000);
+ Inheritance diagram for WifiSerialBridgeBase< maxClients >:
+ Collaboration diagram for WifiSerialBridgeBase< maxClients >:

Public Member Functions

 WifiSerialBridgeBase (HardwareSerial &serial, WifiAccess &wifiAccess, uint16_t port=2000)
 Constructor. More...
 
void setEnabled (bool enabled)
 
bool enabled ()
 
virtual void wifiConnected (WifiAccess &access) override
 
virtual void wifiDisconnected (WifiAccess &access) override
 
virtual void animate () override
 Dispatch any received i2c event to CommandEvent. More...
 
- Public Member Functions inherited from AnimatedEvent
 AnimatedEvent ()
 Default Constructor. More...
 
void setLoopDoneCallback (AnimatedLoopDone loopProc)
 

Public Attributes

WiFiClient fClients [maxClients]
 

Additional Inherited Members

- Static Public Member Functions inherited from AnimatedEvent
static void process ()
 Calls animate() for each created AnimatedEvent subclass. More...
 

Constructor & Destructor Documentation

◆ WifiSerialBridgeBase()

template<unsigned maxClients = 1>
WifiSerialBridgeBase< maxClients >::WifiSerialBridgeBase ( HardwareSerial &  serial,
WifiAccess wifiAccess,
uint16_t  port = 2000 
)
inline

Constructor.

Only a single instance of WifiSerialBridge should be created per sketch.

Parameters
portthe port number of this service

Member Function Documentation

◆ animate()

template<unsigned maxClients = 1>
virtual void WifiSerialBridgeBase< maxClients >::animate ( )
inlineoverridevirtual

Dispatch any received i2c event to CommandEvent.

Implements AnimatedEvent.

◆ enabled()

template<unsigned maxClients = 1>
bool WifiSerialBridgeBase< maxClients >::enabled ( )
inline

◆ setEnabled()

template<unsigned maxClients = 1>
void WifiSerialBridgeBase< maxClients >::setEnabled ( bool  enabled)
inline

◆ wifiConnected()

template<unsigned maxClients = 1>
virtual void WifiSerialBridgeBase< maxClients >::wifiConnected ( WifiAccess access)
inlineoverridevirtual

Implements WifiAccess::Notify.

◆ wifiDisconnected()

template<unsigned maxClients = 1>
virtual void WifiSerialBridgeBase< maxClients >::wifiDisconnected ( WifiAccess access)
inlineoverridevirtual

Implements WifiAccess::Notify.

Member Data Documentation

◆ fClients

template<unsigned maxClients = 1>
WiFiClient WifiSerialBridgeBase< maxClients >::fClients[maxClients]

The documentation for this class was generated from the following file:
WifiSerialBridgeBase
Base template of automatic forwarder from i2c to CommandEvent.
Definition: WifiSerialBridge.h:36
WifiSerialBridge.h
WifiSerialBridge
Default instantiation of automatic forwarder from wifi to Serial.