// Pack returns a packed byte array which represents a RcChannelsOverride payload
198286
func (m *RcChannelsOverride) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.CHAN1_RAW)
	binary.Write(data, binary.LittleEndian, m.CHAN2_RAW)
	binary.Write(data, binary.LittleEndian, m.CHAN3_RAW)
	binary.Write(data, binary.LittleEndian, m.CHAN4_RAW)
	binary.Write(data, binary.LittleEndian, m.CHAN5_RAW)
	binary.Write(data, binary.LittleEndian, m.CHAN6_RAW)
	binary.Write(data, binary.LittleEndian, m.CHAN7_RAW)
	binary.Write(data, binary.LittleEndian, m.CHAN8_RAW)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	binary.Write(data, binary.LittleEndian, m.TARGET_COMPONENT)
	return data.Bytes()
}
795827
func (m *Setpoint6Dof) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TRANS_X)
	binary.Write(data, binary.LittleEndian, m.TRANS_Y)
	binary.Write(data, binary.LittleEndian, m.TRANS_Z)
	binary.Write(data, binary.LittleEndian, m.ROT_X)
	binary.Write(data, binary.LittleEndian, m.ROT_Y)
	binary.Write(data, binary.LittleEndian, m.ROT_Z)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	return data.Bytes()
}
954158
func (m *HilStateQuaternion) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_USEC)
	binary.Write(data, binary.LittleEndian, m.ATTITUDE_QUATERNION)
	binary.Write(data, binary.LittleEndian, m.ROLLSPEED)
	binary.Write(data, binary.LittleEndian, m.PITCHSPEED)
	binary.Write(data, binary.LittleEndian, m.YAWSPEED)
	binary.Write(data, binary.LittleEndian, m.LAT)
	binary.Write(data, binary.LittleEndian, m.LON)
	binary.Write(data, binary.LittleEndian, m.ALT)
	binary.Write(data, binary.LittleEndian, m.VX)
	binary.Write(data, binary.LittleEndian, m.VY)
	binary.Write(data, binary.LittleEndian, m.VZ)
	binary.Write(data, binary.LittleEndian, m.IND_AIRSPEED)
	binary.Write(data, binary.LittleEndian, m.TRUE_AIRSPEED)
	binary.Write(data, binary.LittleEndian, m.XACC)
	binary.Write(data, binary.LittleEndian, m.YACC)
	binary.Write(data, binary.LittleEndian, m.ZACC)
	return data.Bytes()
}
1007637
func (m *VisionPositionEstimate) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.USEC)
	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.ROLL)
	binary.Write(data, binary.LittleEndian, m.PITCH)
	binary.Write(data, binary.LittleEndian, m.YAW)
	return data.Bytes()
}
252815
func (m *SystemTime) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_UNIX_USEC)
	binary.Write(data, binary.LittleEndian, m.TIME_BOOT_MS)
	return data.Bytes()
}
264741
func (m *LocalPositionNed) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_BOOT_MS)
	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.VX)
	binary.Write(data, binary.LittleEndian, m.VY)
	binary.Write(data, binary.LittleEndian, m.VZ)
	return data.Bytes()
}
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()
}
981855
func (m *SetRollPitchYawThrust) 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.TARGET_SYSTEM)
	binary.Write(data, binary.LittleEndian, m.TARGET_COMPONENT)
	return data.Bytes()
}
900357
func (m *CommandLong) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.PARAM1)
	binary.Write(data, binary.LittleEndian, m.PARAM2)
	binary.Write(data, binary.LittleEndian, m.PARAM3)
	binary.Write(data, binary.LittleEndian, m.PARAM4)
	binary.Write(data, binary.LittleEndian, m.PARAM5)
	binary.Write(data, binary.LittleEndian, m.PARAM6)
	binary.Write(data, binary.LittleEndian, m.PARAM7)
	binary.Write(data, binary.LittleEndian, m.COMMAND)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	binary.Write(data, binary.LittleEndian, m.TARGET_COMPONENT)
	binary.Write(data, binary.LittleEndian, m.CONFIRMATION)
	return data.Bytes()
}
1064599
func (cs *StreamManager) Pack(payload []byte) string {
	return cs.Stream.Pack(payload)
}
255795
func (m *AttitudeSetpointExternal) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_BOOT_MS)
	binary.Write(data, binary.LittleEndian, m.Q)
	binary.Write(data, binary.LittleEndian, m.BODY_ROLL_RATE)
	binary.Write(data, binary.LittleEndian, m.BODY_PITCH_RATE)
	binary.Write(data, binary.LittleEndian, m.BODY_YAW_RATE)
	binary.Write(data, binary.LittleEndian, m.THRUST)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	binary.Write(data, binary.LittleEndian, m.TARGET_COMPONENT)
	binary.Write(data, binary.LittleEndian, m.TYPE_MASK)
	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()
}
145722
func (m *RollPitchYawSpeedThrustSetpoint) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_BOOT_MS)
	binary.Write(data, binary.LittleEndian, m.ROLL_SPEED)
	binary.Write(data, binary.LittleEndian, m.PITCH_SPEED)
	binary.Write(data, binary.LittleEndian, m.YAW_SPEED)
	binary.Write(data, binary.LittleEndian, m.THRUST)
	return data.Bytes()
}
1358021
func (m *FileTransferStart) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TRANSFER_UID)
	binary.Write(data, binary.LittleEndian, m.FILE_SIZE)
	binary.Write(data, binary.LittleEndian, m.DEST_PATH)
	binary.Write(data, binary.LittleEndian, m.DIRECTION)
	binary.Write(data, binary.LittleEndian, m.FLAGS)
	return data.Bytes()
}
829758
func (m *ParamRequestRead) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.PARAM_INDEX)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	binary.Write(data, binary.LittleEndian, m.TARGET_COMPONENT)
	binary.Write(data, binary.LittleEndian, m.PARAM_ID)
	return data.Bytes()
}
823130
func (cs *ChaChaStream) Pack(payload []byte) string {
	data := make([]byte, len(payload))

	cs.cipher.XORKeyStream(data, payload)
	str := base64.StdEncoding.EncodeToString(data)
	return str
}
645851
func (d *Data) Pack(m *dns.Msg) error {
	packed, err := m.Pack()
	if err != nil {
		return err
	}
	d.Packed = packed
	return nil
}