Home | History | Annotate | Download | only in generator

Lines Matching defs:to

9     # Add some dummy imports to keep packaging tools happy.
10 import google, distutils.util # bbfreeze seems to need these
11 import pkg_resources # pyinstaller / protobuf 2.5 seem to need these
34 *** Failed to import the protocol definitions for generator. ***
35 *** You have to run 'make' in the nanopb/generator/proto folder. ***
66 '''Keeps a set of nested names and formats them to C identifier.'''
104 '''Class used to represent the encoded size of a field or a message.
227 # Decide the C data type to use in the struct.
253 self.enc_size = None # Needs to be filled in after the message type is available
270 # String/bytes arrays need to be defined as pointers to pointers
336 '''Return the pb_field_t initializer to use in the constant array.
362 '''Determine if this field needs 16bit or 32bit pb_field_t structure to compile properly.
397 # We will have to make a conservative assumption on the length
410 # Decoders must be always able to handle unpacked arrays.
411 # Therefore we have to reserve space for it, even though
448 # until runtime. Other option would be to return None here, but this
523 '''Get list of type names that this structure refers to.'''
706 Generates strings, which should be concatenated and stored to file.
813 yield ' setting PB_MAX_REQUIRED_FIELDS to %d or more.\n' % largest_count
836 yield '#error Field descriptor for %s is too large. Define PB_FIELD_32BIT to fix this.\n' % worst_field
840 yield '/* If you get an error here, it means that you need to define PB_FIELD_32BIT\n'
843 yield ' * The reason you need to do this is that some of your messages contain tag\n'
853 to fix this.\n' % worst_field
857 yield '/* If you get an error here, it means that you need to define PB_FIELD_16BIT\n'
860 yield ' * The reason you need to do this is that some of your messages contain tag\n'
878 yield ' * To get rid of this error, remove any double fields from your .proto.\n'
891 '''Parse a separate options file to list:
908 '''Ugly global variables, should find a good way to pass these.'''
959 "Output will be written to file.pb.h and file.pb.c.")
963 help="Set extension to use instead of 'pb' for generated files. [default: %default]")
968 help="Set format string to use for including other .pb.h files. [default: %default]")
971 help="Set format string to use for including the nanopb pb.h header. [default: %default]")
973 help="Don't add timestamp to .pb.h and .pb.c preambles")
983 filename: The full path to the .proto or .pb source file, as string.
984 fdesc: The loaded FileDescriptorSet, or None to read from the input file.
1045 sys.stderr.write("Use protoc --nanopb-out=-v:. to see a list of the field names.\n")
1068 sys.stderr.write("Writing to " + results['headername'] + " and "
1080 # Set stdin and stdout to binary mode