/* Generated by the protocol buffer compiler. DO NOT EDIT! */ /* Generated from: HardwareMotor.proto */ /* Do not generate deprecated warnings for self */ #ifndef PROTOBUF_C__NO_DEPRECATED #define PROTOBUF_C__NO_DEPRECATED #endif #include "HardwareMotor.pb-c.h" void hardware_motor__init (HardwareMotor *message) { static const HardwareMotor init_value = HARDWARE_MOTOR__INIT; *message = init_value; } size_t hardware_motor__get_packed_size (const HardwareMotor *message) { assert(message->base.descriptor == &hardware_motor__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); } size_t hardware_motor__pack (const HardwareMotor *message, uint8_t *out) { assert(message->base.descriptor == &hardware_motor__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); } size_t hardware_motor__pack_to_buffer (const HardwareMotor *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &hardware_motor__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); } HardwareMotor * hardware_motor__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data) { return (HardwareMotor *) protobuf_c_message_unpack (&hardware_motor__descriptor, allocator, len, data); } void hardware_motor__free_unpacked (HardwareMotor *message, ProtobufCAllocator *allocator) { if(!message) return; assert(message->base.descriptor == &hardware_motor__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } static const ProtobufCFieldDescriptor hardware_motor__field_descriptors[35] = { { "", 1, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_ENUM, offsetof(HardwareMotor, has_hardwaremotortype), offsetof(HardwareMotor, hardwaremotortype), &hardware_motor_type__descriptor, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 2, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_minfrequency), offsetof(HardwareMotor, minfrequency), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_maxfrequency), offsetof(HardwareMotor, maxfrequency), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 4, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_setmicrostep), offsetof(HardwareMotor, setmicrostep), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 5, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_microstep), offsetof(HardwareMotor, microstep), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 6, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwareMotor, has_maxchangeslope), offsetof(HardwareMotor, maxchangeslope), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 7, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwareMotor, has_highlengthmicrosecond), offsetof(HardwareMotor, highlengthmicrosecond), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 8, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, offsetof(HardwareMotor, has_speedmaster), offsetof(HardwareMotor, speedmaster), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 9, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_pulseperround), offsetof(HardwareMotor, pulseperround), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 10, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_DOUBLE, offsetof(HardwareMotor, has_pulleyradius), offsetof(HardwareMotor, pulleyradius), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 11, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_configword), offsetof(HardwareMotor, configword), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 12, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, offsetof(HardwareMotor, has_directionthreadwize), offsetof(HardwareMotor, directionthreadwize), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 13, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_kvalhold), offsetof(HardwareMotor, kvalhold), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 14, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_kvalrun), offsetof(HardwareMotor, kvalrun), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 15, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_kvalacc), offsetof(HardwareMotor, kvalacc), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 16, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_kvaldec), offsetof(HardwareMotor, kvaldec), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 17, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_overcurrentthreshold), offsetof(HardwareMotor, overcurrentthreshold), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 18, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_stallthreshold), offsetof(HardwareMotor, stallthreshold), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 19, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_thermalcompensationfactor), offsetof(HardwareMotor, thermalcompensationfactor), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 20, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, offsetof(HardwareMotor, has_lowspeedoptimization), offsetof(HardwareMotor, lowspeedoptimization), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 21, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_stslp), offsetof(HardwareMotor, stslp), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 22, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_intspd), offsetof(HardwareMotor, intspd), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 23, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_fnslpacc), offsetof(HardwareMotor, fnslpacc), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 24, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_fnslpdec), offsetof(HardwareMotor, fnslpdec), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 25, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_fsspd), offsetof(HardwareMotor, fsspd), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 26, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_gatecfg1), offsetof(HardwareMotor, gatecfg1), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 27, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_gatecfg2), offsetof(HardwareMotor, gatecfg2), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 28, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_tvalhold), offsetof(HardwareMotor, tvalhold), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 29, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_tvalrun), offsetof(HardwareMotor, tvalrun), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 30, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_tvalacc), offsetof(HardwareMotor, tvalacc), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 31, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_tvaldec), offsetof(HardwareMotor, tvaldec), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 32, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_tfast), offsetof(HardwareMotor, tfast), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 33, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_tonmin), offsetof(HardwareMotor, tonmin), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 34, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_toffmin), offsetof(HardwareMotor, toffmin), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "", 35, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(HardwareMotor, has_p01configword), offsetof(HardwareMotor, p01configword), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, }; static const unsigned hardware_motor__field_indices_by_name[] = { 10, /* field[10] = ConfigWord */ 11, /* field[11] = DirectionThreadWize */ 22, /* field[22] = FnSlpAcc */ 23, /* field[23] = FnSlpDec */ 24, /* field[24] = FsSpd */ 25, /* field[25] = GateCfg1 */ 26, /* field[26] = GateCfg2 */ 0, /* field[0] = HardwareMotorType */ 6, /* field[6] = HighLengthMicroSecond */ 21, /* field[21] = IntSpd */ 14, /* field[14] = KvalAcc */ 15, /* field[15] = KvalDec */ 12, /* field[12] = KvalHold */ 13, /* field[13] = KvalRun */ 19, /* field[19] = LowSpeedOptimization */ 5, /* field[5] = MaxChangeSlope */ 2, /* field[2] = MaxFrequency */ 4, /* field[4] = MicroStep */ 1, /* field[1] = MinFrequency */ 16, /* field[16] = OverCurrentThreshold */ 34, /* field[34] = P01ConfigWord */ 9, /* field[9] = PulleyRadius */ 8, /* field[8] = PulsePerRound */ 3, /* field[3] = SetMicroStep */ 7, /* field[7] = SpeedMaster */ 20, /* field[20] = StSlp */ 17, /* field[17] = StallThreshold */ 31, /* field[31] = TFast */ 33, /* field[33] = TOffMin */ 32, /* field[32] = TOnMin */ 29, /* field[29] = TValAcc */ 30, /* field[30] = TValDec */ 27, /* field[27] = TValHold */ 28, /* field[28] = TValRun */ 18, /* field[18] = ThermalCompensationFactor */ }; static const ProtobufCIntRange hardware_motor__number_ranges[1 + 1] = { { 1, 0 }, { 0, 35 } }; const ProtobufCMessageDescriptor hardware_motor__descriptor = { PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, "", "", "", "", sizeof(HardwareMotor), 35, hardware_motor__field_descriptors, hardware_motor__field_indices_by_name, 1, hardware_motor__number_ranges, (ProtobufCMessageInit) hardware_motor__init, NULL,NULL,NULL /* reserved[123] */ };