Documentation ¶
Index ¶
- Constants
- func ReadVLC(c net.Conn) (vlc *VLC, npdu *NPDU, apdu *APDU, leftovers []byte, err error, isBACNet bool)
- func SendVLC(c net.Conn, payload []byte) error
- type APDU
- type Frame
- type Log
- func (log *Log) QueryApplicationSoftwareRevision(c net.Conn) (err error)
- func (log *Log) QueryDescription(c net.Conn) (err error)
- func (log *Log) QueryDeviceID(c net.Conn) (err error)
- func (log *Log) QueryFirmwareRevision(c net.Conn) (err error)
- func (log *Log) QueryLocation(c net.Conn) (err error)
- func (log *Log) QueryModelName(c net.Conn) (err error)
- func (log *Log) QueryObjectName(c net.Conn) (err error)
- func (log *Log) QueryVendorName(c net.Conn) (err error)
- func (log *Log) QueryVendorNumber(c net.Conn) (err error)
- type NPDU
- type ObjectID
- type PropertyID
- type ReadProperty
- type ReadPropertyRequest
- type SegmentParameters
- type VLC
Constants ¶
View Source
const ( VLC_TYPE_IP byte = 0x81 VLC_FUNCTION_UNICAST_NPDU byte = 0x0a )
VLC Header constants
View Source
const ( NPDU_VERSION_ASHRAE_135_1995 byte = 0x01 NPDU_FLAG_EXPECTING_RESPONSE byte = 0x04 )
NPDU header constant
View Source
const (
MAX_BACNET_FRAME_LEN = 1476
)
View Source
const (
SERVER_CHOICE_READ_PROPERTY byte = 0x0c
)
APDU Server Choice constants
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APDU ¶
type APDU struct { TypeAndFlags byte `json:"type_and_flags"` SegmentSizes SegmentParameters `json:"segment_sizes"` InvokeID byte `json:"invoke_id"` ServerChoice byte `json:"server_choice"` }
type Log ¶
type Log struct { IsBACNet bool `json:"is_bacnet"` InstanceNumber uint32 `json:"instance_number"` VendorID uint16 `json:"vendor_id"` VendorName string `json:"vendor_name,omitempty"` FirmwareRevision string `json:"firmware_revision,omitempty"` ApplicationSoftwareRevision string `json:"application_software_revision,omitempty"` ObjectName string `json:"object_name,omitempty"` ModelName string `json:"model_name,omitempty"` Description string `json:"description,omitempty"` Location string `json:"location,omitempty"` }
func (*Log) QueryApplicationSoftwareRevision ¶
type PropertyID ¶
type PropertyID byte
const ( PID_OID PropertyID = 75 PID_VENDOR_NUMBER PropertyID = 0x78 PID_VENDOR_NAME PropertyID = 0x79 PID_FIRMWARE_REVISION PropertyID = 0x2c PID_APPLICATION_SOFTWARE_REVISION PropertyID = 0x0c PID_OBJECT_NAME PropertyID = 0x4d PID_MODEL_NAME PropertyID = 0x46 PID_DESCRIPTION PropertyID = 0x1c PID_LOCATION PropertyID = 0x3a )
type ReadProperty ¶
type ReadProperty struct { Object ObjectID `json:"object"` Property PropertyID `json:"property"` }
func (*ReadProperty) Marshal ¶
func (rp *ReadProperty) Marshal() ([]byte, error)
type ReadPropertyRequest ¶
type ReadPropertyRequest struct { NPDU NPDU `json:"npdu"` APDU APDU `json:"apdu"` Selection ReadProperty `json:"read_property"` }
func NewReadPropertyRequest ¶
func NewReadPropertyRequest(oid ObjectID, pid PropertyID) *ReadPropertyRequest
func (*ReadPropertyRequest) Marshal ¶
func (rp *ReadPropertyRequest) Marshal() (out []byte, err error)
type SegmentParameters ¶
type SegmentParameters struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.