[protobuf] Re: Using Protocol Buffer in other Languages

2012-10-02 Thread cisco tierra
Hi.

You can write your own parser, the structure to follow it is not difficult.

You can download the source code for protobuffer and you will have the 
compiler/cpp, compiler/java and compiler/python parsers to copy.

I wrote the first version of parser to generate code for fitnesse in two 
days.


El jueves, 30 de agosto de 2012 16:13:54 UTC+2, Atanu escribió:

 Hi all,

 I am very new to this technology. After going through the blogs and 
 materials I find it to be interesting.
 I am an SAP ABAP developer. If I want to use this in my technology, is 
 there any suitable parser? If not then what can be the solution ? DO I need 
 to define my own parser?
 Can anybody help me on this.

 Best Regards,
 Atanu
   


-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/protobuf/-/7cHfe1FcF-wJ.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] streaming multiple messages to 1 stream

2012-10-02 Thread kenrick koo
I've read the suggestion about first writing the size of each message 
followed by the message in order to workaround the issue that protocol 
buffer parsers don't know where 1 message ends and another begins.  Could 
someone show example code on how to do this for a C# client sending a 
message to a C++ server.  That would be most appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/protobuf/-/-Rx0QWKqxkoJ.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Job.proto:11:18: DescriptorProto is not defined.

2012-10-02 Thread Fahad Madani
Hi,

I am trying to compile my .proto file using protoc compiler and generate 
java classes for the same.
Below is my Job.proto file

*import google/protobuf/descriptor.proto;

option java_package = com.myfile.test;
option java_outer_classname = JobProto;

message Job{
required string companyName = 1;
required string designation = 2;
required int32 salary = 3;
required DescriptorProto file_prot = 4;
}*

And my protoc command is 

*protoc %Input%\Job.proto --java_out=%Output% --descriptor_set_out=job.desc 
--proto_path=%Input% --proto_path=%protobuf_src_folder%*

where environment variable definition are: 
Input: Folder in which Job.proto file is present
Output: Foldedr where my output classes are generated
protobuf_src_folder: Path till ..\protobuf-2.4.1\src

when i execute the above command i get 
*Job.proto:11:18: DescriptorProto is not defined.*

I have tried copying the discriptor.proto in the same folder and modifying 
the import statement (still i get the same error). Whatever i have browse i 
just found setting --proto_path properly but in my case the path is proper 
but still i am getting the same error. I have also ensure that my protobuf 
source version and protoc version are same 2.4.1

Can anyone tell me whats wrong ?

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/protobuf/-/bC1aYBXjCw4J.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] ignoring part of the message -?

2012-10-02 Thread victorl
Hi,
My message is an UDP packet header and I have to ignore the rest of the 
packet. How can I express that in .proto syntax? 
Note that the header length is fixed (70B), but the packet length is 
not 
Also, would it be possible to validate that those first 70B really conform 
to the message specification in .proto?
Thank you,
-V  

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/protobuf/-/rGboq7Cr_3UJ.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



Re: [protobuf] Job.proto:11:18: DescriptorProto is not defined.

2012-10-02 Thread Jason Hsueh
To start with you need to use the qualify with the package as
google.protobuf.DescriptorProto. See the section on Name Resolution:
https://developers.google.com/protocol-buffers/docs/proto#packages

Assuming your paths are set up correctly it should work after that.

On Fri, Sep 28, 2012 at 2:19 AM, Fahad Madani fsmad...@gmail.com wrote:
 Hi,

 I am trying to compile my .proto file using protoc compiler and generate
 java classes for the same.
 Below is my Job.proto file

 import google/protobuf/descriptor.proto;

 option java_package = com.myfile.test;
 option java_outer_classname = JobProto;

 message Job{
 required string companyName = 1;
 required string designation = 2;
 required int32 salary = 3;
 required DescriptorProto file_prot = 4;
 }

 And my protoc command is

 protoc %Input%\Job.proto --java_out=%Output% --descriptor_set_out=job.desc
 --proto_path=%Input% --proto_path=%protobuf_src_folder%

 where environment variable definition are:
 Input: Folder in which Job.proto file is present
 Output: Foldedr where my output classes are generated
 protobuf_src_folder: Path till ..\protobuf-2.4.1\src

 when i execute the above command i get
 Job.proto:11:18: DescriptorProto is not defined.

 I have tried copying the discriptor.proto in the same folder and modifying
 the import statement (still i get the same error). Whatever i have browse i
 just found setting --proto_path properly but in my case the path is proper
 but still i am getting the same error. I have also ensure that my protobuf
 source version and protoc version are same 2.4.1

 Can anyone tell me whats wrong ?

 --
 You received this message because you are subscribed to the Google Groups
 Protocol Buffers group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/protobuf/-/bC1aYBXjCw4J.
 To post to this group, send email to protobuf@googlegroups.com.
 To unsubscribe from this group, send email to
 protobuf+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/protobuf?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.