Home
last modified time | relevance | path

Searched refs:tag (Results 1 – 25 of 34) sorted by relevance

12

/nanopb-3.4.0/tests/common_unittests/
Dcommon_unittests.c21 TEST(iter.tag == 1 && iter.pData == &msg.req_int32 && !iter.pSize) in main()
22 …TEST(pb_field_iter_next(&iter) && iter.tag == 2 && iter.pData == &msg.req_int64 && !iter.pSize) in main()
23 …TEST(pb_field_iter_next(&iter) && iter.tag == 3 && iter.pData == &msg.req_uint32 && !iter.pSize) in main()
24 …TEST(pb_field_iter_next(&iter) && iter.tag == 4 && iter.pData == &msg.req_uint64 && !iter.pSize) in main()
25 …TEST(pb_field_iter_next(&iter) && iter.tag == 5 && iter.pData == &msg.req_sint32 && !iter.pSize) in main()
26 …TEST(pb_field_iter_next(&iter) && iter.tag == 6 && iter.pData == &msg.req_sint64 && !iter.pSize) in main()
27 …TEST(pb_field_iter_next(&iter) && iter.tag == 7 && iter.pData == &msg.req_bool && !iter.pSize) in main()
28 …TEST(pb_field_iter_next(&iter) && iter.tag == 8 && iter.pData == &msg.req_fixed32 && !iter.pSize) in main()
29 …TEST(pb_field_iter_next(&iter) && iter.tag == 9 && iter.pData == &msg.req_sfixed32 && !iter.pSize) in main()
30 …TEST(pb_field_iter_next(&iter) && iter.tag == 10 && iter.pData == &msg.req_float && !iter.pSize) in main()
[all …]
/nanopb-3.4.0/
Dpb.h338 pb_size_t tag; /* Tag of current field */ member
436 uint32_t tag, pb_wire_type_t wire_type);
520 #define PB_GEN_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) +1 argument
521 #define PB_GEN_REQ_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) \ argument
523 #define PB_GEN_LARGEST_TAG(structname, atype, htype, ltype, fieldname, tag) \ argument
524 * 0 + tag
527 #define PB_GEN_FIELD_INFO_1(structname, atype, htype, ltype, fieldname, tag) \ argument
528 PB_FIELDINFO_1(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \
534 #define PB_GEN_FIELD_INFO_2(structname, atype, htype, ltype, fieldname, tag) \ argument
535 PB_FIELDINFO_2(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \
[all …]
Dpb_common.c25 iter->tag = (pb_size_t)((word0 >> 2) & 0x3F); in load_descriptor_values()
37 iter->tag = (pb_size_t)(((word0 >> 2) & 0x3F) | ((word1 >> 28) << 6)); in load_descriptor_values()
51 iter->tag = (pb_size_t)(((word0 >> 2) & 0x3F) | ((word1 >> 8) << 6)); in load_descriptor_values()
66 iter->tag = (pb_size_t)(((word0 >> 2) & 0x3F) | ((word1 >> 8) << 6)); in load_descriptor_values()
195 bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag) in pb_field_iter_find() argument
197 if (iter->tag == tag) in pb_field_iter_find()
201 else if (tag > iter->descriptor->largest_tag) in pb_field_iter_find()
210 if (tag < iter->tag) in pb_field_iter_find()
226 if (((fieldinfo >> 2) & 0x3F) == (tag & 0x3F)) in pb_field_iter_find()
231 if (iter->tag == tag && in pb_field_iter_find()
Dpb_decode.c32 …xtension_decoder(pb_istream_t *stream, pb_extension_t *extension, uint32_t tag, pb_wire_type_t wir…
33 static bool checkreturn decode_extension(pb_istream_t *stream, uint32_t tag, pb_wire_type_t wire_ty…
290 bool checkreturn pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool… in pb_decode_tag() argument
295 *tag = 0; in pb_decode_tag()
302 *tag = temp >> 3; in pb_decode_tag()
523 *(pb_size_t*)field->pSize != field->tag) in decode_static_field()
547 *(pb_size_t*)field->pSize = field->tag; in decode_static_field()
644 *(pb_size_t*)field->pSize = field->tag; in decode_pointer_field()
829 pb_extension_t *extension, uint32_t tag, pb_wire_type_t wire_type) in default_extension_decoder() argument
836 if (iter.tag != tag || !iter.message) in default_extension_decoder()
[all …]
Dpb_common.h33 bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag);
Dpb_decode.h142 bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof);
Dpb_encode.c147 if (!pb_encode_tag(stream, PB_WT_STRING, field->tag)) in encode_array()
422 if (*(const pb_size_t*)field->pSize != field->tag) in encode_field()
676 pb_uint64_t tag = ((pb_uint64_t)field_number << 3) | wiretype; in pb_encode_tag() local
677 return pb_encode_varint(stream, tag); in pb_encode_tag()
712 return pb_encode_tag(stream, wiretype, field->tag); in pb_encode_tag_for_field()
/nanopb-3.4.0/spm_headers/nanopb/
Dpb.h338 pb_size_t tag; /* Tag of current field */ member
436 uint32_t tag, pb_wire_type_t wire_type);
520 #define PB_GEN_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) +1 argument
521 #define PB_GEN_REQ_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) \ argument
523 #define PB_GEN_LARGEST_TAG(structname, atype, htype, ltype, fieldname, tag) \ argument
524 * 0 + tag
527 #define PB_GEN_FIELD_INFO_1(structname, atype, htype, ltype, fieldname, tag) \ argument
528 PB_FIELDINFO_1(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \
534 #define PB_GEN_FIELD_INFO_2(structname, atype, htype, ltype, fieldname, tag) \ argument
535 PB_FIELDINFO_2(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \
[all …]
Dpb_common.h33 bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag);
Dpb_decode.h142 bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof);
/nanopb-3.4.0/tests/raw_decode/
Draw_decode.c68 uint32_t tag; in raw_decode() local
73 if (!pb_decode_tag(stream, &wire_type, &tag, &eof)) in raw_decode()
87 if (tag == 0) in raw_decode()
94 indent, position, (int)tag, wire_type, wiretypes[wire_type]); in raw_decode()
158 snprintf(prefix, sizeof(prefix), "f%d> ", (int)tag); in raw_decode()
166 indent, (int)tag); in raw_decode()
/nanopb-3.4.0/examples/using_union_messages/
Ddecode.c21 uint32_t tag; in decode_unionmessage_type() local
24 while (pb_decode_tag(stream, &wire_type, &tag, &eof)) in decode_unionmessage_type()
30 pb_field_iter_find(&iter, tag)) in decode_unionmessage_type()
DREADME.txt16 we actually want. Similarly when decoding, we can manually read the tag of
/nanopb-3.4.0/tests/oneof_callback/
Ddecode_oneof.c18 if (istream && field->tag == SubMsg3_strvalue_tag) in SubMsg3_callback()
90 if (field->tag == OneOfMessage_submsg1_tag) in msg_callback()
97 else if (field->tag == OneOfMessage_submsg2_tag) in msg_callback()
104 else if (field->tag == OneOfMessage_submsg3_tag) in msg_callback()
Dencode_oneof.c18 if (ostream && field->tag == SubMsg3_strvalue_tag) in SubMsg3_callback()
/nanopb-3.4.0/tests/regression/issue_242/
DSConscript1 # Regression test for Issue 242: pb_encode does not encode tag for
/nanopb-3.4.0/tests/fuzztest/
Dgenerate_message.c43 *((pb_size_t*)iter.pSize) = iter.tag; in limit_sizes()
Dvalidation.c27 if (*(pb_size_t*)iter->pSize != iter->tag) in validate_static()
71 if (*(pb_size_t*)iter->pSize != iter->tag) in validate_pointer()
/nanopb-3.4.0/examples/network_server/
Dclient.c33 if (istream != NULL && field->tag == ListFilesResponse_file_tag) in ListFilesResponse_callback()
Dserver.c34 if (ostream != NULL && field->tag == ListFilesResponse_file_tag) in ListFilesResponse_callback()
/nanopb-3.4.0/tests/alltypes_proto3_callback/
Dencode_alltypes_callback.c102 return pb_encode_tag(stream, PB_WT_STRING, field->tag) && in write_repeated_fixed32()
116 return pb_encode_tag(stream, PB_WT_STRING, field->tag) && in write_repeated_fixed64()
131 return pb_encode_tag(stream, PB_WT_STRING, field->tag) && in write_repeated_double()
141 return pb_encode_tag(stream, PB_WT_STRING, field->tag) && in write_repeated_double()
/nanopb-3.4.0/tests/alltypes_callback/
Dencode_alltypes_callback.c102 return pb_encode_tag(stream, PB_WT_STRING, field->tag) && in write_repeated_fixed32()
116 return pb_encode_tag(stream, PB_WT_STRING, field->tag) && in write_repeated_fixed64()
131 return pb_encode_tag(stream, PB_WT_STRING, field->tag) && in write_repeated_double()
141 return pb_encode_tag(stream, PB_WT_STRING, field->tag) && in write_repeated_double()
236 return pb_encode_tag(stream, PB_WT_STRING, field->tag) && in write_farray2()
/nanopb-3.4.0/tests/cxx_callback_datatype/
Dcxx_callback_datatype.cpp38 if (field->tag == TestMessage_submessages_tag) { in TestMessage_callback()
/nanopb-3.4.0/docs/
Dreference.md16 * `PB_FIELD_32BIT`: Add support for field tag numbers over 65535, fields larger than 64 kiB and arr…
188 Type used for storing tag numbers and sizes of message fields. By
193 If tag numbers or fields larger than 65535 are needed, `PB_FIELD_32BIT`
283 pb_size_t tag;
303 | tag | Tag number defined in `.proto` file for this field.
377 uint32_t tag, pb_wire_type_t wire_type);
539 * `PB_ENCODE_NULLTERMINATED`: Indicate the length of the message by appending a zero tag value afte…
561 The tag of a field must be encoded first with
590 …r | Identifier for the field, defined in the .proto file. You can get it from `field->tag`.
800 * `PB_DECODE_NULLTERMINATED`: Expect the message to be terminated with zero tag. The counterpart of…
[all …]
/nanopb-3.4.0/generator/
Dnanopb_generator.py543 self.tag = desc.number
700 return self.tag < other.tag
863 return '#define %-40s %d\n' % (identifier, self.tag)
892 self.tag)
1002 encsize += varint_max_size(self.tag << 3) # Tag + wire type
1030 self.tag = range_start
1081 return '#define %-40s %d\n' % (identifier, self.tag)
1143 self.tag = min([f.tag for f in self.fields])
1191 dynamic_sizes[f.tag] = size
1383 def field_for_tag(self, tag): argument
[all …]

12