// Pack returns a packed byte array which represents a HilState payload
770575
func (m *HilState) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_USEC)
	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.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.XACC)
	binary.Write(data, binary.LittleEndian, m.YACC)
	binary.Write(data, binary.LittleEndian, m.ZACC)
	return data.Bytes()
}
359884
func (m *HighresImu) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_USEC)
	binary.Write(data, binary.LittleEndian, m.XACC)
	binary.Write(data, binary.LittleEndian, m.YACC)
	binary.Write(data, binary.LittleEndian, m.ZACC)
	binary.Write(data, binary.LittleEndian, m.XGYRO)
	binary.Write(data, binary.LittleEndian, m.YGYRO)
	binary.Write(data, binary.LittleEndian, m.ZGYRO)
	binary.Write(data, binary.LittleEndian, m.XMAG)
	binary.Write(data, binary.LittleEndian, m.YMAG)
	binary.Write(data, binary.LittleEndian, m.ZMAG)
	binary.Write(data, binary.LittleEndian, m.ABS_PRESSURE)
	binary.Write(data, binary.LittleEndian, m.DIFF_PRESSURE)
	binary.Write(data, binary.LittleEndian, m.PRESSURE_ALT)
	binary.Write(data, binary.LittleEndian, m.TEMPERATURE)
	binary.Write(data, binary.LittleEndian, m.FIELDS_UPDATED)
	return data.Bytes()
}
853787
func (m *AuthKey) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.KEY)
	return data.Bytes()
}
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()
}
1064599
func (cs *StreamManager) Pack(payload []byte) string {
	return cs.Stream.Pack(payload)
}
1169805
func (m *HilOpticalFlow) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_USEC)
	binary.Write(data, binary.LittleEndian, m.FLOW_COMP_M_X)
	binary.Write(data, binary.LittleEndian, m.FLOW_COMP_M_Y)
	binary.Write(data, binary.LittleEndian, m.GROUND_DISTANCE)
	binary.Write(data, binary.LittleEndian, m.FLOW_X)
	binary.Write(data, binary.LittleEndian, m.FLOW_Y)
	binary.Write(data, binary.LittleEndian, m.SENSOR_ID)
	binary.Write(data, binary.LittleEndian, m.QUALITY)
	return data.Bytes()
}
262214
func (m *RcChannelsRaw) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_BOOT_MS)
	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.PORT)
	binary.Write(data, binary.LittleEndian, m.RSSI)
	return data.Bytes()
}
1088774
func (m *SetQuadSwarmLedRollPitchYawThrust) 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)
	binary.Write(data, binary.LittleEndian, m.LED_RED)
	binary.Write(data, binary.LittleEndian, m.LED_BLUE)
	binary.Write(data, binary.LittleEndian, m.LED_GREEN)
	return data.Bytes()
}
895228
func (m *Heartbeat) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.CUSTOM_MODE)
	binary.Write(data, binary.LittleEndian, m.TYPE)
	binary.Write(data, binary.LittleEndian, m.AUTOPILOT)
	binary.Write(data, binary.LittleEndian, m.BASE_MODE)
	binary.Write(data, binary.LittleEndian, m.SYSTEM_STATUS)
	binary.Write(data, binary.LittleEndian, m.MAVLINK_VERSION)
	return data.Bytes()
}
1070000
func (m *FileTransferRes) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TRANSFER_UID)
	binary.Write(data, binary.LittleEndian, m.RESULT)
	return data.Bytes()
}
674173
func (m *HilRcInputsRaw) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_USEC)
	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.CHAN9_RAW)
	binary.Write(data, binary.LittleEndian, m.CHAN10_RAW)
	binary.Write(data, binary.LittleEndian, m.CHAN11_RAW)
	binary.Write(data, binary.LittleEndian, m.CHAN12_RAW)
	binary.Write(data, binary.LittleEndian, m.RSSI)
	return data.Bytes()
}
518185
func PackBytes(box string, name string, bb []byte) {
	gil.Lock()
	defer gil.Unlock()
	if _, ok := data[box]; !ok {
		data[box] = map[string][]byte{}
	}
	data[box][name] = bb
}
1272584
func (m *Setpoint8Dof) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.VAL1)
	binary.Write(data, binary.LittleEndian, m.VAL2)
	binary.Write(data, binary.LittleEndian, m.VAL3)
	binary.Write(data, binary.LittleEndian, m.VAL4)
	binary.Write(data, binary.LittleEndian, m.VAL5)
	binary.Write(data, binary.LittleEndian, m.VAL6)
	binary.Write(data, binary.LittleEndian, m.VAL7)
	binary.Write(data, binary.LittleEndian, m.VAL8)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	return data.Bytes()
}
434672
func (m *GlobalPositionSetpointExternalInt) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_BOOT_MS)
	binary.Write(data, binary.LittleEndian, m.LAT_INT)
	binary.Write(data, binary.LittleEndian, m.LON_INT)
	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.AFX)
	binary.Write(data, binary.LittleEndian, m.AFY)
	binary.Write(data, binary.LittleEndian, m.AFZ)
	binary.Write(data, binary.LittleEndian, m.TYPE_MASK)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	binary.Write(data, binary.LittleEndian, m.TARGET_COMPONENT)
	return data.Bytes()
}
66259
func (m *GlobalPositionInt) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_BOOT_MS)
	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.RELATIVE_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.HDG)
	return data.Bytes()
}
590542
func (m *SimState) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.Q1)
	binary.Write(data, binary.LittleEndian, m.Q2)
	binary.Write(data, binary.LittleEndian, m.Q3)
	binary.Write(data, binary.LittleEndian, m.Q4)
	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.XACC)
	binary.Write(data, binary.LittleEndian, m.YACC)
	binary.Write(data, binary.LittleEndian, m.ZACC)
	binary.Write(data, binary.LittleEndian, m.XGYRO)
	binary.Write(data, binary.LittleEndian, m.YGYRO)
	binary.Write(data, binary.LittleEndian, m.ZGYRO)
	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.STD_DEV_HORZ)
	binary.Write(data, binary.LittleEndian, m.STD_DEV_VERT)
	binary.Write(data, binary.LittleEndian, m.VN)
	binary.Write(data, binary.LittleEndian, m.VE)
	binary.Write(data, binary.LittleEndian, m.VD)
	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()
}