Documentation ¶
Index ¶
- Constants
- func Deferred(fn func() error)
- func NewDriver(_options ...options.WithOption) plc4go.PlcDriver
- func ObjectIdentifierStringToTuple(objectIdentifier string) (objectType uint16, instance uint32)
- type Address
- func NewAddress(args ...any) (*Address, error)
- func NewGlobalBroadcast(route *Address) *Address
- func NewLocalBroadcast(route *Address) *Address
- func NewLocalStation(addr any, route *Address) (*Address, error)
- func NewRemoteBroadcast(net *uint16, route *Address) *Address
- func NewRemoteStation(net *uint16, addr any, route *Address) (*Address, error)
- type AddressTuple
- type AddressType
- type AnnexJCodec
- type Application
- func (a *Application) AddObject(obj *LocalDeviceObject) error
- func (a *Application) DeleteObject(obj *LocalDeviceObject) error
- func (a *Application) GetObjectId(objectId string) *LocalDeviceObject
- func (a *Application) GetObjectName(objectName string) *LocalDeviceObject
- func (a *Application) GetServicesSupported() []string
- func (a *Application) Indication(apdu _PDU) error
- func (a *Application) IterObjects() []*LocalDeviceObject
- func (a *Application) Request(apdu _PDU) error
- type ApplicationIOController
- type ApplicationLayerMessageCodec
- func (m *ApplicationLayerMessageCodec) Connect() error
- func (m *ApplicationLayerMessageCodec) ConnectWithContext(ctx context.Context) error
- func (m *ApplicationLayerMessageCodec) Disconnect() error
- func (m *ApplicationLayerMessageCodec) Expect(ctx context.Context, acceptsMessage spi.AcceptsMessage, ...) error
- func (m *ApplicationLayerMessageCodec) GetCodec() spi.MessageCodec
- func (m *ApplicationLayerMessageCodec) GetDefaultIncomingMessageChannel() chan spi.Message
- func (m *ApplicationLayerMessageCodec) IsRunning() bool
- func (m *ApplicationLayerMessageCodec) Send(message spi.Message) error
- func (m *ApplicationLayerMessageCodec) SendRequest(ctx context.Context, message spi.Message, acceptsMessage spi.AcceptsMessage, ...) error
- func (d *ApplicationLayerMessageCodec) Serialize() ([]byte, error)
- func (d *ApplicationLayerMessageCodec) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
- func (d *ApplicationLayerMessageCodec) String() string
- type ApplicationManager
- type ApplicationServiceAccessPoint
- type ApplicationServiceElement
- type BIPForeign
- type BIPForeignApplication
- type BIPNetworkApplication
- type BIPSAP
- type BIPSimple
- type BIPSimpleApplication
- type BacNetPlcTag
- type Capability
- type Client
- type ClientSSM
- func (c *ClientSSM) Confirmation(apdu _PDU) error
- func (c *ClientSSM) Indication(apdu _PDU) error
- func (t ClientSSM) InstallTask(when *time.Time, delta *time.Duration)
- func (c *ClientSSM) Request(apdu _PDU) error
- func (c *ClientSSM) Response(apdu _PDU) error
- func (t ClientSSM) Resume()
- func (t ClientSSM) String() string
- func (t ClientSSM) SuspendTask()
- type Collector
- type Connection
- 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) GetTracer() tracer.Tracer
- func (c *Connection) IsTraceEnabled() bool
- func (c *Connection) ReadRequestBuilder() apiModel.PlcReadRequestBuilder
- func (c *Connection) String() string
- func (c *Connection) SubscriptionRequestBuilder() apiModel.PlcSubscriptionRequestBuilder
- type DeviceInfo
- type DeviceInfoCache
- func (d *DeviceInfoCache) Acquire(key DeviceInfoCacheKey) (DeviceInfo, bool)
- func (d *DeviceInfoCache) GetDeviceInfo(key DeviceInfoCacheKey) (DeviceInfo, bool)
- func (d *DeviceInfoCache) HasDeviceInfo(key DeviceInfoCacheKey) bool
- func (d *DeviceInfoCache) IAmDeviceInfo(iAm readWriteModel.BACnetUnconfirmedServiceRequestIAm, pduSource Address)
- func (d *DeviceInfoCache) Release(deviceInfo DeviceInfo) error
- func (d *DeviceInfoCache) String() string
- func (d *DeviceInfoCache) UpdateDeviceInfo(deviceInfo DeviceInfo)
- type DeviceInfoCacheKey
- type Discoverer
- type Driver
- func (m *Driver) Close() error
- func (m *Driver) DiscoverWithContext(ctx context.Context, callback func(event apiModel.PlcDiscoveryItem), ...) error
- func (m *Driver) GetConnectionWithContext(ctx context.Context, transportUrl url.URL, ...) <-chan plc4go.PlcConnectionConnectResult
- func (m *Driver) SupportsDiscovery() bool
- type IOCB
- func (i *IOCB) Abort(err error) error
- func (i *IOCB) AddCallback(fn func())
- func (i *IOCB) Complete(apdu _PDU) error
- func (d *IOCB) Serialize() ([]byte, error)
- func (d *IOCB) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
- func (i *IOCB) SetTimeout(delay time.Duration)
- func (d *IOCB) String() string
- func (i *IOCB) Trigger()
- func (i *IOCB) Wait()
- type IOCBState
- type IOController
- func (i *IOController) Abort(err error) error
- func (i *IOController) AbortIO(iocb _IOCB, err error) error
- func (i *IOController) ActiveIO(iocb _IOCB) error
- func (i *IOController) CompleteIO(iocb _IOCB, apdu _PDU) error
- func (i *IOController) ProcessIO(_IOCB) error
- func (i *IOController) RequestIO(iocb _IOCB) error
- func (d *IOController) Serialize() ([]byte, error)
- func (d *IOController) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
- func (d *IOController) String() string
- type IOQController
- func (i *IOQController) Abort(err error) error
- func (i *IOQController) AbortIO(iocb _IOCB, err error) error
- func (i *IOQController) ActiveIO(iocb _IOCB) error
- func (i *IOQController) CompleteIO(iocb _IOCB, msg _PDU) error
- func (i *IOQController) ProcessIO(_IOCB) error
- func (i *IOQController) RequestIO(iocb _IOCB) error
- func (d *IOQController) Serialize() ([]byte, error)
- func (d *IOQController) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
- func (d *IOQController) String() string
- type IOQControllerStates
- type IOQueue
- func (i *IOQueue) Abort(err error)
- func (i *IOQueue) Get(block bool, delay *time.Duration) (_IOCB, error)
- func (i *IOQueue) Put(iocb _IOCB) error
- func (i *IOQueue) Remove(iocb _IOCB) error
- func (d *IOQueue) Serialize() ([]byte, error)
- func (d *IOQueue) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
- func (d *IOQueue) String() string
- type InvokeIdGenerator
- type LocalDeviceObject
- 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 NetworkAdapter
- type NetworkServiceAccessPoint
- func (n *NetworkServiceAccessPoint) DeleteRouterReference(snet *uint16, address, dnets any) error
- func (n *NetworkServiceAccessPoint) Indication(pdu _PDU) error
- func (n *NetworkServiceAccessPoint) ProcessNPDU(adapter *NetworkAdapter, pdu _PDU) error
- func (n *NetworkServiceAccessPoint) SapConfirmation(npdu _PDU) error
- func (n *NetworkServiceAccessPoint) SapConfirmationWithAdapter(adapter *NetworkAdapter, npdu _PDU) error
- func (n *NetworkServiceAccessPoint) SapIndication(npdu _PDU) error
- func (n *NetworkServiceAccessPoint) SapIndicationWithAdapter(adapter *NetworkAdapter, npdu _PDU) error
- func (n *NetworkServiceAccessPoint) UpdateRouterReference(snet *uint16, address, dnets any) error
- type NetworkServiceElement
- type OneShotDeleteTask
- type OneShotFunctionTask
- type OneShotTask
- type OneShotTaskRequirements
- type PCI
- type PDU
- func NewPDU(msg spi.Message, pduOptions ...PDUOption) *PDU
- func NewPDUFromPDU(pdu _PDU, pduOptions ...PDUOption) *PDU
- func NewPDUFromPDUWithNewMessage(pdu _PDU, msg spi.Message, pduOptions ...PDUOption) *PDU
- func NewPDUWithAllOptions(msg spi.Message, pduSource *Address, pduDestination *Address, ...) *PDU
- func (p *PDU) GetExpectingReply() bool
- func (p *PDU) GetMessage() spi.Message
- func (p *PDU) GetNetworkPriority() readWriteModel.NPDUNetworkPriority
- func (p *PDU) GetPDUDestination() *Address
- func (p *PDU) GetPDUSource() *Address
- func (p *PDU) SetPDUDestination(destination *Address)
- func (p *PDU) String() string
- type PDUOption
- type PriorityItem
- type PriorityQueue
- type ReadWritePropertyServices
- type Reader
- type RecurringTask
- type RecurringTaskRequirements
- type RouterInfo
- type RouterInfoCache
- func (n *RouterInfoCache) DeleteRouterInfo(*uint16, any, any) error
- func (n *RouterInfoCache) GetRouterInfo(*uint16, *uint16) *RouterInfo
- func (n *RouterInfoCache) UpdateRouterInfo(*uint16, any, any) error
- func (n *RouterInfoCache) UpdateRouterStatus(*uint16, *Address, []*uint16)
- func (n *RouterInfoCache) UpdateSourceNetwork()
- type RouterStatus
- type SSM
- type SSMProcessingRequirements
- type SSMSAPRequirements
- type SSMState
- type Server
- type ServerSSM
- func (s *ServerSSM) Confirmation(apdu _PDU) error
- func (s *ServerSSM) Indication(apdu _PDU) error
- func (t ServerSSM) InstallTask(when *time.Time, delta *time.Duration)
- func (s *ServerSSM) Request(apdu _PDU) error
- func (s *ServerSSM) Response(apdu _PDU) error
- func (t ServerSSM) Resume()
- func (t ServerSSM) String() string
- func (t ServerSSM) SuspendTask()
- type ServiceAccessPoint
- type Settings
- type SieveQueue
- type StateMachineAccessPoint
- func (s *StateMachineAccessPoint) Confirmation(apdu _PDU) error
- func (s *StateMachineAccessPoint) GetApplicationTimeout() uint
- func (s *StateMachineAccessPoint) GetClientTransactions() []*ClientSSM
- func (s *StateMachineAccessPoint) GetDefaultAPDUSegmentTimeout() uint
- func (s *StateMachineAccessPoint) GetDefaultAPDUTimeout() uint
- func (s *StateMachineAccessPoint) GetDefaultMaxSegmentsAccepted() readWriteModel.MaxSegmentsAccepted
- func (s *StateMachineAccessPoint) GetDefaultMaximumApduLengthAccepted() readWriteModel.MaxApduLengthAccepted
- func (s *StateMachineAccessPoint) GetDefaultSegmentationSupported() readWriteModel.BACnetSegmentation
- func (s *StateMachineAccessPoint) GetDeviceInfoCache() *DeviceInfoCache
- func (s *StateMachineAccessPoint) GetLocalDevice() *LocalDeviceObject
- func (s *StateMachineAccessPoint) GetProposedWindowSize() uint8
- func (s *StateMachineAccessPoint) GetServerTransactions() []*ServerSSM
- func (s *StateMachineAccessPoint) RemoveClientTransaction(c *ClientSSM)
- func (s *StateMachineAccessPoint) RemoveServerTransaction(sssm *ServerSSM)
- func (s *StateMachineAccessPoint) SapConfirmation(apdu _PDU) error
- func (s *StateMachineAccessPoint) SapIndication(apdu _PDU) error
- type Subscriber
- func (m *Subscriber) Register(consumer apiModel.PlcSubscriptionEventConsumer, ...) apiModel.PlcConsumerRegistration
- func (d *Subscriber) Serialize() ([]byte, error)
- func (d *Subscriber) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
- func (d *Subscriber) String() string
- func (m *Subscriber) Subscribe(ctx context.Context, subscriptionRequest apiModel.PlcSubscriptionRequest) <-chan apiModel.PlcSubscriptionRequestResult
- func (m *Subscriber) Unregister(registration apiModel.PlcConsumerRegistration)
- func (m *Subscriber) Unsubscribe(ctx context.Context, unsubscriptionRequest apiModel.PlcUnsubscriptionRequest) <-chan apiModel.PlcUnsubscriptionRequestResult
- type TagHandler
- type TaskManager
- type UDPActor
- func (a *UDPActor) HandleError(err error)
- func (a *UDPActor) Indication(pdu _PDU) error
- func (a *UDPActor) Response(pdu _PDU) error
- func (d *UDPActor) Serialize() ([]byte, error)
- func (d *UDPActor) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
- func (d *UDPActor) String() string
- type UDPDirector
- type UDPMultiplexer
- type ValueHandler
- type WhoIsIAmServices
- func (w *WhoIsIAmServices) DoIAmRequest(iam *model.BACnetUnconfirmedServiceRequestIAm) error
- func (w *WhoIsIAmServices) DoWhoIsRequest(apdu _PDU) error
- func (w *WhoIsIAmServices) IAm(address *Address) error
- func (w *WhoIsIAmServices) Startup() error
- func (w *WhoIsIAmServices) WhoIs(lowLimit, highLimit *uint, address *Address) error
- type WhoIsIAmServicesRequirements
Constants ¶
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
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 NewGlobalBroadcast ¶
func NewLocalBroadcast ¶
func NewRemoteBroadcast ¶
func NewRemoteStation ¶
type AddressTuple ¶
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 ¶
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 (*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 (m *ApplicationLayerMessageCodec) GetCodec() spi.MessageCodec
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 ¶
func (d *ApplicationLayerMessageCodec) String() string
type ApplicationManager ¶
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 (*BIPForeign) Confirmation ¶
func (b *BIPForeign) Confirmation(pdu _PDU) error
func (*BIPForeign) Indication ¶
func (b *BIPForeign) Indication(pdu _PDU) error
func (BIPForeign) InstallTask ¶
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 }
type BIPSAP ¶
type BIPSAP struct { *ServiceAccessPoint // contains filtered or unexported fields }
func (*BIPSAP) SapConfirmation ¶
func (*BIPSAP) SapIndication ¶
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 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 (*Client) Confirmation ¶
type ClientSSM ¶
type ClientSSM struct { *SSM // contains filtered or unexported fields }
func NewClientSSM ¶
func NewClientSSM(sap SSMSAPRequirements, pduAddress *Address) (*ClientSSM, error)
func (*ClientSSM) Confirmation ¶
Confirmation This function is called by the device for all upstream messages related to the transaction.
func (*ClientSSM) Indication ¶
Indication This function is called after the device has bound a new transaction and wants to start the process
rolling
func (ClientSSM) InstallTask ¶
func (*ClientSSM) Request ¶
Request This function is called by client transaction functions when it wants to send a message to the device
func (*ClientSSM) Response ¶
Response This function is called by client transaction functions when they want to send a message to the application.
func (ClientSSM) SuspendTask ¶
func (t ClientSSM) SuspendTask()
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 ¶
func (d *DeviceInfoCache) Acquire(key DeviceInfoCacheKey) (DeviceInfo, bool)
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 ¶
func (d *DeviceInfoCache) IAmDeviceInfo(iAm readWriteModel.BACnetUnconfirmedServiceRequestIAm, pduSource Address)
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 ¶
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) DiscoverWithContext ¶
func (m *Driver) DiscoverWithContext(ctx context.Context, callback func(event apiModel.PlcDiscoveryItem), discoveryOptions ...options.WithDiscoveryOption) error
func (*Driver) GetConnectionWithContext ¶
func (*Driver) SupportsDiscovery ¶
type IOCB ¶
type IOCB struct {
// contains filtered or unexported fields
}
func (*IOCB) AddCallback ¶
func (i *IOCB) AddCallback(fn func())
AddCallback Pass a function to be called when IO is complete.
func (*IOCB) Complete ¶
Complete Called to complete a transaction, usually when ProcessIO has shipped the IOCB off to some other thread or
function.
func (*IOCB) SerializeWithWriteBuffer ¶
func (*IOCB) SetTimeout ¶
SetTimeout Called to set a transaction timer.
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 (*IOQueue) Put ¶
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 ¶
Remove a control block from the queue, called if the request
is canceled/aborted
func (*IOQueue) SerializeWithWriteBuffer ¶
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) 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 (*OneShotDeleteTask) IsOneShotDeleteTask ¶
func (r *OneShotDeleteTask) IsOneShotDeleteTask() bool
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 (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 (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
type PDU ¶
type PDU struct {
*PCI
}
func NewPDUFromPDU ¶
func NewPDUWithAllOptions ¶
func NewPDUWithAllOptions(msg spi.Message, pduSource *Address, pduDestination *Address, expectingReply bool, networkPriority readWriteModel.NPDUNetworkPriority) *PDU
func (*PDU) GetExpectingReply ¶
func (*PDU) GetMessage ¶
func (*PDU) GetNetworkPriority ¶
func (p *PDU) GetNetworkPriority() readWriteModel.NPDUNetworkPriority
func (*PDU) GetPDUDestination ¶
func (*PDU) GetPDUSource ¶
func (*PDU) SetPDUDestination ¶
type PDUOption ¶
type PDUOption func(pdu *PDU)
func WithPDUDestination ¶
func WithPDUExpectingReply ¶
func WithPDUNetworkPriority ¶
func WithPDUNetworkPriority(networkPriority readWriteModel.NPDUNetworkPriority) PDUOption
func WithPDUSource ¶
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 (*RecurringTask) IsRecurringTask ¶
func (r *RecurringTask) IsRecurringTask() bool
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) RestartTimer ¶
func (*SSM) StartTimer ¶
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 Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an "abstract" struct which is used in another struct as delegate
func (*Server) Indication ¶
type ServerSSM ¶
type ServerSSM struct { *SSM // contains filtered or unexported fields }
func NewServerSSM ¶
func NewServerSSM(sap SSMSAPRequirements, pduAddress *Address) (*ServerSSM, error)
func (*ServerSSM) Confirmation ¶
Confirmation This function is called when the application has provided a response and needs it to be sent to the
client.
func (*ServerSSM) Indication ¶
Indication This function is called for each downstream packet related to
the transaction
func (ServerSSM) InstallTask ¶
func (*ServerSSM) Request ¶
Request This function is called by transaction functions to send to the application
func (*ServerSSM) Response ¶
Response This function is called by client transaction functions when they want to send a message to the application.
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 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) Register ¶
func (m *Subscriber) Register(consumer apiModel.PlcSubscriptionEventConsumer, handles []apiModel.PlcSubscriptionHandle) apiModel.PlcConsumerRegistration
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)
type TaskManager ¶
type UDPActor ¶
type UDPActor struct {
// contains filtered or unexported fields
}
func NewUDPActor ¶
func NewUDPActor(director *UDPDirector, peer string) *UDPActor
func (*UDPActor) HandleError ¶
func (*UDPActor) Indication ¶
func (*UDPActor) SerializeWithWriteBuffer ¶
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 ¶
func (w *WhoIsIAmServices) DoIAmRequest(iam *model.BACnetUnconfirmedServiceRequestIAm) error
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
type WhoIsIAmServicesRequirements ¶
type WhoIsIAmServicesRequirements interface {
Request(pdu _PDU) error
}
Source Files ¶
- ApplicationLayer.go
- ApplicationLayerMessageCodec_plc4xgen.go
- ApplicationModule.go
- BACnetVirtualLinkLayerService.go
- Capability.go
- CommunicationsModule.go
- Connection.go
- Core.go
- Device.go
- DeviceInfo_plc4xgen.go
- Discoverer.go
- Driver.go
- IOCBModule.go
- IOCB_plc4xgen.go
- IOController_plc4xgen.go
- IOQController_plc4xgen.go
- IOQueue_plc4xgen.go
- LocalDevice.go
- MessageCodec.go
- MessageCodec_plc4xgen.go
- NetworkService.go
- Object.go
- PDU.go
- Reader.go
- Settings.go
- SieveQueue_plc4xgen.go
- Subscriber.go
- Subscriber_plc4xgen.go
- Tag.go
- TagHandler.go
- Task.go
- UDPActor_plc4xgen.go
- UDPCommunicationsModule.go
- ValueHandler.go