EmbeddedProto 4.0.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- EmbeddedProto/EmbeddedProto.py +122 -0
- EmbeddedProto/Features.py +255 -0
- EmbeddedProto/Field.py +1295 -0
- EmbeddedProto/Oneof.py +74 -0
- EmbeddedProto/ProtoFile.py +210 -0
- EmbeddedProto/TypeDefinitions.py +367 -0
- EmbeddedProto/__init__.py +0 -0
- EmbeddedProto/__main__.py +28 -0
- EmbeddedProto/config.py +173 -0
- EmbeddedProto/custom_header.py +513 -0
- EmbeddedProto/embedded_proto_options.proto +62 -0
- EmbeddedProto/embedded_proto_options_pb2.py +37 -0
- EmbeddedProto/field_options.py +344 -0
- EmbeddedProto/main.py +316 -0
- EmbeddedProto/src/EmbeddedProto/BytesStringCallback.h +476 -0
- EmbeddedProto/src/EmbeddedProto/Defines.h +118 -0
- EmbeddedProto/src/EmbeddedProto/EmptyArray.h +81 -0
- EmbeddedProto/src/EmbeddedProto/Errors.h +53 -0
- EmbeddedProto/src/EmbeddedProto/FieldStringBytes.h +793 -0
- EmbeddedProto/src/EmbeddedProto/Fields.h +832 -0
- EmbeddedProto/src/EmbeddedProto/Functional.h +412 -0
- EmbeddedProto/src/EmbeddedProto/MessageCallback.h +688 -0
- EmbeddedProto/src/EmbeddedProto/MessageInterface.h +792 -0
- EmbeddedProto/src/EmbeddedProto/MessageSizeCalculator.h +109 -0
- EmbeddedProto/src/EmbeddedProto/MessageState.h +207 -0
- EmbeddedProto/src/EmbeddedProto/ReadBufferFixedSize.h +204 -0
- EmbeddedProto/src/EmbeddedProto/ReadBufferInterface.h +181 -0
- EmbeddedProto/src/EmbeddedProto/ReadBufferSection.h +232 -0
- EmbeddedProto/src/EmbeddedProto/RepeatedField.h +1053 -0
- EmbeddedProto/src/EmbeddedProto/RepeatedFieldCallback.h +432 -0
- EmbeddedProto/src/EmbeddedProto/RepeatedFieldFixedSize.h +367 -0
- EmbeddedProto/src/EmbeddedProto/Version.h +39 -0
- EmbeddedProto/src/EmbeddedProto/WireFormatter.h +852 -0
- EmbeddedProto/src/EmbeddedProto/WriteBufferFixedSize.h +114 -0
- EmbeddedProto/src/EmbeddedProto/WriteBufferInterface.h +134 -0
- EmbeddedProto/src/EmbeddedProto.h +55 -0
- EmbeddedProto/templates/FieldBasic_Deserialize.h.jinja2 +26 -0
- EmbeddedProto/templates/FieldBasic_GetSet.h.jinja2 +89 -0
- EmbeddedProto/templates/FieldBytes_GetSet.h.jinja2 +86 -0
- EmbeddedProto/templates/FieldEnum_Deserialize.h.jinja2 +50 -0
- EmbeddedProto/templates/FieldEnum_GetSet.h.jinja2 +93 -0
- EmbeddedProto/templates/FieldErrorRecursive_GetSet.h.jinja2 +29 -0
- EmbeddedProto/templates/FieldMap_GetSet.h.jinja2 +203 -0
- EmbeddedProto/templates/FieldMsg_Deserialize.h.jinja2 +44 -0
- EmbeddedProto/templates/FieldMsg_GetSet.h.jinja2 +93 -0
- EmbeddedProto/templates/FieldRepeated_GetSet.h.jinja2 +94 -0
- EmbeddedProto/templates/FieldString_GetSet.h.jinja2 +86 -0
- EmbeddedProto/templates/Field_DeserializePartial.h.jinja2 +33 -0
- EmbeddedProto/templates/Field_Serialize.h.jinja2 +112 -0
- EmbeddedProto/templates/Field_SerializePartial.h.jinja2 +119 -0
- EmbeddedProto/templates/Header.h.jinja2 +108 -0
- EmbeddedProto/templates/TypeDefEnum.h.jinja2 +45 -0
- EmbeddedProto/templates/TypeDefMsg.h.jinja2 +791 -0
- EmbeddedProto/templates/TypeOneof.h.jinja2 +178 -0
- EmbeddedProto/version.json +3 -0
- embeddedproto-4.0.0b1.dist-info/METADATA +141 -0
- embeddedproto-4.0.0b1.dist-info/RECORD +63 -0
- embeddedproto-4.0.0b1.dist-info/WHEEL +5 -0
- embeddedproto-4.0.0b1.dist-info/entry_points.txt +3 -0
- embeddedproto-4.0.0b1.dist-info/licenses/LICENSE +30 -0
- embeddedproto-4.0.0b1.dist-info/licenses/LICENSES/GPL-3.0-only.txt +674 -0
- embeddedproto-4.0.0b1.dist-info/licenses/LICENSES/LicenseRef-EmbeddedProto-Commercial.txt +12 -0
- embeddedproto-4.0.0b1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
{#
|
|
2
|
+
Copyright (C) 2020-2026 Embedded AMS B.V. - All Rights Reserved
|
|
3
|
+
|
|
4
|
+
This file is part of Embedded Proto.
|
|
5
|
+
|
|
6
|
+
Embedded Proto is dual licensed. You may use it under the terms of the
|
|
7
|
+
GNU General Public License version 3 (GPLv3) as published by the Free
|
|
8
|
+
Software Foundation, or under a commercial license from Embedded AMS B.V.
|
|
9
|
+
|
|
10
|
+
Under the GPLv3 you must release the source code of
|
|
11
|
+
any product you distribute that includes Embedded Proto or code
|
|
12
|
+
generated by it. A commercial license removes that obligation.
|
|
13
|
+
See <https://embeddedproto.com/pricing/>.
|
|
14
|
+
|
|
15
|
+
Embedded Proto is distributed WITHOUT ANY WARRANTY; without even the
|
|
16
|
+
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
17
|
+
See the LICENSE file in the root of the repository for details.
|
|
18
|
+
|
|
19
|
+
SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-EmbeddedProto-Commercial
|
|
20
|
+
|
|
21
|
+
Embedded AMS B.V., Hoorn, the Netherlands - info at EmbeddedProto dot com
|
|
22
|
+
#}
|
|
23
|
+
{% macro assign(_oneof) %}
|
|
24
|
+
if(rhs.get_which_{{_oneof.get_name()}}() != {{_oneof.get_which_oneof()}})
|
|
25
|
+
{
|
|
26
|
+
// First delete the old object in the oneof.
|
|
27
|
+
clear_{{_oneof.get_name()}}();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
switch(rhs.get_which_{{_oneof.get_name()}}())
|
|
31
|
+
{
|
|
32
|
+
{% for field in _oneof.get_fields() %}
|
|
33
|
+
case FieldNumber::{{field.get_variable_id_name()}}:
|
|
34
|
+
set_{{field.get_name()}}(rhs.get_{{field.name}}());
|
|
35
|
+
break;
|
|
36
|
+
|
|
37
|
+
{% endfor %}
|
|
38
|
+
default:
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
{% endmacro %}
|
|
42
|
+
{# #}
|
|
43
|
+
{# ------------------------------------------------------------------------------------------------------------------ #}
|
|
44
|
+
{# #}
|
|
45
|
+
{% macro init(_oneof) %}
|
|
46
|
+
void init_{{_oneof.get_name()}}(const FieldNumber field_id)
|
|
47
|
+
{
|
|
48
|
+
if(FieldNumber::NOT_SET != {{_oneof.get_which_oneof()}})
|
|
49
|
+
{
|
|
50
|
+
// First delete the old object in the oneof.
|
|
51
|
+
clear_{{_oneof.get_name()}}();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
{% if _oneof.oneof_allocation_required() %}
|
|
55
|
+
// C++11 unions only support nontrivial members when you explicitly call the placement new statement.
|
|
56
|
+
switch(field_id)
|
|
57
|
+
{
|
|
58
|
+
{% for field in _oneof.get_fields() %}
|
|
59
|
+
{% if field.oneof_allocation_required() %}
|
|
60
|
+
case FieldNumber::{{field.get_variable_id_name()}}:
|
|
61
|
+
new(&{{field.get_variable_name()}}) {{field.get_type()}};
|
|
62
|
+
break;
|
|
63
|
+
|
|
64
|
+
{% endif %}
|
|
65
|
+
{% endfor %}
|
|
66
|
+
default:
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
{% endif %}
|
|
71
|
+
{{_oneof.get_which_oneof()}} = field_id;
|
|
72
|
+
}
|
|
73
|
+
{% endmacro %}
|
|
74
|
+
{# #}
|
|
75
|
+
{# ------------------------------------------------------------------------------------------------------------------ #}
|
|
76
|
+
{# #}
|
|
77
|
+
{% macro clear(_oneof) %}
|
|
78
|
+
void clear_{{_oneof.get_name()}}()
|
|
79
|
+
{
|
|
80
|
+
switch({{_oneof.get_which_oneof()}})
|
|
81
|
+
{
|
|
82
|
+
{% for field in _oneof.get_fields() %}
|
|
83
|
+
case FieldNumber::{{field.get_variable_id_name()}}:
|
|
84
|
+
{% if field.oneof_allocation_required() %}
|
|
85
|
+
::EmbeddedProto::destroy_at(&{{field.get_variable_name()}});
|
|
86
|
+
{% elif field.of_type_enum %}
|
|
87
|
+
{{field.get_variable_name()}} = {{field.get_default_value()}};
|
|
88
|
+
{% else %}
|
|
89
|
+
{{field.get_variable_name()}}.set(0);
|
|
90
|
+
{% endif %}
|
|
91
|
+
break;
|
|
92
|
+
{% endfor %}
|
|
93
|
+
default:
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
{{_oneof.get_which_oneof()}} = FieldNumber::NOT_SET;
|
|
97
|
+
}
|
|
98
|
+
{% endmacro %}
|
|
99
|
+
{# #}
|
|
100
|
+
{# ------------------------------------------------------------------------------------------------------------------ #}
|
|
101
|
+
{# #}
|
|
102
|
+
{% macro deserialize(_oneof, _environment) %}
|
|
103
|
+
::EmbeddedProto::Error deserialize_{{_oneof.get_name()}}(const FieldNumber field_id,
|
|
104
|
+
::EmbeddedProto::ReadBufferInterface& buffer)
|
|
105
|
+
{
|
|
106
|
+
::EmbeddedProto::Error return_value = ::EmbeddedProto::Error::NO_ERRORS;
|
|
107
|
+
|
|
108
|
+
if(field_id != {{_oneof.get_which_oneof()}})
|
|
109
|
+
{
|
|
110
|
+
init_{{_oneof.get_name()}}(field_id);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
switch({{_oneof.get_which_oneof()}})
|
|
114
|
+
{
|
|
115
|
+
{% for field in _oneof.get_fields() %}
|
|
116
|
+
case FieldNumber::{{field.get_variable_id_name()}}:
|
|
117
|
+
{{ field.render_deserialize(_environment)|indent(6) }}
|
|
118
|
+
break;
|
|
119
|
+
{% endfor %}
|
|
120
|
+
default:
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// If we have a "serious failure", clear the oneof. The end of buffer could signal a partial
|
|
125
|
+
// deserialization so we should not clear in that case.
|
|
126
|
+
if((::EmbeddedProto::Error::NO_ERRORS != return_value) &&
|
|
127
|
+
(::EmbeddedProto::Error::END_OF_BUFFER != return_value))
|
|
128
|
+
{
|
|
129
|
+
clear_{{_oneof.get_name()}}();
|
|
130
|
+
}
|
|
131
|
+
return return_value;
|
|
132
|
+
}
|
|
133
|
+
{% endmacro %}
|
|
134
|
+
{# #}
|
|
135
|
+
{# ------------------------------------------------------------------------------------------------------------------ #}
|
|
136
|
+
{# #}
|
|
137
|
+
{% macro to_string(_oneof) %}
|
|
138
|
+
::EmbeddedProto::string_view to_string_{{_oneof.get_name()}}(::EmbeddedProto::string_view& str, const uint32_t indent_level, const bool first_field) const
|
|
139
|
+
{
|
|
140
|
+
::EmbeddedProto::string_view left_chars = str;
|
|
141
|
+
|
|
142
|
+
switch({{_oneof.get_which_oneof()}})
|
|
143
|
+
{
|
|
144
|
+
{% for field in _oneof.get_fields() %}
|
|
145
|
+
case FieldNumber::{{field.get_variable_id_name()}}:
|
|
146
|
+
left_chars = {{field.get_variable_name()}}.to_string(left_chars, indent_level, {{field.get_name()|upper}}_NAME, first_field);
|
|
147
|
+
break;
|
|
148
|
+
{% endfor %}
|
|
149
|
+
default:
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return left_chars;
|
|
154
|
+
}
|
|
155
|
+
{% endmacro %}
|
|
156
|
+
{# #}
|
|
157
|
+
{# ------------------------------------------------------------------------------------------------------------------ #}
|
|
158
|
+
{# #}
|
|
159
|
+
{% macro max_serialized_size(_oneof) %}
|
|
160
|
+
static constexpr uint32_t max_serialized_size_{{_oneof.get_name()}}()
|
|
161
|
+
{
|
|
162
|
+
using namespace EmbeddedProto;
|
|
163
|
+
return
|
|
164
|
+
{% for field in _oneof.get_fields() %}
|
|
165
|
+
{% if not loop.last %}
|
|
166
|
+
{{ ' ' * (loop.index0 * 2) }}max({{field.get_type()}}::max_serialized_size(static_cast<uint32_t>(FieldNumber::{{field.variable_id_name}})),
|
|
167
|
+
{% else %}
|
|
168
|
+
{{ ' ' * (2 + (loop.index0 * 2))}}{{field.get_type()}}::max_serialized_size(static_cast<uint32_t>(FieldNumber::{{field.variable_id_name}}))
|
|
169
|
+
{% endif %}
|
|
170
|
+
{% endfor %}
|
|
171
|
+
{% if _oneof.get_fields() | length > 1 %}
|
|
172
|
+
{% for i in range(_oneof.get_fields() | length - 1) %}
|
|
173
|
+
{{ ' ' * (5 + (loop.revindex * 2)) }})
|
|
174
|
+
{% endfor %}
|
|
175
|
+
{% endif %}
|
|
176
|
+
;
|
|
177
|
+
}
|
|
178
|
+
{% endmacro %}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: EmbeddedProto
|
|
3
|
+
Version: 4.0.0b1
|
|
4
|
+
Summary: EmbeddedProto generator
|
|
5
|
+
Author-email: "Embedded AMS B.V." <info@EmbeddedAMS.nl>
|
|
6
|
+
License-Expression: GPL-3.0-only OR LicenseRef-EmbeddedProto-Commercial
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: LICENSES/GPL-3.0-only.txt
|
|
11
|
+
License-File: LICENSES/LicenseRef-EmbeddedProto-Commercial.txt
|
|
12
|
+
Requires-Dist: Jinja2<4,>=3
|
|
13
|
+
Requires-Dist: MarkupSafe<4,>=2.0
|
|
14
|
+
Requires-Dist: toposort<2,>=1.7
|
|
15
|
+
Requires-Dist: protobuf==7.36.1
|
|
16
|
+
Requires-Dist: grpcio-tools==1.83.1
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Embedded Proto is a product of Embedded AMS B.V. For more information about Embedded Proto please visit [EmbeddedProto.com](https://EmbeddedProto.com).
|
|
23
|
+
|
|
24
|
+
Copyright (C) 2020-2026 Embedded AMS B.V. - All Rights Reserved, [www.EmbeddedAMS.nl](https://www.EmbeddedAMS.nl), [info@EmbeddedAMS.nl](mailto:info@EmbeddedAMS.nl)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# Introduction
|
|
28
|
+
|
|
29
|
+
Embedded Proto is a C++ implementation of [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) dedicated to microcontrollers. The implementation focuses on a small footprint and low memory usage. No dynamic memory allocation is used to make the code predictable. Unit tests and static code analysis are used to improve the reliability of the code.
|
|
30
|
+
|
|
31
|
+
Natively, protocol buffers are not suitable for microcontrollers. The C++ code protoc generates is written for server and desktop processors. Embedded Proto is a plugin for *protoc* generating C++ code suitable for microcontrollers. In this way, Embedded Proto provides an easy-to-use interface to exchange data between embedded devices and the outside world. Specify the data format between your IoT device and other devices, servers, apps, or desktop applications in a standardized way!
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Requirements
|
|
35
|
+
|
|
36
|
+
To generate the code for your messages:
|
|
37
|
+
* Python 3.11 or newer, and pip.
|
|
38
|
+
|
|
39
|
+
The protobuf compiler comes with Embedded Proto, you do not have to install protoc yourself.
|
|
40
|
+
|
|
41
|
+
To build the generated code for your target:
|
|
42
|
+
* A C++ compiler supporting C++17.
|
|
43
|
+
* No dynamic memory, no exceptions and no RTTI are required. The library is header only.
|
|
44
|
+
|
|
45
|
+
Optional, for the alternative ways to install described on the [installation](https://EmbeddedProto.com/documentation/installation/) page:
|
|
46
|
+
* [uv](https://docs.astral.sh/uv/), a much faster replacement for pip and venv.
|
|
47
|
+
* Git, when you use Embedded Proto as a submodule in your project.
|
|
48
|
+
|
|
49
|
+
Optional, for developing Embedded Proto itself:
|
|
50
|
+
* CMake 3.28 or newer, to build and run the unit tests. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
# Getting started
|
|
54
|
+
|
|
55
|
+
New to Embedded Proto? Follow the [quick start](https://EmbeddedProto.com/documentation/quick-start/). In about ten minutes you install Embedded Proto, define a message, generate the code for it and serialize the message in a small program on your PC. The same code moves to your microcontroller without changes.
|
|
56
|
+
|
|
57
|
+
In short, Embedded Proto is installed with pip:
|
|
58
|
+
```bash
|
|
59
|
+
pip install EmbeddedProto
|
|
60
|
+
```
|
|
61
|
+
Generate the C++ code for the messages in your \*.proto file:
|
|
62
|
+
```bash
|
|
63
|
+
embeddedproto -I proto --eams_out=generated proto/reading.proto
|
|
64
|
+
```
|
|
65
|
+
Build your project with C++17, the `generated` folder and the header only library of Embedded Proto as include paths. The command `embeddedproto --cpp-src-location` prints where the library is.
|
|
66
|
+
When linking with a C compiler, do not forget to pass `-lstdc++` to the linker. This prevents errors like `undefined reference to`.
|
|
67
|
+
|
|
68
|
+
Other ways to install, with uv or as a git submodule, are described on the [installation](https://EmbeddedProto.com/documentation/installation/) page.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Documentation
|
|
72
|
+
|
|
73
|
+
The manual lives on [EmbeddedProto.com](https://EmbeddedProto.com/documentation/):
|
|
74
|
+
* [How it works](https://EmbeddedProto.com/documentation/how-it-works/)
|
|
75
|
+
* [Generating source code](https://EmbeddedProto.com/documentation/generating-source-code/) and [setting field options from a file](https://EmbeddedProto.com/documentation/options-file/)
|
|
76
|
+
* [Using a message](https://EmbeddedProto.com/documentation/using-a-message/): strings, bytes, repeated fields, maps, Any and more
|
|
77
|
+
* [Serialization](https://EmbeddedProto.com/documentation/serialization/) and [deserialization](https://EmbeddedProto.com/documentation/deserialization/)
|
|
78
|
+
* [Supported features](https://EmbeddedProto.com/documentation/supported-features/)
|
|
79
|
+
* [Advanced topics](https://EmbeddedProto.com/documentation/advanced-topics/): protobuf editions, callback storage and custom storage
|
|
80
|
+
|
|
81
|
+
Our website also hosts an array of [examples](https://EmbeddedProto.com/examples/) detailing possible use cases and tutorials on toolchain integrations.
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# What is new
|
|
85
|
+
|
|
86
|
+
Version 4.0.0 is the largest release of Embedded Proto so far. It changes how the library is installed, adds maps, Any and streaming, and supports the new protobuf editions. See [what is new in 4.0](https://EmbeddedProto.com/documentation/what-is-new-in-4-0/) for what you gain, and [migrating from 3.x](https://EmbeddedProto.com/documentation/migrating-from-3-x/) for what to change in your project.
|
|
87
|
+
|
|
88
|
+
To stay up to date, signup for our [User Update](https://EmbeddedProto.com/signup).
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
# License
|
|
92
|
+
|
|
93
|
+
Embedded Proto is dual licensed. See [LICENSE](LICENSE) for the full notice.
|
|
94
|
+
|
|
95
|
+
## Open source
|
|
96
|
+
Embedded Proto is free of charge under the GNU General Public License v3.0. The combined work you distribute must comply with the GPLv3; your own source code may use the GPLv3 or any license compatible with it. The code Embedded Proto generates is produced from templates in this repository and embeds code from them, so the template code in it is covered by the same license. The GPL version comes without support.
|
|
97
|
+
|
|
98
|
+
## Commercial
|
|
99
|
+
Building a closed source product? Then you need a commercial license. It removes the obligation to publish your source code, and depending on the tier includes:
|
|
100
|
+
* An unlimited number of MCUs
|
|
101
|
+
* Professional support
|
|
102
|
+
* A code quality report
|
|
103
|
+
|
|
104
|
+
See [embeddedproto.com/pricing](https://EmbeddedProto.com/pricing/). Setting your license token is described on the [installation](https://EmbeddedProto.com/documentation/installation/) page.
|
|
105
|
+
|
|
106
|
+
## Evaluation
|
|
107
|
+
Internal evaluation and testing of Embedded Proto before purchase are free and do not require either license, as long as no product containing Embedded Proto or its generated code is distributed.
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
# Third-party software
|
|
111
|
+
|
|
112
|
+
For compliance reviews, this is every piece of software Embedded Proto relies on, split by whether it ends up in your product or is only used while generating code.
|
|
113
|
+
|
|
114
|
+
## In your product
|
|
115
|
+
Only code from Embedded Proto itself ends up in your firmware. It contains no third-party code. It does use the C++ standard library, which comes from your own toolchain and is licensed by its vendor, not by Embedded Proto.
|
|
116
|
+
|
|
117
|
+
| Component | Copyright | License |
|
|
118
|
+
| --- | --- | --- |
|
|
119
|
+
| Embedded Proto header-only library | Embedded AMS B.V. | GPL-3.0-only OR commercial |
|
|
120
|
+
| Generated message code | Embedded AMS B.V. for the template code, you for your `.proto` definitions | GPL-3.0-only OR commercial |
|
|
121
|
+
| C++ standard library | The vendor of your toolchain | Whatever your toolchain uses, for example GCC's libstdc++ is GPL-3.0 with the runtime library exception |
|
|
122
|
+
|
|
123
|
+
## During code generation
|
|
124
|
+
These run on your development machine and are not linked into your product. Python comes from your own installation, the packages are installed from PyPI. None of them are redistributed by Embedded Proto.
|
|
125
|
+
|
|
126
|
+
| Component | Use | License |
|
|
127
|
+
| --- | --- | --- |
|
|
128
|
+
| [Python](https://www.python.org/) 3.11 or newer | Runs the generator | PSF License |
|
|
129
|
+
| [protobuf](https://github.com/protocolbuffers/protobuf) | Parses `.proto` files, `descriptor.proto` is imported by the options file | BSD-3-Clause |
|
|
130
|
+
| [grpcio-tools](https://github.com/grpc/grpc) | Bundles the `protoc` compiler | Apache-2.0, bundled protoc is BSD-3-Clause |
|
|
131
|
+
| [Jinja2](https://github.com/pallets/jinja) | Renders the code templates | BSD-3-Clause |
|
|
132
|
+
| [MarkupSafe](https://github.com/pallets/markupsafe) | Dependency of Jinja2 | BSD-3-Clause |
|
|
133
|
+
| [toposort](https://gitlab.com/ericvsmith/toposort) | Orders message definitions | Apache-2.0 |
|
|
134
|
+
|
|
135
|
+
## Development only
|
|
136
|
+
[GoogleTest](https://github.com/google/googletest) (BSD-3-Clause) is a git submodule used for the unit tests of the library. It is not part of the generator package or of your product.
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
# Development
|
|
140
|
+
|
|
141
|
+
If you consider helping with the development of Embedded Proto please read [CONTRIBUTING.md](CONTRIBUTING.md) and the [developer section](https://EmbeddedProto.com/documentation/installation/#for-embedded-proto-developers) of the installation page. They detail how you can build the unit tests included in this repo.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
EmbeddedProto/EmbeddedProto.py,sha256=1xZxIj8cx2a5T2LH78uG8nCNCN9L7Sw_Za3-Sr3bd5s,5368
|
|
2
|
+
EmbeddedProto/Features.py,sha256=TYD0drr8GDyIM1Y7iqTwLi90NcdcW2W7uxs80uUIfGI,9460
|
|
3
|
+
EmbeddedProto/Field.py,sha256=UHsrZ2bucO0USheksN_j2AihxECgw-mJIygYcoer8ew,63096
|
|
4
|
+
EmbeddedProto/Oneof.py,sha256=s4mgweNS6rKPfS3bBiDlxwqKTESUh0vt9_hLtqN2kJI,2725
|
|
5
|
+
EmbeddedProto/ProtoFile.py,sha256=tz6BsX-JA-rgSwMZR-RSsKqoFDKBsWJSxhpUS7FD8DQ,9210
|
|
6
|
+
EmbeddedProto/TypeDefinitions.py,sha256=dPa1LuhyAPsL5AdF0O8ypnuhLTaCvDmm8vpy7zwNWSo,16786
|
|
7
|
+
EmbeddedProto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
EmbeddedProto/__main__.py,sha256=5Of8waEkUfIB5InaRYgszwbGDfobe2pSYrjAO5dqMUs,1002
|
|
9
|
+
EmbeddedProto/config.py,sha256=iQOXLgLyNcuxnOl8z5U6-AFag9fe4Hv5fUMNkW1y1SE,6539
|
|
10
|
+
EmbeddedProto/custom_header.py,sha256=baU49UHpKSqasoUjrgKtEnvXWlKfeZu1HU2h_hSG4LE,19766
|
|
11
|
+
EmbeddedProto/embedded_proto_options.proto,sha256=970uAq5zO_7koZjrE5LICD1ufuRrrVP507YLQR1yb0U,4141
|
|
12
|
+
EmbeddedProto/embedded_proto_options_pb2.py,sha256=A6gImDX0hRDWlMfIV58V63JeADFOFHP0lRsnZi0Qf2w,1783
|
|
13
|
+
EmbeddedProto/field_options.py,sha256=mso6WFPup9MZa2u2CZ-wRUrhMxpzXZuqFhVpxNgKbsg,15522
|
|
14
|
+
EmbeddedProto/main.py,sha256=28f0-drBTKgPuNP3BtdCDXWzgZCNOPJn_n0PU6AopxE,14193
|
|
15
|
+
EmbeddedProto/version.json,sha256=nld4cSva9Nr34C9fhORtz3OU-Tc5aYfyucpfiLG6D70,27
|
|
16
|
+
EmbeddedProto/src/EmbeddedProto.h,sha256=h4SarMMwToWgZtEb0wRT6FVHOHowysIQ4ajg4rVdVqI,2229
|
|
17
|
+
EmbeddedProto/src/EmbeddedProto/BytesStringCallback.h,sha256=MtS5soaW5JOBwSHR1rSE-c8_tf8od_WOHA70-hcQIXs,19749
|
|
18
|
+
EmbeddedProto/src/EmbeddedProto/Defines.h,sha256=oZLtK_AwWuVSfFyEh1HSs-2pOBu56VdwGrnqEWK-iSs,3987
|
|
19
|
+
EmbeddedProto/src/EmbeddedProto/EmptyArray.h,sha256=I1tq4Tmtb2Y2wGwP457hGnl9t_Q7QUBdr9F5NFj6UqA,2727
|
|
20
|
+
EmbeddedProto/src/EmbeddedProto/Errors.h,sha256=WrpmxUARqv5KX4t3xIzVhX4Na4irBii9fu5wFz4-Pfo,2738
|
|
21
|
+
EmbeddedProto/src/EmbeddedProto/FieldStringBytes.h,sha256=R8drTQAqmeBYKI-x7BVPb3jJgsXRUwwTeoBduc1p3Ow,30093
|
|
22
|
+
EmbeddedProto/src/EmbeddedProto/Fields.h,sha256=LbKdNOBooUW4W4W2X7jkd2GM8-hegGuVCEnkUdVij1U,37188
|
|
23
|
+
EmbeddedProto/src/EmbeddedProto/Functional.h,sha256=INOQJmI7VEmdz1z7kBCHzeBRUohZyQTGWzeSX-o_NgE,10859
|
|
24
|
+
EmbeddedProto/src/EmbeddedProto/MessageCallback.h,sha256=hvRN9duvVeCx0v2irgtG6KhEP-D16l7XRxosbflP8Mg,27274
|
|
25
|
+
EmbeddedProto/src/EmbeddedProto/MessageInterface.h,sha256=C64ijfjtxHVHfrc0_AyIfcwVTpFvYhAr3vuuMYK9XOo,31230
|
|
26
|
+
EmbeddedProto/src/EmbeddedProto/MessageSizeCalculator.h,sha256=T9Fj638-xCJpzYrJG37TtnMynY0BIwZJOcD2T7bgH_Q,3419
|
|
27
|
+
EmbeddedProto/src/EmbeddedProto/MessageState.h,sha256=S8TMS_pStt5c21j6nBrhbpVFv0rr3NCRJCg0XVBe8eo,7219
|
|
28
|
+
EmbeddedProto/src/EmbeddedProto/ReadBufferFixedSize.h,sha256=hlXH94NwfpRsi5r--21HI71nSTs733fq82WPfgTBe2M,6419
|
|
29
|
+
EmbeddedProto/src/EmbeddedProto/ReadBufferInterface.h,sha256=HlTEgPe-2S_6vTvbJ4KvZEf8zWULkPHULUY3WdPgwwI,6949
|
|
30
|
+
EmbeddedProto/src/EmbeddedProto/ReadBufferSection.h,sha256=NEnD0Ca9QFLWPqWBHMXIMUPTI-GFWMfjGCc6z4F-Prc,6853
|
|
31
|
+
EmbeddedProto/src/EmbeddedProto/RepeatedField.h,sha256=MDDMGKaFNILCCHH75naHNkzPwlnxu89mOx_OBgEywR8,42440
|
|
32
|
+
EmbeddedProto/src/EmbeddedProto/RepeatedFieldCallback.h,sha256=HL4ta-jO7JqORabccN-yq7FixdKzCGZ3XVMa_VEtqeo,17001
|
|
33
|
+
EmbeddedProto/src/EmbeddedProto/RepeatedFieldFixedSize.h,sha256=71_XCedFHdXWe_ODnjY294BJYQdwzghbeAa53iW1nGY,14342
|
|
34
|
+
EmbeddedProto/src/EmbeddedProto/Version.h,sha256=1i9IhtMLnPV54c0fEzuOD2_zIPnRQiHzkVzeRAGUagI,1492
|
|
35
|
+
EmbeddedProto/src/EmbeddedProto/WireFormatter.h,sha256=hobJLjv0cciwUbnaEyJoU7pknNsEj9EaZXnYJe2_XBI,35032
|
|
36
|
+
EmbeddedProto/src/EmbeddedProto/WriteBufferFixedSize.h,sha256=32lYIn3wGzll1gdRiTPHpA9AM8AveT1I5cb5RNWZ8CA,3434
|
|
37
|
+
EmbeddedProto/src/EmbeddedProto/WriteBufferInterface.h,sha256=yUiMIX4Oo5F9etIBPbes22oigHIJtxa4vTlvgKXASlc,5333
|
|
38
|
+
EmbeddedProto/templates/FieldBasic_Deserialize.h.jinja2,sha256=im7qYtcUAbBQwIyCx9tD0GvnqwQc7jrxh-7OW9QTc7A,1184
|
|
39
|
+
EmbeddedProto/templates/FieldBasic_GetSet.h.jinja2,sha256=m8NT-ezzbvQW45TyAvQ1kthWbzFv42j2jOQtNzqRFgI,4109
|
|
40
|
+
EmbeddedProto/templates/FieldBytes_GetSet.h.jinja2,sha256=wXmsLXAGB9yVYmyih9H6FoWvt1Q1764rbTEzlvaz08Y,4179
|
|
41
|
+
EmbeddedProto/templates/FieldEnum_Deserialize.h.jinja2,sha256=c7mgAPRbnsNAJgKnV8aPkBhnkfJbRkVpl4rEokSdiKc,2196
|
|
42
|
+
EmbeddedProto/templates/FieldEnum_GetSet.h.jinja2,sha256=drVHKOdcQsxkK6WG_zuZRvg74sAQS5HYKNnHJAXKeDQ,4301
|
|
43
|
+
EmbeddedProto/templates/FieldErrorRecursive_GetSet.h.jinja2,sha256=OkFdD-AJ-PT4oX1Oxz-2jnXXxzRlgjyo8CG6DzTJFOg,1503
|
|
44
|
+
EmbeddedProto/templates/FieldMap_GetSet.h.jinja2,sha256=_KPT5RUbQVg8R5Nmr-UYPyAwzYPXmMkr6bFwbFIw1iQ,8820
|
|
45
|
+
EmbeddedProto/templates/FieldMsg_Deserialize.h.jinja2,sha256=pCFvWBWVNKpdW8LnzTQ1MPmPM4V4-ITiKffxjPPME70,1920
|
|
46
|
+
EmbeddedProto/templates/FieldMsg_GetSet.h.jinja2,sha256=lUxzmfwHSFzQd0xgcgY4_KjgLIYTQ6U4q7rc1XtikAU,4175
|
|
47
|
+
EmbeddedProto/templates/FieldRepeated_GetSet.h.jinja2,sha256=ctArv7Pj1g9yNL-8NymddI0YiBuxD-Uk7nWTJnv0lIY,4688
|
|
48
|
+
EmbeddedProto/templates/FieldString_GetSet.h.jinja2,sha256=QPjZGZOloCJI_dtlWOJ9F9eBpJSNdRTID_s-RVdVLb4,4176
|
|
49
|
+
EmbeddedProto/templates/Field_DeserializePartial.h.jinja2,sha256=dlkgASK0kxQAiR81ckjUialU8flD3lq2wRUlwI3E_Hg,1524
|
|
50
|
+
EmbeddedProto/templates/Field_Serialize.h.jinja2,sha256=b1h_pTGzj9V291ToEPXDpoR_AE0LrsxM4cPTwxZ-zeg,5895
|
|
51
|
+
EmbeddedProto/templates/Field_SerializePartial.h.jinja2,sha256=5LP2hQ6t3gO1rGrBo2YfupQaPI8fMR_rkMk4duc9Sk8,6309
|
|
52
|
+
EmbeddedProto/templates/Header.h.jinja2,sha256=McNUCsaZG3q_W0zDeKdm8YRMmuemPZNgMnc_IqEcpzY,4083
|
|
53
|
+
EmbeddedProto/templates/TypeDefEnum.h.jinja2,sha256=52est7rvIe_8tb0MTU98_RvhZSpMF0N_vZjlhkK3f58,1445
|
|
54
|
+
EmbeddedProto/templates/TypeDefMsg.h.jinja2,sha256=_8-b0GYvXJEvWyjTm-U2wgJ83fFMsz8PXleODTiV1zA,30332
|
|
55
|
+
EmbeddedProto/templates/TypeOneof.h.jinja2,sha256=f8gnkikCln4Ec3kqpr90ee1iIie-TAnZR9RgYf9wORo,5809
|
|
56
|
+
embeddedproto-4.0.0b1.dist-info/licenses/LICENSE,sha256=DzuL5Im6iZTbr2_HSIB0PyxEYa5VwtD7iy3z5a-EC70,1354
|
|
57
|
+
embeddedproto-4.0.0b1.dist-info/licenses/LICENSES/GPL-3.0-only.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
58
|
+
embeddedproto-4.0.0b1.dist-info/licenses/LICENSES/LicenseRef-EmbeddedProto-Commercial.txt,sha256=5uaUoDOr0ey-PGK-YUBE--dgMbtJZvLVKy3l1gf3QkE,543
|
|
59
|
+
embeddedproto-4.0.0b1.dist-info/METADATA,sha256=l4GGNkKoL_0V0Izj335Tp6Hzly-8iMLnQjDTq-pFmdA,8767
|
|
60
|
+
embeddedproto-4.0.0b1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
61
|
+
embeddedproto-4.0.0b1.dist-info/entry_points.txt,sha256=c2cfpgUY2tsYkCzdZa9MBEGLTLMuvdQrmeN1QSFT5Do,122
|
|
62
|
+
embeddedproto-4.0.0b1.dist-info/top_level.txt,sha256=HcDH36f9DdgjQ3nTH-g-f2MbzKRaE9HhxwqDoU77BSs,14
|
|
63
|
+
embeddedproto-4.0.0b1.dist-info/RECORD,,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Embedded Proto - License
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2020-2026 Embedded AMS B.V. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Embedded Proto is dual licensed. You may choose either of the following:
|
|
6
|
+
|
|
7
|
+
1. GNU General Public License version 3 (GPLv3)
|
|
8
|
+
Free of charge. The full license text is in LICENSES/GPL-3.0-only.txt.
|
|
9
|
+
In practice this means the combined work you distribute must comply
|
|
10
|
+
with the GPLv3; your own source code may use the GPLv3 or any license
|
|
11
|
+
compatible with it. The code generated by Embedded Proto is produced
|
|
12
|
+
from templates contained in this repository and embeds code from them,
|
|
13
|
+
so the template code in it is covered by the same license.
|
|
14
|
+
|
|
15
|
+
2. Commercial license
|
|
16
|
+
For closed source products. It removes the obligation to publish your
|
|
17
|
+
source code and can include professional support, an unlimited number
|
|
18
|
+
of MCUs and a code quality report. See https://embeddedproto.com/pricing/.
|
|
19
|
+
|
|
20
|
+
Internal evaluation and testing of Embedded Proto before purchase are
|
|
21
|
+
free and do not require either license, as long as no product containing
|
|
22
|
+
Embedded Proto or its generated code is distributed.
|
|
23
|
+
|
|
24
|
+
Embedded Proto is provided WITHOUT ANY WARRANTY; without even the implied
|
|
25
|
+
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
26
|
+
applicable license for details.
|
|
27
|
+
|
|
28
|
+
Embedded AMS B.V.
|
|
29
|
+
Atoomweg 2, 1627 LE Hoorn, the Netherlands
|
|
30
|
+
info at EmbeddedProto dot com
|