Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventAdd = EventType(0) EventRemove = EventType(1) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BroadcastMessage ¶
type BroadcastMessage struct {
// contains filtered or unexported fields
}
BroadcastMessage represents a broadcast message sent by a Robomaster S1. Currently it only handles pairing messages (although, so far, no other types of broadcast messages have been observed).
func ParseBroadcastMessageData ¶
func ParseBroadcastMessageData(data []byte) (*BroadcastMessage, error)
ParseBroadcastMessageData parses the given data as a BroadcastMessage. It return the associated BroadcastMessage instance pointer and a nil error on success and a nil and a non-nil error on failure.
func (*BroadcastMessage) AppId ¶
func (b *BroadcastMessage) AppId() uint64
func (*BroadcastMessage) IsPairing ¶
func (b *BroadcastMessage) IsPairing() bool
func (*BroadcastMessage) SourceIp ¶
func (b *BroadcastMessage) SourceIp() net.IP
func (*BroadcastMessage) SourceMac ¶
func (b *BroadcastMessage) SourceMac() net.HardwareAddr
func (*BroadcastMessage) String ¶
func (b *BroadcastMessage) String() string
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) HardwareAddr ¶
func (p *Event) HardwareAddr() net.HardwareAddr
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewListener ¶
Click to show internal directories.
Click to hide internal directories.