Mark Single-parameter constructors explicit
This commit is contained in:
parent
0d880cb61e
commit
088ba58827
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
class AlarmDataCommand : public MultiDataCommand {
|
class AlarmDataCommand : public MultiDataCommand {
|
||||||
public:
|
public:
|
||||||
AlarmDataCommand(uint64_t target_address = 0, uint64_t router_address = 0, time_t time = 0);
|
explicit AlarmDataCommand(uint64_t target_address = 0, uint64_t router_address = 0, time_t time = 0);
|
||||||
|
|
||||||
virtual bool handleResponse(InverterAbstract* inverter, fragment_t fragment[], uint8_t max_fragment_id);
|
virtual bool handleResponse(InverterAbstract* inverter, fragment_t fragment[], uint8_t max_fragment_id);
|
||||||
};
|
};
|
||||||
@ -10,7 +10,7 @@ class InverterAbstract;
|
|||||||
|
|
||||||
class CommandAbstract {
|
class CommandAbstract {
|
||||||
public:
|
public:
|
||||||
CommandAbstract(uint64_t target_address = 0, uint64_t router_address = 0);
|
explicit CommandAbstract(uint64_t target_address = 0, uint64_t router_address = 0);
|
||||||
virtual ~CommandAbstract() {};
|
virtual ~CommandAbstract() {};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@ -4,5 +4,5 @@
|
|||||||
|
|
||||||
class DevControlCommand : public CommandAbstract {
|
class DevControlCommand : public CommandAbstract {
|
||||||
public:
|
public:
|
||||||
DevControlCommand(uint64_t target_address = 0, uint64_t router_address = 0);
|
explicit DevControlCommand(uint64_t target_address = 0, uint64_t router_address = 0);
|
||||||
};
|
};
|
||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
class DevInfoAllCommand : public MultiDataCommand {
|
class DevInfoAllCommand : public MultiDataCommand {
|
||||||
public:
|
public:
|
||||||
DevInfoAllCommand(uint64_t target_address = 0, uint64_t router_address = 0, time_t time = 0);
|
explicit DevInfoAllCommand(uint64_t target_address = 0, uint64_t router_address = 0, time_t time = 0);
|
||||||
|
|
||||||
virtual bool handleResponse(InverterAbstract* inverter, fragment_t fragment[], uint8_t max_fragment_id);
|
virtual bool handleResponse(InverterAbstract* inverter, fragment_t fragment[], uint8_t max_fragment_id);
|
||||||
};
|
};
|
||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
class DevInfoSampleCommand : public MultiDataCommand {
|
class DevInfoSampleCommand : public MultiDataCommand {
|
||||||
public:
|
public:
|
||||||
DevInfoSampleCommand(uint64_t target_address = 0, uint64_t router_address = 0, time_t time = 0);
|
explicit DevInfoSampleCommand(uint64_t target_address = 0, uint64_t router_address = 0, time_t time = 0);
|
||||||
|
|
||||||
virtual bool handleResponse(InverterAbstract* inverter, fragment_t fragment[], uint8_t max_fragment_id);
|
virtual bool handleResponse(InverterAbstract* inverter, fragment_t fragment[], uint8_t max_fragment_id);
|
||||||
};
|
};
|
||||||
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
class MultiDataCommand : public CommandAbstract {
|
class MultiDataCommand : public CommandAbstract {
|
||||||
public:
|
public:
|
||||||
MultiDataCommand(uint64_t target_address = 0, uint64_t router_address = 0, uint8_t data_type = 0, time_t time = 0);
|
explicit MultiDataCommand(uint64_t target_address = 0, uint64_t router_address = 0, uint8_t data_type = 0, time_t time = 0);
|
||||||
|
|
||||||
void setTime(time_t time);
|
void setTime(time_t time);
|
||||||
time_t getTime();
|
time_t getTime();
|
||||||
|
|||||||
@ -4,5 +4,5 @@
|
|||||||
|
|
||||||
class ParaSetCommand : public CommandAbstract {
|
class ParaSetCommand : public CommandAbstract {
|
||||||
public:
|
public:
|
||||||
ParaSetCommand(uint64_t target_address = 0, uint64_t router_address = 0);
|
explicit ParaSetCommand(uint64_t target_address = 0, uint64_t router_address = 0);
|
||||||
};
|
};
|
||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
class RealTimeRunDataCommand : public MultiDataCommand {
|
class RealTimeRunDataCommand : public MultiDataCommand {
|
||||||
public:
|
public:
|
||||||
RealTimeRunDataCommand(uint64_t target_address = 0, uint64_t router_address = 0, time_t time = 0);
|
explicit RealTimeRunDataCommand(uint64_t target_address = 0, uint64_t router_address = 0, time_t time = 0);
|
||||||
|
|
||||||
virtual bool handleResponse(InverterAbstract* inverter, fragment_t fragment[], uint8_t max_fragment_id);
|
virtual bool handleResponse(InverterAbstract* inverter, fragment_t fragment[], uint8_t max_fragment_id);
|
||||||
};
|
};
|
||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
class RequestFrameCommand : public SingleDataCommand {
|
class RequestFrameCommand : public SingleDataCommand {
|
||||||
public:
|
public:
|
||||||
RequestFrameCommand(uint64_t target_address = 0, uint64_t router_address = 0, uint8_t frame_no = 0);
|
explicit RequestFrameCommand(uint64_t target_address = 0, uint64_t router_address = 0, uint8_t frame_no = 0);
|
||||||
|
|
||||||
void setFrameNo(uint8_t frame_no);
|
void setFrameNo(uint8_t frame_no);
|
||||||
uint8_t getFrameNo();
|
uint8_t getFrameNo();
|
||||||
|
|||||||
@ -4,5 +4,5 @@
|
|||||||
|
|
||||||
class SingleDataCommand : public CommandAbstract {
|
class SingleDataCommand : public CommandAbstract {
|
||||||
public:
|
public:
|
||||||
SingleDataCommand(uint64_t target_address = 0, uint64_t router_address = 0);
|
explicit SingleDataCommand(uint64_t target_address = 0, uint64_t router_address = 0);
|
||||||
};
|
};
|
||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
class SystemConfigParaCommand : public MultiDataCommand {
|
class SystemConfigParaCommand : public MultiDataCommand {
|
||||||
public:
|
public:
|
||||||
SystemConfigParaCommand(uint64_t target_address = 0, uint64_t router_address = 0, time_t time = 0);
|
explicit SystemConfigParaCommand(uint64_t target_address = 0, uint64_t router_address = 0, time_t time = 0);
|
||||||
|
|
||||||
virtual bool handleResponse(InverterAbstract* inverter, fragment_t fragment[], uint8_t max_fragment_id);
|
virtual bool handleResponse(InverterAbstract* inverter, fragment_t fragment[], uint8_t max_fragment_id);
|
||||||
};
|
};
|
||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
class HM_1CH : public HM_Abstract {
|
class HM_1CH : public HM_Abstract {
|
||||||
public:
|
public:
|
||||||
HM_1CH(uint64_t serial);
|
explicit HM_1CH(uint64_t serial);
|
||||||
static bool isValidSerial(uint64_t serial);
|
static bool isValidSerial(uint64_t serial);
|
||||||
String typeName();
|
String typeName();
|
||||||
const byteAssign_t* getByteAssignment();
|
const byteAssign_t* getByteAssignment();
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
class HM_2CH : public HM_Abstract {
|
class HM_2CH : public HM_Abstract {
|
||||||
public:
|
public:
|
||||||
HM_2CH(uint64_t serial);
|
explicit HM_2CH(uint64_t serial);
|
||||||
static bool isValidSerial(uint64_t serial);
|
static bool isValidSerial(uint64_t serial);
|
||||||
String typeName();
|
String typeName();
|
||||||
const byteAssign_t* getByteAssignment();
|
const byteAssign_t* getByteAssignment();
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
class HM_4CH : public HM_Abstract {
|
class HM_4CH : public HM_Abstract {
|
||||||
public:
|
public:
|
||||||
HM_4CH(uint64_t serial);
|
explicit HM_4CH(uint64_t serial);
|
||||||
static bool isValidSerial(uint64_t serial);
|
static bool isValidSerial(uint64_t serial);
|
||||||
String typeName();
|
String typeName();
|
||||||
const byteAssign_t* getByteAssignment();
|
const byteAssign_t* getByteAssignment();
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
class HM_Abstract : public InverterAbstract {
|
class HM_Abstract : public InverterAbstract {
|
||||||
public:
|
public:
|
||||||
HM_Abstract(uint64_t serial);
|
explicit HM_Abstract(uint64_t serial);
|
||||||
bool sendStatsRequest(HoymilesRadio* radio);
|
bool sendStatsRequest(HoymilesRadio* radio);
|
||||||
bool sendAlarmLogRequest(HoymilesRadio* radio);
|
bool sendAlarmLogRequest(HoymilesRadio* radio);
|
||||||
bool sendDevInfoRequest(HoymilesRadio* radio);
|
bool sendDevInfoRequest(HoymilesRadio* radio);
|
||||||
|
|||||||
@ -25,7 +25,7 @@ class CommandAbstract;
|
|||||||
|
|
||||||
class InverterAbstract {
|
class InverterAbstract {
|
||||||
public:
|
public:
|
||||||
InverterAbstract(uint64_t serial);
|
explicit InverterAbstract(uint64_t serial);
|
||||||
void init();
|
void init();
|
||||||
uint64_t serial();
|
uint64_t serial();
|
||||||
void setName(const char* name);
|
void setName(const char* name);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user