SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
All Classes Files Functions Variables Typedefs Enumerations
testing/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  uint8_t m_channel = 1;
28 
29  public:
35  uint8_t getChannel()
36  {
37  return m_channel;
38  }
39 
45  void setChannel(uint8_t ch)
46  {
47  m_channel = ch;
48  }
49 
56  {
57  ChannelRestrictions rest = {};
58  rest.low = 1;
59  rest.high = 5;
60  return rest;
61  }
62  };
63 } // 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: testing/spsp/wifi_dummy.hpp:55
SPSP::WiFi::ChannelRestrictions::high
uint8_t high
Highest usable channel.
Definition: wifi_types.hpp:36
SPSP::WiFi::Dummy::setChannel
void setChannel(uint8_t ch)
Sets current channel.
Definition: testing/spsp/wifi_dummy.hpp:45
SPSP::WiFi::Dummy::getChannel
uint8_t getChannel()
Gets current WiFi channel.
Definition: testing/spsp/wifi_dummy.hpp:35
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)