Midnight Sun Firmware
Loading...
Searching...
No Matches
gpio_manager.h
1#pragma once
2
3/************************************************************************************************
4 * @file gpio_manager.h
5 *
6 * @brief Header file defining the Client GpioManager class
7 *
8 * @date 2025-01-04
9 * @author Aryan Kashem
10 ************************************************************************************************/
11
12/* Standard library Headers */
13#include <stdint.h>
14#include <string.h>
15
16#include <unordered_map>
17
18/* Inter-component Headers */
19#include "gpio_datagram.h"
20
21/* Intra-component Headers */
22
37 private:
40 public:
45 GpioManager() = default;
46
53 void setGpioPinState(std::string &payload);
54
61 void setGpioAllStates(std::string &payload);
62
70 std::string processGpioPinState(std::string &payload);
71
78 std::string processGpioAllStates();
79
87 std::string processGpioPinMode(std::string &payload);
88
95 std::string processGpioAllModes();
96
104 std::string processGpioPinAltFunction(std::string &payload);
105
112 std::string processGpioAllAltFunctions();
113};
114
Definition: gpio_datagram.h:36
Class that manages receiving and transmitting Gpio commands and JSON logging.
Definition: gpio_manager.h:36
std::string processGpioPinMode(std::string &payload)
Process a get Gpio Pin mode command given the data payload.
Definition: gpio_manager.cc:90
std::string processGpioAllAltFunctions()
Process a get all Gpio Pin alternate functions command.
Definition: gpio_manager.cc:150
std::string processGpioAllModes()
Process a get all Gpio Pin modes command.
Definition: gpio_manager.cc:102
std::string processGpioAllStates()
Process a get all Gpio Pin states command.
Definition: gpio_manager.cc:58
Datagram::Gpio m_gpioDatagram
Definition: gpio_manager.h:38
std::string processGpioPinAltFunction(std::string &payload)
Process a get Gpio Pin alternate function command given the data payload.
Definition: gpio_manager.cc:138
GpioManager()=default
Constructs a GpioManager object.
void setGpioAllStates(std::string &payload)
Sets all Gpio Pin state given the data payload.
Definition: gpio_manager.cc:35
void setGpioPinState(std::string &payload)
Sets a Gpio Pin state given the data payload.
Definition: gpio_manager.cc:26
std::string processGpioPinState(std::string &payload)
Process a get Gpio Pin state command given the data payload.
Definition: gpio_manager.cc:46