{'fraction_non_alphanumeric': 0.028531663187195546, 'fraction_numerical': 0.006263048016701462, 'mean_word_length': 5.419642857142857, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Using Protocol Buffers for Resource-Constrained Distributed Embedded Systems

Protocol Buffers are a widely used, robust and efficient data interchange format contributed and maintained by Google. Specifications of custom messages, fields and enumerations are comfortably defined in the Proto language and then compiled to a large variety of target programming languages like C++, Java and Python. This makes Protocol Buffers an excellent choice when heterogeneous system platforms and programming environments have to communicate with each other. In this paper, we present our compiler Protobuf-Embedded-C that generates C as target language. This compiler generates lean and self-contained C-code for resource-constrained, distributed and embedded real-time systems. We implemented this new compiler from scratch, because an alternative Protocol Buffers compiler targeting at resource-constrained and real-time systems was not available at the moment of writing. We discuss the features and architecture of this compiler that accepts a subset of the Proto language and give an outline of possible future extensions. To show the practicability, we present a successful application of generated Protobuf-Embedded-C code for an E-Energy-Grid demonstrator, developed together with a major German power supplier during the national research joint-project SPES2020. This document refers to Protobuf-Embedded-C version 1.0M1 (protoc-0.1.jar).