Instead of just adding the target_address to a command this patch adds a reference to the whole inverter instance
22 lines
647 B
C++
22 lines
647 B
C++
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
#pragma once
|
|
|
|
#include "CommandAbstract.h"
|
|
#include "../HoymilesRadio_CMT.h"
|
|
|
|
class ChannelChangeCommand : public CommandAbstract {
|
|
public:
|
|
explicit ChannelChangeCommand(InverterAbstract* inv, const uint64_t router_address = 0, const uint8_t channel = 0);
|
|
|
|
virtual String getCommandName() const;
|
|
|
|
void setChannel(const uint8_t channel);
|
|
uint8_t getChannel() const;
|
|
|
|
void setCountryMode(const CountryModeId_t mode);
|
|
|
|
virtual bool handleResponse(InverterAbstract& inverter, const fragment_t fragment[], const uint8_t max_fragment_id);
|
|
|
|
virtual uint8_t getMaxResendCount();
|
|
};
|