Release for adding short names
This commit is contained in:
parent
a0d06edf7b
commit
25fef43d66
10 changed files with 49 additions and 37 deletions
|
|
@ -31,7 +31,7 @@ class Dtu {
|
|||
|
||||
// void printMicroinverters();
|
||||
|
||||
void printMicroinverters(std::vector<std::string> ¶metersToGet, bool allParameters, std::vector<long long> µinvertersToGet);
|
||||
void printMicroinverters(std::vector<std::string> ¶metersToGet, bool allParameters, std::vector<long long> µinvertersToGet, bool shortNames);
|
||||
|
||||
~Dtu();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class Microinverter {
|
|||
|
||||
void updatePorts(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
|
||||
void printPorts(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
void printPorts(std::vector<std::string> ¶metersToGet, bool allParameters, bool shortNames);
|
||||
|
||||
long long getTodayProduction();
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class Port {
|
|||
|
||||
void updateParameters(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
|
||||
void printParameters(std::vector<std::string> ¶metersToGet, bool allParameters);
|
||||
void printParameters(std::vector<std::string> ¶metersToGet, bool allParameters, bool shortNames);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -16,7 +16,7 @@ class PortParameter {
|
|||
virtual void setValueFromRegisters(uint16_t *readArray, int registerCount);
|
||||
|
||||
public:
|
||||
PortParameter(std::string name, uint16_t parameterAddressOffset, int registerSize);
|
||||
PortParameter(std::string name, std::string shortName, uint16_t parameterAddressOffset, int registerSize);
|
||||
|
||||
virtual ~PortParameter();
|
||||
|
||||
|
|
@ -33,6 +33,8 @@ class PortParameter {
|
|||
|
||||
public:
|
||||
std::string name;
|
||||
std::string shortName;
|
||||
|
||||
int age;
|
||||
|
||||
std::pair<PortParameterValue, PortParameterValueType> getValue();
|
||||
|
|
@ -42,24 +44,24 @@ class PortParameter {
|
|||
void updateValue(std::shared_ptr<class modbus> modubs, uint16_t portStartAddress);
|
||||
};
|
||||
|
||||
class PortParameterFloat : virtual public PortParameter {
|
||||
class PortParameterFloat : public PortParameter {
|
||||
protected:
|
||||
int decimalPlaces;
|
||||
|
||||
virtual void setValueFromRegisters(uint16_t *readArray, int registerCount);
|
||||
|
||||
public:
|
||||
PortParameterFloat(std::string name, int decimalPlaces, uint16_t parameterAddressOffset, int registerSize);
|
||||
PortParameterFloat(std::string name, std::string shortName, int decimalPlaces, uint16_t parameterAddressOffset, int registerSize);
|
||||
|
||||
std::string getOutputValue();
|
||||
};
|
||||
|
||||
class PortParameterInt : virtual public PortParameter {
|
||||
class PortParameterInt : public PortParameter {
|
||||
protected:
|
||||
virtual void setValueFromRegisters(uint16_t *readArray, int registerCount);
|
||||
|
||||
public:
|
||||
PortParameterInt(std::string name, uint16_t parameterAddressOffset, int registerSize);
|
||||
PortParameterInt(std::string name, std::string shortName, uint16_t parameterAddressOffset, int registerSize);
|
||||
|
||||
std::string getOutputValue();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue