Documentation
¶
Index ¶
Constants ¶
View Source
const ( SUB_HEADER = "5000" // 3Eフレームでは固定 HEALTH_CHECK_COMMAND = "1906" // binary mode expression. if ascii mode then 0619 HEALTH_CHECK_SUBCOMMAND = "0000" READ_COMMAND = "0104" // binary mode expression. if ascii mode then 0401 READ_SUB_COMMAND = "0000" BIT_READ_SUB_COMMAND = "0100" WRITE_COMMAND = "0114" // binary mode expression. if ascii mode then 1401 WRITE_SUB_COMMAND = "0000" MONITORING_TIMER = "1000" // 3[sec] )
Variables ¶
This section is empty.
Functions ¶
func NewStation ¶
func NewStation(networkNum, pcNum, unitIONum, unitStationNum string) *station
Types ¶
type AccessRoute ¶
type AccessRoute struct {
Sts station
Code Code
}
func (*AccessRoute) AsciiRoute ¶
func (r *AccessRoute) AsciiRoute() []byte
func (*AccessRoute) BinaryRoute ¶
func (r *AccessRoute) BinaryRoute() []byte
func (*AccessRoute) Len ¶
func (r *AccessRoute) Len() int64
type Client ¶
type Client interface {
Read(deviceName string, offset, numPoints int64) ([]byte, error)
BitRead(deviceName string, offset, numPoints int64) ([]byte, error)
Write(deviceName string, offset, numPoints int64, writeData []byte) ([]byte, error)
HealthCheck() error
Connect() error
Disconnect() error
Reconnect() error
IsConnect() bool
}
type Response ¶
type Response struct {
// Sub header
SubHeader string
// network number
NetworkNum string
// PC number
PCNum string
// Request Unit I/O number
UnitIONum string
// Request Unit station number
UnitStationNum string
// Response data length
DataLen string
// Response data code
EndCode uint16
// Response data
Payload []byte
// error data
ErrInfo []byte
}
Response represents mcp response
Click to show internal directories.
Click to hide internal directories.