From 9bdd889bc43e47b15abc5c9c73193ca2504fae3b Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 8 Jul 2019 17:12:35 +0200 Subject: [PATCH] fix naming in str --- src/RegisterDatapoint.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/RegisterDatapoint.py b/src/RegisterDatapoint.py index e6a02f5..b7beb0a 100644 --- a/src/RegisterDatapoint.py +++ b/src/RegisterDatapoint.py @@ -21,7 +21,7 @@ class AbstractModbusDatapoint(object): self.priority = 0 def __str__(self): - return "{0}, {1}: Unit: {2}, Address: {3}, Count: {4}, Scanrate: {5}".format(self.type, + return "{0}, {1}: unit: {2}, address: {3}, count: {4}, scanRate: {5}".format(self.type, self.label, self.unit, self.address, @@ -43,7 +43,7 @@ class HoldingRegisterDatapoint(AbstractModbusDatapoint): self.type = 'holding register' def __str__(self): - return "[{0!s}, Read: {1}, Write: {2}, Feedback: {3}".format(super().__str__(), self.publishTopic, self.subscribeTopic, self.feedbackTopic) + return "[{0!s}, publishTopic: {1}, subscribeTopic: {2}, feedbackTopic: {3}".format(super().__str__(), self.publishTopic, self.subscribeTopic, self.feedbackTopic) def process(self, client, pubQueue): successFull = True @@ -92,7 +92,7 @@ class ReadOnlyDatapoint(AbstractModbusDatapoint): self.lastContact = None def __str__(self): - return "[{0!s}, UpdateOnly: {1}, Read: {2}".format(super().__str__(), self.updateOnly, self.publishTopic) + return "[{0!s}, updateOnly: {1}, publishTopic: {2}".format(super().__str__(), self.updateOnly, self.publishTopic)