enum ModuleType: byte { SPLITTER = 0, SERVO_1 = 1, DC_MOTOR = 2, BATTERY = 3, SERVO_2 = 4, DISPLAY = 5, GRIPPER = 6, SPEAKER = 7, IMU = 8, DISTANCE_SENSOR = 9, SPLITTER_2 = 10, SPLITTER_3 = 11, SPLITTER_4 = 12, SPLITTER_5 = 13, SPLITTER_6 = 14, SPLITTER_7 = 15, SPLITTER_8 = 16 } enum Orientation : byte { Deg0 = 0, Deg90 = 1, Deg180 = 2, Deg270 = 3, } table MotorState { angle: int; } union ModuleState { MotorState } table RobotModule { id: uint8; module_type: ModuleType; configuration: ModuleState; } root_type RobotModule;