Documentation ¶
Index ¶
Constants ¶
const ( EventTypeSetValue = EventType(0) EventTypeGetValue = EventType(1) EventTypeGetAvailableValue = EventType(2) EventTypePerformAction = EventType(3) EventTypeStartListening = EventType(4) EventTypeStopListening = EventType(5) EventTypeActivation = EventType(6) EventTypeLocalAlbum = EventType(7) EventTypeFirmwareUpgrade = EventType(8) EventTypeConnection = EventType(100) EventTypeSecurity = EventType(101) EventTypePrintLog = EventType(200) EventTypeStartVideo = EventType(300) EventTypeStopVideo = EventType(301) EventTypeRender = EventType(302) EventTypeGetNativeTexture = EventType(303) EventTypeVideoTransferSpeed = EventType(304) EventTypeAudioDataRecv = EventType(305) EventTypeVideoDataRecv = EventType(306) EventTypeNativeFunctions = EventType(500) )
Variables ¶
This section is empty.
Functions ¶
func EventTypeName ¶
EventTypeName returns the name associated with the given EventType. If it is not known, returns an empty string.
func IsValidEventType ¶
IsValidEventType checks if the given EventType is valid. It returns true if it is and false oherwise.
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event represents a Unity Event used for communication with the Robomaster S1.
func NewEvent ¶
NewEvent creates a new Event with the given type and 0 as subtype. Returns a pointer to the created Event on success or nil on failure (usually if the specific event type is unknown).
func NewEventFromCode ¶
NewEventFromCode creates a new Event by parsing the given code. Returns a pointer to the created Event on success or nil on failure (usually if the parsed event type is unknown).
func NewEventWithSubType ¶
NewEventWithSubType creates a new Event with the given type and subtype. Returns a pointer to the created Event on success or nil on failure (usually if the specific event type is unknown).
func (*Event) ResetSubType ¶
/ ResetSubType resets this event to have the given subtype.
func (*Event) String ¶
String returns this Event as a formated string. This implements the fmt.Stringer interface.