Module author: Galen Collins <bashwork@gmail.com>
Section author: Galen Collins <bashwork@gmail.com>
These need to be tied into a the current server context or linked to the appropriate data
This is a base class for all of the diagnostic request functions
Base decoder for a diagnostic request
Parameters: | data – The data to decode into the function code |
---|
Base encoder for a diagnostic response we encode the data set in self.message
Returns: | The encoded packet |
---|
This is a base class for all of the diagnostic response functions
It works by performing all of the encoding and decoding of variable data and lets the higher classes define what extra data to append and how to execute a request
Base decoder for a diagnostic response
Parameters: | data – The data to decode into the function code |
---|
Base encoder for a diagnostic response we encode the data set in self.message
Returns: | The encoded packet |
---|
A large majority of the diagnostic functions are simple status request functions. They work by sending 0x0000 as data and their function code and they are returned 2 bytes of data.
If a function inherits this, they only need to implement the execute method
Base function to raise if not implemented
A large majority of the diagnostic functions are simple status request functions. They work by sending 0x0000 as data and their function code and they are returned 2 bytes of data.
The data passed in the request data field is to be returned (looped back) in the response. The entire response message should be identical to the request.
Executes the loopback request (builds the response)
Returns: | The populated loopback response message |
---|
The data passed in the request data field is to be returned (looped back) in the response. The entire response message should be identical to the request.
The remote device serial line port must be initialized and restarted, and all of its communications event counters are cleared. If the port is currently in Listen Only Mode, no response is returned. This function is the only one that brings the port out of Listen Only Mode. If the port is not currently in Listen Only Mode, a normal response is returned. This occurs before the restart is executed.
Clear event log and restart
Returns: | The initialized response message |
---|
The remote device serial line port must be initialized and restarted, and all of its communications event counters are cleared. If the port is currently in Listen Only Mode, no response is returned. This function is the only one that brings the port out of Listen Only Mode. If the port is not currently in Listen Only Mode, a normal response is returned. This occurs before the restart is executed.
The contents of the remote device’s 16-bit diagnostic register are returned in the response
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
The contents of the remote device’s 16-bit diagnostic register are returned in the response
The character ‘CHAR’ passed in the request data field becomes the end of message delimiter for future messages (replacing the default LF character). This function is useful in cases of a Line Feed is not required at the end of ASCII messages.
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
The character ‘CHAR’ passed in the request data field becomes the end of message delimiter for future messages (replacing the default LF character). This function is useful in cases of a Line Feed is not required at the end of ASCII messages.
Forces the addressed remote device to its Listen Only Mode for MODBUS communications. This isolates it from the other devices on the network, allowing them to continue communicating without interruption from the addressed remote device. No response is returned.
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
Forces the addressed remote device to its Listen Only Mode for MODBUS communications. This isolates it from the other devices on the network, allowing them to continue communicating without interruption from the addressed remote device. No response is returned.
This does not send a response
The goal is to clear ll counters and the diagnostic register. Also, counters are cleared upon power-up
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
The goal is to clear ll counters and the diagnostic register. Also, counters are cleared upon power-up
The response data field returns the quantity of messages that the remote device has detected on the communications systems since its last restart, clear counters operation, or power-up
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
The response data field returns the quantity of messages that the remote device has detected on the communications systems since its last restart, clear counters operation, or power-up
The response data field returns the quantity of CRC errors encountered by the remote device since its last restart, clear counter operation, or power-up
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
The response data field returns the quantity of CRC errors encountered by the remote device since its last restart, clear counter operation, or power-up
The response data field returns the quantity of modbus exception responses returned by the remote device since its last restart, clear counters operation, or power-up
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
The response data field returns the quantity of modbus exception responses returned by the remote device since its last restart, clear counters operation, or power-up
The response data field returns the quantity of messages addressed to the remote device, or broadcast, that the remote device has processed since its last restart, clear counters operation, or power-up
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
The response data field returns the quantity of messages addressed to the remote device, or broadcast, that the remote device has processed since its last restart, clear counters operation, or power-up
The response data field returns the quantity of messages addressed to the remote device, or broadcast, that the remote device has processed since its last restart, clear counters operation, or power-up
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
The response data field returns the quantity of messages addressed to the remote device, or broadcast, that the remote device has processed since its last restart, clear counters operation, or power-up
The response data field returns the quantity of messages addressed to the remote device for which it returned a Negative Acknowledge (NAK) exception response, since its last restart, clear counters operation, or power-up. Exception responses are described and listed in section 7 .
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
The response data field returns the quantity of messages addressed to the remote device for which it returned a Negative Acknowledge (NAK) exception response, since its last restart, clear counters operation, or power-up. Exception responses are described and listed in section 7.
The response data field returns the quantity of messages addressed to the remote device for which it returned a Slave Device Busy exception response, since its last restart, clear counters operation, or power-up.
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
The response data field returns the quantity of messages addressed to the remote device for which it returned a Slave Device Busy exception response, since its last restart, clear counters operation, or power-up.
The response data field returns the quantity of messages addressed to the remote device that it could not handle due to a character overrun condition, since its last restart, clear counters operation, or power-up. A character overrun is caused by data characters arriving at the port faster than they can be stored, or by the loss of a character due to a hardware malfunction.
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
The response data field returns the quantity of messages addressed to the remote device that it could not handle due to a character overrun condition, since its last restart, clear counters operation, or power-up. A character overrun is caused by data characters arriving at the port faster than they can be stored, or by the loss of a character due to a hardware malfunction.
Clears the overrun error counter and reset the error flag
An error flag should be cleared, but nothing else in the specification mentions is, so it is ignored.
Execute the diagnostic request on the given device
Returns: | The initialized response message |
---|
Clears the overrun error counter and reset the error flag