Documentation ¶
Index ¶
- Variables
- func NewPCI(args Args, kwArgs KWArgs, options ...Option) *_PCI
- func PackIpAddr(addrTuple *AddressTuple[string, uint16]) (octetString []byte)
- func Uint16ToPort(number uint16) []byte
- type Address
- func NewAddress(args Args) (*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)
- func (a *Address) AlternateString() (string, bool)
- func (a *Address) DeepCopy() any
- func (a *Address) Equals(other any) bool
- func (a *Address) Format(s fmt.State, v rune)
- func (d *Address) Serialize() ([]byte, error)
- func (d *Address) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
- func (d *Address) String() string
- type AddressTuple
- type AddressType
- type IPCI
- type PCI
- type PDU
- type PDUData
Constants ¶
This section is empty.
Variables ¶
View Source
var CombinedPattern = regexp.MustCompile(`^(?:(?:([0-9]+)|([*])):)?(?:([*])|` + _field_address.String() + `|` + _ip_address_mask_port.String() + `)` + _at_route.String() + `$`)
Functions ¶
func PackIpAddr ¶
func PackIpAddr(addrTuple *AddressTuple[string, uint16]) (octetString []byte)
PackIpAddr Given an IP address tuple like ('1.2.3.4', 47808) return the six-octet string useful for a BACnet address.
func Uint16ToPort ¶
Types ¶
type Address ¶
type Address struct { AddrType AddressType AddrNet *uint16 AddrAddress []byte AddrLen *uint8 AddrRoute *Address AddrIP *uint32 AddrMask *uint32 AddrHost *uint32 AddrSubnet *uint32 AddrPort *uint16 AddrTuple *AddressTuple[string, uint16] AddrBroadcastTuple *AddressTuple[string, uint16] // contains filtered or unexported fields }
func NewAddress ¶
func NewLocalBroadcast ¶
func NewLocalStation ¶
TODO: convert to struct
func NewRemoteBroadcast ¶
TODO: convert to struct
func NewRemoteStation ¶
TODO: convert to struct
func (*Address) AlternateString ¶
func (*Address) SerializeWithWriteBuffer ¶
type AddressTuple ¶
func NewAddressTuple ¶
func NewAddressTuple[L any, R any](l L, r R) *AddressTuple[L, R]
func UnpackIpAddr ¶
func UnpackIpAddr(addr []byte) (addrTuple *AddressTuple[string, uint16])
UnpackIpAddr Given a six-octet BACnet address, return an IP address tuple.
func (*AddressTuple[L, R]) DeepCopy ¶
func (a *AddressTuple[L, R]) DeepCopy() any
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 IPCI ¶
type IPCI interface { spi.Message GetLeafName() string SetRootMessage(spi.Message) GetRootMessage() spi.Message SetPDUUserData(spi.Message) GetPDUUserData() spi.Message GetPDUSource() *Address SetPDUSource(*Address) GetPDUDestination() *Address SetPDUDestination(*Address) Update(pci Arg) error DeepCopy() any }
type PCI ¶
type PCI interface { IPCI SetExpectingReply(bool) GetExpectingReply() bool SetNetworkPriority(model.NPDUNetworkPriority) GetNetworkPriority() model.NPDUNetworkPriority GetPCI() PCI }
type PDUData ¶
type PDUData interface { Copyable SetPduData([]byte) GetPduData() []byte Get() (byte, error) GetShort() (int16, error) GetLong() (int64, error) GetData(dlen int) ([]byte, error) Put(byte) PutData(...byte) PutShort(uint16) PutLong(uint32) }
func NewPDUData ¶
func NewPDUData(args Args, kwArgs KWArgs, _ ...Option) PDUData
Click to show internal directories.
Click to hide internal directories.