Added CLI
This commit is contained in:
parent
b63bd9ae42
commit
70b27a0c07
8 changed files with 151 additions and 32 deletions
|
|
@ -1,6 +1,7 @@
|
|||
// #include <thread>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "modbus.h"
|
||||
|
||||
|
|
@ -27,6 +28,14 @@ void Microinverter::updatePorts() {
|
|||
// }
|
||||
}
|
||||
|
||||
void Microinverter::updatePorts(std::vector<std::string> ¶metersToGet) {
|
||||
std::vector<Port>::iterator portsIterator = this->ports.begin();
|
||||
while(portsIterator != this->ports.end()) {
|
||||
portsIterator->updateParameters(parametersToGet);
|
||||
portsIterator++;
|
||||
}
|
||||
}
|
||||
|
||||
void Microinverter::printPorts() {
|
||||
std::cout << "Microinverter: " << this->serialNumber << std::endl;
|
||||
|
||||
|
|
@ -36,4 +45,15 @@ void Microinverter::printPorts() {
|
|||
std::cout << std::endl;
|
||||
portsIterator++;
|
||||
}
|
||||
}
|
||||
|
||||
void Microinverter::printPorts(std::vector<std::string> ¶metersToGet) {
|
||||
std::cout << "Microinverter: " << this->serialNumber << std::endl;
|
||||
|
||||
std::vector<Port>::iterator portsIterator = this->ports.begin();
|
||||
while(portsIterator != this->ports.end()) {
|
||||
portsIterator->printParameters(parametersToGet);
|
||||
std::cout << std::endl;
|
||||
portsIterator++;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue