Documentation
¶
Index ¶
- Variables
- func NewFinsTCP(link connect.Link, opts protocol.Options) protocol.Adapter
- func NewFinsUDP(link connect.Link, opts protocol.Options) protocol.Adapter
- func NewHostLink(link connect.Link, opts protocol.Options) protocol.Adapter
- func ParseAddress(addr string) (protocol.Addr, error)
- type Address
- type Command
- type Fins
- func (f *Fins) Address(addr string) (protocol.Addr, error)
- func (f *Fins) Handshake() error
- func (f *Fins) Immediate(station int, addr protocol.Addr, size int) ([]byte, error)
- func (f *Fins) Read(station int, address protocol.Addr, size int) ([]byte, error)
- func (f *Fins) Write(station int, address protocol.Addr, values []byte) error
- type FinsHostLink
- func (f *FinsHostLink) Address(addr string) (protocol.Addr, error)
- func (f *FinsHostLink) Immediate(station int, addr protocol.Addr, size int) ([]byte, error)
- func (f *FinsHostLink) Read(station int, address protocol.Addr, size int) ([]byte, error)
- func (f *FinsHostLink) Write(station int, address protocol.Addr, values []byte) error
- type FinsUdp
- func (f *FinsUdp) Address(addr string) (protocol.Addr, error)
- func (f *FinsUdp) Immediate(station int, addr protocol.Addr, size int) ([]byte, error)
- func (f *FinsUdp) Read(station int, address protocol.Addr, size int) ([]byte, error)
- func (f *FinsUdp) Write(station int, address protocol.Addr, values []byte) error
- type UdpFrame
Constants ¶
This section is empty.
Variables ¶
View Source
var Codes = []protocol.Code{
{"D", "DM Area"},
{"C", "CIO Area"},
{"W", "Work Area"},
{"H", "Holding Bit Area"},
{"A", "Auxiliary Bit Area"},
}
View Source
var DescHostlink = protocol.Protocol{ Name: "OmronHostlink", Version: "1.0", Label: "Omron Hostlink", Codes: Codes, Factory: NewHostLink, }
View Source
var DescTCP = protocol.Protocol{ Name: "OmronFinsTCP", Version: "1.0", Label: "Omron FINS TCP", Codes: Codes, Factory: NewFinsTCP, }
View Source
var DescUDP = protocol.Protocol{ Name: "OmronFinsUDP", Version: "1.0", Label: "Omron FINS UDP", Codes: Codes, Factory: NewFinsUDP, }
Functions ¶
func NewFinsTCP ¶ added in v1.0.2
func NewFinsUDP ¶ added in v1.0.2
func NewHostLink ¶ added in v1.0.2
Types ¶
type Fins ¶
type Fins struct {
// contains filtered or unexported fields
}
type FinsHostLink ¶
type FinsHostLink struct {
// contains filtered or unexported fields
}
func (*FinsHostLink) Address ¶ added in v1.0.2
func (f *FinsHostLink) Address(addr string) (protocol.Addr, error)
type FinsUdp ¶
type FinsUdp struct {
// contains filtered or unexported fields
}
type UdpFrame ¶
type UdpFrame struct { // 信息控制字段,默认0x80 ICF byte // 0x80 // 系统使用的内部信息 RSV byte // 0x00 // 网络层信息,默认0x02,如果有八层消息,就设置为0x07 GCT byte // 0x02 // PLC的网络号地址,默认0x00 DNA byte // 0x00 // PLC的节点地址,这个值在配置了ip地址之后是默认赋值的,默认为Ip地址的最后一位 DA1 byte // 0x13 // PLC的单元号地址 DA2 byte // 0x00 // 上位机的网络号地址 SNA byte // 0x00 // 上位机的节点地址,假如你的电脑的Ip地址为192.168.0.13,那么这个值就是13 SA1 byte // 上位机的单元号地址 SA2 byte // 设备的标识号 SID byte // 0x00 }
Click to show internal directories.
Click to hide internal directories.