Documentation ¶
Index ¶
Constants ¶
This section is empty.
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 robot.
func ParseBroadcastMessageData ¶
func ParseBroadcastMessageData(data []byte) (*BroadcastMessage, error)
ParseBroadcastMessageData parses the given data as a BroadcastMessage. It returns the associated BroadcastMessage instance pointer and a nil error on success and a nil BroadcastMessage 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 Finder ¶
type Finder struct {
// contains filtered or unexported fields
}
Finder provides an interface for finding a robot broadcasting its ip in the network.
func (*Finder) GetOrFindIP ¶
GetOrFindIP returns the ip of a robot if it is already know or tries to detect a robot broadcasting its ip in the network. The search will go on until a robot is detected or a timeout happens. Returns the robot ip and a nil error on success and a non-nil error on failure.