Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sven Gestegård Robertz
LabComm
Commits
9a97824a
Commit
9a97824a
authored
Feb 12, 2015
by
Sven Gestegård Robertz
Browse files
Options
Downloads
Patches
Plain Diff
added typdef parsing to tech report
parent
e1b71232
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/tech_report.tex
+52
-15
52 additions, 15 deletions
doc/tech_report.tex
with
52 additions
and
15 deletions
doc/tech_report.tex
+
52
−
15
View file @
9a97824a
...
...
@@ -489,6 +489,42 @@ not required to do so. However, if multiple \verb+TYPE_DECL+ packets are
sent for the same
\verb
+
typedef
+
, the encoder must use the same
\verb
+
type_id
+
.
\subsection
{
Decoding in-band type descriptions
}
In LabComm, the in-band data descriptions are equivalent to
\footnote
{
in
the sense that they contain all information needed to recreate
}
the data
description source (i.e., the ``.lc-file'').
%
As the type declarations (a.k.a.
\emph
{
signatures
}
) are written before
sample data on every channel, they can be used to interpret data with
an unknown (by the receiver) format.
The libraries provide functionality to subscribe to (i.e., register a
\emph
{
handler
}
for) sample and type declarations.
On the low level, the handler receives an instance of the signature
data structure corresponding to the received declaration.
For higher-level processing, the Java library provides the
\verb
+
ASTbuilder
+
class, which builds an abstract syntax tree in
the internal representation of the LabComm compiler.
That enables the user to use the complete functionality of the
LabComm compiler, e.g. code generation, on declarations received in a
LabComm stream.
In combination with on-the-fly compilation and class-loading (or
linking) that makes it possible to dynamically create handlers for
previously unknown data types. Thereby, it enables dynamic configuration
of LabComm endpoints in static languages without the overhead of
interpreting signatures (at the one-time cost of code generation and
compilation).
\section
{
Ideas/Discussion
}
:
...
...
@@ -564,7 +600,7 @@ first.
The built-in data types are encoded as follows:
\begin{lstlisting}
[basicstyle=
\footnotesize\ttfamily
]
||Type ||Encoding/Size ||
||----------||---------------------------------------------------||
||----------
-
||---------------------------------------------------||
||boolean || 8 bits ||
||byte || 8 bits ||
||short || 16 bits ||
...
...
@@ -572,13 +608,14 @@ The built-in data types are encoded as follows:
||long || 64 bits ||
||float || 32 bits ||
||double || 64 bits ||
||sample
_
ref || 32 bits ||
||string || length (varint), followed by UTF8 encoded string ||
||array || each variable index (varint), ||
|| || followed by encoded elements ||
||struct || concatenation of encoding of each element ||
|| || in declaration order ||
\end{lstlisting}
\pagebreak
\subsection
{
Protocol grammar
}
\label
{
sec:ConcreteGrammar
}
\begin{lstlisting}
[basicstyle=
\footnotesize\ttfamily
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment