Files
OpenIris-ESPIDF/components/CommandManager/CommandManager/CommandSchema.hpp

58 lines
1.0 KiB
C++

#ifndef COMMAND_SCHEMA_HPP
#define COMMAND_SCHEMA_HPP
// this generally should be merged with ProjectConfig definitions
// and moved into a separate component
// and used as more or less models
struct BasePayload
{
};
struct WifiPayload : BasePayload
{
std::string networkName;
std::string ssid;
std::string password;
uint8_t channel;
uint8_t power;
};
struct UpdateWifiPayload : BasePayload
{
std::string networkName;
std::optional<std::string> ssid;
std::optional<std::string> password;
std::optional<uint8_t> channel;
std::optional<uint8_t> power;
};
struct deleteNetworkPayload : BasePayload
{
std::string networkName;
};
// implement
struct UpdateAPWiFiPayload : BasePayload
{
std::string ssid;
std::string password;
uint8_t channel;
};
struct MDNSPayload : public BasePayload
{
std::string hostname;
};
// todo implement
struct UpdateCameraConfigPayload : BasePayload
{
uint8_t vflip;
uint8_t href;
uint8_t framesize;
uint8_t quality;
uint8_t brightness;
// todo add more options here
};
#endif