Documentation ¶
Index ¶
- Constants
- type APDU
- type Address
- type BVLC
- type BacFunc
- type Date
- type DayOfWeek
- type Device
- type Enumerated
- type IAm
- type NPDU
- type NPDUPriority
- type Object
- type ObjectID
- type ObjectInstance
- type ObjectMap
- type ObjectType
- type PDUType
- type Property
- type ReadMultipleProperty
- type ReadPropertyData
- type ServiceConfirmed
- type ServiceUnconfirmed
- type Time
Constants ¶
const ( // WhoIsAll is used when scanning a range. Using this as one of the two ranges, // will scan all available devices WhoIsAll = -1 ArrayAll = 0xFFFFFFFF )
const ( AnalogInputStr = "Analog Input" AnalogOutputStr = "Analog Output" AnalogValueStr = "Analog Value" BinaryInputStr = "Binary Input" BinaryOutputStr = "Binary Output" BinaryValueStr = "Binary Value" DeviceTypeStr = "Device" FileStr = "File" NotificationClassStr = "Notification Class" MultiStateValueStr = "Multi-State Value" MultiStateInputStr = "Multi-State Input" TrendLogStr = "Trend Log" CharacterStringStr = "Character String" )
const BVLCTypeBacnetIP = 0x81
BVLCTypeBacnetIP is the only valid type for the BVLC layer as of 2002. Additional types may be added in the future
const DefaultHopCount uint8 = 255
const MaxAPDU = MaxAPDUOverIP
const MaxAPDUOverIP = 1476
const (
MaxInstance = 0x3FFFFF
)
const ProtocolVersion uint8 = 1
const UnspecifiedTime = 0xFF
UnspecifiedTime means that this time is triggered through out a period. An example of this is 02:FF:FF:FF will trigger all through out 2 am
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APDU ¶
type APDU struct { DataType PDUType SegmentedMessage bool MoreFollows bool SegmentedResponseAccepted bool MaxSegs uint MaxApdu uint InvokeId uint8 Sequence uint8 WindowNumber uint8 Service ServiceConfirmed UnconfirmedService ServiceUnconfirmed Error struct { Class uint32 Code uint32 } // This is the raw data passed based on the service RawData []byte }
APDU - Application Protocol Data Unit
func (*APDU) IsConfirmedServiceRequest ¶
IsConfirmedServiceRequest checks to see if the APDU is in the list of known services
type Address ¶
func UDPToAddress ¶
Address converts a given udp address into a bacnet address
func (*Address) IsBroadcast ¶
IsBroadcast returns if the address is a broadcast address
func (*Address) IsSubBroadcast ¶
IsSubBroadcast checks to see if packet is meant to be a network specific broadcast
func (*Address) SetBroadcast ¶
type BacFunc ¶
type BacFunc byte
Bacnet Fuction
const ( BacFuncResult BacFunc = 0 BacFuncWriteBroadcastDistributionTable BacFunc = 1 BacFuncBroadcastDistributionTable BacFunc = 2 BacFuncBroadcastDistributionTableAck BacFunc = 3 BacFuncForwardedNPDU BacFunc = 4 BacFuncUnicast BacFunc = 10 BacFuncBroadcast BacFunc = 11 )
List of possible BACnet functions
type Device ¶
type Device struct { ID ObjectID MaxApdu uint32 Segmentation Enumerated Vendor uint32 Addr Address Objects ObjectMap }
func (Device) ObjectSlice ¶
ObjectSlice returns all the objects in the device as a slice (not thread-safe)
type Enumerated ¶
type Enumerated uint32
type IAm ¶
type IAm struct { ID ObjectID MaxApdu uint32 Segmentation Enumerated Vendor uint32 Addr Address }
type NPDUPriority ¶
type NPDUPriority byte
const ( LifeSafety NPDUPriority = 3 CriticalEquipment NPDUPriority = 2 Urgent NPDUPriority = 1 Normal NPDUPriority = 0 )
type ObjectID ¶
type ObjectID struct { Type ObjectType Instance ObjectInstance }
type ObjectInstance ¶
type ObjectInstance uint32
type ObjectMap ¶
type ObjectMap map[ObjectType]map[ObjectInstance]Object
func (ObjectMap) MarshalJSON ¶
func (ObjectMap) UnmarshalJSON ¶
type ObjectType ¶
type ObjectType uint16
const ( AnalogInput ObjectType = 0 AnalogOutput ObjectType = 1 AnalogValue ObjectType = 2 BinaryInput ObjectType = 3 BinaryOutput ObjectType = 4 BinaryValue ObjectType = 5 DeviceType ObjectType = 8 File ObjectType = 10 MultiStateInput ObjectType = 13 NotificationClass ObjectType = 15 MultiStateValue ObjectType = 19 TrendLog ObjectType = 20 CharacterString ObjectType = 40 )
func GetType ¶
func GetType(s string) ObjectType
func (ObjectType) String ¶
func (t ObjectType) String() string
type ReadMultipleProperty ¶
func (ReadMultipleProperty) String ¶
func (rp ReadMultipleProperty) String() string
String returns a pretty print of the read multiple property structure
type ReadPropertyData ¶
type ServiceConfirmed ¶
type ServiceConfirmed uint8
const ( /* Alarm and Event Services */ ServiceConfirmedAcknowledgeAlarm ServiceConfirmed = 0 ServiceConfirmedCOVNotification ServiceConfirmed = 1 ServiceConfirmedEventNotification ServiceConfirmed = 2 ServiceConfirmedGetAlarmSummary ServiceConfirmed = 3 ServiceConfirmedGetEnrollmentSummary ServiceConfirmed = 4 ServiceConfirmedGetEventInformation ServiceConfirmed = 29 ServiceConfirmedSubscribeCOV ServiceConfirmed = 5 ServiceConfirmedSubscribeCOVProperty ServiceConfirmed = 28 ServiceConfirmedLifeSafetyOperation ServiceConfirmed = 27 /* File Access Services */ ServiceConfirmedAtomicReadFile ServiceConfirmed = 6 ServiceConfirmedAtomicWriteFile ServiceConfirmed = 7 /* Object Access Services */ ServiceConfirmedAddListElement ServiceConfirmed = 8 ServiceConfirmedRemoveListElement ServiceConfirmed = 9 ServiceConfirmedCreateObject ServiceConfirmed = 10 ServiceConfirmedDeleteObject ServiceConfirmed = 11 ServiceConfirmedReadProperty ServiceConfirmed = 12 ServiceConfirmedReadPropConditional ServiceConfirmed = 13 ServiceConfirmedReadPropMultiple ServiceConfirmed = 14 ServiceConfirmedReadRange ServiceConfirmed = 26 ServiceConfirmedWriteProperty ServiceConfirmed = 15 ServiceConfirmedWritePropMultiple ServiceConfirmed = 16 /* Remote Device Management Services */ ServiceConfirmedDeviceCommunicationControl ServiceConfirmed = 17 ServiceConfirmedPrivateTransfer ServiceConfirmed = 18 ServiceConfirmedTextMessage ServiceConfirmed = 19 ServiceConfirmedReinitializeDevice ServiceConfirmed = 20 /* Virtual Terminal Services */ ServiceConfirmedVTOpen ServiceConfirmed = 21 ServiceConfirmedVTClose ServiceConfirmed = 22 ServiceConfirmedVTData ServiceConfirmed = 23 /* Security Services */ ServiceConfirmedAuthenticate ServiceConfirmed = 24 ServiceConfirmedRequestKey ServiceConfirmed = 25 )
func (*ServiceConfirmed) String ¶
func (s *ServiceConfirmed) String() string
type ServiceUnconfirmed ¶
type ServiceUnconfirmed uint8
const ( ServiceUnconfirmedIAm ServiceUnconfirmed = 0 ServiceUnconfirmedIHave ServiceUnconfirmed = 1 ServiceUnconfirmedCOVNotification ServiceUnconfirmed = 2 ServiceUnconfirmedEventNotification ServiceUnconfirmed = 3 ServiceUnconfirmedPrivateTransfer ServiceUnconfirmed = 4 ServiceUnconfirmedTextMessage ServiceUnconfirmed = 5 ServiceUnconfirmedTimeSync ServiceUnconfirmed = 6 ServiceUnconfirmedWhoHas ServiceUnconfirmed = 7 ServiceUnconfirmedWhoIs ServiceUnconfirmed = 8 ServiceUnconfirmedUTCTimeSync ServiceUnconfirmed = 9 ServiceUnconfirmedWriteGroup ServiceUnconfirmed = 10 /* Other services to be added as they are defined. */ /* All choice values in this production are reserved */ /* for definition by ASHRAE. */ /* Proprietary extensions are made by using the */ /* UnconfirmedPrivateTransfer service. See Clause 23. */ MaxServiceUnconfirmed ServiceUnconfirmed = 11 )