CheeseBoard
A library for use with the CheeseBoard Cheddar platform
GfxNetInfo.h
1 #pragma once
2 
3 #include <Arduino.h>
4 #include <stdint.h>
5 #include "GfxItem.h"
6 
9 class GfxNetInfo : public GfxItem {
10 public:
11  GfxNetInfo(String newSsid, int8_t newChannel, uint8_t newSignal);
12  ~GfxNetInfo();
13  GfxNetInfo(const GfxNetInfo& other);
14  GfxNetInfo& operator=(const GfxNetInfo& other);
15  bool operator==(const GfxNetInfo& other);
16 
17  // For GfxItem
18  void draw(uint16_t xOffset=0, uint16_t yOffset=0);
19  uint16_t width();
20  uint16_t height();
21 
22  String ssid();
23  int8_t channel();
24  uint8_t signal();
25  uint32_t lastSeenMs();
26  String lastSeen();
27 
29  void update(int8_t newChannel, uint8_t newSignal);
30 
31 protected:
32  String _ssid;
33  int8_t _channel;
34  uint8_t _signal;
35  uint32_t _lastSeenMs;
36 
37 };
38 
void draw(uint16_t xOffset=0, uint16_t yOffset=0)
Definition: GfxNetInfo.cpp:38
Definition: GfxItem.h:5
uint16_t height()
Definition: GfxNetInfo.cpp:51
int8_t channel()
get the channel
Definition: GfxNetInfo.cpp:66
void update(int8_t newChannel, uint8_t newSignal)
Updates the ephemeral details for this ssid.
Definition: GfxNetInfo.cpp:98
uint8_t signal()
get the last signal strength
Definition: GfxNetInfo.cpp:71
uint32_t lastSeenMs()
get last seen ms
Definition: GfxNetInfo.cpp:76
uint16_t width()
Definition: GfxNetInfo.cpp:56
String lastSeen()
get last seen in human readable form
Definition: GfxNetInfo.cpp:81
String ssid()
get the ssid
Definition: GfxNetInfo.cpp:61