DRONEFIGHTER2017 / Protocol / DataType
Modified : 2018.02.08
Introduce data type.
Protocol::DataType::Type
Data type
namespace Protocol
{
namespace DataType
{
enum Type
{
None = 0x00, // none
Ping = 0x01, // ping
Ack = 0x02, // ack
Error = 0x03, // error
Request = 0x04, // Request data of the specified type
Message = 0x05, // String data
Reserved_1 = 0x06, // Reserved_1
Reserved_2 = 0x07, // Reserved_2
Monitor = 0x08, // Monitoring value for debug
SystemCounter = 0x09, // System counter
Information = 0x0A, // Firmware information
UpdateLocation = 0x0B, // Firmware update position correction
Update = 0x0C, // Firmware update
Encrypt = 0x0D, // Firmware encrypt
Address = 0x0E, // Device address
Administrator = 0x0F, // Obtain Administrator Permissions
Control = 0x10, // Control command
Command = 0x11, // Command
// Light
LightManual = 0x20, // LED manual control
LightMode = 0x21, // LED mode
LightModeCommand = 0x22, // LED mode, Command
LightModeCommandIr = 0x23, // LED mode, Command, IR
LightModeColor = 0x24, // LED mode 3 colors
LightModeColorCommand = 0x25, // LED mode 3 colors, Command
LightModeColorCommandIr = 0x26, // LED mode 3 colors, Command, IR
LightModeColors = 0x27, // LED mode palette
LightModeColorsCommand = 0x28, // LED mode palette, Command
LightModeColorsCommandIr = 0x29, // LED mode palette, Command, IR
LightEvent = 0x2A, // LED event
LightEventCommand = 0x2B, // LED event, Command
LightEventCommandIr = 0x2C, // LED event, Command, IR
LightEventColor = 0x2D, // LED event 3 colors
LightEventColorCommand = 0x2E, // LED event 3 colors, Command
LightEventColorCommandIr = 0x2F, // LED event 3 colors, Command, IR
LightEventColors = 0x30, // LED event palette
LightEventColorsCommand = 0x31, // LED event palette, Command
LightEventColorsCommandIr = 0x32, // LED event palette, Command, IR
LightModeDefaultColor = 0x33, // LED mode default 3 color.
// status, setting
State = 0x40, // Drone status
Attitude, // Drone attitude
GyroBias, // Drone gyro bias
TrimAll, // Drone trim all
TrimFlight, // Drone trim flight
TrimDrive, // Drone trim drive
UserInterface, // User interface
// Sensor raw data
Imu = 0x50, // IMU Raw
Pressure, // Pressure sensor
Battery, // Battery
Range, // Range sensor
ImageFlow, // Image flow
CameraImage, // Camera Image
// Input
Button = 0x70, // button input
Joystick, // joystick input
// Devices
Motor = 0x80, // Motor control and check current value
MotorSingle, // Single motor control
IrMessage, // IR data send & recieve
Buzzer, // Buzzer control
Vibrator, // Vibrator control
// System log
CountFlight = 0x90, // count of flight
CountDrive, // count of drive
// RF
Pairing = 0xA0, // pairing
Rssi, // RSSI
EndOfType
};
}
}
Link that connects the structures associated with each DataType.
이름 | 값 | 대상 | 설명 | 구조체 |
---|---|---|---|---|
None | 0x00 | - | none | |
Ping | 0x01 | A | Communication verification | Protocol::Ping |
Ack | 0x02 | A | Response to data receive | Protocol::Ack |
Error | 0x03 | - | Error(reserve, Specify Bit Flag Later) | |
Request | 0x04 | A | Request data of the specified type | Protocol::Request |
Message | 0x05 | - | String data | |
Reserved_1 | 0x06 | - | Reserved_1 | |
Reserved_2 | 0x07 | - | Reserved_2 | |
Monitor | 0x08 | D | Send array of values for debugging | |
SystemCounter | 0x09 | A | System counter | |
Information | 0x0A | A | Firmware and device information | |
UpdateLocation | 0x0B | A | Firmware update position correction | |
Update | 0x0C | A | Firmware update | |
Encrypt | 0x0D | - | Firmware encrypt | |
Address | 0x0E | A | Device address | |
Administrator | 0x0F | - | Obtain Administrator Permissions | |
Control | 0x10 | D | Control command | Control::Double8, Control::Quad8 |
Command | 0x11 | A | Command | Protocol::Command |
LightManual | 0x20 | A | LED manual control | Protocol::Light::Manual |
LightMode | 0x21 | A | LED mode | Protocol::Light::Mode |
LightModeCommand | 0x22 | A | LED mode, command | Protocol::Light::ModeCommand |
LightModeCommandIr | 0x23 | A | LED mode, command, IR | Protocol::Light::ModeCommandIr |
LightModeColor | 0x24 | - | LED mode 3 colors | |
LightModeColorCommand | 0x25 | - | LED mode 3 colors, command | |
LightModeColorCommandIr | 0x26 | - | LED mode 3 colors, command, IR | |
LightModeColors | 0x27 | - | LED mode palette | |
LightModeColorsCommand | 0x28 | - | LED mode palette, command | |
LightModeColorsCommandIr | 0x29 | - | LED mode palette, command, IR | |
LightEvent | 0x2A | A | LED event | Protocol::Light::Event |
LightEventCommand | 0x2B | A | LED event, command | Protocol::Light::EventCommand |
LightEventCommandIr | 0x2C | A | LED event, command, IR | Protocol::Light::EventCommandIr |
LightEventColor | 0x2D | - | LED event 3 colors | |
LightEventColorCommand | 0x2E | - | LED event 3 colors, command | |
LightEventColorCommandIr | 0x2F | - | LED event 3 colors, 커command드, IR | |
LightEventColors | 0x30 | - | LED event palette | |
LightEventColorsCommand | 0x31 | - | LED event palette, command | |
LightEventColorsCommandIr | 0x32 | - | LED event palette, command, IR | |
LightModeDefaultColor | 0x33 | - | LED mode default 3 color. | Protocol::Light::ModeColor |
State | 0x40 | D | Drone status | Protocol::State |
Attitude | 0x41 | D | Drone Attitude(Angle) | Protocol::Attitude |
GyroBias | 0x42 | D | Drone gyro bias | Protocol::GyroBias |
TrimAll | 0x43 | D | All trim | Protocol::TrimAll |
TrimFlight | 0x44 | D | Flight trim | Protocol::TrimFlight |
TrimDrive | 0x45 | D | Drive trime | Protocol::TrimDrive |
UserInterface | 0x46 | C | User interface setting | Protocol::UserInterface |
Imu | 0x50 | D | IMU(Accel, Gyro, Angle) | Protocol::Imu |
Pressure | 0x51 | - | Pressure sensor data | |
Battery | 0x52 | - | Battery | |
Range | 0x53 | - | Range sensor | |
ImageFlow | 0x54 | - | Image Flow | |
CameraImage | 0x55 | - | Camera Image | |
Button | 0x70 | A | Button input | Protocol::Button |
Joystick | 0x71 | C | Joystick input | Protocol::Joystick |
Motor | 0x80 | D | Motor control and check current value | Protocol::Motor |
MotorSingle | 0x81 | D | Single motor control | Protocol::MotorSingle |
IrMessage | 0x82 | D | IR data send & recieve | Protocol::IrMessage |
Buzzer | 0x83 | C | Buzzer control | Protocol::Buzzer |
Vibrator | 0x84 | C | Vibrator control | Protocol::Vibrator |
CountFlight | 0x90 | D | count of flight log | Protocol::CountFlight |
CountDrive | 0x91 | D | count of dirve log | Protocol::CountDrive |
Pairing | 0xA0 | A | Pairing | Protocol::Pairing |
Rssi | 0xA1 | - | RSSI |
- A: All device
- C: Controller
- D: Drone
DRONE FIGHTER 2017
- Intro
- Typedef
- DataType
- Definitions
- Structs
- Structs - Light