Code Review
/
apps
/
low-level-can-service.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Document the .options file usage.
[apps/low-level-can-service.git]
/
generator
/
nanopb.proto
diff --git
a/generator/nanopb.proto
b/generator/nanopb.proto
index
bc40f29
..
fe564b5
100644
(file)
--- a/
generator/nanopb.proto
+++ b/
generator/nanopb.proto
@@
-7,6
+7,8
@@
import "google/protobuf/descriptor.proto";
import "google/protobuf/descriptor.proto";
+option java_package = "fi.kapsi.koti.jpa.nanopb";
+
enum FieldType {
FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible.
FT_CALLBACK = 1; // Always generate a callback field.
enum FieldType {
FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible.
FT_CALLBACK = 1; // Always generate a callback field.
@@
-14,6
+16,9
@@
enum FieldType {
FT_IGNORE = 3; // Ignore the field completely.
}
FT_IGNORE = 3; // Ignore the field completely.
}
+// This is the inner options message, which basically defines options for
+// a field. When it is used in message or file scope, it applies to all
+// fields.
message NanoPBOptions {
// Allocated size for 'bytes' and 'string' fields.
optional int32 max_size = 1;
message NanoPBOptions {
// Allocated size for 'bytes' and 'string' fields.
optional int32 max_size = 1;
@@
-28,9
+33,14
@@
message NanoPBOptions {
optional bool long_names = 4 [default = true];
// Add 'packed' attribute to generated structs.
optional bool long_names = 4 [default = true];
// Add 'packed' attribute to generated structs.
+ // Note: this cannot be used on CPUs that break on unaligned
+ // accesses to variables.
optional bool packed_struct = 5 [default = false];
}
optional bool packed_struct = 5 [default = false];
}
+// Extensions to protoc 'Descriptor' type in order to define options
+// inside a .proto file.
+//
// Protocol Buffers extension number registry
// --------------------------------
// Project: Nanopb
// Protocol Buffers extension number registry
// --------------------------------
// Project: Nanopb