How to use the nanopb.nanopb.generator.nanopb_generator.Field.__init__ function in nanopb

To help you get started, we’ve selected a few nanopb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github particle-iot / device-os / nanopb / nanopb / generator / nanopb_generator.py View on Github external
def __init__(self, struct_name, desc, field_options):
        self.fullname = struct_name + desc.name
        self.extendee_name = names_from_type_name(desc.extendee)
        Field.__init__(self, self.fullname + 'struct', desc, field_options)

        if self.rules != 'OPTIONAL':
            self.skip = True
        else:
            self.skip = False
            self.rules = 'OPTEXT'