// Pack returns a packed byte array which represents a SetQuadSwarmRollPitchYawThrust payload
193965
func (m *SetQuadSwarmRollPitchYawThrust) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.ROLL)
	binary.Write(data, binary.LittleEndian, m.PITCH)
	binary.Write(data, binary.LittleEndian, m.YAW)
	binary.Write(data, binary.LittleEndian, m.THRUST)
	binary.Write(data, binary.LittleEndian, m.GROUP)
	binary.Write(data, binary.LittleEndian, m.MODE)
	return data.Bytes()
}
805779
func NewSetQuadSwarmRollPitchYawThrust(ROLL [4]int16, PITCH [4]int16, YAW [4]int16, THRUST [4]uint16, GROUP uint8, MODE uint8) *SetQuadSwarmRollPitchYawThrust {
	m := SetQuadSwarmRollPitchYawThrust{}
	m.ROLL = ROLL
	m.PITCH = PITCH
	m.YAW = YAW
	m.THRUST = THRUST
	m.GROUP = GROUP
	m.MODE = MODE
	return &m
}
353950
func (m *Gps2Rtk) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_LAST_BASELINE_MS)
	binary.Write(data, binary.LittleEndian, m.TOW)
	binary.Write(data, binary.LittleEndian, m.BASELINE_A_MM)
	binary.Write(data, binary.LittleEndian, m.BASELINE_B_MM)
	binary.Write(data, binary.LittleEndian, m.BASELINE_C_MM)
	binary.Write(data, binary.LittleEndian, m.ACCURACY)
	binary.Write(data, binary.LittleEndian, m.IAR_NUM_HYPOTHESES)
	binary.Write(data, binary.LittleEndian, m.WN)
	binary.Write(data, binary.LittleEndian, m.RTK_RECEIVER_ID)
	binary.Write(data, binary.LittleEndian, m.RTK_HEALTH)
	binary.Write(data, binary.LittleEndian, m.RTK_RATE)
	binary.Write(data, binary.LittleEndian, m.NSATS)
	binary.Write(data, binary.LittleEndian, m.BASELINE_COORDS_TYPE)
	return data.Bytes()
}
770223
func (m *ParamValue) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.PARAM_VALUE)
	binary.Write(data, binary.LittleEndian, m.PARAM_COUNT)
	binary.Write(data, binary.LittleEndian, m.PARAM_INDEX)
	binary.Write(data, binary.LittleEndian, m.PARAM_ID)
	binary.Write(data, binary.LittleEndian, m.PARAM_TYPE)
	return data.Bytes()
}
19390
func (m *ParamSet) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.PARAM_VALUE)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	binary.Write(data, binary.LittleEndian, m.TARGET_COMPONENT)
	binary.Write(data, binary.LittleEndian, m.PARAM_ID)
	binary.Write(data, binary.LittleEndian, m.PARAM_TYPE)
	return data.Bytes()
}
988445
func (m *TerrainRequest) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.MASK)
	binary.Write(data, binary.LittleEndian, m.LAT)
	binary.Write(data, binary.LittleEndian, m.LON)
	binary.Write(data, binary.LittleEndian, m.GRID_SPACING)
	return data.Bytes()
}
419809
func (m *ManualSetpoint) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_BOOT_MS)
	binary.Write(data, binary.LittleEndian, m.ROLL)
	binary.Write(data, binary.LittleEndian, m.PITCH)
	binary.Write(data, binary.LittleEndian, m.YAW)
	binary.Write(data, binary.LittleEndian, m.THRUST)
	binary.Write(data, binary.LittleEndian, m.MODE_SWITCH)
	binary.Write(data, binary.LittleEndian, m.MANUAL_OVERRIDE_SWITCH)
	return data.Bytes()
}
794750
func (m *LocalPositionSetpoint) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.X)
	binary.Write(data, binary.LittleEndian, m.Y)
	binary.Write(data, binary.LittleEndian, m.Z)
	binary.Write(data, binary.LittleEndian, m.YAW)
	binary.Write(data, binary.LittleEndian, m.COORDINATE_FRAME)
	return data.Bytes()
}
1278382
func (m *RequestDataStream) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.REQ_MESSAGE_RATE)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	binary.Write(data, binary.LittleEndian, m.TARGET_COMPONENT)
	binary.Write(data, binary.LittleEndian, m.REQ_STREAM_ID)
	binary.Write(data, binary.LittleEndian, m.START_STOP)
	return data.Bytes()
}
651150
func (m *MAVLinkPacket) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.Protocol)
	binary.Write(data, binary.LittleEndian, m.Length)
	binary.Write(data, binary.LittleEndian, m.Sequence)
	binary.Write(data, binary.LittleEndian, m.SystemID)
	binary.Write(data, binary.LittleEndian, m.ComponentID)
	binary.Write(data, binary.LittleEndian, m.MessageID)
	data.Write(m.Data)
	binary.Write(data, binary.LittleEndian, m.Checksum)
	return data.Bytes()
}
1340299
func pack(out *[32]byte, x *[5]uint64) {
	t := *x
	freeze(&t)

	out[0] = byte(t[0])
	out[1] = byte(t[0] >> 8)
	out[2] = byte(t[0] >> 16)
	out[3] = byte(t[0] >> 24)
	out[4] = byte(t[0] >> 32)
	out[5] = byte(t[0] >> 40)
	out[6] = byte(t[0] >> 48)

	out[6] ^= byte(t[1]<<3) & 0xf8
	out[7] = byte(t[1] >> 5)
	out[8] = byte(t[1] >> 13)
	out[9] = byte(t[1] >> 21)
	out[10] = byte(t[1] >> 29)
	out[11] = byte(t[1] >> 37)
	out[12] = byte(t[1] >> 45)

	out[12] ^= byte(t[2]<<6) & 0xc0
	out[13] = byte(t[2] >> 2)
	out[14] = byte(t[2] >> 10)
	out[15] = byte(t[2] >> 18)
	out[16] = byte(t[2] >> 26)
	out[17] = byte(t[2] >> 34)
	out[18] = byte(t[2] >> 42)
	out[19] = byte(t[2] >> 50)

	out[19] ^= byte(t[3]<<1) & 0xfe
	out[20] = byte(t[3] >> 7)
	out[21] = byte(t[3] >> 15)
	out[22] = byte(t[3] >> 23)
	out[23] = byte(t[3] >> 31)
	out[24] = byte(t[3] >> 39)
	out[25] = byte(t[3] >> 47)

	out[25] ^= byte(t[4]<<4) & 0xf0
	out[26] = byte(t[4] >> 4)
	out[27] = byte(t[4] >> 12)
	out[28] = byte(t[4] >> 20)
	out[29] = byte(t[4] >> 28)
	out[30] = byte(t[4] >> 36)
	out[31] = byte(t[4] >> 44)
}
1064599
func (cs *StreamManager) Pack(payload []byte) string {
	return cs.Stream.Pack(payload)
}
1258713
func (m *RawSlice) UnmarshalVPack(data Slice) error {
	if m == nil {
		return errors.New("velocypack.RawSlice: UnmarshalVPack on nil pointer")
	}
	*m = append((*m)[0:0], data...)
	return nil
}
1096979
func (m *PowerStatus) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.VCC)
	binary.Write(data, binary.LittleEndian, m.VSERVO)
	binary.Write(data, binary.LittleEndian, m.FLAGS)
	return data.Bytes()
}
853787
func (m *AuthKey) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.KEY)
	return data.Bytes()
}
985591
func Pack(a []byte, width int, val byte) []byte {
	var i, j, jStart, end int

	fill := make([]byte, width)
	for i := 0; i < len(fill); i++ {
		fill[i] = val
	}

	// Skip the first run that won't move
	for ; i < len(a) && a[i] != val; i += width {
	}
	end = i

	for i < len(a) {
		// Find the next gap to remove
		for i < len(a) && a[i] == val {
			i += width
		}

		// Find the next non-gap to keep
		jStart = i
		for j = i; j < len(a) && a[j] != val; j += width {
		}

		if jStart == len(a) {
			break
		}

		// Move the non-gap over the section to remove.
		copy(a[end:], a[jStart:j])
		end += j - jStart
		i = j
	}

	return a[:end]
}
892803
func (m *RadioStatus) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.RXERRORS)
	binary.Write(data, binary.LittleEndian, m.FIXED)
	binary.Write(data, binary.LittleEndian, m.RSSI)
	binary.Write(data, binary.LittleEndian, m.REMRSSI)
	binary.Write(data, binary.LittleEndian, m.TXBUF)
	binary.Write(data, binary.LittleEndian, m.NOISE)
	binary.Write(data, binary.LittleEndian, m.REMNOISE)
	return data.Bytes()
}