Documentation ¶
Index ¶
- func CRC16(bs []byte) uint16
- type Adapter
- func (adapter *Adapter) Get(id, name string) (any, error)
- func (adapter *Adapter) Mount(device string) error
- func (adapter *Adapter) Set(id, name string, value any) error
- func (adapter *Adapter) Sync(id string) (map[string]any, error)
- func (adapter *Adapter) Tunnel() connect.Tunnel
- func (adapter *Adapter) Unmount(device string) error
- type Bit
- type Calculator
- type Device
- type Filter
- type Mapper
- type Modbus
- type ParallelTCP
- type Point
- type PointBit
- type PointWord
- type Poller
- type RTU
- type Station
- type TCP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Calculator ¶
type Mapper ¶
type ParallelTCP ¶
type ParallelTCP struct {
// contains filtered or unexported fields
}
ParallelTCP Modbus-TCP协议
func NewParallelTCP ¶
func NewParallelTCP(tunnel connect.Conn, opts string) *ParallelTCP
func (*ParallelTCP) OnData ¶
func (m *ParallelTCP) OnData(buf []byte)
type PointWord ¶ added in v4.1.5
type PointWord struct { Name string `json:"name"` //名称 Type string `json:"type"` //类型 Address uint16 `json:"address"` //偏移 BigEndian bool `json:"be,omitempty"` //大端模式 Rate float64 `json:"rate,omitempty"` //倍率 Correct float64 `json:"correct,omitempty"` //纠正 Bits []*Bit `json:"bits,omitempty"` //位,1 2 3... }
type Poller ¶
type RTU ¶
type RTU struct {
// contains filtered or unexported fields
}
RTU Modbus-RTU协议
Click to show internal directories.
Click to hide internal directories.