dataAccess

package
v0.0.0-...-3257b51 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2018 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanWriteDataRef

func CanWriteDataRef(dataRef DataRef) bool

func GetData

func GetData(dataRef DataRef) []byte

func GetDoubleData

func GetDoubleData(dataRef DataRef) float64

func GetFloatArrayData

func GetFloatArrayData(dataRef DataRef) []float32

func GetFloatData

func GetFloatData(dataRef DataRef) float32

func GetIntArrayData

func GetIntArrayData(dataRef DataRef) []int

func GetIntData

func GetIntData(dataRef DataRef) int

func GetString

func GetString(dataRef DataRef) string

func IsDataRefGood

func IsDataRefGood(dataRef DataRef) bool

func SetData

func SetData(dataRef DataRef, value []byte)

func SetDoubleData

func SetDoubleData(dataRef DataRef, value float64)

func SetFloatArrayData

func SetFloatArrayData(dataRef DataRef, value []float32)

func SetFloatData

func SetFloatData(dataRef DataRef, value float32)

func SetIntArrayData

func SetIntArrayData(dataRef DataRef, value []int)

func SetIntData

func SetIntData(dataRef DataRef, value int)

func SetString

func SetString(dataRef DataRef, value string)

func ShareData

func ShareData(name string, dataType DataRefType, callback DataChangedFunc, ref interface{})

func UnregisterDataAccessor

func UnregisterDataAccessor(dataRef DataRef)

func UnshareData

func UnshareData(name string, dataType DataRefType, callback DataChangedFunc, ref interface{})

Types

type DataChangedFunc

type DataChangedFunc func(ref interface{})

type DataRef

type DataRef C.XPLMDataRef

func FindDataRef

func FindDataRef(dataRefName string) (DataRef, bool)

func RegisterDataAccessor

func RegisterDataAccessor(name string, dataType DataRefType, isWriteable bool, accessors DataRefAccessors, readRef, writeRef interface{}) DataRef

type DataRefAccessors

type DataRefAccessors struct {
	ReadInt         GetIntDataFunc
	WriteInt        SetIntDataFunc
	ReadFloat       GetFloatDataFunc
	WriteFloat      SetFloatDataFunc
	ReadDouble      GetDoubleDataFunc
	WriteDouble     SetDoubleDataFunc
	ReadIntArray    GetIntArrayDataFunc
	WriteIntArray   SetIntArrayDataFunc
	ReadFloatArray  GetFloatArrayDataFunc
	WriteFloatArray SetFloatArrayDataFunc
	ReadData        GetDataFunc
	WriteData       SetDataFunc
}

type DataRefType

type DataRefType int
const (
	TypeUnknown    DataRefType = 0
	TypeInt        DataRefType = 1
	TypeFloat      DataRefType = 2
	TypeDouble     DataRefType = 4
	TypeFloatArray DataRefType = 8
	TypeIntArray   DataRefType = 16
	TypeData       DataRefType = 32
)

func GetDataRefTypes

func GetDataRefTypes(dataRef DataRef) DataRefType

type GetDataFunc

type GetDataFunc func(ref interface{}) []byte

type GetDoubleDataFunc

type GetDoubleDataFunc func(ref interface{}) float64

type GetFloatArrayDataFunc

type GetFloatArrayDataFunc func(ref interface{}) []float32

type GetFloatDataFunc

type GetFloatDataFunc func(ref interface{}) float32

type GetIntArrayDataFunc

type GetIntArrayDataFunc func(ref interface{}) []int32

type GetIntDataFunc

type GetIntDataFunc func(ref interface{}) int32

type SetDataFunc

type SetDataFunc func(ref interface{}, value []byte, offset, count int)

type SetDoubleDataFunc

type SetDoubleDataFunc func(ref interface{}, value float64)

type SetFloatArrayDataFunc

type SetFloatArrayDataFunc func(ref interface{}, value []float32, offset, count int)

type SetFloatDataFunc

type SetFloatDataFunc func(ref interface{}, value float32)

type SetIntArrayDataFunc

type SetIntArrayDataFunc func(ref interface{}, value []int32, offset, count int)

type SetIntDataFunc

type SetIntDataFunc func(ref interface{}, value int32)

Jump to

Keyboard shortcuts

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