Re: [protobuf] Integers are being padded in protobufs on ARM

2016-05-24 Thread Christopher Smith
I'm guessing your cross compiler setup is somehow mucking up endian logic. Do you have a simple reproducible set up. On Apr 28, 2016 2:58 PM, "Brian Savage" wrote: > I am using protobufs on an ARM processor running Ubuntu Linux. Everything > seems to be working, except

[protobuf] Has Anyone Successfully Defined "smaller" integers for protocol buffers (C++ or Java)?

2016-05-24 Thread Douglas Lewis
I'm working on a project and we are hoping to use protocol buffers for messages between embedded and PC based applications. One issue I've immediately run into is protocol buffers only has 32 and 64 bit integers, I'm needing 16 and 8 bit integers for fields in the messages. Has anyone been

[protobuf] Re: Integers are being padded in protobufs on ARM

2016-05-24 Thread Douglas Lewis
Brian, I'm new to protobufs myself and we are going to be running on an ARM processor also. How do you have the integer defined, int32? Regards, Doug On Thursday, April 28, 2016 at 4:58:42 PM UTC-5, Brian Savage wrote: > > I am using protobufs on an ARM processor running Ubuntu Linux.

[protobuf] Re: using proto3 for receiving proto2 messages ("group", C#)

2016-05-24 Thread Jon Skeet
No, unfortunately if they're using groups in their proto files, you won't be able to use the proto3 C# code. I *think* I supported groups in the proto2 port (https://github.com/jskeet/protobuf-csharp-port) but please be aware that that code is not under active development, and not officially

[protobuf] Re: Issue 593 in protobuf: FatalException on calling SerializeAsString()

2016-05-24 Thread ganumurali
I just observed the same and by following the workaround (changing bool->int) solved it but... Do we always have to do that or protobuf library has a fix for this? If so which version? " at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); (gdb)

[protobuf] Newbie Question: Can Protobuf be Used to Replace Serialization in Existing Non-Anemic code?

2016-05-24 Thread kraythe
Greetings, I have never liked "anemic model" POJO code and I have a large application with domain models that have intelligence built in them. I am wondering if I can use protobuf to solve my serialization woes. The criteria are: 1. I cannot dump my current model and move to POJOs where

[protobuf] Re: Issue 593 in protobuf: FatalException on calling SerializeAsString()

2016-05-24 Thread ganumurali
I recently observed the same. Stack trace is below for reference. Following the suggestions in this thread, changing bool -> int solved the problem. Do we know if this issue needs to be addressed by changing bool->int or protobuf library already has a fix for it? "Program received signal

Re: [protobuf] Has Anyone Successfully Defined "smaller" integers for protocol buffers (C++ or Java)?

2016-05-24 Thread Ilia Mirkin
On Mon, May 23, 2016 at 9:55 AM, Douglas Lewis wrote: > I'm working on a project and we are hoping to use protocol buffers for > messages between embedded and PC based applications. > > One issue I've immediately run into is protocol buffers only has 32 and 64 > bit

Re: [protobuf] Re: Has Anyone Successfully Defined "smaller" integers for protocol buffers (C++ or Java)?

2016-05-24 Thread Ilia Mirkin
Why not just use a varint? You can use the zigzag variants if you want to store things like -1 efficiently. The only time you'd benefit from having a fixed8/fixed16 field is if the high bits are set, and it'd only be by 1 byte. -ilia On Tue, May 24, 2016 at 11:32 AM, Douglas Lewis

[protobuf] Re: Has Anyone Successfully Defined "smaller" integers for protocol buffers (C++ or Java)?

2016-05-24 Thread Douglas Lewis
I'm talking about fixed integers. We have certain elements of the messages that we only need/want resolution to 16 bits or 8 bits. - Doug On Tuesday, May 24, 2016 at 10:06:50 AM UTC-5, Douglas Lewis wrote: > > I'm working on a project and we are hoping to use protocol buffers for > messages

[protobuf] Re: Has Anyone Successfully Defined "smaller" integers for protocol buffers (C++ or Java)?

2016-05-24 Thread Douglas Lewis
Well the solution we want to implement is with 16 bit and 8 bit elements when that is all the resolution of the integer variable we need. This is an embedded application and we are sending the messages over a wireless connection so data packet size is critical to achieving our desired

Re: [protobuf] Re: Has Anyone Successfully Defined "smaller" integers for protocol buffers (C++ or Java)?

2016-05-24 Thread Ilia Mirkin
If your varint is < 128, it will only take a single byte to get encoded. Even if it's declared as an int64. (Also, consider that what matters isn't data size but number of frames sent.) Anyways, if you wanted to created fixed 8- and 16-bit types, you'd have to add new field types for those, and