SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
All Classes Files Functions Variables Typedefs Enumerations
linux/spsp/wifi_dummy.hpp
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include <string>
13 #include <unordered_set>
14 
15 #include "spsp/wifi_espnow_if.hpp"
16 #include "spsp/wifi_types.hpp"
17 
18 namespace SPSP::WiFi
19 {
25  class Dummy : public IESPNOW
26  {
27  public:
33  uint8_t getChannel()
34  {
35  return 1;
36  }
37 
45  void setChannel(uint8_t ch) {}
46 
53  {
54  ChannelRestrictions rest = {};
55  rest.low = 1;
56  rest.high = 1;
57  return rest;
58  }
59  };
60 } // namespace SPSP::WiFi
wifi_espnow_if.hpp
WiFi interface for ESP-NOW.
SPSP::WiFi::Dummy::getChannelRestrictions
const ChannelRestrictions getChannelRestrictions()
Get the Channel Restrictions object.
Definition: linux/spsp/wifi_dummy.hpp:52
SPSP::WiFi::ChannelRestrictions::high
uint8_t high
Highest usable channel.
Definition: wifi_types.hpp:36
SPSP::WiFi::IESPNOW
Requirements of ESP-NOW from WiFi instance.
Definition: wifi_espnow_if.hpp:23
SPSP::WiFi::Dummy::setChannel
void setChannel(uint8_t ch)
Sets current channel.
Definition: linux/spsp/wifi_dummy.hpp:45
SPSP::WiFi::Dummy::getChannel
uint8_t getChannel()
Gets current WiFi channel.
Definition: linux/spsp/wifi_dummy.hpp:33
SPSP::WiFi::Dummy
Dummy WiFi adapter.
Definition: linux/spsp/wifi_dummy.hpp:25
SPSP::WiFi::ChannelRestrictions::low
uint8_t low
Lowest usable channel.
Definition: wifi_types.hpp:35
SPSP::WiFi::ChannelRestrictions
WiFi channel restrictions structure.
Definition: wifi_types.hpp:33
wifi_types.hpp
Common WiFi types (and some constants)