diff --git a/docs/classdiagram.svg b/docs/classdiagram.svg
index 04442a6..01f6a67 100644
--- a/docs/classdiagram.svg
+++ b/docs/classdiagram.svg
@@ -1,3 +1,3 @@
-<interface_type→SoftwareSerial>
- deviceId: char
- charTimeout: uint
- frameTimeout: uint
- recTimeout: uint
+ send()
+ receive()
+ getDeviceId()
- calulateTimeouts() - clearRxBuffer()
<<struct>>
Message_content_t - msg_text: string - receiver_id: char - sender_id: char
+ sendNewMessage() + stackProcessing() + getdestinationId
- sendAck() - printMessage()
Service-implementation-layer
ServiceInterface_modbusRTU
# getPDU_from_services() # addPDU_to_service() + communicate()
- interface: interface_type
- receiveBuffer: CharArray*
# send() <<virtual>>
# receive() <<virtual>>
+ sendNewFrame() + finishedSending() + getReceivedFrame() + receivedNewFrame() + receiveCycle() + sendCycle()
- content: String - representation: CharAray
- CRC16mask: short
- CRC16startval: short
- slaveId: char
- functionCode: char
- rep_to_content() - content_to_rep()
- calcCRC16()
+ check_crc()+ getFunctionCode()
<c→Message_content_t> <r→String>
+ getService_byID() + getService_byPos() + getNumberOfServices()
+ get_response() + responseAvailable() + clearResponse() + stackProcessing() + impart_pdu() + get_ServiceId() + get_InstanceId()
<c→string, r→const char*>
+ setup_interface() + sendNewFrame() + finishedSending() + getReceivedFrame() + receivedNewFrame()
<CommInterfaceBase→CommInterface_modbusRTU> <frameType→Frame_modbusRTU>
Abstract-Communication-layer
Communication-implementation-layer
+ raiseError() + stackProcessing()
- code: errorCodes - instanceId: char - message: String
<c→ErrorContent_t> <r→String>
- elements: c[0..s] - size: int
+ addElement() + deleteElement() + getElement()
c: typeName s: intExpression
# rep_to_content() <<virtual>>
# content_to_rep() <<virtual>>
# service_id: short # instance_id: short # response_pdu: String # rec_stack: Content_stack<c→c, s→s> # send_stack: Content_stack<c→c, s→s>
+ get_response() + responseAvailable() + clearResponse() + stackProcessing() + impart_pdu() + get_ServiceId() + get_InstanceId()
c: typeName s: intExpression
- services: Service[1..n]
+ getService_byID() + getService_byPos() + getNumberOfServices()
- comm_interface: CommInterfaceBase - services: ServiceClusterBase - sendItem: CharArray - recItem: CharArray - recStack: Content_stack <c→frameType, s→Stacksize> - sendStack: Content_stack <c→frameType, s→Stacksize>
# getPDU_from_services() <<virtual>> # addPDU_to_service() <<virtual>> # proecessServices() # processRecStack() # processSendStack() + communicate() <<virtual>>
CommInterfaceBase: typeName frameType: typeName
+ raiseError() + getErrorState() + clearErrorState()
<<enumeration>>
errorCodes norError
framingError
crcError
arbitrationError
serviceNotFound
unknownError
- extendArray() + getSize() + getData() + getHexString()
\ No newline at end of file
+<interface_type→SoftwareSerial>
- deviceId: char
- charTimeout: uint
- frameTimeout: uint
- recTimeout: uint
- nullByteSilence: uint
+ send()
+ receive()
+ getDeviceId()
- calulateTimeouts() - clearRxBuffer()
<<struct>>
Message_content_t - msg_text: string - receiver_id: char - sender_id: char
+ sendNewMessage() + stackProcessing() + getdestinationId
- sendAck() - printMessage()
Service-implementation-layer
ServiceInterface_modbusRTU
- getPDU_from_services()
- discardInvalidFrames()
+ communicate()
# interface: interface_type
# receiveBuffer: CharArray*
# send() <<virtual>>
# receive() <<virtual>>
+ sendNewFrame()
+ finishedSending()
+ getReceivedFrame()
+ receivedNewFrame()
+ receiveCycle()
+ sendCycle()
+ getServiceId() <<virtual>>
- slaveId: char
- functionCode: char
- rep_to_content()
- content_to_rep()
- calcCRC16()
+ check_crc() + getServiceId()
<c→Message_content_t> <r→String>
+ getService_byID() <<virtual>>
+ getService_byPos() <<virtual>>
+ getNumberOfServices() <<virtual>>
+ impart_pdu() <<virtual>>
+ get_response() <<virtual>>
+ responseAvailable() <<virtual>>
+ clearResponse() <<virtual>>
+ stackProcessing() <<virtual>>
+ impart_pdu() <<virtual>> + get_ServiceID() <<virtual>> + get_InstanceID() <<virtual>>
<c→string, r→const char*>
+ setup_interface() + sendNewFrame() + finishedSending() + getReceivedFrame() + receivedNewFrame()
<CommInterfaceBase→CommInterface_modbusRTU> <frameType→Frame_modbusRTU>
Abstract-Communication-layer
Communication-implementation-layer
+ raiseError() + stackProcessing()
- code: errorCodes - instanceId: char - message: String
<c→ErrorContent_t> <r→String>
- elements: c[0..s] - size: int
+ addElement() + deleteElement() + getElement()
c: typeName s: intExpression
+ get_content()
+ get_representation()
+ isValid()
# rep_to_content() <<virtual>>
# content_to_rep() <<virtual>>
# service_id: short # instance_id: short # response_pdu: String # rec_stack: Content_stack<c→c, s→s> # send_stack: Content_stack<c→c, s→s>
+ get_response() + responseAvailable() + clearResponse() + stackProcessing() + impart_pdu() + get_ServiceId() + get_InstanceId()
c: typeName s: intExpression
- services: Service[1..n]
+ getService_byID()
+ getService_byPos()
+ getNumberOfServices()
+ impart_pdu()
- comm_interface: CommInterfaceBase - services: ServiceClusterBase - sendItem: CharArray - recItem: CharArray - recStack: Content_stack <c→frameType, s→Stacksize> - sendStack: Content_stack <c→frameType, s→Stacksize>
# getPDU_from_services() <<virtual>>
# proecessServices()
# raiseError() # processSendStack()
# processRecStack()
# addPDU_to_services + communicate() <<virtual>>
CommInterfaceBase: typeName frameType: typeName
+ raiseError() + getErrorState() + clearErrorState()
<<enumeration>>
errorCodes noError
framingError
crcError
arbitrationError
serviceNotFound
unknownError
- extendArray() + getSize() + getData() + getHexString()
\ No newline at end of file
diff --git a/docs/html/_content__stack_8h_source.html b/docs/html/_content__stack_8h_source.html
index f8582bc..86e2519 100644
--- a/docs/html/_content__stack_8h_source.html
+++ b/docs/html/_content__stack_8h_source.html
@@ -186,23 +186,22 @@
-
124 bool retVal = (size == 0) ?
true :
false ;
-
-
+
+
-
-
-
-
135 bool retVal = (size == MaxSize) ?
true :
false ;
-
-
+
+
+
+
134 bool retVal = (size == MaxSize) ?
true :
false ;
+
+
-
+
-
-
+
+
Content-Stack-Template the content-stack stores the added items (call-by-value / copy) on internal ar...
Definition Content_stack.h:45
-bool full()
Check if the Stack is full (size reached MaxSize)
Definition Content_stack.h:134
+bool full()
Check if the Stack is full (size reached MaxSize)
Definition Content_stack.h:133
bool addElement(content_class element)
Add item to stack.
Definition Content_stack.h:72
bool empty()
Check if the Stack is empty (size is 0)
Definition Content_stack.h:123
content_class * getElement(int index=0)
Get Pointer to element in the stack. Accepts positive and negative indexing.
Definition Content_stack.h:107
diff --git a/docs/html/_message_service_8h_source.html b/docs/html/_message_service_8h_source.html
index 5e765c1..e6b363d 100644
--- a/docs/html/_message_service_8h_source.html
+++ b/docs/html/_message_service_8h_source.html
@@ -167,8 +167,8 @@
Represents a message with information for sender and receiver, and provides methods for converting be...
Definition Message.h:109
Service class for handling messages and acknowledgments.
Definition MessageService.h:68
MessageService(uint8_t instance_id)
Constructor for MessageService with default Service ID "m".
Definition MessageService.cpp:28
-void sendMessage(char receiverId, String messagetext)
Sends a new message.
Definition MessageService.cpp:77
-uint8_t get_destinationId()
Retrieves the destination instance ID for the current response PDU in the send stack.
Definition MessageService.cpp:55
+void sendMessage(char receiverId, String messagetext)
Sends a new message.
Definition MessageService.cpp:72
+uint8_t get_destinationId()
Retrieves the destination instance ID for the current response PDU in the send stack.
Definition MessageService.cpp:50
void stackProcessing() override
Processes all messages from the receive stack.
Definition MessageService.cpp:35
Service-Template to derive a Service class by defining the Content (derived Class of "Content") to ha...
Definition Service.h:115
diff --git a/docs/html/_service_interface_8h_source.html b/docs/html/_service_interface_8h_source.html
index 62991d8..62b286c 100644
--- a/docs/html/_service_interface_8h_source.html
+++ b/docs/html/_service_interface_8h_source.html
@@ -224,67 +224,68 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
202 if (ServicesErrorState =
overflow )
break ;
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
200 if (ServicesErrorState ==
overflow )
break ;
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
231 frameType recItemFrame(&
recItem );
-
232 if (recItemFrame.isValid()){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
232 frameType recItemFrame(&
recItem );
+
233 if (recItemFrame.isValid()){
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
errorCodes
Enumeration for various error codes.
Definition Error.h:47
@@ -303,7 +304,7 @@
virtual bool finishedSending()
Check, if the Frame was sent and the CommInterface is ready to send the next Frame.
Definition CommInterface.h:75
virtual void sendNewFrame(CharArray *sendFrame)
Add a new Frame to the send-buffer.
Definition CommInterface.h:67
Content-Stack-Template the content-stack stores the added items (call-by-value / copy) on internal ar...
Definition Content_stack.h:45
-bool full()
Check if the Stack is full (size reached MaxSize)
Definition Content_stack.h:134
+bool full()
Check if the Stack is full (size reached MaxSize)
Definition Content_stack.h:133
bool addElement(content_class element)
Add item to stack.
Definition Content_stack.h:72
bool empty()
Check if the Stack is empty (size is 0)
Definition Content_stack.h:123
content_class * getElement(int index=0)
Get Pointer to element in the stack. Accepts positive and negative indexing.
Definition Content_stack.h:107
@@ -331,7 +332,7 @@
virtual void processServices()
start the stackProcessing of the registered services
Definition ServiceInterface.h:109
CharArray recItem
Item received last
Definition ServiceInterface.h:95
Content_stack< frameType, STACKSIZE > recStack
stack for received frames (instance of Content_stack-derived class, specified for type of frames,...
Definition ServiceInterface.h:86
-virtual void processRecStack()
Add items received by the CommInterface to the recStack and execute the CommInterface's receiveCycle ...
Definition ServiceInterface.h:223
+virtual void processRecStack()
Add items received by the CommInterface to the recStack and execute the CommInterface's receiveCycle ...
Definition ServiceInterface.h:221
CommInterfaceBase * comm_interface
pointer to Communication-Interface (instance of CommInterface-derived class)
Definition ServiceInterface.h:80
virtual void getPDU_from_services()=0
Add all PDUs provided by the services to the sendstack, depending on how frametype stores the informa...
ServiceInterface(CommInterfaceBase *comm_interface, ServiceClusterBase *services)
Construct a new Service Interface object.
Definition ServiceInterface.h:64
diff --git a/docs/html/_service_interface__modbus_r_t_u_8h_source.html b/docs/html/_service_interface__modbus_r_t_u_8h_source.html
index 3bc54f6..d4f5953 100644
--- a/docs/html/_service_interface__modbus_r_t_u_8h_source.html
+++ b/docs/html/_service_interface__modbus_r_t_u_8h_source.html
@@ -149,10 +149,12 @@
102 void getPDU_from_services()
override ;
-
+ 109 void discardInvalidFrames();
+
+
-
-
+
+
@@ -162,7 +164,7 @@
Service-Interface-class for Modbus-RTU: Impart incoming frames from the CommInterface to the designat...
Definition ServiceInterface_modbusRTU.h:47
~ServiceInterface_modbusRTU()
Destroy the ServiceInterface_modbusRTU object.
Definition ServiceInterface_modbusRTU.cpp:31
ServiceInterface_modbusRTU(ServiceClusterBase *services, CommInterface_modbusRTU *comm_interface)
Construct a new ServiceInterface_modbusRTU object.
Definition ServiceInterface_modbusRTU.cpp:27
-void communicate() override
Manages data transfer between the CommInterface and services.
Definition ServiceInterface_modbusRTU.cpp:72
+void communicate() override
Manages data transfer between the CommInterface and services.
Definition ServiceInterface_modbusRTU.cpp:94
Template for generic Service-Interface Defines the handling of incoming frames from CommInterface to ...
Definition ServiceInterface.h:56
CommInterface_modbusRTU * comm_interface
Definition ServiceInterface.h:80
ServiceClusterBase * services
Definition ServiceInterface.h:83
diff --git a/docs/modbus_classdiagram.drawio b/docs/modbus_classdiagram.drawio
index e7723c7..70def58 100644
--- a/docs/modbus_classdiagram.drawio
+++ b/docs/modbus_classdiagram.drawio
@@ -1,6 +1,6 @@
-
+
-
+
@@ -18,19 +18,19 @@
-
+
-
-
+
+
-
+
-
+
-
+
@@ -117,7 +117,7 @@
-
+
@@ -125,10 +125,10 @@
-
-
+
+
-
+
@@ -137,12 +137,12 @@
-
+
-
+
-
+
@@ -151,11 +151,16 @@
-
-
+
+
-
+
+
+
+
+
+
@@ -166,17 +171,17 @@
-
-
+
+
-
-
+
+
-
+
-
-
+
+
@@ -187,24 +192,28 @@
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
+
+
+
+
@@ -288,8 +297,16 @@
-
-
+
+
+
+
+
+
+
+
+
+
@@ -297,10 +314,10 @@
-
-
+
+
-
+
@@ -309,7 +326,7 @@
-
+
@@ -320,13 +337,14 @@
-
+
+
@@ -367,7 +385,7 @@
-
+
@@ -481,7 +499,7 @@
-
+
@@ -492,17 +510,11 @@
-
-
-
-
-
-
-
-
+
+
-
-
+
+
@@ -529,10 +541,10 @@
-
+
-
+
@@ -540,17 +552,17 @@
-
-
+
+
-
+
-
+
@@ -558,8 +570,8 @@
-
-
+
+
@@ -591,7 +603,7 @@
-
+
@@ -600,7 +612,7 @@
-
+
@@ -610,7 +622,7 @@
-
+