bacnetip

package
v0.0.0-...-2d02f19 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 35 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 Deferred

func Deferred(fn func() error)

func NewDriver

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

func ObjectIdentifierStringToTuple

func ObjectIdentifierStringToTuple(objectIdentifier string) (objectType uint16, instance uint32)

Types

type Address

type Address struct {
	AddrType    AddressType
	AddrNet     *uint16
	AddrAddress []byte
	AddrLen     *uint32
	AddrRoute   *Address

	AddrIP             *uint32
	AddrMask           *uint32
	AddrHost           *uint32
	AddrSubnet         *uint32
	AddrPort           *uint16
	AddrTuple          *AddressTuple[string, uint16]
	AddrBroadcastTuple *AddressTuple[string, uint16]
}

func NewAddress

func NewAddress(args ...any) (*Address, error)

func NewGlobalBroadcast

func NewGlobalBroadcast(route *Address) *Address

func NewLocalBroadcast

func NewLocalBroadcast(route *Address) *Address

func NewLocalStation

func NewLocalStation(addr any, route *Address) (*Address, error)

func NewRemoteBroadcast

func NewRemoteBroadcast(net *uint16, route *Address) *Address

func NewRemoteStation

func NewRemoteStation(net *uint16, addr any, route *Address) (*Address, error)

func (*Address) Equals

func (a *Address) Equals(other any) bool

func (*Address) String

func (a *Address) String() string

type AddressTuple

type AddressTuple[L any, R any] struct {
	Left  L
	Right R
}

func (*AddressTuple[L, R]) String

func (a *AddressTuple[L, R]) String() string

type AddressType

type AddressType int
const (
	NULL_ADDRESS AddressType = iota
	LOCAL_BROADCAST_ADDRESS
	LOCAL_STATION_ADDRESS
	REMOTE_BROADCAST_ADDRESS
	REMOTE_STATION_ADDRESS
	GLOBAL_BROADCAST_ADDRESS
)

func (AddressType) String

func (a AddressType) String() string

type AnnexJCodec

type AnnexJCodec struct {
	*Client
	*Server
}

func NewAnnexJCodec

func NewAnnexJCodec(cid *int, sid *int) (*AnnexJCodec, error)

func (*AnnexJCodec) Confirmation

func (b *AnnexJCodec) Confirmation(pdu _PDU) error

func (*AnnexJCodec) Indication

func (b *AnnexJCodec) Indication(pdu _PDU) error

type Application

type Application struct {
	*ApplicationServiceElement
	Collector
	// contains filtered or unexported fields
}

func NewApplication

func NewApplication(localDevice *LocalDeviceObject, deviceInfoCache *DeviceInfoCache, aseID *int) (*Application, error)

func (*Application) AddObject

func (a *Application) AddObject(obj *LocalDeviceObject) error

AddObject adds an object to the local collection

func (*Application) DeleteObject

func (a *Application) DeleteObject(obj *LocalDeviceObject) error

DeleteObject deletes an object from the local collection

func (*Application) GetObjectId

func (a *Application) GetObjectId(objectId string) *LocalDeviceObject

GetObjectId returns a local object or None.

func (*Application) GetObjectName

func (a *Application) GetObjectName(objectName string) *LocalDeviceObject

GetObjectName returns a local object or None.

func (*Application) GetServicesSupported

func (a *Application) GetServicesSupported() []string

GetServicesSupported returns a ServicesSupported bit string based in introspection, look for helper methods that

match confirmed and unconfirmed services.

TODO: match that with readWriteModel.BACnetServicesSupported

func (*Application) Indication

func (a *Application) Indication(apdu _PDU) error

func (*Application) IterObjects

func (a *Application) IterObjects() []*LocalDeviceObject

IterObjects iterates over the objects

func (*Application) Request

func (a *Application) Request(apdu _PDU) error

type ApplicationIOController

type ApplicationIOController struct {
	*IOController
	*Application
	// contains filtered or unexported fields
}

TODO: finish

func NewApplicationIOController

func NewApplicationIOController(localDevice *LocalDeviceObject, deviceInfoCache *DeviceInfoCache, aseID *int) (*ApplicationIOController, error)

func (*ApplicationIOController) Confirmation

func (a *ApplicationIOController) Confirmation(apdu _PDU) error

func (*ApplicationIOController) ProcessIO

func (a *ApplicationIOController) ProcessIO(iocb _IOCB) error

func (*ApplicationIOController) Request

func (a *ApplicationIOController) Request(apdu _PDU) error

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(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 ApplicationServiceAccessPoint

type ApplicationServiceAccessPoint struct {
	*ApplicationServiceElement
	*ServiceAccessPoint
}

func NewApplicationServiceAccessPoint

func NewApplicationServiceAccessPoint(aseID *int, sapID *int) (*ApplicationServiceAccessPoint, error)

func (*ApplicationServiceAccessPoint) Confirmation

func (a *ApplicationServiceAccessPoint) Confirmation(apdu _PDU) error

TODO: big WIP

func (*ApplicationServiceAccessPoint) Indication

func (a *ApplicationServiceAccessPoint) Indication(apdu _PDU) error

TODO: big WIP

func (*ApplicationServiceAccessPoint) SapConfirmation

func (a *ApplicationServiceAccessPoint) SapConfirmation(apdu _PDU) error

TODO: big WIP

func (*ApplicationServiceAccessPoint) SapIndication

func (a *ApplicationServiceAccessPoint) SapIndication(apdu _PDU) error

TODO: big WIP

type ApplicationServiceElement

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

func NewApplicationServiceElement

func NewApplicationServiceElement(aseID *int, rootStruct _ApplicationServiceElement) (*ApplicationServiceElement, error)

func (*ApplicationServiceElement) Confirmation

func (a *ApplicationServiceElement) Confirmation(_PDU) error

func (*ApplicationServiceElement) Indication

func (a *ApplicationServiceElement) Indication(_PDU) error

func (*ApplicationServiceElement) Request

func (a *ApplicationServiceElement) Request(pdu _PDU) error

func (*ApplicationServiceElement) Response

func (a *ApplicationServiceElement) Response(pdu _PDU) error

type BIPForeign

type BIPForeign struct {
	*BIPSAP
	*Client
	*Server
	*OneShotTask
	// contains filtered or unexported fields
}

func NewBIPForeign

func NewBIPForeign(addr *Address, ttl *int, sapID *int, cid *int, sid *int) (*BIPForeign, error)

func (*BIPForeign) Confirmation

func (b *BIPForeign) Confirmation(pdu _PDU) error

func (*BIPForeign) Indication

func (b *BIPForeign) Indication(pdu _PDU) error

func (BIPForeign) InstallTask

func (t BIPForeign) InstallTask(when *time.Time, delta *time.Duration)

func (BIPForeign) Resume

func (t BIPForeign) Resume()

func (BIPForeign) SuspendTask

func (t BIPForeign) SuspendTask()

type BIPForeignApplication

type BIPForeignApplication struct {
	*ApplicationIOController
	*WhoIsIAmServices
	*ReadWritePropertyServices
	// contains filtered or unexported fields
}

func NewBIPForeignApplication

func NewBIPForeignApplication(localDevice *LocalDeviceObject, localAddress Address, bbmdAddress *Address, bbmdTTL *int, deviceInfoCache *DeviceInfoCache, aseID *int) (*BIPForeignApplication, error)

func (*BIPForeignApplication) Close

func (b *BIPForeignApplication) Close() error

type BIPNetworkApplication

type BIPNetworkApplication struct {
	*NetworkServiceElement
	// contains filtered or unexported fields
}

func NewBIPNetworkApplication

func NewBIPNetworkApplication(localAddress Address, bbmdAddress *Address, bbmdTTL *int, eID *int) (*BIPNetworkApplication, error)

type BIPSAP

type BIPSAP struct {
	*ServiceAccessPoint
	// contains filtered or unexported fields
}

func NewBIPSAP

func NewBIPSAP(sapID *int, rootStruct _BIPSAP) (*BIPSAP, error)

func (*BIPSAP) SapConfirmation

func (b *BIPSAP) SapConfirmation(pdu _PDU) error

func (*BIPSAP) SapIndication

func (b *BIPSAP) SapIndication(pdu _PDU) error

type BIPSimple

type BIPSimple struct {
	*BIPSAP
	*Client
	*Server
}

func NewBIPSimple

func NewBIPSimple(sapID *int, cid *int, sid *int) (*BIPSimple, error)

func (*BIPSimple) Confirmation

func (b *BIPSimple) Confirmation(pdu _PDU) error

func (*BIPSimple) Indication

func (b *BIPSimple) Indication(pdu _PDU) error

type BIPSimpleApplication

type BIPSimpleApplication struct {
	*ApplicationIOController
	*WhoIsIAmServices
	*ReadWritePropertyServices
	// contains filtered or unexported fields
}

func NewBIPSimpleApplication

func NewBIPSimpleApplication(localDevice *LocalDeviceObject, localAddress Address, deviceInfoCache *DeviceInfoCache, aseID *int) (*BIPSimpleApplication, error)

func (*BIPSimpleApplication) Close

func (b *BIPSimpleApplication) Close() error

type BacNetPlcTag

type BacNetPlcTag interface {
	apiModel.PlcTag

	GetObjectId() objectId
	GetProperties() []property
}

type Capability

type Capability struct {
}

TODO: implement

func NewCapability

func NewCapability() *Capability

type Client

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

Client is an "abstract" struct which is used in another struct as delegate

func NewClient

func NewClient(cid *int, rootStruct _Client) (*Client, error)

func (*Client) Confirmation

func (c *Client) Confirmation(_PDU) error

func (*Client) Request

func (c *Client) Request(pdu _PDU) error

func (*Client) String

func (c *Client) String() string

type ClientSSM

type ClientSSM struct {
	*SSM
	// contains filtered or unexported fields
}

func NewClientSSM

func NewClientSSM(sap SSMSAPRequirements, pduAddress *Address) (*ClientSSM, error)

func (*ClientSSM) Confirmation

func (c *ClientSSM) Confirmation(apdu _PDU) error

Confirmation This function is called by the device for all upstream messages related to the transaction.

func (*ClientSSM) Indication

func (c *ClientSSM) Indication(apdu _PDU) error

Indication This function is called after the device has bound a new transaction and wants to start the process

rolling

func (ClientSSM) InstallTask

func (t ClientSSM) InstallTask(when *time.Time, delta *time.Duration)

func (*ClientSSM) Request

func (c *ClientSSM) Request(apdu _PDU) error

Request This function is called by client transaction functions when it wants to send a message to the device

func (*ClientSSM) Response

func (c *ClientSSM) Response(apdu _PDU) error

Response This function is called by client transaction functions when they want to send a message to the application.

func (ClientSSM) Resume

func (t ClientSSM) Resume()

func (ClientSSM) String

func (t ClientSSM) String() string

func (ClientSSM) SuspendTask

func (t ClientSSM) SuspendTask()

type Collector

type Collector struct {
}

TODO: implement

func (*Collector) CapabilityFunctions

func (c *Collector) CapabilityFunctions(fn string) []func() error

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 DeviceInfo

type DeviceInfo struct {
	DeviceIdentifier readWriteModel.BACnetTagPayloadObjectIdentifier
	Address          Address

	MaximumApduLengthAccepted *readWriteModel.MaxApduLengthAccepted `stringer:"true"`
	SegmentationSupported     *readWriteModel.BACnetSegmentation    `stringer:"true"`
	MaxSegmentsAccepted       *readWriteModel.MaxSegmentsAccepted   `stringer:"true"`
	VendorId                  *readWriteModel.BACnetVendorId        `stringer:"true"`
	MaximumNpduLength         *uint
	// contains filtered or unexported fields
}

func NewDeviceInfo

func NewDeviceInfo(deviceIdentifier readWriteModel.BACnetTagPayloadObjectIdentifier, address Address) DeviceInfo

func (*DeviceInfo) Serialize

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

func (*DeviceInfo) SerializeWithWriteBuffer

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

func (*DeviceInfo) String

func (d *DeviceInfo) String() string

type DeviceInfoCache

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

func NewDeviceInfoCache

func NewDeviceInfoCache() *DeviceInfoCache

func (*DeviceInfoCache) Acquire

Acquire Return the known information about the device and mark the record as being used by a segmentation state

machine.

func (*DeviceInfoCache) GetDeviceInfo

func (d *DeviceInfoCache) GetDeviceInfo(key DeviceInfoCacheKey) (DeviceInfo, bool)

GetDeviceInfo gets a DeviceInfo from cache

func (*DeviceInfoCache) HasDeviceInfo

func (d *DeviceInfoCache) HasDeviceInfo(key DeviceInfoCacheKey) bool

HasDeviceInfo Return true if cache has information about the device.

func (*DeviceInfoCache) IAmDeviceInfo

IAmDeviceInfo Create a device information record based on the contents of an IAmRequest and put it in the cache.

func (*DeviceInfoCache) Release

func (d *DeviceInfoCache) Release(deviceInfo DeviceInfo) error

Release This function is called by the segmentation state machine when it has finished with the device information.

func (*DeviceInfoCache) String

func (d *DeviceInfoCache) String() string

func (*DeviceInfoCache) UpdateDeviceInfo

func (d *DeviceInfoCache) UpdateDeviceInfo(deviceInfo DeviceInfo)

UpdateDeviceInfo The application has updated one or more fields in the device information record and the cache needs

to be updated to reflect the changes.  If this is a cached version of a persistent record then this is the
opportunity to update the database.

type DeviceInfoCacheKey

type DeviceInfoCacheKey struct {
	Instance  *uint32
	PduSource *Address
}

DeviceInfoCacheKey caches by either Instance, PduSource of both

func (DeviceInfoCacheKey) HashKey

func (k DeviceInfoCacheKey) HashKey() uint32

func (DeviceInfoCacheKey) String

func (k DeviceInfoCacheKey) String() string

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 IOCB

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

func NewIOCB

func NewIOCB(request _PDU, destination *Address) (*IOCB, error)

func (*IOCB) Abort

func (i *IOCB) Abort(err error) error

Abort Called by a client to abort a transaction.

func (*IOCB) AddCallback

func (i *IOCB) AddCallback(fn func())

AddCallback Pass a function to be called when IO is complete.

func (*IOCB) Complete

func (i *IOCB) Complete(apdu _PDU) error

Complete Called to complete a transaction, usually when ProcessIO has shipped the IOCB off to some other thread or

function.

func (*IOCB) Serialize

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

func (*IOCB) SerializeWithWriteBuffer

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

func (*IOCB) SetTimeout

func (i *IOCB) SetTimeout(delay time.Duration)

SetTimeout Called to set a transaction timer.

func (*IOCB) String

func (d *IOCB) String() string

func (*IOCB) Trigger

func (i *IOCB) Trigger()

Trigger Set the completion event and make the callback(s)

func (*IOCB) Wait

func (i *IOCB) Wait()

Wait for the completion event to be set

type IOCBState

type IOCBState int
const (
	IOCBState_IDLE IOCBState = iota
	IOCBState_PENDING
	IOCBState_ACTIVE
	IOCBState_COMPLETED
	IOCBState_ABORTED
)

func (IOCBState) String

func (i IOCBState) String() string

type IOController

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

func NewIOController

func NewIOController(name string, rootStruct _IOController) (*IOController, error)

func (*IOController) Abort

func (i *IOController) Abort(err error) error

Abort all requests, no default implementation.

func (*IOController) AbortIO

func (i *IOController) AbortIO(iocb _IOCB, err error) error

AbortIO Called by a handler or a client to abort a transaction

func (*IOController) ActiveIO

func (i *IOController) ActiveIO(iocb _IOCB) error

ActiveIO Called by a handler to notify the controller that a request is being processed

func (*IOController) CompleteIO

func (i *IOController) CompleteIO(iocb _IOCB, apdu _PDU) error

CompleteIO Called by a handler to return data to the client

func (*IOController) ProcessIO

func (i *IOController) ProcessIO(_IOCB) error

ProcessIO Figure out how to respond to this request. This must be provided by the derived class.

func (*IOController) RequestIO

func (i *IOController) RequestIO(iocb _IOCB) error

RequestIO Called by a client to start processing a request.

func (*IOController) Serialize

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

func (*IOController) SerializeWithWriteBuffer

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

func (*IOController) String

func (d *IOController) String() string

type IOQController

type IOQController struct {
	*IOController
	// contains filtered or unexported fields
}

func NewIOQController

func NewIOQController(name string, rootStruct _IOQController) (*IOQController, error)

func (*IOQController) Abort

func (i *IOQController) Abort(err error) error

Abort all pending requests

func (*IOQController) AbortIO

func (i *IOQController) AbortIO(iocb _IOCB, err error) error

AbortIO Called by a handler or a client to abort a transaction

func (*IOQController) ActiveIO

func (i *IOQController) ActiveIO(iocb _IOCB) error

ActiveIO Called by a handler to notify the controller that a request is being processed

func (*IOQController) CompleteIO

func (i *IOQController) CompleteIO(iocb _IOCB, msg _PDU) error

CompleteIO Called by a handler to return data to the client

func (*IOQController) ProcessIO

func (i *IOQController) ProcessIO(_IOCB) error

ProcessIO Figure out how to respond to this request. This must be provided by the derived class

func (*IOQController) RequestIO

func (i *IOQController) RequestIO(iocb _IOCB) error

RequestIO Called by a client to start processing a request

func (*IOQController) Serialize

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

func (*IOQController) SerializeWithWriteBuffer

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

func (*IOQController) String

func (d *IOQController) String() string

type IOQControllerStates

type IOQControllerStates int
const (
	IOQControllerStates_CTRL_IDLE IOQControllerStates = iota
	IOQControllerStates_CTRL_ACTIVE
	IOQControllerStates_CTRL_WAITING
)

func (IOQControllerStates) String

func (i IOQControllerStates) String() string

type IOQueue

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

func NewIOQueue

func NewIOQueue(name string) *IOQueue

func (*IOQueue) Abort

func (i *IOQueue) Abort(err error)

Abort all the control blocks in the queue

func (*IOQueue) Get

func (i *IOQueue) Get(block bool, delay *time.Duration) (_IOCB, error)

Get a request from a queue, optionally block until a request is available.

func (*IOQueue) Put

func (i *IOQueue) Put(iocb _IOCB) error

Put an IOCB to a queue. This is usually called by the function that filters requests and passes them out to the

correct processing thread.

func (*IOQueue) Remove

func (i *IOQueue) Remove(iocb _IOCB) error

Remove a control block from the queue, called if the request

is canceled/aborted

func (*IOQueue) Serialize

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

func (*IOQueue) SerializeWithWriteBuffer

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

func (*IOQueue) String

func (d *IOQueue) String() string

type InvokeIdGenerator

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

type LocalDeviceObject

type LocalDeviceObject struct {
	NumberOfAPDURetries       *uint
	APDUTimeout               *uint
	SegmentationSupported     *readWriteModel.BACnetSegmentation
	APDUSegmentTimeout        *uint
	MaxSegmentsAccepted       *readWriteModel.MaxSegmentsAccepted
	MaximumApduLengthAccepted *readWriteModel.MaxApduLengthAccepted
	App                       *Application
	ObjectName                string
	ObjectIdentifier          string
	VendorIdentifier          uint16
	ObjectList                []string
}

func (*LocalDeviceObject) String

func (l *LocalDeviceObject) String() string

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 NetworkAdapter

type NetworkAdapter struct {
	*Client
	// contains filtered or unexported fields
}

TODO: implement me

func NewNetworkAdapter

func NewNetworkAdapter(sap *NetworkServiceAccessPoint, net *uint16, addr *Address, cid *int) (*NetworkAdapter, error)

func (*NetworkAdapter) Confirmation

func (n *NetworkAdapter) Confirmation(npdu _PDU) error

Confirmation Decode upstream PDUs and pass them up to the service access point.

func (*NetworkAdapter) DisconnectConnectionToNetwork

func (n *NetworkAdapter) DisconnectConnectionToNetwork(net any) error

func (*NetworkAdapter) EstablishConnectionToNetwork

func (n *NetworkAdapter) EstablishConnectionToNetwork(net any) error

func (*NetworkAdapter) ProcessNPDU

func (n *NetworkAdapter) ProcessNPDU(npdu _PDU) error

ProcessNPDU Encode NPDUs from the service access point and send them downstream.

type NetworkServiceAccessPoint

type NetworkServiceAccessPoint struct {
	*ServiceAccessPoint
	*Server
	// contains filtered or unexported fields
}

func NewNetworkServiceAccessPoint

func NewNetworkServiceAccessPoint(routerInfoCache *RouterInfoCache, sapID *int, sid *int) (*NetworkServiceAccessPoint, error)

func (*NetworkServiceAccessPoint) DeleteRouterReference

func (n *NetworkServiceAccessPoint) DeleteRouterReference(snet *uint16, address, dnets any) error

DeleteRouterReference Delete references to routers/networks.

func (*NetworkServiceAccessPoint) Indication

func (n *NetworkServiceAccessPoint) Indication(pdu _PDU) error

func (*NetworkServiceAccessPoint) ProcessNPDU

func (n *NetworkServiceAccessPoint) ProcessNPDU(adapter *NetworkAdapter, pdu _PDU) error

func (*NetworkServiceAccessPoint) SapConfirmation

func (n *NetworkServiceAccessPoint) SapConfirmation(npdu _PDU) error

func (*NetworkServiceAccessPoint) SapConfirmationWithAdapter

func (n *NetworkServiceAccessPoint) SapConfirmationWithAdapter(adapter *NetworkAdapter, npdu _PDU) error

func (*NetworkServiceAccessPoint) SapIndication

func (n *NetworkServiceAccessPoint) SapIndication(npdu _PDU) error

func (*NetworkServiceAccessPoint) SapIndicationWithAdapter

func (n *NetworkServiceAccessPoint) SapIndicationWithAdapter(adapter *NetworkAdapter, npdu _PDU) error

func (*NetworkServiceAccessPoint) UpdateRouterReference

func (n *NetworkServiceAccessPoint) UpdateRouterReference(snet *uint16, address, dnets any) error

UpdateRouterReference Update references to routers.

type NetworkServiceElement

type NetworkServiceElement struct {
	*ApplicationServiceElement
}

func NewNetworkServiceElement

func NewNetworkServiceElement(eid *int) (*NetworkServiceElement, error)

func (*NetworkServiceElement) Startup

func (n *NetworkServiceElement) Startup() error

type OneShotDeleteTask

type OneShotDeleteTask struct {
	OneShotTaskRequirements
	// contains filtered or unexported fields
}

func NewOneShotDeleteTask

func NewOneShotDeleteTask(oneShotTaskRequirements OneShotTaskRequirements, when *time.Time) *OneShotDeleteTask

func (OneShotDeleteTask) InstallTask

func (t OneShotDeleteTask) InstallTask(when *time.Time, delta *time.Duration)

func (*OneShotDeleteTask) IsOneShotDeleteTask

func (r *OneShotDeleteTask) IsOneShotDeleteTask() bool

func (OneShotDeleteTask) Resume

func (t OneShotDeleteTask) Resume()

func (OneShotDeleteTask) String

func (t OneShotDeleteTask) String() string

func (OneShotDeleteTask) SuspendTask

func (t OneShotDeleteTask) SuspendTask()

type OneShotFunctionTask

type OneShotFunctionTask struct {
	*OneShotDeleteTask
	// contains filtered or unexported fields
}

func FunctionTask

func FunctionTask(fn func() error) *OneShotFunctionTask

func OneShotFunction

func OneShotFunction(fn func() error) *OneShotFunctionTask

func (OneShotFunctionTask) InstallTask

func (t OneShotFunctionTask) InstallTask(when *time.Time, delta *time.Duration)

func (OneShotFunctionTask) Resume

func (t OneShotFunctionTask) Resume()

func (OneShotFunctionTask) String

func (t OneShotFunctionTask) String() string

func (OneShotFunctionTask) SuspendTask

func (t OneShotFunctionTask) SuspendTask()

type OneShotTask

type OneShotTask struct {
	OneShotTaskRequirements
	// contains filtered or unexported fields
}

func NewOneShotTask

func NewOneShotTask(oneShotTaskRequirements OneShotTaskRequirements, when *time.Time) *OneShotTask

func (OneShotTask) InstallTask

func (t OneShotTask) InstallTask(when *time.Time, delta *time.Duration)

func (OneShotTask) Resume

func (t OneShotTask) Resume()

func (OneShotTask) String

func (t OneShotTask) String() string

func (OneShotTask) SuspendTask

func (t OneShotTask) SuspendTask()

type OneShotTaskRequirements

type OneShotTaskRequirements interface {
	// contains filtered or unexported methods
}

type PCI

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

func NewPCI

func NewPCI(msg spi.Message, pduSource *Address, pduDestination *Address, expectingReply bool, networkPriority readWriteModel.NPDUNetworkPriority) *PCI

func (*PCI) String

func (p *PCI) String() string

type PDU

type PDU struct {
	*PCI
}

func NewPDU

func NewPDU(msg spi.Message, pduOptions ...PDUOption) *PDU

func NewPDUFromPDU

func NewPDUFromPDU(pdu _PDU, pduOptions ...PDUOption) *PDU

func NewPDUFromPDUWithNewMessage

func NewPDUFromPDUWithNewMessage(pdu _PDU, msg spi.Message, pduOptions ...PDUOption) *PDU

func NewPDUWithAllOptions

func NewPDUWithAllOptions(msg spi.Message, pduSource *Address, pduDestination *Address, expectingReply bool, networkPriority readWriteModel.NPDUNetworkPriority) *PDU

func (*PDU) GetExpectingReply

func (p *PDU) GetExpectingReply() bool

func (*PDU) GetMessage

func (p *PDU) GetMessage() spi.Message

func (*PDU) GetNetworkPriority

func (p *PDU) GetNetworkPriority() readWriteModel.NPDUNetworkPriority

func (*PDU) GetPDUDestination

func (p *PDU) GetPDUDestination() *Address

func (*PDU) GetPDUSource

func (p *PDU) GetPDUSource() *Address

func (*PDU) SetPDUDestination

func (p *PDU) SetPDUDestination(destination *Address)

func (*PDU) String

func (p *PDU) String() string

type PDUOption

type PDUOption func(pdu *PDU)

func WithPDUDestination

func WithPDUDestination(pduDestination *Address) PDUOption

func WithPDUExpectingReply

func WithPDUExpectingReply(expectingReply bool) PDUOption

func WithPDUNetworkPriority

func WithPDUNetworkPriority(networkPriority readWriteModel.NPDUNetworkPriority) PDUOption

func WithPDUSource

func WithPDUSource(pduSource *Address) PDUOption

type PriorityItem

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

An PriorityItem is something we manage in a priority queue.

type PriorityQueue

type PriorityQueue []*PriorityItem

A PriorityQueue implements heap.Interface and holds Items.

func (*PriorityQueue) Len

func (pq *PriorityQueue) Len() int

func (*PriorityQueue) Less

func (pq *PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() any

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(x any)

func (*PriorityQueue) Swap

func (pq *PriorityQueue) Swap(i, j int)

type ReadWritePropertyServices

type ReadWritePropertyServices struct {
}

func NewReadWritePropertyServices

func NewReadWritePropertyServices() (*ReadWritePropertyServices, error)

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 RecurringTask

type RecurringTask struct {
	RecurringTaskRequirements
	// contains filtered or unexported fields
}

func NewRecurringTask

func NewRecurringTask(recurringTaskRequirements RecurringTaskRequirements, interval *time.Duration, offset *time.Duration) *RecurringTask

func RecurringFunctionTask

func RecurringFunctionTask(interval *time.Duration, fn func() error) *RecurringTask

func (RecurringTask) InstallTask

func (t RecurringTask) InstallTask(when *time.Time, delta *time.Duration)

func (*RecurringTask) IsRecurringTask

func (r *RecurringTask) IsRecurringTask() bool

func (RecurringTask) Resume

func (t RecurringTask) Resume()

func (RecurringTask) String

func (t RecurringTask) String() string

func (RecurringTask) SuspendTask

func (t RecurringTask) SuspendTask()

type RecurringTaskRequirements

type RecurringTaskRequirements interface {
	// contains filtered or unexported methods
}

type RouterInfo

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

func (RouterInfo) String

func (r RouterInfo) String() string

type RouterInfoCache

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

func NewRouterInfoCache

func NewRouterInfoCache() *RouterInfoCache

func (*RouterInfoCache) DeleteRouterInfo

func (n *RouterInfoCache) DeleteRouterInfo(*uint16, any, any) error

func (*RouterInfoCache) GetRouterInfo

func (n *RouterInfoCache) GetRouterInfo(*uint16, *uint16) *RouterInfo

func (*RouterInfoCache) UpdateRouterInfo

func (n *RouterInfoCache) UpdateRouterInfo(*uint16, any, any) error

func (*RouterInfoCache) UpdateRouterStatus

func (n *RouterInfoCache) UpdateRouterStatus(*uint16, *Address, []*uint16)

func (*RouterInfoCache) UpdateSourceNetwork

func (n *RouterInfoCache) UpdateSourceNetwork()

type RouterStatus

type RouterStatus uint8
const (
	ROUTER_AVAILABLE    RouterStatus = iota // normal
	ROUTER_BUSY                             // router is busy
	ROUTER_DISCONNECTED                     // could make a connection, but hasn't
	ROUTER_UNREACHABLE                      // temporarily unreachable
)

func (RouterStatus) String

func (r RouterStatus) String() string

type SSM

type SSM struct {
	*OneShotTask
	SSMProcessingRequirements
	// contains filtered or unexported fields
}

SSM - Segmentation State Machine

func NewSSM

func NewSSM(sap interface {
	SSMSAPRequirements
	SSMProcessingRequirements
}, pduAddress *Address) (*SSM, error)

func (SSM) InstallTask

func (t SSM) InstallTask(when *time.Time, delta *time.Duration)

func (*SSM) RestartTimer

func (s *SSM) RestartTimer(millis uint)

func (SSM) Resume

func (t SSM) Resume()

func (*SSM) StartTimer

func (s *SSM) StartTimer(millis uint)

func (*SSM) StopTimer

func (s *SSM) StopTimer()

func (SSM) String

func (t SSM) String() string

func (SSM) SuspendTask

func (t SSM) SuspendTask()

type SSMProcessingRequirements

type SSMProcessingRequirements interface {
	// contains filtered or unexported methods
}

type SSMSAPRequirements

type SSMSAPRequirements interface {
	GetDeviceInfoCache() *DeviceInfoCache
	GetLocalDevice() *LocalDeviceObject
	GetProposedWindowSize() uint8
	GetClientTransactions() []*ClientSSM
	RemoveClientTransaction(*ClientSSM)
	GetServerTransactions() []*ServerSSM
	RemoveServerTransaction(*ServerSSM)
	GetApplicationTimeout() uint
	GetDefaultAPDUTimeout() uint
	GetDefaultSegmentationSupported() readWriteModel.BACnetSegmentation
	GetDefaultAPDUSegmentTimeout() uint
	GetDefaultMaxSegmentsAccepted() readWriteModel.MaxSegmentsAccepted
	GetDefaultMaximumApduLengthAccepted() readWriteModel.MaxApduLengthAccepted
	// contains filtered or unexported methods
}

type SSMState

type SSMState uint8
const (
	SSMState_IDLE SSMState = iota
	SSMState_SEGMENTED_REQUEST
	SSMState_AWAIT_CONFIRMATION
	SSMState_AWAIT_RESPONSE
	SSMState_SEGMENTED_RESPONSE
	SSMState_SEGMENTED_CONFIRMATION
	SSMState_COMPLETED
	SSMState_ABORTED
)

func (SSMState) String

func (s SSMState) String() string

type Server

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

Server is an "abstract" struct which is used in another struct as delegate

func NewServer

func NewServer(sid *int, rootStruct _Server) (*Server, error)

func (*Server) Indication

func (s *Server) Indication(_PDU) error

func (*Server) Response

func (s *Server) Response(pdu _PDU) error

func (*Server) String

func (s *Server) String() string

type ServerSSM

type ServerSSM struct {
	*SSM
	// contains filtered or unexported fields
}

func NewServerSSM

func NewServerSSM(sap SSMSAPRequirements, pduAddress *Address) (*ServerSSM, error)

func (*ServerSSM) Confirmation

func (s *ServerSSM) Confirmation(apdu _PDU) error

Confirmation This function is called when the application has provided a response and needs it to be sent to the

client.

func (*ServerSSM) Indication

func (s *ServerSSM) Indication(apdu _PDU) error

Indication This function is called for each downstream packet related to

the transaction

func (ServerSSM) InstallTask

func (t ServerSSM) InstallTask(when *time.Time, delta *time.Duration)

func (*ServerSSM) Request

func (s *ServerSSM) Request(apdu _PDU) error

Request This function is called by transaction functions to send to the application

func (*ServerSSM) Response

func (s *ServerSSM) Response(apdu _PDU) error

Response This function is called by client transaction functions when they want to send a message to the application.

func (ServerSSM) Resume

func (t ServerSSM) Resume()

func (ServerSSM) String

func (t ServerSSM) String() string

func (ServerSSM) SuspendTask

func (t ServerSSM) SuspendTask()

type ServiceAccessPoint

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

func NewServiceAccessPoint

func NewServiceAccessPoint(sapID *int, rootStruct _ServiceAccessPoint) (*ServiceAccessPoint, error)

func (*ServiceAccessPoint) SapConfirmation

func (s *ServiceAccessPoint) SapConfirmation(_PDU) error

func (*ServiceAccessPoint) SapIndication

func (s *ServiceAccessPoint) SapIndication(_PDU) error

func (*ServiceAccessPoint) SapRequest

func (s *ServiceAccessPoint) SapRequest(pdu _PDU) error

func (*ServiceAccessPoint) SapResponse

func (s *ServiceAccessPoint) SapResponse(pdu _PDU) error

type Settings

type Settings struct {
	Debug       bool
	Color       bool
	DebugFile   string
	MaxBytes    uint
	BackupCount uint
	RouteAware  bool
}

type SieveQueue

type SieveQueue struct {
	*IOQController
	// contains filtered or unexported fields
}

func NewSieveQueue

func NewSieveQueue(fn func(apdu _PDU), address *Address) (*SieveQueue, error)

func (*SieveQueue) ProcessIO

func (s *SieveQueue) ProcessIO(iocb _IOCB) error

func (*SieveQueue) Serialize

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

func (*SieveQueue) SerializeWithWriteBuffer

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

func (*SieveQueue) String

func (d *SieveQueue) String() string

type StateMachineAccessPoint

type StateMachineAccessPoint struct {
	*Client
	*ServiceAccessPoint
	// contains filtered or unexported fields
}

func NewStateMachineAccessPoint

func NewStateMachineAccessPoint(localDevice *LocalDeviceObject, deviceInfoCache *DeviceInfoCache, sapID *int, cid *int) (*StateMachineAccessPoint, error)

func (*StateMachineAccessPoint) Confirmation

func (s *StateMachineAccessPoint) Confirmation(apdu _PDU) error

Confirmation Packets coming up the stack are APDU's

func (*StateMachineAccessPoint) GetApplicationTimeout

func (s *StateMachineAccessPoint) GetApplicationTimeout() uint

func (*StateMachineAccessPoint) GetClientTransactions

func (s *StateMachineAccessPoint) GetClientTransactions() []*ClientSSM

func (*StateMachineAccessPoint) GetDefaultAPDUSegmentTimeout

func (s *StateMachineAccessPoint) GetDefaultAPDUSegmentTimeout() uint

func (*StateMachineAccessPoint) GetDefaultAPDUTimeout

func (s *StateMachineAccessPoint) GetDefaultAPDUTimeout() uint

func (*StateMachineAccessPoint) GetDefaultMaxSegmentsAccepted

func (s *StateMachineAccessPoint) GetDefaultMaxSegmentsAccepted() readWriteModel.MaxSegmentsAccepted

func (*StateMachineAccessPoint) GetDefaultMaximumApduLengthAccepted

func (s *StateMachineAccessPoint) GetDefaultMaximumApduLengthAccepted() readWriteModel.MaxApduLengthAccepted

func (*StateMachineAccessPoint) GetDefaultSegmentationSupported

func (s *StateMachineAccessPoint) GetDefaultSegmentationSupported() readWriteModel.BACnetSegmentation

func (*StateMachineAccessPoint) GetDeviceInfoCache

func (s *StateMachineAccessPoint) GetDeviceInfoCache() *DeviceInfoCache

func (*StateMachineAccessPoint) GetLocalDevice

func (s *StateMachineAccessPoint) GetLocalDevice() *LocalDeviceObject

func (*StateMachineAccessPoint) GetProposedWindowSize

func (s *StateMachineAccessPoint) GetProposedWindowSize() uint8

func (*StateMachineAccessPoint) GetServerTransactions

func (s *StateMachineAccessPoint) GetServerTransactions() []*ServerSSM

func (*StateMachineAccessPoint) RemoveClientTransaction

func (s *StateMachineAccessPoint) RemoveClientTransaction(c *ClientSSM)

func (*StateMachineAccessPoint) RemoveServerTransaction

func (s *StateMachineAccessPoint) RemoveServerTransaction(sssm *ServerSSM)

func (*StateMachineAccessPoint) SapConfirmation

func (s *StateMachineAccessPoint) SapConfirmation(apdu _PDU) error

SapConfirmation This function is called when the application is responding to a request, the apdu may be a simple

ack, complex ack, error, reject or abort

func (*StateMachineAccessPoint) SapIndication

func (s *StateMachineAccessPoint) SapIndication(apdu _PDU) error

SapIndication This function is called when the application is requesting a new transaction as a client.

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 TaskManager

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

type UDPActor

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

func NewUDPActor

func NewUDPActor(director *UDPDirector, peer string) *UDPActor

func (*UDPActor) HandleError

func (a *UDPActor) HandleError(err error)

func (*UDPActor) Indication

func (a *UDPActor) Indication(pdu _PDU) error

func (*UDPActor) Response

func (a *UDPActor) Response(pdu _PDU) error

func (*UDPActor) Serialize

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

func (*UDPActor) SerializeWithWriteBuffer

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

func (*UDPActor) String

func (d *UDPActor) String() string

type UDPDirector

type UDPDirector struct {
	*Server
	*ServiceAccessPoint
	// contains filtered or unexported fields
}

func NewUDPDirector

func NewUDPDirector(address AddressTuple[string, uint16], timeout *int, reuse *bool, sid *int, sapID *int) (*UDPDirector, error)

func (*UDPDirector) ActorError

func (d *UDPDirector) ActorError(err error)

func (*UDPDirector) AddActor

func (d *UDPDirector) AddActor(actor *UDPActor)

AddActor adds an actor when a new one is connected

func (*UDPDirector) Close

func (d *UDPDirector) Close() error

func (*UDPDirector) DelActor

func (d *UDPDirector) DelActor(actor *UDPActor)

DelActor removes an actor when the socket is closed.

func (*UDPDirector) GetActor

func (d *UDPDirector) GetActor(address Address) *UDPActor

func (*UDPDirector) Indication

func (d *UDPDirector) Indication(pdu _PDU) error

Indication Client requests are queued for delivery.

type UDPMultiplexer

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

func NewUDPMultiplexer

func NewUDPMultiplexer(address any, noBroadcast bool) (*UDPMultiplexer, error)

func (*UDPMultiplexer) Close

func (m *UDPMultiplexer) Close() error

func (*UDPMultiplexer) Confirmation

func (m *UDPMultiplexer) Confirmation(client *_MultiplexClient, pdu _PDU) error

func (*UDPMultiplexer) Indication

func (m *UDPMultiplexer) Indication(server *_MultiplexServer, pdu _PDU) error

type ValueHandler

type ValueHandler struct {
	values.DefaultValueHandler
}

func NewValueHandler

func NewValueHandler() ValueHandler

type WhoIsIAmServices

type WhoIsIAmServices struct {
	WhoIsIAmServicesRequirements
	*Capability
	// contains filtered or unexported fields
}

func NewWhoIsIAmServices

func NewWhoIsIAmServices(whoIsIAmServicesRequirements WhoIsIAmServicesRequirements) (*WhoIsIAmServices, error)

func (*WhoIsIAmServices) DoIAmRequest

DoIAmRequest responds to an I-Am request.

func (*WhoIsIAmServices) DoWhoIsRequest

func (w *WhoIsIAmServices) DoWhoIsRequest(apdu _PDU) error

DoWhoIsRequest respond to a Who-Is request.

func (*WhoIsIAmServices) IAm

func (w *WhoIsIAmServices) IAm(address *Address) error

func (*WhoIsIAmServices) Startup

func (w *WhoIsIAmServices) Startup() error

func (*WhoIsIAmServices) WhoIs

func (w *WhoIsIAmServices) WhoIs(lowLimit, highLimit *uint, address *Address) error

type WhoIsIAmServicesRequirements

type WhoIsIAmServicesRequirements interface {
	Request(pdu _PDU) error
}

Jump to

Keyboard shortcuts

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