bacnetip

package
v0.0.0-...-d6403d3 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OBJECT_TYPE          = "objectType"
	OBJECT_INSTANCE      = "objectInstance"
	PROPERTY_IDENTIFIERS = "propertyIdentifiers"
	PROPERTY_IDENTIFIER  = "propertyIdentifier"
	ARRAY_INDEX          = "arrayIndex"
)

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(_options ...options.WithOption) plc4go.PlcDriver

func One

func One(filteredOptionMap map[string][]any, key string) (any, error)

func OneInt

func OneInt(filteredOptionMap map[string][]any, key string) (int, error)

func OneString

func OneString(filteredOptionMap map[string][]any, key string) (string, error)

func OneUint

func OneUint(filteredOptionMap map[string][]any, key string) (uint, error)

Types

type ApplicationLayerMessageCodec

type ApplicationLayerMessageCodec struct {
	// contains filtered or unexported fields
}

ApplicationLayerMessageCodec is a wrapper for MessageCodec which takes care of segmentation, retries etc.

func NewApplicationLayerMessageCodec

func NewApplicationLayerMessageCodec(localLog zerolog.Logger, udpTransport *udp.Transport, transportUrl url.URL, options map[string][]string, localAddress *net.UDPAddr, remoteAddress *net.UDPAddr) (*ApplicationLayerMessageCodec, error)

func (*ApplicationLayerMessageCodec) Connect

func (m *ApplicationLayerMessageCodec) Connect() error

func (*ApplicationLayerMessageCodec) ConnectWithContext

func (m *ApplicationLayerMessageCodec) ConnectWithContext(ctx context.Context) error

func (*ApplicationLayerMessageCodec) Disconnect

func (m *ApplicationLayerMessageCodec) Disconnect() error

func (*ApplicationLayerMessageCodec) Expect

func (m *ApplicationLayerMessageCodec) Expect(ctx context.Context, acceptsMessage spi.AcceptsMessage, handleMessage spi.HandleMessage, handleError spi.HandleError, ttl time.Duration) error

func (*ApplicationLayerMessageCodec) GetCodec

func (*ApplicationLayerMessageCodec) GetDefaultIncomingMessageChannel

func (m *ApplicationLayerMessageCodec) GetDefaultIncomingMessageChannel() chan spi.Message

func (*ApplicationLayerMessageCodec) IsRunning

func (m *ApplicationLayerMessageCodec) IsRunning() bool

func (*ApplicationLayerMessageCodec) Send

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

func (*ApplicationLayerMessageCodec) SendRequest

func (m *ApplicationLayerMessageCodec) SendRequest(ctx context.Context, message spi.Message, acceptsMessage spi.AcceptsMessage, handleMessage spi.HandleMessage, handleError spi.HandleError, ttl time.Duration) error

func (*ApplicationLayerMessageCodec) Serialize

func (d *ApplicationLayerMessageCodec) Serialize() ([]byte, error)

func (*ApplicationLayerMessageCodec) SerializeWithWriteBuffer

func (d *ApplicationLayerMessageCodec) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error

func (*ApplicationLayerMessageCodec) String

type ApplicationManager

type ApplicationManager struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type BacNetPlcTag

type BacNetPlcTag interface {
	apiModel.PlcTag

	GetObjectId() objectId
	GetProperties() []property
}

type Connection

type Connection struct {
	_default.DefaultConnection
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(messageCodec spi.MessageCodec, tagHandler spi.PlcTagHandler, tm transactions.RequestTransactionManager, connectionOptions map[string][]string, _options ...options.WithOption) *Connection

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

func (c *Connection) SubscriptionRequestBuilder() apiModel.PlcSubscriptionRequestBuilder

type Discoverer

type Discoverer struct {
	// contains filtered or unexported fields
}

func NewDiscoverer

func NewDiscoverer() *Discoverer

func (*Discoverer) Discover

func (d *Discoverer) Discover(ctx context.Context, callback func(event apiModel.PlcDiscoveryItem), discoveryOptions ...options.WithDiscoveryOption) error

type Driver

type Driver struct {
	_default.DefaultDriver
	// contains filtered or unexported fields
}

func (*Driver) Close

func (m *Driver) Close() error

func (*Driver) DiscoverWithContext

func (m *Driver) DiscoverWithContext(ctx context.Context, callback func(event apiModel.PlcDiscoveryItem), discoveryOptions ...options.WithDiscoveryOption) error

func (*Driver) GetConnectionWithContext

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

func (*Driver) SupportsDiscovery

func (m *Driver) SupportsDiscovery() bool

type InvokeIdGenerator

type InvokeIdGenerator struct {
	// contains filtered or unexported fields
}

type MessageCodec

type MessageCodec struct {
	_default.DefaultCodec
	// contains filtered or unexported fields
}

func NewMessageCodec

func NewMessageCodec(transportInstance transports.TransportInstance) *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 Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(invokeIdGenerator *InvokeIdGenerator, messageCodec spi.MessageCodec, tm transactions.RequestTransactionManager, _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(apdu readWriteModel.APDU, readRequest apiModel.PlcReadRequest) (apiModel.PlcReadResponse, error)

type Subscriber

type Subscriber struct {
	// contains filtered or unexported fields
}

func NewSubscriber

func NewSubscriber(connection *Connection, _options ...options.WithOption) *Subscriber

func (*Subscriber) Serialize

func (d *Subscriber) Serialize() ([]byte, error)

func (*Subscriber) SerializeWithWriteBuffer

func (d *Subscriber) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error

func (*Subscriber) String

func (d *Subscriber) String() string

func (*Subscriber) Subscribe

func (m *Subscriber) Subscribe(ctx context.Context, subscriptionRequest apiModel.PlcSubscriptionRequest) <-chan apiModel.PlcSubscriptionRequestResult

func (*Subscriber) Unregister

func (m *Subscriber) Unregister(registration apiModel.PlcConsumerRegistration)

func (*Subscriber) Unsubscribe

func (m *Subscriber) Unsubscribe(ctx context.Context, unsubscriptionRequest apiModel.PlcUnsubscriptionRequest) <-chan apiModel.PlcUnsubscriptionRequestResult

type TagHandler

type TagHandler struct {
	// contains filtered or unexported fields
}

func NewTagHandler

func NewTagHandler() TagHandler

func (TagHandler) ParseQuery

func (m TagHandler) ParseQuery(_ string) (apiModel.PlcQuery, error)

func (TagHandler) ParseTag

func (m TagHandler) ParseTag(tagString string) (apiModel.PlcTag, error)

type ValueHandler

type ValueHandler struct {
	values.DefaultValueHandler
}

func NewValueHandler

func NewValueHandler() ValueHandler

Jump to

Keyboard shortcuts

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