Shashwat Agarwal | 27 Jul 10:33 2016
Picon

Missing sources and javadoc jars of Protobuf 3.0.0-beta3 in Maven Central

Hello,
It will be great if someone can upload the javadocs and source jars of protobuf 3.0.0-beta3 (http://central.maven.org/maven2/com/google/protobuf/protobuf-java/3.0.0-beta-3/)
TIA

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
hugues-henri liniger | 24 Jul 11:21 2016
Picon

Proto3 C# and services for RPC

hi!

I 'm using the RPC Library proposed by Roger <at> csharptest.net
It is fast and efficient, but I'd like to move it to proto3.

is it any plan to generate proto3  services in c# ?

Thks

hugues

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Doug Lewis | 25 Jul 18:09 2016
Picon

Has Anyone Been Able to Build proto3 on BeagleBoards?

Has anyone been able to successfully build protocol buffers 3 on a BeagleBoard?

After running the configure command I get an error during make because the version of automake that is on my BeagleBoard (1.11) is not version 1.14 that the makefile wants to use.  From what I've read 1.14 works on trusty but my board is showing wheezy.

Thanks,
Doug

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Chazix | 23 Jul 23:56 2016
Picon
Gravatar

Re-Parsing Received CodedMessages Over Network (Proto3)

I'm utilizing Protobuf3 with c# for my client & c++ for my server, where the .proto's are generated from the corresponding protoc3 compiler. I'm new to utilizing Google Protocol Buffers, where I'm currently trying to figure out how to re-parse the received bytes on my server that were sent from my client to turn it back into it's originating google::protobuf::Message object on my c++ server.

My client is sending a CodedOutputStream in c# :

    public PacketHandler()
    {
      m_client  = GetComponent<ClientObject>();
      m_packet  = new byte[m_client.GetServerConnection().GetMaxPacketSize()];
      m_ostream = new BinaryWriter(new MemoryStream(m_packet));
    }

    public void DataToSend(IMessage message)
    {
      // message looks like :
      // Base.BaseMessage msg = new Base.BaseMessage();
      // msg.Msg = Google.Protobuf.WellKnownTypes.Any.Pack(new Server.Ping());
      CodedOutputStream output = new CodedOutputStream(m_ostream.BaseStream, true);
      output.WriteMessage(message);
      output.Flush();
      m_client.GetServerConnection().GetClient().Send(m_packet, message.CalculateSize());
    }


This seems to be working, the message that is sent right now is a simple Ping message that looks like this:

    // Ping.proto
    syntax = "proto3";
    package server;

    import "BaseMessage.proto";
   
    message Ping {
     
    }
   
    message Pong {
     
    }


My BaseMessage looks like this :

    // BaseMessage.proto
    syntax = "proto3";
   
    package base;
   
    message BaseMessage {
      uint32 size = 1;
      google.protobuf.Any msg = 2;
    }


The received message that I am getting on my c++ server side looks like this : #\u0012!\n\u001Ftype.googleapis.com/server.Pin

When receiving the message I am attempting to re-parse using the CodedInputStream object by attempting to parse the received bytes.

    PacketHandler::PacketHandler(QByteArray& packet, const Manager::ClientPtr client) :
        m_packet(packet),
        m_client(client)
    {
      unsigned char buffer[512] = { 0 };
      unsigned char data[packet.size()] = { 0 };
      memcpy(data, packet.data(), packet.size());
   
      google::protobuf::uint32 msgSize;
      google::protobuf::io::CodedInputStream inputStream(data, packet.size());
      inputStream.ReadVarint32(&msgSize); // read the prefixed message length

      base::BaseMessage msg;
      msg.ParseFromCodedStream(&inputStream);

      if (msg.msg().Is<server::Ping>())
      {
        // This never occurs
        server::Ping pingMsg;
        msg.msg().UnpackTo(&pingMsg);
        qDebug() << "Is a Ping";
      }
      qDebug() << msg.size(); // this isn't the correct value either
    }


This is where I am a bit unsure of the process that is needing to be done to re-parse the message into the particular message. I'm reading the initial prefixed length of message to remove that from the parse, where the inputStream has the remaining bytes for the message identification.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Oi Lee | 21 Jul 23:49 2016
Picon

Does Protobuf v2.6.1 have a protobuf to json library?

I know C++ does for proto3 but I was wondering about proto2. Do I need to use 3rd party software?

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Oi Lee | 21 Jul 22:09 2016
Picon

How to tell which implementation I am using, pure python or python compiled using c++?

I'm curious to find out how to tell which implementation of protobuffs I am using. I recently installed using the C++ library but I just want to make sure it is the one I am using. I'm currently on Protocol Buffers 2.6.1. Thanks!

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
antoniochen0205 | 21 Jul 05:41 2016
Picon

how can i change my protobuf object to byte arrays in javascript

i just want to get a byte arrays from a protobuf object as java in javascript, but i never find a function to do it. who knows? please tell me

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Doug Lewis | 20 Jul 15:34 2016
Picon

Test-suite Error Log

I was doing the "make check" on my proto3 build.  I'm running in a mingw32 window.

Regards,
Doug

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Attachment (test-suite.log): application/octet-stream, 1205 KiB
kristen | 19 Jul 23:56 2016
Picon

Determining global vs local enum in plugin

I've been working on writing my own plugin and I've been looking at the code example from the following blog for guidance: http://www.expobrain.net/2015/09/13/create-a-plugin-for-google-protocol-buffer/


While parsing the request in this block of code:
if isinstance(item, DescriptorProto): data.update({ 'type': 'Message', 'properties': [{'name': f.name, 'type': int(f.type)} for f in item.field] }) elif isinstance(item, EnumDescriptorProto): data.update({ 'type': 'Enum', 'values': [{'name': v.name, 'value': v.number} for v in item.value] })

is there a way to identify if an EnumDescriptorProto enum is defined globally or locally in the original .proto file? I've figured out that if the item is a DescriptorProto, then if it is an enum it's type_name will vary depending on if it is global or local, but that's about the only indicator I have seen thus far. 

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Alex Shaver | 19 Jul 20:46 2016
Picon

Is there a hashing function for each supported language? Does it produce the same output across each?

(proto3 question)

Suppose I have some messages Foo and Bar, where Bar represents data for objects that are related to some Foo. I send the whole bunch of them in some set like so:
message MyMessage{
  repeated
Foo = 1;
  repeated
Bar = 2;
}

What I'd like is for Bar to have a structure like:
message Bar{
 
...
 
int foo_id = 100;
}

where foo_id is the hash of the Foo protobuf that is associated with that given Bar protobuf. 

Now I know I could probably do something like bar.set_foo_id(md5(fooProto.SerializeAsString())) where i use md5 to just represent some common hashing function that should exist for the several languages, and just have it hash the serialized string of data. What I'm more wondering is if there's something more simple like bar.set_foo_id(fooProto.hash()), that will generate a consistent foo_id value between different platforms. 

Specifically, I'm doing this in c++ and javascript. I see the hashing seems to exist in java. I haven't found a similar function within the c++ source, but that could just be something I haven't found; and I haven't yet looked on the javascript side of things.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Mohamed Koubaa | 19 Jul 16:38 2016

message wrapped enums

Hello,

In my cpp proto3 project I am using enums that are wrapped in messages to avoid namespace collisions.  See for example:

message Physics {
  enum Enum {
     STRUCTURAL = 0;
     THERMAL = 1;
  }
}

In c++ I can refer to it by Physics::STRUCTURAL which is great.

In this case, the Physics message does not have any fields. It derives from google::protobuf::Message or MessageLite and has some generated methods that are not relevant.  In a project with several thousand enums, this could create binary bloat when compiled.

Does it make sense for protoc to identify messages that are simply there to wrap enums and provide a lighter api for it?  Or more generally to identify messages that do not have fields and derive from something even smaller than MessageLite?

Thanks,
Mohamed Koubaa
Software Developer
Ansys Inc

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Gmane