eip

package
v0.0.0-...-13edf00 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

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

func ParseFromOptions(localLogger zerolog.Logger, options map[string][]string) (Configuration, error)

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) Close

func (d *Driver) Close() error

func (*Driver) GetConnectionWithContext

func (d *Driver) GetConnectionWithContext(ctx context.Context, transportUrl url.URL, transports map[string]transports.Transport, driverOptions map[string][]string) <-chan plc4go.PlcConnectionConnectResult

func (*Driver) SetAwaitDisconnectComplete

func (d *Driver) SetAwaitDisconnectComplete(awaitComplete bool)

func (*Driver) SetAwaitSetupComplete

func (d *Driver) SetAwaitSetupComplete(awaitComplete bool)

type DriverContext

type DriverContext struct {
	Backplane int8
	Slot      int8
	// contains filtered or unexported fields
}

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) Receive

func (m *MessageCodec) Receive() (spi.Message, error)

func (*MessageCodec) Send

func (m *MessageCodec) Send(message spi.Message) error

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)

func (TagHandler) ParseTag

func (m TagHandler) ParseTag(tagAddress string) (apiModel.PlcTag, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL