id
stringlengths
15
54
text
stringlengths
3
133k
title
stringclasses
1 value
message_type/n67eEBCx5vI_93.txt
Jun 12, 2019, 3:58:21 AM 6/12/19
message_type/331_107.txt
On each callback to ` mqtt_logs_pl_t ` just encode 1 ` mqtt_log_pl_t ` . But obtain that log message before hand and pass it to the callback. Then just call pb_encode() in a loop until the buffer becomes full or there no more logs. Then just send the encode buffer. See below? Will this build the buffer correctly so t...
message_type/n67eEBCx5vI_109.txt
> (list->rep[list->numbers_count]).xaxis = xaxis[list->numbers_count];
message_type/n67eEBCx5vI_49.txt
Reply to author
message_type/331_159.txt
No one assigned
message_type/n67eEBCx5vI_103.txt
Show original message
message_type/n67eEBCx5vI_80.txt
to nanopb
message_type/rubygenerated_27.txt
You should _not_ create your own ` Foo ` subclasses. Generated classes are not designed for subclassing and may lead to "fragile base class" problems.
message_type/331_171.txt
[ ](https://github.com "GitHub") © 2024 GitHub, Inc.
message_type/331_137.txt
**[ PetteriAimonen ](/PetteriAimonen) ** commented Aug 20, 2018
message_type/331_77.txt
[ ![@PetteriAimonen](https://avatars.githubusercontent.com/u/922265?s=80&u=14ce5a89695c2e2e9f4a45948345741e7c9ea90a&v=4) ](/PetteriAimonen)
message_type/n67eEBCx5vI_39.txt
callbacks.proto
message_type/n67eEBCx5vI_119.txt
Sign in to forward
message_type/n67eEBCx5vI_87.txt
[  ](https://groups.google.com/group/nanopb/attach/3816eefd406f9/function_callback.h?part=0.3)
message_type/rubygenerated_69.txt
You can refer to enum values like so:
message_type/331_1.txt
Toggle navigation
message_type/331_123.txt
###
message_type/n67eEBCx5vI_57.txt
Sign in to report message
message_type/n67eEBCx5vI_2.txt
All groups and messages
message_type/TibrvMsgaddFieldhtm_17.txt
Field Name Length The constant TIBRVMSG_FIELDNAME_MAX (127) determines the longest possible field name.
message_type/n67eEBCx5vI_204.txt
Main menu
message_type/n67eEBCx5vI_131.txt
energy : 50
message_type/331_72.txt
* This message holds a single log message. * ` log ` : is a byte array of varying size. I am think of putting this into it's own messages and serialise it using ` pb_encode_delimited() ` so I can encode the size with it. * ` serial ` : Fixed length of 4 bytes. But I don't specify it as fixed because I want to u...
message_type/331_163.txt
None yet
message_type/331_83.txt
You could make use of the protobuf feature that appending messages in binary format appends the data in them. So you can set (nanopb).max_count = 1 on the mqtt_logs_pl_t field logs, and then just do:
message_type/331_130.txt
Is there better example of how this can be done? As I'm not following your suggestions.
message_type/331_37.txt
[ Sign up ](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser- name%3E%2F%3Crepo- name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header- repo&source_repo=nanopb%2Fnanopb)
message_type/331_47.txt
Pick a username
message_type/n67eEBCx5vI_1.txt
Conversations
message_type/331_162.txt
Projects
message_type/n67eEBCx5vI_97.txt
Sign in to forward
message_type/n67eEBCx5vI_101.txt
Report message
message_type/331_21.txt
Search or jump to...
message_type/n67eEBCx5vI_64.txt
\-- Petteri
message_type/rubygenerated_20.txt
The package name defined in the ` .proto ` file is used to generate a module structure for the generated messages. Given a file like:
message_type/n67eEBCx5vI_116.txt
Reply to author
message_type/n67eEBCx5vI_62.txt
> I am really confused on how to implement the REPEATED INT32 XAXIS as > If I use the same function in function_callbacks.h it gives error that > I cannot assign an array to pb_callbacks_t type.
message_type/rubygenerated_6.txt
[ __ View page source ](https://github.com/protocolbuffers/protocolbuffers.github.io/tree/main/content/reference/ruby/ruby- generated.md) [ __ Edit this page ](https://github.com/protocolbuffers/protocolbuffers.github.io/edit/main/content/reference/ruby/ruby- generated.md) [ __ Create child page ](https://github.com/pr...
message_type/rubygenerated_15.txt
* The extension ( ` .proto ` ) is replaced with ` _pb.rb ` . * The proto path (specified with the ` --proto_path= ` or ` -I ` command-line flag) is replaced with the output path (specified with the ` --ruby_out= ` flag).
message_type/rubygenerated_82.txt
* [ __ ](https://stackoverflow.com/questions/tagged/protocol-buffers)
message_type/n67eEBCx5vI_10.txt
[ Conversations ](./g/nanopb)
message_type/331_29.txt
Cancel Submit feedback
message_type/331_131.txt
Thanks --- All reactions
message_type/n67eEBCx5vI_157.txt
Yeah, that's what I tried to show in my first reply. But currently I don't have enough time to provide a more elaborate example. \-- Petteri
message_type/rubygenerated_81.txt
message = Foo.new raise unless !message.has_test_oneof? raise unless !message.has_name? raise unless !message.has_serial_number? raise unless !message.has_test_oneof? message.name = "Bender" raise unless message.has_test_oneof? raise unless message.has_name? raise...
message_type/331_126.txt
I took a look at submessage encoding that won't work. When I read the data if I don't encode it and store it in the 512 byte buffer I won't have anywhere else to store it. So I have to read the data and encode on the fly.
message_type/n67eEBCx5vI_33.txt
I have the following .proto file:
message_type/rubygenerated_61.txt
The ` RepeatedField ` type supports all of the same methods as a regular Ruby ` Array ` . You can convert it to a regular Ruby Array with ` repeated_field.to_a ` .
message_type/n67eEBCx5vI_172.txt
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
message_type/331_45.txt
New issue
message_type/rubygenerated_56.txt
// foo.proto message RecursiveMessage { RecursiveMessage submessage = 1; } # test.rb require 'foo' message = RecursiveSubmessage.new message.submessage = message
message_type/331_84.txt
void add_log_message(void *data, pb_stream_t *stream) { mqtt_logs_pl_t logs = mqtt_logs_pl_t_init_zero; logs.logs_count = 1; logs.logs[0] = .. fill in data ..; size_t size = 0; pb_get_encoded_size(&size, mqtt_logs_pl_t_fields, &logs); if (strea...
message_type/n67eEBCx5vI_56.txt
Report message
message_type/rubygenerated_12.txt
The protocol compiler for Ruby emits Ruby source files that use a DSL to define the message schema. However the DSL is still subject to change. In this guide we only describe the API of the generated messages, and not the DSL.
message_type/n67eEBCx5vI_120.txt
Delete
message_type/n67eEBCx5vI_126.txt
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
message_type/n67eEBCx5vI_186.txt
You do not have permission to delete messages in this group
message_type/TibrvMsgaddFieldhtm_0.txt
Open topic with navigation
message_type/rubygenerated_71.txt
You may assign either a number or a symbol to an enum field. When reading the value back, it will be a symbol if the enum value is known, or a number if it is unknown. Since **proto3** uses open enum semantics, any number may be assigned to an enum field, even if it was not defined in the enum.
message_type/rubygenerated_14.txt
The protocol buffer compiler produces Ruby output when invoked with the ` --ruby_out= ` command-line flag. The parameter to the ` --ruby_out= ` option is the directory where you want the compiler to write your Ruby output. The compiler creates a ` .rb ` file for each ` .proto ` file input. The names of the output files...
message_type/n67eEBCx5vI_150.txt
Report message
message_type/331_148.txt
[ ![@umanayana](https://avatars.githubusercontent.com/u/34135197?s=80&u=2f4a514b0e2ce5c2d97488daab852ae11d37538d&v=4) ](/umanayana)
message_type/331_98.txt
` --- All reactions
message_type/n67eEBCx5vI_195.txt
Nah, that won't make a difference. I'm constantly overwhelmed by the amount of free support requests on nanopb, so I just have to put a limit on how much time I'll spend on one case. \-- Petteri
message_type/331_87.txt
Copy link
message_type/331_25.txt
[ Search syntax tips ](https://docs.github.com/search-github/github-code- search/understanding-github-code-search-syntax)
message_type/rubygenerated_57.txt
If you try to serialize this, the library will detect the cycle and fail to serialize.
message_type/TibrvMsgaddFieldhtm_13.txt
It is illegal to add a field that has both a NULL field name, and a non-zero field identifier.
message_type/rubygenerated_4.txt
* [ ](/reference/kotlin/api-docs/protobuf-kotlin/com.google.protobuf.kotlin/-extension-list/to-string/) * [ ](/reference/kotlin/api-docs/protobuf-kotlin/com.google.protobuf.kotlin/-only-for-use-by-generated-proto-code/) * [ ](/reference/kotlin/api-docs/protobuf-kotlin/com.google....
message_type/331_62.txt
## Comments
message_type/n67eEBCx5vI_115.txt
Jun 12, 2019, 4:57:25 PM 6/12/19
message_type/rubygenerated_16.txt
So, for example, let’s say you invoke the compiler as follows:
message_type/331_80.txt
###
message_type/n67eEBCx5vI_89.txt
[  ](https://groups.google.com/group/nanopb/attach/3816eefd406f9/error_callback.png?part=0.4)
message_type/331_58.txt
[ umanayana ](/umanayana) opened this issue Aug 17, 2018 · 8 comments
message_type/331_93.txt
Since all the field are repeated I plan to use ` pb_callback_t() ` for all messages. I also can't have the C structure declare inline memory as I don't have the memory to do that. So all the stream need to directly write into the 512 buffer, from there source streams. Thus I can't prefill the structure as you sugge...
message_type/n67eEBCx5vI_114.txt
unread,
message_type/n67eEBCx5vI_15.txt
Skip to first unread message
message_type/n67eEBCx5vI_8.txt
[ Groups ](./my-groups "Groups")
message_type/331_103.txt
###
message_type/TibrvMsgaddFieldhtm_10.txt
Procedure
message_type/rubygenerated_75.txt
## Oneof
message_type/n67eEBCx5vI_98.txt
Delete
message_type/n67eEBCx5vI_122.txt
Copy link
message_type/n67eEBCx5vI_200.txt
Search
message_type/n67eEBCx5vI_201.txt
Clear search
message_type/n67eEBCx5vI_113.txt
### Grooo
message_type/331_12.txt
* [ CI/CD & Automation ](/solutions/ci-cd/) * [ DevOps ](/solutions/devops/) * [ DevSecOps ](https://resources.github.com/devops/fundamentals/devsecops/)
message_type/n67eEBCx5vI_48.txt
Jun 7, 2019, 2:57:33 AM 6/7/19
message_type/n67eEBCx5vI_156.txt
> So, how will the nested callbacks work, could you point me towards or > give me an example ?
message_type/n67eEBCx5vI_167.txt
You do not have permission to delete messages in this group
message_type/331_7.txt
* [ All features ](/features) * [ Documentation ](https://docs.github.com) * [ GitHub Skills ](https://skills.github.com/) * [ Blog ](https://github.blog)
message_type/331_92.txt
[ @PetteriAimonen ](https://github.com/PetteriAimonen) Why do I need to set the ` (nanopb).max_count ` to ` 1 ` ?
message_type/n67eEBCx5vI_23.txt
Sign in to forward
message_type/TibrvMsgaddFieldhtm_8.txt
Add this field to the message.
message_type/n67eEBCx5vI_165.txt
Sign in to forward
message_type/TibrvMsgaddFieldhtm_18.txt
Convenience Methods When the datatype of a field is determined during execution, use this general method. When you can determine the datatype of a field before compile-time, we recommend using type-specific convenience methods instead of this general method. Type-specific methods yield these advantages when adding fiel...
message_type/331_85.txt
Sorry, something went wrong.
message_type/331_90.txt
**[ umanayana ](/umanayana) ** commented Aug 18, 2018 •
message_type/331_3.txt
[ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fnanopb%2Fnanopb%2Fissues%2F331)