Documentation ¶
Index ¶
- Constants
- Variables
- type DataTime
- type Snap7Client
- func (client *Snap7Client) ABRead(start int, size int) ([]byte, error)
- func (client *Snap7Client) ABWrite(start int, data []byte) error
- func (client *Snap7Client) CTRead(start int, amount int) ([]byte, error)
- func (client *Snap7Client) CTWrite(start int, data []byte) error
- func (client *Snap7Client) Close()
- func (client *Snap7Client) DBRead(db_number int, start int, size int) ([]byte, error)
- func (client *Snap7Client) DBWrite(db_number, start int, data []byte) error
- func (client *Snap7Client) EBRead(start int, size int) ([]byte, error)
- func (client *Snap7Client) EBWrite(start int, data []byte) error
- func (client *Snap7Client) GetPlcDateTime() (DataTime, error)
- func (client *Snap7Client) MBRead(start int, size int) ([]byte, error)
- func (client *Snap7Client) MBWrite(start int, data []byte) error
- func (client *Snap7Client) ReadArea(area int, db_number int, start int, amount int) ([]byte, error)
- func (client *Snap7Client) SetPlcDateTime(time DataTime) error
- func (client *Snap7Client) TMRead(start int, amount int) ([]byte, error)
- func (client *Snap7Client) TMWrite(start int, data []byte) error
- func (client *Snap7Client) WriteArea(area int, db_number int, start int, data []byte) error
Constants ¶
View Source
const ( S7AreaPE = 0x81 S7AreaPA = 0x82 S7AreaMK = 0x83 S7AreaDB = 0x84 S7AreaCT = 0x1C S7AreaTM = 0x1D )
Variables ¶
View Source
var ErrCliAddressOutOfRange = errors.New("ErrCliAddressOutOfRange")
View Source
var ErrCliAlreadyRun = errors.New("ErrCliAlreadyRun")
View Source
var ErrCliAlreadyStop = errors.New("ErrCliAlreadyStop")
View Source
var ErrCliBufferTooSmall = errors.New("ErrCliBufferTooSmall")
View Source
var ErrCliCannotChangeParam = errors.New("ErrCliCannotChangeParam")
View Source
var ErrCliCannotCompress = errors.New("ErrCliCannotCompress")
View Source
var ErrCliCannotCopyRamToRom = errors.New("ErrCliCannotCopyRamToRom")
View Source
var ErrCliCannotStartPLC = errors.New("ErrCliCannotStartPLC")
View Source
var ErrCliCannotStopPLC = errors.New("ErrCliCannotStopPLC")
View Source
var ErrCliDeleteRefused = errors.New("ErrCliDeleteRefused")
View Source
var ErrCliDestroying = errors.New("ErrCliDestroying")
View Source
var ErrCliDownloadSequenceFailed = errors.New("ErrCliDownloadSequenceFailed")
View Source
var ErrCliFunNotAvailable = errors.New("ErrCliFunNotAvailable")
View Source
var ErrCliFunctionRefused = errors.New("ErrCliFunctionRefused")
View Source
var ErrCliInsertRefused = errors.New("ErrCliInsertRefused")
View Source
var ErrCliInvalidBlockNumber = errors.New("ErrCliInvalidBlockNumber")
View Source
var ErrCliInvalidBlockSize = errors.New("ErrCliInvalidBlockSize")
View Source
var ErrCliInvalidBlockType = errors.New("ErrCliInvalidBlockType")
View Source
var ErrCliInvalidDataSizeRecvd = errors.New("ErrCliInvalidDataSizeRecvd")
View Source
var ErrCliInvalidParamNumber = errors.New("ErrCliInvalidParamNumber")
View Source
var ErrCliInvalidParams = errors.New("ErrCliInvalidParams")
View Source
var ErrCliInvalidPassword = errors.New("ErrCliInvalidPassword")
View Source
var ErrCliInvalidPlcAnswer = errors.New("ErrCliInvalidPlcAnswer")
View Source
var ErrCliInvalidTransportSize = errors.New("ErrCliInvalidTransportSize")
View Source
var ErrCliInvalidValue = errors.New("ErrCliInvalidValue")
View Source
var ErrCliInvalidWordLen = errors.New("ErrCliInvalidWordLen")
View Source
var ErrCliItemNotAvailable = errors.New("ErrCliItemNotAvailable")
View Source
var ErrCliJobPending = errors.New("ErrCliJobPending")
View Source
var ErrCliJobTimeout = errors.New("ErrCliJobTimeout")
View Source
var ErrCliNeedPassword = errors.New("ErrCliNeedPassword")
View Source
var ErrCliNoPasswordToSetOrClear = errors.New("ErrCliNoPasswordToSetOrClear")
View Source
var ErrCliPartialDataRead = errors.New("ErrCliPartialDataRead")
View Source
var ErrCliPartialDataWritten = errors.New("ErrCliPartialDataWritten")
View Source
var ErrCliSizeOverPDU = errors.New("ErrCliSizeOverPDU")
View Source
var ErrCliTooManyItems = errors.New("ErrCliTooManyItems")
View Source
var ErrCliUploadSequenceFailed = errors.New("ErrCliUploadSequenceFailed")
View Source
var ErrCliWriteDataSizeMismatch = errors.New("ErrCliWriteDataSizeMismatch")
View Source
var ErrIsoConnect = errors.New("ErrIsoConnect") // Connection error
ISO Errors
View Source
var ErrIsoDisconnect = errors.New("ErrIsoDisconnect") // Disconnect error
View Source
var ErrIsoInvalidDataSize = errors.New("ErrIsoInvalidDataSize") // Bad Datasize passed to send/recv buffer is invalid
View Source
var ErrIsoInvalidPDU = errors.New("ErrIsoInvalidPDU") // Bad format
View Source
var ErrIsoInvalidParams = errors.New("ErrIsoInvalidParams") // Invalid TSAP params
View Source
var ErrIsoNullPointer = errors.New("ErrIsoNullPointer") // Null passed as pointer
View Source
var ErrIsoPduOverflow = errors.New("ErrIsoPduOverflow") // The sum of fragments data exceded maximum packet size
View Source
var ErrIsoRecvPacket = errors.New("ErrIsoRecvPacket") // An error occurred during recv
View Source
var ErrIsoResvd_1 = errors.New("ErrIsoResvd_1") // Unassigned
View Source
var ErrIsoResvd_2 = errors.New("ErrIsoResvd_2") // Unassigned
View Source
var ErrIsoResvd_3 = errors.New("ErrIsoResvd_3") // Unassigned
View Source
var ErrIsoResvd_4 = errors.New("ErrIsoResvd_4") // Unassigned
View Source
var ErrIsoSendPacket = errors.New("ErrIsoSendPacket") // An error occurred during send
View Source
var ErrIsoShortPacket = errors.New("rrIsoShortPacket") // A short packet received
View Source
var ErrIsoTooManyFragments = errors.New("ErrIsoTooManyFragments") // Too many packets without EoT flag
View Source
var ErrNEgotiatingPDU = errors.New("ErrNEgotiatingPDU")
Error codes
View Source
var ErrUnknow = errors.New("ErrUnknow")
Functions ¶
This section is empty.
Types ¶
type Snap7Client ¶
type Snap7Client struct {
// contains filtered or unexported fields
}
func (*Snap7Client) CTRead ¶
func (client *Snap7Client) CTRead(start int, amount int) ([]byte, error)
func (*Snap7Client) Close ¶
func (client *Snap7Client) Close()
func (*Snap7Client) DBWrite ¶
func (client *Snap7Client) DBWrite(db_number, start int, data []byte) error
func (*Snap7Client) GetPlcDateTime ¶
func (client *Snap7Client) GetPlcDateTime() (DataTime, error)
func (*Snap7Client) SetPlcDateTime ¶
func (client *Snap7Client) SetPlcDateTime(time DataTime) error
Click to show internal directories.
Click to hide internal directories.