Digitalisierte Elektroverteilung zur permanenten Verbraucherüberwachung
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PublisherPowercenter.cpp 765B

3 years ago
1234567891011121314151617181920212223242526
  1. #include "PublisherPowercenter.h"
  2. #include <easylogging++.h>
  3. PublisherPowercenter::PublisherPowercenter() : PublisherInterface(PublisherType::POWERCENTER)
  4. {
  5. connection = std::make_unique<ModbusTCP>(SystemConfig::getIntConfigParameter("modbus_tcp_slave_address"),
  6. SystemConfig::getStringConfigParameter("modbus_poc_ip"),
  7. SystemConfig::getIntConfigParameter("modbus_poc_port"));
  8. modbusData = std::make_unique<ModbusDataPOC>(this->id);
  9. }
  10. PublisherPowercenter::~PublisherPowercenter() {
  11. //modbus->disconnect();
  12. }
  13. std::string PublisherPowercenter::getName() const
  14. {
  15. std::stringstream name;
  16. name << "Powercenter - Siemens (ID: " << id << ")";
  17. return name.str();
  18. }