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.

23 lines
447 B

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