Home
last modified time | relevance | path

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

12

/nanopb-2.7.6/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-2.7.6/spm_headers/nanopb/
Dpb.h302 pb_size_t tag; /* Tag of current field */ member
399 uint32_t tag, pb_wire_type_t wire_type);
483 #define PB_GEN_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) +1 argument
484 #define PB_GEN_REQ_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) \ argument
486 #define PB_GEN_LARGEST_TAG(structname, atype, htype, ltype, fieldname, tag) \ argument
487 * 0 + tag
490 #define PB_GEN_FIELD_INFO_1(structname, atype, htype, ltype, fieldname, tag) \ argument
491 PB_FIELDINFO_1(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \
497 #define PB_GEN_FIELD_INFO_2(structname, atype, htype, ltype, fieldname, tag) \ argument
498 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.h148 bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof);
/nanopb-2.7.6/
Dpb.h302 pb_size_t tag; /* Tag of current field */ member
399 uint32_t tag, pb_wire_type_t wire_type);
483 #define PB_GEN_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) +1 argument
484 #define PB_GEN_REQ_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) \ argument
486 #define PB_GEN_LARGEST_TAG(structname, atype, htype, ltype, fieldname, tag) \ argument
487 * 0 + tag
490 #define PB_GEN_FIELD_INFO_1(structname, atype, htype, ltype, fieldname, tag) \ argument
491 PB_FIELDINFO_1(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \
497 #define PB_GEN_FIELD_INFO_2(structname, atype, htype, ltype, fieldname, tag) \ argument
498 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…
288 bool checkreturn pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool… in pb_decode_tag() argument
293 *tag = 0; in pb_decode_tag()
300 *tag = temp >> 3; in pb_decode_tag()
521 *(pb_size_t*)field->pSize != field->tag) in decode_static_field()
545 *(pb_size_t*)field->pSize = field->tag; in decode_static_field()
642 *(pb_size_t*)field->pSize = field->tag; in decode_pointer_field()
818 pb_extension_t *extension, uint32_t tag, pb_wire_type_t wire_type) in default_extension_decoder() argument
825 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.h148 bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof);
Dpb_encode.c145 if (!pb_encode_tag(stream, PB_WT_STRING, field->tag)) in encode_array()
420 if (*(const pb_size_t*)field->pSize != field->tag) in encode_field()
663 pb_uint64_t tag = ((pb_uint64_t)field_number << 3) | wiretype; in pb_encode_tag() local
664 return pb_encode_varint(stream, tag); in pb_encode_tag()
699 return pb_encode_tag(stream, wiretype, field->tag); in pb_encode_tag_for_field()
/nanopb-2.7.6/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-2.7.6/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-2.7.6/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-2.7.6/tests/regression/issue_242/
DSConscript1 # Regression test for Issue 242: pb_encode does not encode tag for
/nanopb-2.7.6/tests/fuzztest/
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()
Dgenerate_message.c43 *((pb_size_t*)iter.pSize) = iter.tag; in limit_sizes()
/nanopb-2.7.6/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-2.7.6/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-2.7.6/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-2.7.6/tests/cxx_callback_datatype/
Dcxx_callback_datatype.cpp38 if (field->tag == TestMessage_submessages_tag) { in TestMessage_callback()
/nanopb-2.7.6/docs/
Dreference.md15 * `PB_FIELD_32BIT`: Add support for field tag numbers over 65535, fields larger than 64 kiB and arr…
175 Type used for storing tag numbers and sizes of message fields. By
180 If tag numbers or fields larger than 65535 are needed, `PB_FIELD_32BIT`
270 pb_size_t tag;
290 | tag | Tag number defined in `.proto` file for this field.
364 uint32_t tag, pb_wire_type_t wire_type);
526 * `PB_ENCODE_NULLTERMINATED`: Indicate the length of the message by appending a zero tag value afte…
548 The tag of a field must be encoded first with
577 …r | Identifier for the field, defined in the .proto file. You can get it from `field->tag`.
787 * `PB_DECODE_NULLTERMINATED`: Expect the message to be terminated with zero tag. The counterpart of…
[all …]
/nanopb-2.7.6/generator/
Dnanopb_generator.py470 self.tag = desc.number
627 return self.tag < other.tag
771 return '#define %-40s %d\n' % (identifier, self.tag)
793 self.tag)
902 encsize += varint_max_size(self.tag << 3) # Tag + wire type
930 self.tag = range_start
981 return '#define %-40s %d\n' % (identifier, self.tag)
1043 self.tag = min([f.tag for f in self.fields])
1091 dynamic_sizes[f.tag] = size
1287 def field_for_tag(self, tag): argument
[all …]

12