Documentation
¶
Index ¶
- func GetReadCommand_A_1E(address MitsubishiMCAddress, length uint16, isBit bool) []byte
- func GetReadCommand_Qna_3E(address MitsubishiMCAddress, length uint16, isBit bool) []byte
- func GetWriteCommand_A_1E(address MitsubishiMCAddress, data []byte, isBit bool) []byte
- func GetWriteCommand_Qna_3E(address MitsubishiMCAddress, data []byte, isBit bool) []byte
- func PrintBuff(str string, buff []byte)
- type MitsubishiClient
- func (client *MitsubishiClient) Close() error
- func (client *MitsubishiClient) Connect() error
- func (client *MitsubishiClient) Connected() bool
- func (client *MitsubishiClient) ReConnect()
- func (client *MitsubishiClient) Read(address string, length uint16, isBit bool) ([]byte, error)
- func (client *MitsubishiClient) ReadBool(address string) (bool, error)
- func (client *MitsubishiClient) ReadFloat32(address string) (float32, error)
- func (client *MitsubishiClient) ReadFloat64(address string) (float64, error)
- func (client *MitsubishiClient) ReadInt16(address string) (int16, error)
- func (client *MitsubishiClient) ReadInt32(address string) (int32, error)
- func (client *MitsubishiClient) ReadInt64(address string) (int64, error)
- func (client *MitsubishiClient) ReadUInt16(address string) (uint16, error)
- func (client *MitsubishiClient) ReadUInt32(address string) (uint32, error)
- func (client *MitsubishiClient) ReadUInt64(address string) (uint64, error)
- func (client *MitsubishiClient) SendPackageReliable(command []byte) ([]byte, error)
- func (client *MitsubishiClient) SendPackageSingle(command []byte, receiveCount int) ([]byte, error)
- func (client *MitsubishiClient) Write(address string, data []byte, isBit bool) ([]byte, error)
- func (client *MitsubishiClient) WriteValue(address string, value interface{}) (err error)
- type MitsubishiMCAddress
- type MitsubishiVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetReadCommand_A_1E ¶
func GetReadCommand_A_1E(address MitsubishiMCAddress, length uint16, isBit bool) []byte
func GetReadCommand_Qna_3E ¶
func GetReadCommand_Qna_3E(address MitsubishiMCAddress, length uint16, isBit bool) []byte
func GetWriteCommand_A_1E ¶
func GetWriteCommand_A_1E(address MitsubishiMCAddress, data []byte, isBit bool) []byte
func GetWriteCommand_Qna_3E ¶
func GetWriteCommand_Qna_3E(address MitsubishiMCAddress, data []byte, isBit bool) []byte
Types ¶
type MitsubishiClient ¶
func NewMitsubishiClient ¶
func NewMitsubishiClient(version MitsubishiVersion, ip string, port int, timeout time.Duration) (*MitsubishiClient, error)
func (*MitsubishiClient) Close ¶
func (client *MitsubishiClient) Close() error
func (*MitsubishiClient) Connect ¶
func (client *MitsubishiClient) Connect() error
func (*MitsubishiClient) Connected ¶
func (client *MitsubishiClient) Connected() bool
func (*MitsubishiClient) ReConnect ¶
func (client *MitsubishiClient) ReConnect()
func (*MitsubishiClient) ReadBool ¶
func (client *MitsubishiClient) ReadBool(address string) (bool, error)
func (*MitsubishiClient) ReadFloat32 ¶
func (client *MitsubishiClient) ReadFloat32(address string) (float32, error)
func (*MitsubishiClient) ReadFloat64 ¶
func (client *MitsubishiClient) ReadFloat64(address string) (float64, error)
func (*MitsubishiClient) ReadInt16 ¶
func (client *MitsubishiClient) ReadInt16(address string) (int16, error)
func (*MitsubishiClient) ReadInt32 ¶
func (client *MitsubishiClient) ReadInt32(address string) (int32, error)
func (*MitsubishiClient) ReadInt64 ¶
func (client *MitsubishiClient) ReadInt64(address string) (int64, error)
func (*MitsubishiClient) ReadUInt16 ¶
func (client *MitsubishiClient) ReadUInt16(address string) (uint16, error)
func (*MitsubishiClient) ReadUInt32 ¶
func (client *MitsubishiClient) ReadUInt32(address string) (uint32, error)
func (*MitsubishiClient) ReadUInt64 ¶
func (client *MitsubishiClient) ReadUInt64(address string) (uint64, error)
func (*MitsubishiClient) SendPackageReliable ¶
func (client *MitsubishiClient) SendPackageReliable(command []byte) ([]byte, error)
func (*MitsubishiClient) SendPackageSingle ¶
func (client *MitsubishiClient) SendPackageSingle(command []byte, receiveCount int) ([]byte, error)
func (*MitsubishiClient) WriteValue ¶
func (client *MitsubishiClient) WriteValue(address string, value interface{}) (err error)
type MitsubishiMCAddress ¶
type MitsubishiMCAddress struct { TypeCode []byte BitType byte Format int BeginAddress int TypeChar string }
func ConvertArg_A_1E ¶
func ConvertArg_A_1E(address string) MitsubishiMCAddress
func ConvertArg_Qna_3E ¶
func ConvertArg_Qna_3E(address string) MitsubishiMCAddress
type MitsubishiVersion ¶
type MitsubishiVersion int
MitsubishiVersion is an enum type for the different versions of the Mitsubishi protocol.
const ( Undefined MitsubishiVersion = iota A_1E Qna_3E )
Click to show internal directories.
Click to hide internal directories.