Home
last modified time | relevance | path

Searched refs:type (Results 1 – 25 of 67) sorted by relevance

123

/nanopb-2.7.6/tests/fuzztest/
Dvalidation.c13 if (PB_HTYPE(iter->type) == PB_HTYPE_REPEATED && iter->pSize) in validate_static()
19 else if (PB_HTYPE(iter->type) == PB_HTYPE_OPTIONAL && iter->pSize) in validate_static()
25 else if (PB_HTYPE(iter->type) == PB_HTYPE_ONEOF) in validate_static()
38 if (PB_LTYPE(iter->type) == PB_LTYPE_STRING) in validate_static()
43 else if (PB_LTYPE(iter->type) == PB_LTYPE_BYTES) in validate_static()
49 else if (PB_LTYPE(iter->type) == PB_LTYPE_BOOL) in validate_static()
55 else if (PB_LTYPE_IS_SUBMSG(iter->type)) in validate_static()
69 if (PB_HTYPE(iter->type) == PB_HTYPE_ONEOF) in validate_pointer()
80 if (PB_HTYPE(iter->type) == PB_HTYPE_REPEATED && iter->pSize != &iter->array_size) in validate_pointer()
87 if (PB_HTYPE(iter->type) == PB_HTYPE_REPEATED) in validate_pointer()
[all …]
Dalltypes_proto3_pointer.options1 * type:FT_POINTER
2 *.static_msg type:FT_STATIC
Dalltypes_callback.options1 *.rep_* type:FT_CALLBACK
3 *.Limits.int64_min type:FT_CALLBACK
Dgenerate_message.c28 if (PB_LTYPE(iter.type) == PB_LTYPE_BYTES) in limit_sizes()
33 if (PB_HTYPE(iter.type) == PB_HTYPE_REPEATED) in limit_sizes()
38 if (PB_HTYPE(iter.type) == PB_HTYPE_ONEOF) in limit_sizes()
63 ext.type = &alltypes_static_TestExtension_testextension; in generate_message()
Dalltypes_pointer.options2 * type:FT_POINTER
3 *.static_msg type:FT_STATIC
/nanopb-2.7.6/tests/mem_release/
Dmem_release.proto6 optional string dynamic_str = 1 [(nanopb).type = FT_POINTER];
7 repeated string dynamic_str_arr = 2 [(nanopb).type = FT_POINTER];
8 repeated SubMessage dynamic_submsg = 3 [(nanopb).type = FT_POINTER];
13 required SubMessage static_req_submsg = 1 [(nanopb).type = FT_STATIC];
14 optional SubMessage dynamic_submsg = 2 [(nanopb).type = FT_POINTER];
15 optional SubMessage static_opt_submsg = 3 [(nanopb).type = FT_STATIC];
16 repeated SubMessage static_rep_submsg = 4 [(nanopb).type = FT_STATIC, (nanopb).max_count=2];
22 optional SubMessage dynamic_ext = 100 [(nanopb).type = FT_POINTER];
23 optional SubMessage static_ext = 101 [(nanopb).type = FT_STATIC];
/nanopb-2.7.6/tests/regression/issue_125/
Dextensionbug.options1 * type:FT_IGNORE
3 Message2.extras type:FT_STATIC
4 Message2.field2 type:FT_STATIC
/nanopb-2.7.6/tests/cyclic_messages/
Dcyclic_callback.options1 TreeNode.left type:FT_CALLBACK
2 TreeNode.right type:FT_CALLBACK
6 KeyValuePair.treeValue type:FT_CALLBACK
/nanopb-2.7.6/tests/alltypes_pointer/
Dalltypes.options2 * type:FT_POINTER
3 *.static_msg type:FT_STATIC
4 SubMessage.substuff1 type:FT_STATIC max_size:8
/nanopb-2.7.6/tests/any_type/google/protobuf/
Dany.proto43 // URL that describes the type of the serialized message.
46 // of utility functions or additional generated methods of the Any type.
88 // 'type.googleapis.com/full.type.name' as the type URL and the unpack
89 // methods only use the fully qualified type name after the last '/'
90 // in the type URL, for example "foo.bar.com/x/y.z" will yield type
98 // additional field `@type` which contains the type URL. Example:
107 // "@type": "type.googleapis.com/google.profile.Person",
112 // If the embedded message type is well-known and has a custom JSON
114 // `value` which holds the custom JSON in addition to the `@type`
118 // "@type": "type.googleapis.com/google.protobuf.Duration",
[all …]
/nanopb-2.7.6/tests/generator_relative_paths/proto/protobuf/
Dany.proto43 // URL that describes the type of the serialized message.
46 // of utility functions or additional generated methods of the Any type.
88 // 'type.googleapis.com/full.type.name' as the type URL and the unpack
89 // methods only use the fully qualified type name after the last '/'
90 // in the type URL, for example "foo.bar.com/x/y.z" will yield type
98 // additional field `@type` which contains the type URL. Example:
107 // "@type": "type.googleapis.com/google.profile.Person",
112 // If the embedded message type is well-known and has a custom JSON
114 // `value` which holds the custom JSON in addition to the `@type`
118 // "@type": "type.googleapis.com/google.protobuf.Duration",
[all …]
/nanopb-2.7.6/
Dpb_encode.c138 if (PB_ATYPE(field->type) != PB_ATYPE_POINTER && count > field->array_size) in encode_array()
143 if (PB_LTYPE(field->type) <= PB_LTYPE_LAST_PACKABLE) in encode_array()
149 if (PB_LTYPE(field->type) == PB_LTYPE_FIXED32) in encode_array()
153 else if (PB_LTYPE(field->type) == PB_LTYPE_FIXED64) in encode_array()
180 … if (PB_LTYPE(field->type) == PB_LTYPE_FIXED32 || PB_LTYPE(field->type) == PB_LTYPE_FIXED64) in encode_array()
203 if (PB_ATYPE(field->type) == PB_ATYPE_POINTER && in encode_array()
204 (PB_LTYPE(field->type) == PB_LTYPE_STRING || in encode_array()
205 PB_LTYPE(field->type) == PB_LTYPE_BYTES)) in encode_array()
243 pb_type_t type = field->type; in pb_check_proto3_default_value() local
245 if (PB_ATYPE(type) == PB_ATYPE_STATIC) in pb_check_proto3_default_value()
[all …]
Dpb_decode.c395 switch (PB_LTYPE(field->type)) in decode_basic_field()
466 switch (PB_HTYPE(field->type)) in decode_static_field()
478 && PB_LTYPE(field->type) <= PB_LTYPE_LAST_PACKABLE) in decode_static_field()
520 if (PB_LTYPE_IS_SUBMSG(field->type) && in decode_static_field()
607 if (PB_LTYPE(field->type) == PB_LTYPE_STRING || in initialize_pointer_field()
608 PB_LTYPE(field->type) == PB_LTYPE_BYTES) in initialize_pointer_field()
612 else if (PB_LTYPE_IS_SUBMSG(field->type)) in initialize_pointer_field()
628 switch (PB_HTYPE(field->type)) in decode_pointer_field()
633 if (PB_LTYPE_IS_SUBMSG(field->type) && *(void**)field->pField != NULL) in decode_pointer_field()
640 if (PB_HTYPE(field->type) == PB_HTYPE_ONEOF) in decode_pointer_field()
[all …]
Dpb_common.c18 iter->type = (pb_type_t)((word0 >> 8) & 0xFF); in load_descriptor_values()
88 else if (PB_HTYPE(iter->type) == PB_HTYPE_REPEATED && in load_descriptor_values()
89 (PB_ATYPE(iter->type) == PB_ATYPE_STATIC || in load_descriptor_values()
90 PB_ATYPE(iter->type) == PB_ATYPE_POINTER)) in load_descriptor_values()
100 if (PB_ATYPE(iter->type) == PB_ATYPE_POINTER && iter->pField != NULL) in load_descriptor_values()
110 if (PB_LTYPE_IS_SUBMSG(iter->type)) in load_descriptor_values()
168 const pb_msgdesc_t *msg = (const pb_msgdesc_t*)extension->type->arg; in pb_field_iter_begin_extension()
232 PB_LTYPE(iter->type) != PB_LTYPE_EXTENSION) in pb_field_iter_find()
248 if (PB_LTYPE(iter->type) == PB_LTYPE_EXTENSION) in pb_field_iter_find_extension()
/nanopb-2.7.6/tests/extra_fields/
Dperson_with_extra_field.expected6 type: MOBILE
13 type: WORK
/nanopb-2.7.6/tests/regression/issue_259/
Dcallback_pointer.proto5 optional int32 foo = 1 [(nanopb).type = FT_CALLBACK];
9 optional SubMessage bar = 1 [(nanopb).type = FT_POINTER];
/nanopb-2.7.6/examples/using_union_messages/
Ddecode.c63 const pb_msgdesc_t *type = decode_unionmessage_type(&stream); in main() local
66 if (type == MsgType1_fields) in main()
72 else if (type == MsgType2_fields) in main()
78 else if (type == MsgType3_fields) in main()
/nanopb-2.7.6/tests/regression/issue_504/
Dtest.proto12 string somestring = 1 [(nanopb).type = FT_POINTER];
13 SubMessage2 submsg2 = 2 [(nanopb).type = FT_POINTER];
/nanopb-2.7.6/tests/multiple_files/
Dtest_multiple_files.c24 TEST(PB_LTYPE(iter.type) == PB_LTYPE_VARINT); in main()
26 TEST(PB_LTYPE(iter.type) == PB_LTYPE_UVARINT); in main()
/nanopb-2.7.6/tests/inline/
Dinline.proto11 required bytes data = 1 [(nanopb).type = FT_INLINE, (nanopb).max_size = 32];
16 optional bytes data = 1 [(nanopb).type = FT_INLINE, (nanopb).max_size = 64];
/nanopb-2.7.6/tests/extensions/
Dencode_extensions.c26 ext1.type = &AllTypes_extensionfield1; in main()
30 ext2.type = &ExtensionMessage_AllTypes_extensionfield2; in main()
Ddecode_extensions.c33 ext1.type = &AllTypes_extensionfield1; in main()
37 ext2.type = &ExtensionMessage_AllTypes_extensionfield2; in main()
/nanopb-2.7.6/tests/any_type/
Danytest.proto1 // This file is an example and test case on handling the Any type in nanopb.
2 // The Any type is defined in Google-provided any.proto file:
8 // The type_url field identifies the type of message, and the message data
/nanopb-2.7.6/tests/regression/issue_342/
Dtest_extensions.c28 ext.type = &string_extension; in main()
43 ext.type = &string_extension; in main()
/nanopb-2.7.6/spm_headers/nanopb/
Dpb.h305 pb_type_t type; /* Type of current field */ member
416 const pb_extension_type_t *type; member
526 #define PB_FIELDINFO_AUTO2(width, tag, type, data_offset, data_size, size_offset, array_size) \ argument
527 PB_FIELDINFO_AUTO3(width, tag, type, data_offset, data_size, size_offset, array_size)
529 #define PB_FIELDINFO_AUTO3(width, tag, type, data_offset, data_size, size_offset, array_size) \ argument
530 PB_FIELDINFO_ ## width(tag, type, data_offset, data_size, size_offset, array_size)
571 #define PB_FIELDINFO_ASSERT_AUTO2(width, tag, type, data_offset, data_size, size_offset, array_size… argument
572 PB_FIELDINFO_ASSERT_AUTO3(width, tag, type, data_offset, data_size, size_offset, array_size)
574 #define PB_FIELDINFO_ASSERT_AUTO3(width, tag, type, data_offset, data_size, size_offset, array_size… argument
575 PB_FIELDINFO_ASSERT_ ## width(tag, type, data_offset, data_size, size_offset, array_size)
[all …]

123