Documentation ¶
Index ¶
- Constants
- func NewDriver(_options ...options.WithOption) plc4go.PlcDriver
- type Configuration
- type Connection
- func (c *Connection) Close() <-chan plc4go.PlcConnectionCloseResult
- func (c *Connection) ConnectWithContext(ctx context.Context) <-chan plc4go.PlcConnectionConnectResult
- func (c *Connection) GetConnection() plc4go.PlcConnection
- func (c *Connection) GetConnectionId() string
- func (c *Connection) GetMessageCodec() spi.MessageCodec
- func (c *Connection) GetMetadata() apiModel.PlcConnectionMetadata
- func (c *Connection) GetTracer() tracer.Tracer
- func (c *Connection) IsTraceEnabled() bool
- func (c *Connection) ReadRequestBuilder() apiModel.PlcReadRequestBuilder
- func (c *Connection) String() string
- func (c *Connection) WriteRequestBuilder() apiModel.PlcWriteRequestBuilder
- type Driver
- type DriverContext
- type MessageCodec
- func (m *MessageCodec) GetCodec() spi.MessageCodec
- func (m *MessageCodec) Receive() (spi.Message, error)
- func (m *MessageCodec) Send(message spi.Message) error
- func (d *MessageCodec) Serialize() ([]byte, error)
- func (d *MessageCodec) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
- func (d *MessageCodec) String() string
- type PlcTag
- type Reader
- type TagHandler
- type ValueHandler
- type Writer
Constants ¶
View Source
const ( DefaultSenderContext = "PLC4X " EmptySessionHandle = uint32(0) EmptyInterfaceHandle = uint32(0) )
View Source
const ( TAG = "tag" DATA_TYPE = "dataType" ELEMENT_NB = "elementNb" )
Variables ¶
This section is empty.
Functions ¶
func NewDriver ¶
func NewDriver(_options ...options.WithOption) plc4go.PlcDriver
Types ¶
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
func ParseFromOptions ¶
type Connection ¶
type Connection struct { _default.DefaultConnection // contains filtered or unexported fields }
func NewConnection ¶
func NewConnection( messageCodec spi.MessageCodec, configuration Configuration, driverContext DriverContext, tagHandler spi.PlcTagHandler, tm transactions.RequestTransactionManager, connectionOptions map[string][]string, _options ...options.WithOption, ) *Connection
func (*Connection) Close ¶
func (c *Connection) Close() <-chan plc4go.PlcConnectionCloseResult
func (*Connection) ConnectWithContext ¶
func (c *Connection) ConnectWithContext(ctx context.Context) <-chan plc4go.PlcConnectionConnectResult
func (*Connection) GetConnection ¶
func (c *Connection) GetConnection() plc4go.PlcConnection
func (*Connection) GetConnectionId ¶
func (c *Connection) GetConnectionId() string
func (*Connection) GetMessageCodec ¶
func (c *Connection) GetMessageCodec() spi.MessageCodec
func (*Connection) GetMetadata ¶
func (c *Connection) GetMetadata() apiModel.PlcConnectionMetadata
func (*Connection) GetTracer ¶
func (c *Connection) GetTracer() tracer.Tracer
func (*Connection) IsTraceEnabled ¶
func (c *Connection) IsTraceEnabled() bool
func (*Connection) ReadRequestBuilder ¶
func (c *Connection) ReadRequestBuilder() apiModel.PlcReadRequestBuilder
func (*Connection) String ¶
func (c *Connection) String() string
func (*Connection) WriteRequestBuilder ¶
func (c *Connection) WriteRequestBuilder() apiModel.PlcWriteRequestBuilder
type Driver ¶
type Driver struct { _default.DefaultDriver // contains filtered or unexported fields }
func (*Driver) GetConnectionWithContext ¶
func (*Driver) SetAwaitDisconnectComplete ¶
func (*Driver) SetAwaitSetupComplete ¶
type DriverContext ¶
func NewDriverContext ¶
func NewDriverContext(configuration Configuration) (DriverContext, error)
type MessageCodec ¶
type MessageCodec struct { _default.DefaultCodec // contains filtered or unexported fields }
func NewMessageCodec ¶
func NewMessageCodec(transportInstance transports.TransportInstance, _options ...options.WithOption) *MessageCodec
func (*MessageCodec) GetCodec ¶
func (m *MessageCodec) GetCodec() spi.MessageCodec
func (*MessageCodec) Serialize ¶
func (d *MessageCodec) Serialize() ([]byte, error)
func (*MessageCodec) SerializeWithWriteBuffer ¶
func (d *MessageCodec) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
func (*MessageCodec) String ¶
func (d *MessageCodec) String() string
type PlcTag ¶
type PlcTag interface { apiModel.PlcTag utils.Serializable GetTag() string GetType() readWriteModel.CIPDataTypeCode GetElementNb() uint16 }
func NewTag ¶
func NewTag(tag string, _type readWriteModel.CIPDataTypeCode, elementNb uint16) PlcTag
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReader ¶
func NewReader(messageCodec spi.MessageCodec, tm transactions.RequestTransactionManager, configuration Configuration, sessionHandle *uint32, _options ...options.WithOption) *Reader
func (*Reader) Read ¶
func (m *Reader) Read(ctx context.Context, readRequest apiModel.PlcReadRequest) <-chan apiModel.PlcReadRequestResult
func (*Reader) ToPlc4xReadResponse ¶
func (m *Reader) ToPlc4xReadResponse(response readWriteModel.CipService, readRequest apiModel.PlcReadRequest) (apiModel.PlcReadResponse, error)
type TagHandler ¶
type TagHandler struct {
// contains filtered or unexported fields
}
func NewTagHandler ¶
func NewTagHandler() TagHandler
func (TagHandler) ParseQuery ¶
func (m TagHandler) ParseQuery(query string) (apiModel.PlcQuery, error)
type ValueHandler ¶
type ValueHandler struct {
spiValues.DefaultValueHandler
}
func NewValueHandler ¶
func NewValueHandler(_options ...options.WithOption) ValueHandler
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func NewWriter ¶
func NewWriter(messageCodec spi.MessageCodec, tm transactions.RequestTransactionManager, configuration Configuration, sessionHandle *uint32, senderContext *[]uint8, _options ...options.WithOption) Writer
func (Writer) ToPlc4xWriteResponse ¶
func (m Writer) ToPlc4xWriteResponse(response readWriteModel.CipService, writeRequest apiModel.PlcWriteRequest) (apiModel.PlcWriteResponse, error)
func (Writer) Write ¶
func (m Writer) Write(ctx context.Context, writeRequest apiModel.PlcWriteRequest) <-chan apiModel.PlcWriteRequestResult
Click to show internal directories.
Click to hide internal directories.