Documentation ¶
Index ¶
- func CanWriteDataRef(dataRef DataRef) bool
- func GetData(dataRef DataRef) []byte
- func GetDoubleData(dataRef DataRef) float64
- func GetFloatArrayData(dataRef DataRef) []float32
- func GetFloatData(dataRef DataRef) float32
- func GetIntArrayData(dataRef DataRef) []int
- func GetIntData(dataRef DataRef) int
- func GetString(dataRef DataRef) string
- func IsDataRefGood(dataRef DataRef) bool
- func SetData(dataRef DataRef, value []byte)
- func SetDoubleData(dataRef DataRef, value float64)
- func SetFloatArrayData(dataRef DataRef, value []float32)
- func SetFloatData(dataRef DataRef, value float32)
- func SetIntArrayData(dataRef DataRef, value []int)
- func SetIntData(dataRef DataRef, value int)
- func SetString(dataRef DataRef, value string)
- func ShareData(name string, dataType DataRefType, callback DataChangedFunc, ref interface{})
- func UnregisterDataAccessor(dataRef DataRef)
- func UnshareData(name string, dataType DataRefType, callback DataChangedFunc, ref interface{})
- type DataChangedFunc
- type DataRef
- type DataRefAccessors
- type DataRefType
- type GetDataFunc
- type GetDoubleDataFunc
- type GetFloatArrayDataFunc
- type GetFloatDataFunc
- type GetIntArrayDataFunc
- type GetIntDataFunc
- type SetDataFunc
- type SetDoubleDataFunc
- type SetFloatArrayDataFunc
- type SetFloatDataFunc
- type SetIntArrayDataFunc
- type SetIntDataFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanWriteDataRef ¶
func GetDoubleData ¶
func GetFloatArrayData ¶
func GetFloatData ¶
func GetIntArrayData ¶
func GetIntData ¶
func IsDataRefGood ¶
func SetDoubleData ¶
func SetFloatArrayData ¶
func SetFloatData ¶
func SetIntArrayData ¶
func SetIntData ¶
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 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 SetDoubleDataFunc ¶
type SetDoubleDataFunc func(ref interface{}, value float64)
type SetFloatArrayDataFunc ¶
type SetFloatDataFunc ¶
type SetFloatDataFunc func(ref interface{}, value float32)
type SetIntArrayDataFunc ¶
type SetIntDataFunc ¶
type SetIntDataFunc func(ref interface{}, value int32)
Click to show internal directories.
Click to hide internal directories.