packet

package
v0.0.0-...-ad088db Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VECTOR_ROOT_E131_DATA     = 0x0004
	VECTOR_ROOT_E131_EXTENDED = 0x0008

	VECTOR_E131_DATA_PACKET              = 0x0002
	VECTOR_E131_EXTENDED_SYNCHRONIZATION = 0x0001
	VECTOR_E131_EXTENDED_DISCOVERY       = 0x0002

	VECTOR_DMP_SET_PROPERTY                 = 0x02
	VECTOR_UNIVERSE_DISCOVERY_UNIVERSE_LIST = 0x0001
)

From ANSI E1.31—2018 Appendix A.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataPacket

type DataPacket struct {
	// Inherit RootLayer
	RootLayer

	// Framing layer
	FrameLength uint16
	FrameVector uint32
	SourceName  [64]byte
	Priority    uint8
	SyncAddress uint16
	Sequence    uint8
	Options     uint8
	Universe    uint16

	// DMP Layer
	DMPLength        uint16
	DMPVector        uint8
	Format           uint8
	PropertyAddress  uint16
	AddressIncrement uint16
	Length           uint16
	Data             [513]byte
}

func NewDataPacket

func NewDataPacket() *DataPacket

func (*DataPacket) GetType

func (d *DataPacket) GetType() SACNPacketType

func (*DataPacket) UnmarshalBinary

func (d *DataPacket) UnmarshalBinary(b []byte) error

type DiscoveryPacket

type DiscoveryPacket struct {
	// Inherit RootLayer
	RootLayer

	// Framing layer
	FrameLength uint16
	FrameVector uint32
	SourceName  [64]byte

	// Universe Discovery Layer
	UDLLength uint16
	UDLVector uint32
	Page      uint8
	Last      uint8
	Universes [512]uint16
	// contains filtered or unexported fields
}

func NewDiscoveryPacket

func NewDiscoveryPacket() *DiscoveryPacket

func (*DiscoveryPacket) GetNumUniverses

func (d *DiscoveryPacket) GetNumUniverses() int

func (*DiscoveryPacket) GetType

func (d *DiscoveryPacket) GetType() SACNPacketType

func (*DiscoveryPacket) UnmarshalBinary

func (d *DiscoveryPacket) UnmarshalBinary(b []byte) error

type RootLayer

type RootLayer struct {
	PreambleSize        uint16
	PostambleSize       uint16
	ACNPacketIdentifier [12]byte
	RootLength          uint16
	RootVector          uint32
	CID                 [16]byte
}

type SACNPacket

type SACNPacket interface {
	// encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler

	GetType() SACNPacketType
	// contains filtered or unexported methods
}

func Unmarshal

func Unmarshal(b []byte) (p SACNPacket, err error)

type SACNPacketType

type SACNPacketType int
const (
	PacketTypeData SACNPacketType = iota
	PacketTypeSync
	PacketTypeDiscovery
)

type SyncPacket

type SyncPacket struct {
	// Inherit RootLayer
	RootLayer

	// Framing layer
	FrameLength uint16
	FrameVector uint32
	Sequence    uint8
	SyncAddress uint16
	// contains filtered or unexported fields
}

func NewSyncPacket

func NewSyncPacket() *SyncPacket

func (*SyncPacket) GetType

func (d *SyncPacket) GetType() SACNPacketType

func (*SyncPacket) UnmarshalBinary

func (d *SyncPacket) UnmarshalBinary(b []byte) error

Jump to

Keyboard shortcuts

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