/* Generated by the protocol buffer compiler. DO NOT EDIT! */ /* Generated from: DigitalPin.proto */ /* Do not generate deprecated warnings for self */ #ifndef PROTOBUF_C__NO_DEPRECATED #define PROTOBUF_C__NO_DEPRECATED #endif #include "DigitalPin.pb-c.h" void digital_pin__init (DigitalPin *message) { static const DigitalPin init_value = DIGITAL_PIN__INIT; *message = init_value; } size_t digital_pin__get_packed_size (const DigitalPin *message) { assert(message->base.descriptor == &digital_pin__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); } size_t digital_pin__pack (const DigitalPin *message, uint8_t *out) { assert(message->base.descriptor == &digital_pin__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); } size_t digital_pin__pack_to_buffer (const DigitalPin *message, ProtobufCBuffer *buffer) { assert(message->base.descriptor == &digital_pin__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); } DigitalPin * digital_pin__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data) { return (DigitalPin *) protobuf_c_message_unpack (&digital_pin__descriptor, allocator, len, data); } void digital_pin__free_unpacked (DigitalPin *message, ProtobufCAllocator *allocator) { if(!message) return; assert(message->base.descriptor == &digital_pin__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } static const ProtobufCFieldDescriptor digital_pin__field_descriptors[2] = { { "Port", 1, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, offsetof(DigitalPin, has_port), offsetof(DigitalPin, port), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, { "Value", 2, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, offsetof(DigitalPin, has_value), offsetof(DigitalPin, value), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, }; static const unsigned digital_pin__field_indices_by_name[] = { 0, /* field[0] = Port */ 1, /* field[1] = Value */ }; static const ProtobufCIntRange digital_pin__number_ranges[1 + 1] = { { 1, 0 }, { 0, 2 } }; const ProtobufCMessageDescriptor digital_pin__descriptor = { PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, "DigitalPin", "DigitalPin", "DigitalPin", "", sizeof(DigitalPin), 2, digital_pin__field_descriptors, digital_pin__field_indices_by_name, 1, digital_pin__number_ranges, (ProtobufCMessageInit) digital_pin__init, NULL,NULL,NULL /* reserved[123] */ };