unitybridge

package
v0.0.0-...-e766dbd Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

Robomaster S1/EP Unity Bridge Libraries.

Collection of DJI's closed source Unity Bridge libraries for the RoboMaster S1 and EP.

This includes versions of the library for all the known supported platforms:

1 - MacOS (Darwin) - App v1.1.5: amd64 2 - Windows - App v1.1.5: amd64 3 - Android: - App v1.2.0: arm/arm64 4 - iOS: - App v1.1.6: arm64

All versions are shared libraries and can be directly linked to a program or dynamically loaded (for example using dlopen/dlsym).

See include/unitybridge.h for details on the functions that are available.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DJIUnityBridge

type DJIUnityBridge interface {
	Init()
	UnInit()
	RegisterEventHandler(handler IEventHandler, typ DJIUnityEventType)
	UnregisterEventHandler(handler IEventHandler)
	SendEvent(e *DJIUnityEvent, data []byte, tag uint64)
	SendEventWithoutTag(e *DJIUnityEvent, data []byte)
	SendEventWithoutDataOrTag(e *DJIUnityEvent)
	SendEventWithNumber(e *DJIUnityEvent, data uint64, tag uint64)
	SendEventWithString(e *DJIUnityEvent, data string, tag uint64)
	GetStringValueWithEvent(e *DJIUnityEvent) string
	GetInt32ValueWithEvent(e *DJIUnityEvent) int32
	GetSecurityKeyByKeyChainIndex(index int) string
}

func DJIUnityBridgeInstance

func DJIUnityBridgeInstance() DJIUnityBridge

type DJIUnityDataType

type DJIUnityDataType byte
const (
	String DJIUnityDataType = iota
	Number
)

type DJIUnityEvent

type DJIUnityEvent struct {
	// contains filtered or unexported fields
}

func NewDJIUnityEvent

func NewDJIUnityEvent(code uint64) *DJIUnityEvent

func NewDJIUnityEventWithType

func NewDJIUnityEventWithType(typ DJIUnityEventType) *DJIUnityEvent

func NewDJIUnityEventWithTypeAndSubType

func NewDJIUnityEventWithTypeAndSubType(typ DJIUnityEventType, subTyp uint32) *DJIUnityEvent

func NewDJIUnityEventZero

func NewDJIUnityEventZero() *DJIUnityEvent

func (*DJIUnityEvent) GetCode

func (e *DJIUnityEvent) GetCode() uint64

func (*DJIUnityEvent) Reset

func (e *DJIUnityEvent) Reset(typ DJIUnityEventType, subTyp uint32)

func (*DJIUnityEvent) ResetSubType

func (e *DJIUnityEvent) ResetSubType(subTyp uint32)

func (*DJIUnityEvent) SubType

func (e *DJIUnityEvent) SubType() uint32

func (*DJIUnityEvent) Type

func (e *DJIUnityEvent) Type() DJIUnityEventType

type DJIUnityEventType

type DJIUnityEventType int32
const (
	SetValue DJIUnityEventType = iota
	GetValue
	GetAvailableValue
	PerformAction
	StartListening
	StopListening
	Activation
	LocalAlbum
	FirmwareUpgrade
	Connection         DJIUnityEventType = 100
	Security           DJIUnityEventType = 101
	PrintLog           DJIUnityEventType = 200
	StartVideo         DJIUnityEventType = 300
	StopVideo          DJIUnityEventType = 301
	Render             DJIUnityEventType = 302
	GetNativeTexture   DJIUnityEventType = 303
	VideoTransferSpeed DJIUnityEventType = 304
	AudioDataRecv      DJIUnityEventType = 305
	VideoDataRecv      DJIUnityEventType = 306
	NativeFunctions    DJIUnityEventType = 500
)

func DJIUnityEventTypes

func DJIUnityEventTypes() []DJIUnityEventType

type IEventHandler

type IEventHandler interface {
	OnEventCallback(e *DJIUnityEvent, data []byte, tag uint64)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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