Public Member Functions | Protected Attributes
msp::Message Class Reference

#include <Message.hpp>

Inherited by msp::msg::AccCalibration, msp::msg::AccTrim, msp::msg::ActiveBoxes, msp::msg::AdjustmentRanges, msp::msg::AdvancedConfig, msp::msg::Altitude, msp::msg::Analog, msp::msg::ApiVersion, msp::msg::ArmingConfig, msp::msg::Attitude, msp::msg::BatteryConfig, msp::msg::BatteryState, msp::msg::BeeperConfig, msp::msg::BfBuildInfo, msp::msg::BfConfig, msp::msg::BlackboxConfig, msp::msg::BoardAlignment, msp::msg::BoardInfo, msp::msg::BoardName, msp::msg::BoxIds, msp::msg::BoxNames, msp::msg::BuildInfo, msp::msg::CalibrationData, msp::msg::CameraControl, msp::msg::CfSerialConfig, msp::msg::CommonMotorMixer, msp::msg::CommonSetMotorMixer, msp::msg::CommonSetSetting, msp::msg::CommonSetting, msp::msg::CommonSetTz, msp::msg::CommonTz, msp::msg::CompassConfig, msp::msg::CompGPS, msp::msg::CopyProfile, msp::msg::CurrentMeterConfig, msp::msg::CurrentMeters, msp::msg::DataflashErase, msp::msg::DataflashRead, msp::msg::DataflashSummary, msp::msg::Debug, msp::msg::DebugMessage, msp::msg::Displayport, msp::msg::EscSensorData, msp::msg::FailsafeConfig, msp::msg::FcVariant, msp::msg::FcVersion, msp::msg::Feature, msp::msg::FilterConfig, msp::msg::FwConfig, msp::msg::GpsConfig, msp::msg::GpsStatistics, msp::msg::GpsSvInfo, msp::msg::Ident, msp::msg::InavAirSpeed, msp::msg::InavAnalog, msp::msg::InavBatteryConfig, msp::msg::InavMisc, msp::msg::InavOpticalFlow, msp::msg::InavPid, msp::msg::InavRateProfile, msp::msg::InavSetBatteryConfig, msp::msg::InavSetMisc, msp::msg::InavSetRateProfile, msp::msg::InavStatus, msp::msg::LedColors, msp::msg::LedStripConfigs, msp::msg::LedStripModecolor, msp::msg::LoopTime, msp::msg::MagCalibration, msp::msg::Misc, msp::msg::Mixer, msp::msg::ModeRanges, msp::msg::Motor, msp::msg::Motor3dConfig, msp::msg::MotorConfig, msp::msg::MotorPins, msp::msg::NavConfig, msp::msg::NavPosHold, msp::msg::NavStatus, msp::msg::OsdCharWrite, msp::msg::OsdConfig, msp::msg::OsdVideoConfig, msp::msg::PassthroughSerial, msp::msg::Pid, msp::msg::PidAdvanced, msp::msg::PidController, msp::msg::PidNames, msp::msg::PositionEstimationConfig, msp::msg::RawGPS, msp::msg::RawImu, msp::msg::Rc, msp::msg::RcDeadband, msp::msg::RcTuning, msp::msg::Reboot, msp::msg::Reserve1, msp::msg::Reserve2, msp::msg::ResetConfig, msp::msg::RssiConfig, msp::msg::Rtc, msp::msg::RthAndLandConfig, msp::msg::RxConfig, msp::msg::RxFailConfigs, msp::msg::RxMap, msp::msg::SdcardSummary, msp::msg::SelectSetting, msp::msg::SensorAlignment, msp::msg::SensorConfig, msp::msg::SensorStatus, msp::msg::Servo, msp::msg::ServoConf, msp::msg::ServoMixRules, msp::msg::Set4WayIF, msp::msg::SetAccTrim, msp::msg::SetAdjustmentRange, msp::msg::SetAdvancedConfig, msp::msg::SetArmingConfig, msp::msg::SetArmingDisabled, msp::msg::SetBatteryConfig, msp::msg::SetBeeperConfig, msp::msg::SetBfConfig, msp::msg::SetBlackboxConfig, msp::msg::SetBoardAlignment, msp::msg::SetBoardName, msp::msg::SetBox, msp::msg::SetCalibrationData, msp::msg::SetCfSerialConfig, msp::msg::SetCompassConfig, msp::msg::SetCurrentMeterConfig, msp::msg::SetFailsafeConfig, msp::msg::SetFeature, msp::msg::SetFilterConfig, msp::msg::SetFwConfig, msp::msg::SetGpsConfig, msp::msg::SetHeading, msp::msg::SetInavPid, msp::msg::SetLedColors, msp::msg::SetLedStripConfig, msp::msg::SetLedStripModecolor, msp::msg::SetLoopTime, msp::msg::SetMisc, msp::msg::SetMixer, msp::msg::SetModeRange, msp::msg::SetMotor, msp::msg::SetMotor3dConf, msp::msg::SetMotorConfig, msp::msg::SetNavConfig, msp::msg::SetNavPosHold, msp::msg::SetOsdConfig, msp::msg::SetOsdVideoConfig, msp::msg::SetPid, msp::msg::SetPidAdvanced, msp::msg::SetPidController, msp::msg::SetPositionEstimationConfig, msp::msg::SetRawGPS, msp::msg::SetRawRc, msp::msg::SetRcDeadband, msp::msg::SetRcTuning, msp::msg::SetResetCurrPid, msp::msg::SetRssiConfig, msp::msg::SetRtc, msp::msg::SetRthAndLandConfig, msp::msg::SetRxConfig, msp::msg::SetRxFailConfigs, msp::msg::SetRxMap, msp::msg::SetSensorAlignment, msp::msg::SetSensorConfig, msp::msg::SetServoConf, msp::msg::SetServoMixRule, msp::msg::SetTransponderConfig, msp::msg::SetTxInfo, msp::msg::SetVoltageMeterConfig, msp::msg::SetVtxConfig, msp::msg::SetWp, msp::msg::SonarAltitude, msp::msg::Status, msp::msg::StatusEx, msp::msg::TransponderConfig, msp::msg::TxInfo, msp::msg::Uid, msp::msg::V2Frame, msp::msg::VoltageMeterConfig, msp::msg::VoltageMeters, msp::msg::VtxConfig, msp::msg::WayPoint, msp::msg::WpGetInfo, msp::msg::WpMissionLoad, msp::msg::WpMissionSave, msp::msg::WriteEEPROM, and MyIdent.

List of all members.

Public Member Functions

virtual bool decode (const ByteVector &)
 Decode message contents from a ByteVector.
virtual ByteVectorUptr encode () const
 Encode all data into a ByteVector.
FirmwareVariant getFirmwareVariant () const
 Queries the firmware variant the message works with.
virtual ID id () const =0
 get the ID of the message
 Message (FirmwareVariant v)
 Message constructor accepting a FirmwareVariant.
virtual std::ostream & print (std::ostream &s) const
void setFirmwareVariant (FirmwareVariant v)
 Set the firmware the message should work with.
virtual ~Message ()
 Message destructor.

Protected Attributes

FirmwareVariant fw_variant

Detailed Description

Definition at line 15 of file Message.hpp.


Constructor & Destructor Documentation

Message constructor accepting a FirmwareVariant.

Parameters:
vFirmwareVariant specifing which firmware this message should tailor itself to.

Definition at line 28 of file Message.hpp.

virtual msp::Message::~Message ( ) [inline, virtual]

Message destructor.

Definition at line 33 of file Message.hpp.


Member Function Documentation

virtual bool msp::Message::decode ( const ByteVector ) [inline, virtual]

Decode message contents from a ByteVector.

Parameters:
dataSource of data
Returns:
False. Override methods should return true on success

Reimplemented in msp::msg::InavAirSpeed, msp::msg::InavRateProfile, msp::msg::InavBatteryConfig, msp::msg::InavMisc, msp::msg::InavAnalog, msp::msg::InavOpticalFlow, msp::msg::InavStatus, msp::msg::CommonMotorMixer, msp::msg::CommonSetting, msp::msg::CommonTz, msp::msg::Debug, msp::msg::DebugMessage, msp::msg::Rtc, msp::msg::Set4WayIF, msp::msg::ServoMixRules, msp::msg::AccTrim, msp::msg::TxInfo, msp::msg::BeeperConfig, msp::msg::OsdVideoConfig, msp::msg::GpsStatistics, msp::msg::GpsSvInfo, msp::msg::Uid, msp::msg::SensorStatus, msp::msg::StatusEx, msp::msg::EscSensorData, msp::msg::CompassConfig, msp::msg::GpsConfig, msp::msg::MotorConfig, msp::msg::BatteryState, msp::msg::CurrentMeters, msp::msg::VoltageMeters, msp::msg::LedStripModecolor, msp::msg::SensorAlignment, msp::msg::RcDeadband, msp::msg::Motor3dConfig, msp::msg::NavConfig, msp::msg::NavStatus, msp::msg::ServoConf, msp::msg::BoxIds, msp::msg::WayPoint, msp::msg::PidNames, msp::msg::BoxNames, msp::msg::MotorPins, msp::msg::Misc, msp::msg::Pid, msp::msg::RcTuning, msp::msg::Analog, msp::msg::Altitude, msp::msg::Attitude, msp::msg::CompGPS, msp::msg::RawGPS, msp::msg::Rc, msp::msg::Motor, msp::msg::Servo, msp::msg::RawImu, msp::msg::Status, msp::msg::Ident, msp::msg::SensorConfig, msp::msg::PidAdvanced, msp::msg::FilterConfig, msp::msg::AdvancedConfig, msp::msg::VtxConfig, msp::msg::OsdConfig, msp::msg::TransponderConfig, msp::msg::BlackboxConfig, msp::msg::SdcardSummary, msp::msg::SetRxFailConfigs, msp::msg::RxFailConfigs, msp::msg::FailsafeConfig, msp::msg::LoopTime, msp::msg::DataflashErase, msp::msg::DataflashRead, msp::msg::DataflashSummary, msp::msg::BfBuildInfo, msp::msg::BfConfig, msp::msg::RxMap, msp::msg::ArmingConfig, msp::msg::PidController, msp::msg::SonarAltitude, msp::msg::VoltageMeterConfig, msp::msg::CfSerialConfig, msp::msg::AdjustmentRanges, msp::msg::RssiConfig, msp::msg::LedStripConfigs, msp::msg::LedColors, msp::msg::RxConfig, msp::msg::Mixer, msp::msg::CurrentMeterConfig, msp::msg::BoardAlignment, msp::msg::Feature, msp::msg::ModeRanges, msp::msg::BatteryConfig, msp::msg::FwConfig, msp::msg::RthAndLandConfig, msp::msg::WpGetInfo, msp::msg::PositionEstimationConfig, msp::msg::CalibrationData, msp::msg::NavPosHold, msp::msg::BoardName, msp::msg::InavPid, msp::msg::BuildInfo, msp::msg::BoardInfo, msp::msg::FcVersion, msp::msg::FcVariant, msp::msg::ApiVersion, and MyIdent.

Definition at line 53 of file Message.hpp.

virtual ByteVectorUptr msp::Message::encode ( ) const [inline, virtual]

Encode all data into a ByteVector.

Returns:
Unique pointer to a ByteVector of data

Reimplemented in msp::msg::InavSetRateProfile, msp::msg::InavSetBatteryConfig, msp::msg::InavSetMisc, msp::msg::CommonSetMotorMixer, msp::msg::CommonSetSetting, msp::msg::CommonSetting, msp::msg::CommonSetTz, msp::msg::SetRtc, msp::msg::Set4WayIF, msp::msg::SetServoMixRule, msp::msg::SetAccTrim, msp::msg::SetCompassConfig, msp::msg::SetGpsConfig, msp::msg::SetMotorConfig, msp::msg::SetLedStripModecolor, msp::msg::SetSensorAlignment, msp::msg::SetRcDeadband, msp::msg::SetMotor3dConf, msp::msg::SetMotor, msp::msg::SetServoConf, msp::msg::SetHeading, msp::msg::SelectSetting, msp::msg::SetWp, msp::msg::SetMisc, msp::msg::SetRcTuning, msp::msg::SetPid, msp::msg::SetRawGPS, msp::msg::SetRawRc, msp::msg::SetTxInfo, msp::msg::SetBeeperConfig, msp::msg::CopyProfile, msp::msg::Displayport, msp::msg::SetArmingDisabled, msp::msg::CameraControl, msp::msg::SetSensorConfig, msp::msg::SetPidAdvanced, msp::msg::SetFilterConfig, msp::msg::SetAdvancedConfig, msp::msg::SetVtxConfig, msp::msg::OsdCharWrite, msp::msg::SetOsdConfig, msp::msg::SetTransponderConfig, msp::msg::SetBlackboxConfig, msp::msg::SetFailsafeConfig, msp::msg::SetLoopTime, msp::msg::DataflashRead, msp::msg::SetBfConfig, msp::msg::SetRxMap, msp::msg::SetArmingConfig, msp::msg::SetVoltageMeterConfig, msp::msg::SetCfSerialConfig, msp::msg::SetAdjustmentRange, msp::msg::SetRssiConfig, msp::msg::SetLedStripConfig, msp::msg::SetLedColors, msp::msg::SetRxConfig, msp::msg::SetMixer, msp::msg::SetCurrentMeterConfig, msp::msg::SetBoardAlignment, msp::msg::SetFeature, msp::msg::SetModeRange, msp::msg::SetBatteryConfig, msp::msg::SetFwConfig, msp::msg::SetRthAndLandConfig, msp::msg::WpMissionSave, msp::msg::WpMissionLoad, msp::msg::SetPositionEstimationConfig, msp::msg::SetCalibrationData, msp::msg::SetNavPosHold, msp::msg::SetBoardName, and msp::msg::SetInavPid.

Definition at line 59 of file Message.hpp.

Queries the firmware variant the message works with.

Returns:
FirmwareVariant for this message

Definition at line 46 of file Message.hpp.

virtual ID msp::Message::id ( ) const [pure virtual]

get the ID of the message

Returns:
ID

Implemented in msp::msg::InavAirSpeed, msp::msg::InavSetRateProfile, msp::msg::InavRateProfile, msp::msg::InavSetBatteryConfig, msp::msg::InavBatteryConfig, msp::msg::InavSetMisc, msp::msg::InavMisc, msp::msg::InavAnalog, msp::msg::InavOpticalFlow, msp::msg::InavStatus, msp::msg::CommonSetMotorMixer, msp::msg::CommonMotorMixer, msp::msg::CommonSetSetting, msp::msg::CommonSetting, msp::msg::CommonSetTz, msp::msg::CommonTz, msp::msg::V2Frame, msp::msg::Debug, msp::msg::DebugMessage, msp::msg::Reserve2, msp::msg::Reserve1, msp::msg::WriteEEPROM, msp::msg::Rtc, msp::msg::SetRtc, msp::msg::Set4WayIF, msp::msg::PassthroughSerial, msp::msg::SetServoMixRule, msp::msg::ServoMixRules, msp::msg::AccTrim, msp::msg::SetAccTrim, msp::msg::SetCompassConfig, msp::msg::SetGpsConfig, msp::msg::SetMotorConfig, msp::msg::SetLedStripModecolor, msp::msg::SetSensorAlignment, msp::msg::SetResetCurrPid, msp::msg::SetRcDeadband, msp::msg::SetMotor3dConf, msp::msg::SetNavConfig, msp::msg::SetMotor, msp::msg::SetServoConf, msp::msg::SetHeading, msp::msg::SelectSetting, msp::msg::SetWp, msp::msg::ResetConfig, msp::msg::SetMisc, msp::msg::MagCalibration, msp::msg::AccCalibration, msp::msg::SetRcTuning, msp::msg::SetBox, msp::msg::SetPid, msp::msg::SetRawGPS, msp::msg::SetRawRc, msp::msg::TxInfo, msp::msg::SetTxInfo, msp::msg::SetBeeperConfig, msp::msg::BeeperConfig, msp::msg::CopyProfile, msp::msg::Displayport, msp::msg::SetOsdVideoConfig, msp::msg::OsdVideoConfig, msp::msg::GpsStatistics, msp::msg::GpsSvInfo, msp::msg::Uid, msp::msg::SensorStatus, msp::msg::StatusEx, msp::msg::EscSensorData, msp::msg::CompassConfig, msp::msg::GpsConfig, msp::msg::MotorConfig, msp::msg::BatteryState, msp::msg::CurrentMeters, msp::msg::VoltageMeters, msp::msg::LedStripModecolor, msp::msg::SensorAlignment, msp::msg::RcDeadband, msp::msg::Motor3dConfig, msp::msg::NavConfig, msp::msg::NavStatus, msp::msg::ServoConf, msp::msg::BoxIds, msp::msg::WayPoint, msp::msg::PidNames, msp::msg::BoxNames, msp::msg::MotorPins, msp::msg::Misc, msp::msg::ActiveBoxes, msp::msg::Pid, msp::msg::RcTuning, msp::msg::Analog, msp::msg::Altitude, msp::msg::Attitude, msp::msg::CompGPS, msp::msg::RawGPS, msp::msg::Rc, msp::msg::Motor, msp::msg::Servo, msp::msg::RawImu, msp::msg::Status, msp::msg::Ident, msp::msg::SetArmingDisabled, msp::msg::CameraControl, msp::msg::SetSensorConfig, msp::msg::SensorConfig, msp::msg::SetPidAdvanced, msp::msg::PidAdvanced, msp::msg::SetFilterConfig, msp::msg::FilterConfig, msp::msg::SetAdvancedConfig, msp::msg::AdvancedConfig, msp::msg::SetVtxConfig, msp::msg::VtxConfig, msp::msg::OsdCharWrite, msp::msg::SetOsdConfig, msp::msg::OsdConfig, msp::msg::SetTransponderConfig, msp::msg::TransponderConfig, msp::msg::SetBlackboxConfig, msp::msg::BlackboxConfig, msp::msg::SdcardSummary, msp::msg::SetRxFailConfigs, msp::msg::RxFailConfigs, msp::msg::SetFailsafeConfig, msp::msg::FailsafeConfig, msp::msg::SetLoopTime, msp::msg::LoopTime, msp::msg::DataflashErase, msp::msg::DataflashRead, msp::msg::DataflashSummary, msp::msg::BfBuildInfo, msp::msg::Reboot, msp::msg::SetBfConfig, msp::msg::BfConfig, msp::msg::SetRxMap, msp::msg::RxMap, msp::msg::SetArmingConfig, msp::msg::ArmingConfig, msp::msg::SetPidController, msp::msg::PidController, msp::msg::SonarAltitude, msp::msg::SetVoltageMeterConfig, msp::msg::VoltageMeterConfig, msp::msg::SetCfSerialConfig, msp::msg::CfSerialConfig, msp::msg::SetAdjustmentRange, msp::msg::AdjustmentRanges, msp::msg::SetRssiConfig, msp::msg::RssiConfig, msp::msg::SetLedStripConfig, msp::msg::LedStripConfigs, msp::msg::SetLedColors, msp::msg::LedColors, msp::msg::SetRxConfig, msp::msg::RxConfig, msp::msg::SetMixer, msp::msg::Mixer, msp::msg::SetCurrentMeterConfig, msp::msg::CurrentMeterConfig, msp::msg::SetBoardAlignment, msp::msg::BoardAlignment, msp::msg::SetFeature, msp::msg::Feature, msp::msg::SetModeRange, msp::msg::ModeRanges, msp::msg::SetBatteryConfig, msp::msg::BatteryConfig, msp::msg::SetFwConfig, msp::msg::FwConfig, msp::msg::SetRthAndLandConfig, msp::msg::RthAndLandConfig, msp::msg::WpGetInfo, msp::msg::WpMissionSave, msp::msg::WpMissionLoad, msp::msg::SetPositionEstimationConfig, msp::msg::PositionEstimationConfig, msp::msg::SetCalibrationData, msp::msg::CalibrationData, msp::msg::SetNavPosHold, msp::msg::NavPosHold, msp::msg::SetBoardName, msp::msg::BoardName, msp::msg::SetInavPid, msp::msg::InavPid, msp::msg::BuildInfo, msp::msg::BoardInfo, msp::msg::FcVersion, msp::msg::FcVariant, msp::msg::ApiVersion, and MyIdent.

virtual std::ostream& msp::Message::print ( std::ostream &  s) const [inline, virtual]

Set the firmware the message should work with.

Parameters:
vFirmwareVariant specifing which firmware this message should tailor itself to.

Definition at line 40 of file Message.hpp.


Member Data Documentation

Definition at line 68 of file Message.hpp.


The documentation for this class was generated from the following file:


msp
Author(s): Christian Rauch
autogenerated on Thu Jun 20 2019 19:40:38