Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Bit access FuncCodeReadDiscreteInputs = 2 FuncCodeReadCoils = 1 FuncCodeWriteSingleCoil = 5 FuncCodeWriteMultipleCoils = 15 // 16-bit access FuncCodeReadInputRegisters = 4 FuncCodeReadHoldingRegisters = 3 FuncCodeWriteSingleRegister = 6 FuncCodeWriteMultipleRegisters = 16 FuncCodeReadWriteMultipleRegisters = 23 FuncCodeMaskWriteRegister = 22 FuncCodeReadFIFOQueue = 24 )
View Source
const ( ExceptionCodeIllegalFunction = 1 ExceptionCodeIllegalDataAddress = 2 ExceptionCodeIllegalDataValue = 3 ExceptionCodeServerDeviceFailure = 4 ExceptionCodeAcknowledge = 5 ExceptionCodeServerDeviceBusy = 6 ExceptionCodeMemoryParityError = 8 ExceptionCodeGatewayTargetDeviceFailedToRespond = 11 )
Variables ¶
This section is empty.
Functions ¶
func DataBlockSuffix ¶
DataBlockSuffix creates a sequence of uint16 data and append the suffix plus its length.
Types ¶
type ModbusError ¶
ModbusError implements error interface.
func (*ModbusError) Error ¶
func (e *ModbusError) Error() string
Error converts known modbus exception code to error message.
Click to show internal directories.
Click to hide internal directories.