Documentation
¶
Overview ¶
Package modbus provides interfaces to Modbus Clients and Servers via either TCP or RTU protocols.
Whether behaving as a Client or a Server, you need to establish a communication channel, either socket or serial based. The Modbus protocol is established on top of the communication channel. Once a Modbus instance is created, you can establish Client or Server instances on top of it. A client instance allows communication to a specific remote Server
Special note about Client instances: the Modbus documentation indicates that a "client" can talk to any of the servers on the modbus, but this code requires that for each remote server has a unique Client instance to communicate with it.
Establishing a Modbus communicationc channel using TCP is simple:
mb, _ := modbus.NewTCP("host.example.com:502")
The above establishes a TCP connection on the standard port 502. It is normal, but not required, for the system initiating the TCP to be the client. As a result, it would be normal if you wanted to communicate with the server at the unitID 5 to follow the above line with:
client := mb.GetClient(5)
With a client, you can perform all the standard Modbus functions against that server, for example, read 4 coils from address 0 with a timeout of 2 seconds:
coils, _ := client.ReadCoils(0, 4, time.Second*2) fmt.Printf("The 4 coils are %v\n", coils)
Similar to TCP, establishing an RTU Modbus instance is relatively simple, though additional data is required:
mb, _ := modbus.NewRTU("COM5", 9600, 'E', 1, true)
The above establishes a serial communication channel on the serial port COM5 (windows) with 9600 baud, even parity, 1 stop bit and it also sets the serial DTR line (some systems, espeically USB-based serial protocol converters need this).
The `mb` Modbus instance returned from the NewRTU function behaves the same way as the `mb` returned from NewTCP. You can establish either/both a client presence or server presence on the Modbus. In this example we create a server at the UnitID of 5. Servers are more complicated than clients - we need to establish a pattern of behaviour that the server supports, including ID properties and more.
deviceInfo := []string{"My VendorName", "My ProductCode", "My MajorMinor", "My VendorURL", "My ProductName", ....} server := []byte("MyServer ID") server, _ := modbus.NewServer(serverId, deviceInfo) mb.SetServer(5, server)
The above will establish a server that has no discretes, coils, inputs, registers, or files, but all the metadata and counter logic will still work fine. You need to register handlers for coils, etc in order for them to be functional: more detail about handlers is given in the Server documentaion.
The Modbus protocol relies heavily on 8-bit byte and 16-bit word values to communicate data. This library abstracts all the type conversion and relies on basic Go `int` values instead. Where converting to the valid Modbus type is not possible due to out-of-range values, a panic will be generated. The trade off for code complexity is significant. The public interface for all modbus operations is thus completely int and bool based. The only exception is the byte-array for serverIDs.
Index ¶
- Constants
- func ServeAllUnits(server Server) map[int]Server
- type Atomic
- type BusDiagnostics
- type Client
- type Diagnostic
- type Error
- func IllegalAddressErrorF(format string, args ...interface{}) *Error
- func IllegalFunctionErrorF(format string, args ...interface{}) *Error
- func IllegalValueErrorF(format string, args ...interface{}) *Error
- func ServerBusyErrorF(format string, args ...interface{}) *Error
- func ServerFailureErrorF(format string, args ...interface{}) *Error
- type Modbus
- type Server
- type ServerDiagnostics
- type TCPServer
- type UpdateCoils
- type UpdateFile
- type UpdateHoldings
- type X01xReadCoils
- type X02xReadDiscretes
- type X03xReadHolding
- type X04xReadInputs
- type X05xWriteSingleCoil
- type X06xWriteSingleHolding
- type X07xReadExceptionStatus
- type X08xDiagnosticCount
- type X08xDiagnosticEcho
- type X08xDiagnosticOverrunClear
- type X08xDiagnosticRegister
- type X0BxCommEventCounter
- type X0CxCommEventLog
- type X0FxWriteMultipleCoils
- type X10xWriteMultipleHoldings
- type X11xServerID
- type X14xReadFileRecordResult
- type X14xReadMultiFileRecord
- type X14xReadRecordRequest
- type X15xMultiWriteFileRecord
- type X15xWriteFileRecordRequest
- type X15xWriteFileRecordResult
- type X16xMaskWriteHolding
- type X17xWriteReadHoldings
- type X18xReadFIFOQueue
- type X2BxDeviceIdentification
- type X2BxDeviceIdentificationObject
Constants ¶
const ( // ParityNone is what is used to have no parity bit ParityNone = 'N' // ParityOdd is what is used to have one parity bit that is set to have an even number of 1 bits ParityOdd = 'O' // ParityEven is what is used to have one parity bit that is set to have an odd nuber of 1 bits ParityEven = 'E' )
const ( // StopBitsOne ensures a single stop bit after transmitting data. StopBitsOne = 1 // StopBitsTwo ensures 2 stop bits after transmitting data. StopBitsTwo = 2 )
Variables ¶
This section is empty.
Functions ¶
func ServeAllUnits ¶
ServeAllUnits is a convenience function to map a Modbus Server instance on to all unitID addresses.
Types ¶
type Atomic ¶
type Atomic interface { // Complete indicates that all operations in the atomic set are queued. It returns when all operations have completed. Complete() // contains filtered or unexported methods }
Atomic allows locked access to the server's internal cache of coil, discrete, input, holding, and file values. implementation in serverCache.go An Atomic instance is created by calling the StartAtomic() function on the Server
Do not Complete an atomic unless you started it. It's normal to `defer a.Complete()` immediately after starting it
atomic := server.StartAtomic() defer atomic.Complete() // do stuff using the atomic...
type BusDiagnostics ¶
type BusDiagnostics struct { // Messages represents the number of valid messages received on this Modbus Messages int // CommErrors represents the number of failed receptions (invalid CRC, etc) CommErrors int // Exceptions represents the number of fail responses this Modbus instance has sent to clients Exceptions int // Overruns represents the number of incoming requests that were larger than the max Modbus payload size Overruns int }
BusDiagnostics are values specific to the Modbus that summarize the bus status
type Client ¶
type Client interface { // UnitID retrieves the remote unitID we are communicating with UnitID() int // ReadDiscretes reads read-only discrete values from the remote unit ReadDiscretes(from int, count int, tout time.Duration) (*X02xReadDiscretes, error) // ReadDiscretes reads coil values from the remote unit ReadCoils(from int, count int, tout time.Duration) (*X01xReadCoils, error) // WriteSingleCoil writes a single coil values to the remote unit WriteSingleCoil(address int, value bool, tout time.Duration) (*X05xWriteSingleCoil, error) // WriteMultipleCoils writes multiple coil values to the remote unit WriteMultipleCoils(address int, values []bool, tout time.Duration) (*X0FxWriteMultipleCoils, error) // ReadInputs reads multiple input values from the remote unit ReadInputs(from int, count int, tout time.Duration) (*X04xReadInputs, error) // ReadHoldings reads multipls holding register values from a remote unit ReadHoldings(from int, count int, tout time.Duration) (*X03xReadHolding, error) // WriteSingleHolding writes a single holding register to the remote unit WriteSingleHolding(from int, value int, tout time.Duration) (*X06xWriteSingleHolding, error) // WriteMultipleHoldings writes multiple holding registers to the remote unit WriteMultipleHoldings(address int, values []int, tout time.Duration) (*X10xWriteMultipleHoldings, error) // WriteReadMultipleHoldings initially writes one set of holding registers to the remote unit, then in the same // operation reads multiple values from the remote unit. The addresses being written and then read do not need to overlap WriteReadMultipleHoldings(read int, count int, write int, values []int, tout time.Duration) (*X17xWriteReadHoldings, error) // MaskWriteHolding applies an AND mask and an OR mask to a register on the remote unit. The logic is: // Result = (Current Contents AND And_Mask) OR (Or_Mask AND (NOT And_Mask)) MaskWriteHolding(address int, andmask int, ormask int, tout time.Duration) (*X16xMaskWriteHolding, error) // Reads a variable number of values from the remote unit's holding register. At most 31 values can be retrieved // and the count of values depends on the value at the specified address (if the value at address is 3, it will return the three // values that are in address+1, address+2, address+3) ReadFIFOQueue(from int, tout time.Duration) (*X18xReadFIFOQueue, error) // ReadMultiFileRecords retrieves multiple sequences of File records from the remote unit ReadMultiFileRecords(requests []X14xReadRecordRequest, tout time.Duration) (*X14xReadMultiFileRecord, error) // ReadFileRecords retrieves a sequence of records from a file on a remote unit ReadFileRecords(file int, record int, length int, tout time.Duration) (*X14xReadFileRecordResult, error) // WriteMultiFileRecords writes sequences of records to multiple files on a remote unit WriteMultiFileRecords(requests []X15xWriteFileRecordRequest, tout time.Duration) (*X15xMultiWriteFileRecord, error) // WriteFileRecords writes a sequence of records to a single file on a remote unit WriteFileRecords(file int, record int, values []int, tout time.Duration) (*X15xWriteFileRecordResult, error) // ReadExceptionStatus returns the exception status register. The value is a bitmask of exception bits, but the meaning // of the set bits is device specific (no standard exists). ReadExceptionStatus(tout time.Duration) (*X07xReadExceptionStatus, error) // ServerID retrieves the ID of the remote unit. This is typically a unique value, but that is not guaranteed. ServerID(tout time.Duration) (*X11xServerID, error) // DiagnosticRegister retrieves the diagnostic sub-function 2 register. The value is device-specific. DiagnosticRegister(tout time.Duration) (*X08xDiagnosticRegister, error) // DiagnosticEcho responds with the exact same content that was sent. DiagnosticEcho(data []int, tout time.Duration) (*X08xDiagnosticEcho, error) // DiagnosticClear resets all counters and logs on the remote unit DiagnosticClear(tout time.Duration) error // DiagnosticCount retrieves a specific diagnostic counter from the remote unit. See the Diagnostic constants for valid // Diagnostic values. DiagnosticCount(counter Diagnostic, tout time.Duration) (*X08xDiagnosticCount, error) // DiagnosticOverrunClear resets the overrun counter DiagnosticOverrunClear(echo int, tout time.Duration) (*X08xDiagnosticOverrunClear, error) // CommEventCounter returns the number of "regular" operations on the remote unit. Regular operations access // discretes, coils, inputs, registers, and/or files CommEventCounter(tout time.Duration) (*X0BxCommEventCounter, error) // CommEventLog retrieves the basic details of the most recent 64 messages on the remote unit CommEventLog(tout time.Duration) (*X0CxCommEventLog, error) // DeviceIdentification retrieves all the remote unit's device labels. DeviceIdentification(tout time.Duration) (*X2BxDeviceIdentification, error) // DeviceIdentification retrieves a remote unit's specific device label. DeviceIdentificationObject(objectID int, tout time.Duration) (*X2BxDeviceIdentificationObject, error) }
Client is able to drive a single modbus server (Send functions and get responses)
type Diagnostic ¶
type Diagnostic uint16
Diagnostic is a type used to identify counters in the modbus diagnostics in client.DiagnosticCount(...)
const ( BusMessages Diagnostic = 0x0B + iota BusCommErrors BusExceptionErrors ServerMessages ServerNoResponses ServerNAKs ServerBusies BusCharacterOverruns )
Diagnostic constants for querying various counters on a Modbus Server
func (Diagnostic) String ¶
func (d Diagnostic) String() string
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is a custom type for Modbus errors
func IllegalAddressErrorF ¶
IllegalAddressErrorF represents an invalid address - Modbus error code 2
func IllegalFunctionErrorF ¶
IllegalFunctionErrorF represents an invalid function code - Modbus error code 1
func IllegalValueErrorF ¶
IllegalValueErrorF represents an illegal data value - Modbus error code 3
func ServerBusyErrorF ¶
ServerBusyErrorF represents a condition in which the server is busy and cannot process the client request - Modbus error code 6
func ServerFailureErrorF ¶
ServerFailureErrorF represents an error that is not represented by the above types - Modbus error code 4
type Modbus ¶
type Modbus interface { //GetClient creates a control instance for communicating with a specific server on the remote side of the Modbus GetClient(unitID int) Client // SetServer establishes a server instance on the given unitId SetServer(unitID int, server Server) // Close closes the communication channel under the Modbus protocol Close() error // Diagnostics returns the current diagnostic counters for the Modbus channel Diagnostics() BusDiagnostics // contains filtered or unexported methods }
Modbus is a half duplex (or possibly full duplex) mechanism for talking to remote units.
Both Modbus TCP and RTU can be described this way. In order to create a Modbus instance you need to initialize it using either the `modbus.NewTCPConn` or `modbus.NewRTU` constructors.
The Modbus instance can be used to get clients, add servers, or close the communication channel. In addition you can get the current diagnostic state of the channel.
func NewRTU ¶
NewRTU establishes a connection to a local COM port (windows) or serial device (others)
type Server ¶
type Server interface { // Diagnostics returns the current diagnostic counts of the server instance Diagnostics() ServerDiagnostics // Busy will return true if a command is actively being handled Busy() bool // StartAtomic requests that access to the internal memory model/cache (coils, registers, discretes, inputs and files) // of the Server is granted. Only 1 transaction is active at a time, and is active until it is Completed. StartAtomic() Atomic // RegisterDiscretes indicates how many discretes to make available in the server memory model/cache RegisterDiscretes(count int) // ReadDiscretes performs a discrete read operation as part of an existing atomic operation from the memory model/cache ReadDiscretes(atomic Atomic, address int, count int) ([]bool, error) // ReadDiscretesAtomic performs an atomic ReadDiscretes ReadDiscretesAtomic(address int, count int) ([]bool, error) // WriteDiscretes performs a discrete write operation as part of an existing atomic operation to the memory model/cache WriteDiscretes(atomic Atomic, address int, values []bool) error // WriteDiscretesAtomic performs an atomic WriteDiscretes WriteDiscretesAtomic(address int, values []bool) error // RegisterCoils indicates how many coils to make available in the server memory model/cache, and which function to call // when a remote client attempts to update the coil settings RegisterCoils(count int, handler UpdateCoils) // ReadCoils performs a coil read operation as part of an existing atomic operation from the memory model/cache ReadCoils(atomic Atomic, address int, count int) ([]bool, error) // ReadCoilsAtomic performs an atomic ReadCoils ReadCoilsAtomic(address int, count int) ([]bool, error) // WriteCoils performs a coil write operation as part of an existing atomic operation to the memory model/cache WriteCoils(atomic Atomic, address int, values []bool) error // WriteCoilsAtomic performs an atomic WriteCoils WriteCoilsAtomic(address int, values []bool) error // RegisterInputs indicates how many inputs to make available in the server memory model/cache RegisterInputs(count int) // ReadInputs performs ain input read operation as part of an existing atomic operation from the memory model/cache ReadInputs(atomic Atomic, address int, count int) ([]int, error) // ReadInputsAtomic performs an atomic ReadInputs ReadInputsAtomic(address int, count int) ([]int, error) // WriteInputs performs an input write operation as part of an existing atomic operation to the memory model/cache WriteInputs(atomic Atomic, address int, values []int) error // WriteInputsAtomic performs an atomic WriteInputs WriteInputsAtomic(address int, values []int) error // RegisterHoldings indicates how many coils to make available in the server memory model/cache, and which function to call // when a remote client attempts to update the holding register values RegisterHoldings(count int, handler UpdateHoldings) // ReadHoldings performs a holding register read operation as part of an existing atomic operation from the memory model/cache ReadHoldings(atomic Atomic, address int, count int) ([]int, error) // ReadHoldingsAtomic performs an atomic ReadHoldings ReadHoldingsAtomic(address int, count int) ([]int, error) // WriteHoldings performs a holding register write operation as part of an existing atomic operation to the memory model/cache WriteHoldings(atomic Atomic, address int, values []int) error // WriteHoldingsAtomic performs an atomic WriteHoldings WriteHoldingsAtomic(address int, values []int) error // RegisterFiles indicates how many files to make available in the server memory model/cache, and which function to call // when a remote client attempts to update the file records RegisterFiles(count int, handler UpdateFile) // ReadFileRecords performs a file records read operation as part of an existing atomic operation from the memory model/cache ReadFileRecords(atomic Atomic, address int, offset int, count int) ([]int, error) // ReadFileRecordsAtomic performs an atomic ReadFileRecords ReadFileRecordsAtomic(address int, offset int, count int) ([]int, error) // WriteFileRecords performs a file records write operation as part of an existing atomic operation to the memory model/cache WriteFileRecords(atomic Atomic, address int, offset int, values []int) error // WriteFileRecordsAtomic performs an atomic WriteFileRecords WriteFileRecordsAtomic(address int, offset int, values []int) error // contains filtered or unexported methods }
Server represents a system that can handle an incoming request from a remote client
type ServerDiagnostics ¶
type ServerDiagnostics struct { Messages int NoResponse int ServerNAKs int ServerBusy int Register int EventCounter int }
ServerDiagnostics represents a summary of the server state.
type TCPServer ¶
type TCPServer interface { io.Closer // WaitClosed will simply wait until the TCP server is closed. This is useful for creating // programs that don't exit until the listener is terminated. WaitClosed() }
TCPServer represents a mechanism for receiving connections from remote clients. Note that this is not a Modbus server, but a TCP service, ready to accept connections and from each connection create a Modbus instance using NewTCPConn(...)
func NewTCPServer ¶
NewTCPServer establishes a listening socket to accept incoming TCP requests. Use ":{port}" style value to bind to all interfaces on the host. Use a specific local IP or local hostname to bind to just one interface.
Example bind to all interfaces: NewModbusTCPListener(":502", demux)
Example bind to just localhost: NewModbusTCPListener("localhost:502", demux)
Note that this function accepts a UnitID to Server mapping. Any connections to this server will be initialized with the supplied servers serving requests to the matching UnitID. It's normal for Modbus-TCP to have 1 server instance hosting ALL the UnitID addresses on the bus. The standard is to listen on UnitID 0xff. This is made more convenient with the ServeAllUnits(server) function.const
tcpserv, _ := modbus.NewTCPServer(":502", modbus.ServeAllUnits(server))
type UpdateCoils ¶
type UpdateCoils func(server Server, atomic Atomic, address int, values []bool, current []bool) ([]bool, error)
UpdateCoils is a function called when coils are expected to be written by request from a remote client Do not Complete the atomic
type UpdateFile ¶
type UpdateFile func(server Server, atomic Atomic, file int, address int, values []int, current []int) ([]int, error)
UpdateFile is a function called when files are expected to be written by request from a remote client Do not Complete the atomic
type UpdateHoldings ¶
type UpdateHoldings func(server Server, atomic Atomic, address int, values []int, current []int) ([]int, error)
UpdateHoldings is a function called when holding registers are expected to be written by request from a remote client Do not Complete the atomic
type X01xReadCoils ¶
X01xReadCoils contains the results of reading coils from a remote server
func (X01xReadCoils) String ¶
func (s X01xReadCoils) String() string
type X02xReadDiscretes ¶
X02xReadDiscretes contains the results of reading discretes from a remote server
func (X02xReadDiscretes) String ¶
func (s X02xReadDiscretes) String() string
type X03xReadHolding ¶
X03xReadHolding server response to a Read Multiple Holding Registers request
func (X03xReadHolding) String ¶
func (s X03xReadHolding) String() string
type X04xReadInputs ¶
X04xReadInputs server response to a Read Multiple Inputs request
func (X04xReadInputs) String ¶
func (s X04xReadInputs) String() string
type X05xWriteSingleCoil ¶
X05xWriteSingleCoil server response to a Write Single Coil request
func (X05xWriteSingleCoil) String ¶
func (s X05xWriteSingleCoil) String() string
type X06xWriteSingleHolding ¶
X06xWriteSingleHolding server response to a Read Multiple Holding Registers request
func (X06xWriteSingleHolding) String ¶
func (s X06xWriteSingleHolding) String() string
type X07xReadExceptionStatus ¶
type X07xReadExceptionStatus struct {
ExceptionStatus int
}
X07xReadExceptionStatus server response to a ServerID function request
func (X07xReadExceptionStatus) String ¶
func (s X07xReadExceptionStatus) String() string
type X08xDiagnosticCount ¶
type X08xDiagnosticCount struct { Counter Diagnostic Count int }
X08xDiagnosticCount server response to a Diagnostic Counter function request
func (X08xDiagnosticCount) String ¶
func (s X08xDiagnosticCount) String() string
type X08xDiagnosticEcho ¶
type X08xDiagnosticEcho struct {
// contains filtered or unexported fields
}
X08xDiagnosticEcho server response to a Diagnostic Return Query data function request
func (X08xDiagnosticEcho) String ¶
func (s X08xDiagnosticEcho) String() string
type X08xDiagnosticOverrunClear ¶
type X08xDiagnosticOverrunClear struct {
Echo int
}
X08xDiagnosticOverrunClear server response to a Diagnostic Overrun Clear data function request
func (X08xDiagnosticOverrunClear) String ¶
func (s X08xDiagnosticOverrunClear) String() string
type X08xDiagnosticRegister ¶
type X08xDiagnosticRegister struct {
Register int
}
X08xDiagnosticRegister server response to a Diagnostic Return Query data function request
func (X08xDiagnosticRegister) String ¶
func (s X08xDiagnosticRegister) String() string
type X0BxCommEventCounter ¶
X0BxCommEventCounter server response to a Comm Event Counter function request
func (X0BxCommEventCounter) String ¶
func (s X0BxCommEventCounter) String() string
type X0CxCommEventLog ¶
X0CxCommEventLog server response to a Comm Event Counter function request
func (X0CxCommEventLog) String ¶
func (s X0CxCommEventLog) String() string
type X0FxWriteMultipleCoils ¶
X0FxWriteMultipleCoils server response to a Write Multiple Coil request
func (X0FxWriteMultipleCoils) String ¶
func (s X0FxWriteMultipleCoils) String() string
type X10xWriteMultipleHoldings ¶
X10xWriteMultipleHoldings server response to a Write Multiple Holding Registers request
func (X10xWriteMultipleHoldings) String ¶
func (s X10xWriteMultipleHoldings) String() string
type X11xServerID ¶
X11xServerID server response to a ServerID function request
func (X11xServerID) String ¶
func (s X11xServerID) String() string
type X14xReadFileRecordResult ¶
X14xReadFileRecordResult server response to a Read Multiple File Record request
func (X14xReadFileRecordResult) String ¶
func (s X14xReadFileRecordResult) String() string
type X14xReadMultiFileRecord ¶
type X14xReadMultiFileRecord struct {
Records []X14xReadFileRecordResult
}
X14xReadMultiFileRecord server response to a Read Multiple File Record request
func (X14xReadMultiFileRecord) String ¶
func (s X14xReadMultiFileRecord) String() string
type X14xReadRecordRequest ¶
X14xReadRecordRequest defines a record to read from a file. To be used by ReadMultiFileRecord
func (X14xReadRecordRequest) String ¶
func (s X14xReadRecordRequest) String() string
type X15xMultiWriteFileRecord ¶
type X15xMultiWriteFileRecord struct {
Results []X15xWriteFileRecordResult
}
X15xMultiWriteFileRecord server response to Multiple Write File Records request
func (X15xMultiWriteFileRecord) String ¶
func (s X15xMultiWriteFileRecord) String() string
type X15xWriteFileRecordRequest ¶
X15xWriteFileRecordRequest data to send in a multi-file-record-write
func (X15xWriteFileRecordRequest) String ¶
func (s X15xWriteFileRecordRequest) String() string
type X15xWriteFileRecordResult ¶
X15xWriteFileRecordResult defines the response to the WriteMultiFileRecord function for just one of the file results
func (X15xWriteFileRecordResult) String ¶
func (s X15xWriteFileRecordResult) String() string
type X16xMaskWriteHolding ¶
X16xMaskWriteHolding server response to a Read Multiple Holding Registers request
func (X16xMaskWriteHolding) String ¶
func (s X16xMaskWriteHolding) String() string
type X17xWriteReadHoldings ¶
X17xWriteReadHoldings server response to a Write/Read Multiple Holding Registers request
func (X17xWriteReadHoldings) String ¶
func (s X17xWriteReadHoldings) String() string
type X18xReadFIFOQueue ¶
X18xReadFIFOQueue server response to a Read FIFO Queue request
func (X18xReadFIFOQueue) String ¶
func (s X18xReadFIFOQueue) String() string
type X2BxDeviceIdentification ¶
type X2BxDeviceIdentification struct { VendorName string ProductCode string MajorMinorVersion string VendorURL string ProductName string ModelName string UserApplicationName string Additional []string }
X2BxDeviceIdentification server response to a Device Identification function request
func (X2BxDeviceIdentification) String ¶
func (s X2BxDeviceIdentification) String() string
type X2BxDeviceIdentificationObject ¶
X2BxDeviceIdentificationObject server response to a Device Identification function request for a single Object
func (X2BxDeviceIdentificationObject) String ¶
func (s X2BxDeviceIdentificationObject) String() string
Source Files
¶
- client.go
- clientCoils.go
- clientDiscrete.go
- clientFile.go
- clientHolding.go
- clientInput.go
- clientMetadata.go
- codec.go
- errors.go
- helpers.go
- modbus.go
- modbusDiagnostics.go
- rtu.go
- server.go
- serverCache.go
- serverCoils.go
- serverDiagnostics.go
- serverDiscrete.go
- serverFile.go
- serverHolding.go
- serverInput.go
- serverMetadata.go
- tcp.go
- tcpClient.go
- tcpServer.go
Directories
¶
Path | Synopsis |
---|---|
Goserial is a simple go package to allow you to read and write from the serial port as a stream of bytes.
|
Goserial is a simple go package to allow you to read and write from the serial port as a stream of bytes. |