OpenDTU-old/lib/Hoymiles/src/commands/PowerControlCommand.h
Thomas Basler 8acae28c59 Feature: New handling of command queue
Goal of this change is to  prevent a overflow in the command queue by flooding it with MQTT commands and therefor also prevent  the reading of the inverter data.

To achieve this it is now possible to specify a insert type for each  queue element.
2024-12-15 20:45:32 +01:00

19 lines
579 B
C++

// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "DevControlCommand.h"
class PowerControlCommand : public DevControlCommand {
public:
explicit PowerControlCommand(InverterAbstract* inv, const uint64_t router_address = 0);
virtual String getCommandName() const;
virtual QueueInsertType getQueueInsertType() const { return QueueInsertType::AllowMultiple; }
virtual bool handleResponse(const fragment_t fragment[], const uint8_t max_fragment_id);
virtual void gotTimeout();
void setPowerOn(const bool state);
void setRestart();
};