Questions tagged [preon]

Preon aims to provide a framework for dealing with binary encoded data; or more specifically, it aims to deal with situations in which bytes are considered to be overkill.

Preon aims to provide a framework for dealing with binary encoded data; or more specifically, it aims to deal with situations in which bytes are considered to be overkill. The project is named after the "point-like" particles, conceived to be subcomponents of quarks and leptons. Let's just say very small particles that you don't see with the naked eye, but you probably rely on them without knowing.

24 questions
0
votes
1 answer

Preon framework gathering separated bits (nibbles actually)

A binary stream I'm trying to decode using Preon has a value that is made up of 5 non-consecutive nibbles, for example: Hex data: 00A00000F200EE0000 Consider that the value has to be extracted from the non zero marked nibbles into AF2EE, is that…
gvasquez
  • 1,919
  • 5
  • 27
  • 41
0
votes
1 answer

Simple arithmetic using Preon framework

I'm using Preon Binding for reading a stream of incoming binary data. The problem we are having is that certain field values require some simple arithmetic for their proper representation, as our "data documentation" says: field lat: Latitude…
gvasquez
  • 1,919
  • 5
  • 27
  • 41
0
votes
1 answer

I need a BCD decoder and encoder

I am just starting to use Preon to decode configuration data from radios (channel number, frequency, mode, channel name, etc). Different radios have different radio formats, usually radically different. Preon seems to be the perfect solution. And…
ClarkS
  • 100
  • 1
  • 9
0
votes
2 answers

Parsing variable record lengths in Preon

I'm trying to use Preon to parse binary files, which are structured as a sequence of variable length records. For each record, there's a number which specifies the record length (in bytes). Here's a simplified version of what I'm trying to…
skoob
  • 1,411
  • 12
  • 10
0
votes
1 answer

How are enums defined in Preon?

I am trying to use the preon I compiled from github (v 1.1) to parse the messages I get from an embedded C++ application. I included antlr 3.3-complete version in my project. I defined the following class as a header for network messages: public…
randomVariable
  • 305
  • 1
  • 4
  • 12
0
votes
1 answer

Circular Dependencies with Preon Binary Parser

I've got a pair of binary files to parse that have dependencies on one another. I'm using the Preon library. The files are named rec.table and rec.offset. One is an offset index into the other (lines of rec.offset file 32 bit integers, representing…
Eric
  • 663
  • 7
  • 18
0
votes
2 answers

Preon enum interpretation and mapping

According to http://www.scribd.com/doc/8128172/Preon-Introduction , Preon can be used to decode bits into an enum representation as such: // Reads a bit from the buffer, and interprets it as an enum value, // interpreting the number as its…
JohnyTex
  • 3,323
  • 5
  • 29
  • 52
0
votes
0 answers

Preon encode() does not fill up remaining bits until the byte boundary is reached

I have a message where a variable length of 7Bit characters is encoded. Unfortunately those 7Bit characters are stored in the message as 7Bit. That means the last byte of the message is not necessarily aligned to a byte boundary. Decoding a message…
Michael Rumpf
  • 371
  • 1
  • 5
  • 9
0
votes
2 answers

How can preon use bean properties?

I need to read a binary file where the size of a byte array depends on an optional value as well as on a constant number. How can I achieve this using Preon? It seems that the byte array size calculation cannot be conditional ie.…
tchristensen
  • 86
  • 1
  • 7
1
2