views:

20

answers:

1

I'm working with a binary protocol that uses LLV to encode some variables.

I was given an example below which is used to specify a set of 5 chars to display.

F1 F0 F5 4C 69 6E 65 31

the F1 is specific to my device, it indicates display text on line one. The f0 and f5 I'm not sure about, the rest looks like ASCII text.

Anyone know how this encoding works exactly?

LLV is referenced in this protocol spec. pasted below, but doesn't seem to be defined in there.

http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBIQFjAA&url=http%3A%2F%2Fwww.terminalhersteller.de%2FDownload%2FPA00P016_03_en.pdf&ei=yUFPTOSzH432tgON5PjuBw&usg=AFQjCNGjS_y264qKIRCSJQpdhlSXWtiadw&sig2=jMGtIwd42dozDSq7ub844w

+1  A: 

Since the F1 is device-specific, this leaves the rest as F0 F5 ..., and this looks like an LLVAR sequence, in which the first two bytes specify the length of the rest (decimal 05 here). My guess would be that the whole data represents F1 "Line1", which looks quite reasonable.

By the way, LLVAR stands for "VARiable length with two decimal digits specifying the length". With three decimal digits for the length, it's LLLVAR.

Roland Illig
Thanks for the response. The spec. says they use LLVAR, so in that case I can just parse for the Fa Fb forming a length of decimal ab?
fred basset
Yes. But make sure that the high nibbles are really `F` and the low nibbles are in the range `0-9`. The much more interesting document is the high level protocol described in http://www.terminalhersteller.de/Download/PA00P015_13.02_en.pdf though.
Roland Illig
So you are not really using a device-specific command but "Display Text (`06 E0`)", right? Chapter 11 explicitly lists the `F1` bitmap as having data type `LLVAR`. So while the specification is scattered around, it looks quite complete to me.
Roland Illig