Documentation ¶
Overview ¶
Package types provides the set of base types defined by the FIT protocol. Users of this package must validate base types parsed from a raw byte using the Known method before calling any other methods (except String).
Index ¶
- type Base
- func (t Base) Float() bool
- func (t Base) GoInvalidValue() string
- func (t Base) GoType() string
- func (t Base) Integer() bool
- func (t Base) Invalid() interface{}
- func (t Base) Known() bool
- func (t Base) PkgString() string
- func (t Base) Signed() bool
- func (t Base) Size() int
- func (t Base) String() string
- type Fit
- type Kind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base byte
const ( BaseEnum Base = 0x00 BaseSint8 Base = 0x01 // 2's complement format BaseUint8 Base = 0x02 BaseSint16 Base = 0x03 // 2's complement format BaseUint16 Base = 0x04 BaseSint32 Base = 0x05 // 2's complement format BaseUint32 Base = 0x06 BaseString Base = 0x07 // Null terminated string encoded in UTF-8 BaseFloat32 Base = 0x08 BaseFloat64 Base = 0x09 BaseUint8z Base = 0x0A BaseUint16z Base = 0x0B BaseUint32z Base = 0x0C BaseByte Base = 0x0D // Array of bytes. Field is invalid if all bytes are invalid BaseSint64 Base = 0x0E // 2's complement format BaseUint64 Base = 0x0F BaseUint64z Base = 0x10 )
func BaseFromString ¶
func DecodeBase ¶
func (Base) GoInvalidValue ¶
type Fit ¶
type Fit uint16
Bit-packing layout:
+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ | bF | bE | bD | bC | bB | bA | b9 | b8 | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ \_________________________________/\______________/\__/\________________________/ Unused Kind Array Base type
func MakeNative ¶
func (Fit) GoInvalidValue ¶
func (Fit) ValueString ¶
Click to show internal directories.
Click to hide internal directories.