Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
406 B

  1. /*
  2. Part of MQTT and API modules
  3. */
  4. #pragma once
  5. #include "espurna.h"
  6. #include <vector>
  7. #include <utility>
  8. enum class PayloadStatus {
  9. Off = 0,
  10. On = 1,
  11. Toggle = 2,
  12. Unknown = 0xFF
  13. };
  14. using rpc_payload_check_t = PayloadStatus(*)(const char*);
  15. bool rpcHandleAction(const String& action);
  16. PayloadStatus rpcParsePayload(const char* payload, const rpc_payload_check_t ext_check = nullptr);