Files
espurna/code/espurna/rpc.h
2021-10-20 13:07:34 +03:00

24 lines
447 B
C

/*
Part of MQTT and API modules
*/
#pragma once
#include <Arduino.h>
// --------------------------------------------------------------------------
enum class PayloadStatus {
Off = 0,
On = 1,
Toggle = 2,
Unknown = 0xFF
};
using rpc_payload_check_t = PayloadStatus(*)(const char*);
bool rpcHandleAction(const String& action);
PayloadStatus rpcParsePayload(const char* payload, const rpc_payload_check_t ext_check = nullptr);