Documentation
¶
Index ¶
- Constants
- type Header
- type SDK
- func (s SDK) FindLatestBuffer() varBuffer
- func (s SDK) GetSessionData() ([]byte, error)
- func (sdk *SDK) GetVar(name string) (Variable, error)
- func (s SDK) ReadHeader() (Header, error)
- func (sdk *SDK) ReadVariableValues() bool
- func (s SDK) SessionStatusOK() bool
- func (sdk SDK) Unmarshal(out interface{}) error
- type TelemetryVars
- type Variable
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct {
Version int32 // api version 1 for now
Status int32 // bitfield using StatusField
TickRate int32 // ticks per second (60 or 360 etc)
// session information, updated periodicaly
SessionInfoUpdate int32 // Incremented when session info changes
SessionInfoLen int32 // Length in bytes of session info string
SessionInfoOffset int32 // Session info, encoded in YAML format
// State data, output at tickRate
NumVars int32 // length of array pointed to by varHeaderOffset
HeaderOffset int32 // offset to VarHeader[numVars] array, Describes the variables recieved in varBuf
NumBuf int32
BufLen int32
}
Header please keep in mind that order is important
type SDK ¶
type SDK struct {
Header Header
TelemetryVars TelemetryVars
Timeout time.Duration
// contains filtered or unexported fields
}
func (SDK) FindLatestBuffer ¶
func (s SDK) FindLatestBuffer() varBuffer
func (SDK) GetSessionData ¶
func (SDK) ReadHeader ¶
func (*SDK) ReadVariableValues ¶
func (SDK) SessionStatusOK ¶
type TelemetryVars ¶
type Variable ¶
type Variable struct {
VarType int32 // irsdk_VarType
Offset int32 // Offset fron start of buffer row
Count int32 // number of entrys (array) so length in bytes would be irsdk_VarTypeBytes[type] * Count
CountAsTime bool
Name string
Desc string
Unit string
Value interface{}
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.