// Pack returns a packed byte array which represents a ParamSet payload
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()
}
181348
func (m *LocalNedPositionSetpointExternal) 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)
	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)
	binary.Write(data, binary.LittleEndian, m.COORDINATE_FRAME)
	return data.Bytes()
}
115531
func (m *LogData) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.OFS)
	binary.Write(data, binary.LittleEndian, m.ID)
	binary.Write(data, binary.LittleEndian, m.COUNT)
	binary.Write(data, binary.LittleEndian, m.DATA)
	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()
}
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()
}
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
}
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()
}
54034
func (m *EncapsulatedData) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.SEQNR)
	binary.Write(data, binary.LittleEndian, m.DATA)
	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()
}
453043
func (m *ScaledPressure) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_BOOT_MS)
	binary.Write(data, binary.LittleEndian, m.PRESS_ABS)
	binary.Write(data, binary.LittleEndian, m.PRESS_DIFF)
	binary.Write(data, binary.LittleEndian, m.TEMPERATURE)
	return data.Bytes()
}
208572
func (arguments Arguments) Pack(args ...interface{}) ([]byte, error) {
	// Make sure arguments match up and pack them
	abiArgs := arguments
	if len(args) != len(abiArgs) {
		return nil, fmt.Errorf("argument count mismatch: %d for %d", len(args), len(abiArgs))
	}
	// variable input is the output appended at the end of packed
	// output. This is used for strings and bytes types input.
	var variableInput []byte

	// input offset is the bytes offset for packed output
	inputOffset := 0
	for _, abiArg := range abiArgs {
		inputOffset += getTypeSize(abiArg.Type)
	}
	var ret []byte
	for i, a := range args {
		input := abiArgs[i]
		// pack the input
		packed, err := input.Type.pack(reflect.ValueOf(a))
		if err != nil {
			return nil, err
		}
		// check for dynamic types
		if isDynamicType(input.Type) {
			// set the offset
			ret = append(ret, packNum(reflect.ValueOf(inputOffset))...)
			// calculate next offset
			inputOffset += len(packed)
			// append to variable input
			variableInput = append(variableInput, packed...)
		} else {
			// append the packed value to the input
			ret = append(ret, packed...)
		}
	}
	// append the variable input at the end of the packed input
	ret = append(ret, variableInput...)

	return ret, nil
}
723996
func (m *LogEntry) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_UTC)
	binary.Write(data, binary.LittleEndian, m.SIZE)
	binary.Write(data, binary.LittleEndian, m.ID)
	binary.Write(data, binary.LittleEndian, m.NUM_LOGS)
	binary.Write(data, binary.LittleEndian, m.LAST_LOG_NUM)
	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()
}
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()
}
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()
}
1254564
func (m *HilControls) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_USEC)
	binary.Write(data, binary.LittleEndian, m.ROLL_AILERONS)
	binary.Write(data, binary.LittleEndian, m.PITCH_ELEVATOR)
	binary.Write(data, binary.LittleEndian, m.YAW_RUDDER)
	binary.Write(data, binary.LittleEndian, m.THROTTLE)
	binary.Write(data, binary.LittleEndian, m.AUX1)
	binary.Write(data, binary.LittleEndian, m.AUX2)
	binary.Write(data, binary.LittleEndian, m.AUX3)
	binary.Write(data, binary.LittleEndian, m.AUX4)
	binary.Write(data, binary.LittleEndian, m.MODE)
	binary.Write(data, binary.LittleEndian, m.NAV_MODE)
	return data.Bytes()
}
519245
func (m *NamedValueInt) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.TIME_BOOT_MS)
	binary.Write(data, binary.LittleEndian, m.VALUE)
	binary.Write(data, binary.LittleEndian, m.NAME)
	return data.Bytes()
}