Module author: Galen Collins <bashwork@gmail.com>
Section author: Galen Collins <bashwork@gmail.com>
This function code is used to write a single holding register in a remote device.
The Request PDU specifies the address of the register to be written. Registers are addressed starting at zero. Therefore register numbered 1 is addressed as 0.
Decode a write single register packet packet request
Parameters: | data – The request to decode |
---|
Encode a write single register packet packet request
Returns: | The encoded packet |
---|
Run a write single register request against a datastore
Parameters: | context – The datastore to request from |
---|---|
Returns: | An initialized response, exception message otherwise |
The normal response is an echo of the request, returned after the register contents have been written.
Decode a write single register packet packet request
Parameters: | data – The request to decode |
---|
Encode a write single register packet packet request
Returns: | The encoded packet |
---|
This function code is used to write a block of contiguous registers (1 to approx. 120 registers) in a remote device.
The requested written values are specified in the request data field. Data is packed as two bytes per register.
Decode a write single register packet packet request
Parameters: | data – The request to decode |
---|
Encode a write single register packet packet request
Returns: | The encoded packet |
---|
Run a write single register request against a datastore
Parameters: | context – The datastore to request from |
---|---|
Returns: | An initialized response, exception message otherwise |
“The normal response returns the function code, starting address, and quantity of registers written.
Decode a write single register packet packet request
Parameters: | data – The request to decode |
---|
Encode a write single register packet packet request
Returns: | The encoded packet |
---|