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
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Anders Blomdell
LabComm
Commits
6f8eb61c
Commit
6f8eb61c
authored
10 years ago
by
Sven Gestegård Robertz
Browse files
Options
Downloads
Patches
Plain Diff
documented void and sample ref types
parent
95aef48f
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
+56
-1
56 additions, 1 deletion
doc/tech_report.tex
with
56 additions
and
1 deletion
doc/tech_report.tex
+
56
−
1
View file @
6f8eb61c
...
...
@@ -169,6 +169,22 @@ language covering most common use-cases.
sample string a
_
string;
\end{verbatim}
\subsection
{
The void type
}
There is a type,
\verb
+
void
+
, which can be used to send
a sample that contains no data.
\begin{verbatim}
typedef void an
_
empty
_
type;
sample an
_
empty
_
type no
_
data1;
sample void no
_
data2;
\end{verbatim}
\verb
+
void
+
type can may not be used as a field in a struct or
the element type of an array.
\subsection
{
Arrays
}
\begin{verbatim}
...
...
@@ -198,7 +214,46 @@ only arrays of arrays.
}
a
_
struct;
\end{verbatim}
\section
{
User defined types
}
\subsection
{
Sample type refereces
}
In addition to the primitive types, a sample may contain
a reference to a sample type. References are declared using
the
\verb
+
sample
+
keyword.
Examples:
\begin{verbatim}
sample sample a
_
ref;
sample sample ref
_
list[4];
sample struct
{
sample ref1;
sample ref2;
int x;
int y;
}
refs
_
and
_
ints;
\end{verbatim}
Sample references are need to be registered on both encoder and decoder
side, using the functions
\begin{verbatim}
int labcomm
_
decoder
_
sample
_
ref
_
register(
struct labcomm
_
decoder *decoder
\nonumber
const struct labcomm
_
signature *signature);
int labcomm
_
encoder
_
sample
_
ref
_
register(
struct labcomm
_
encoder *encoder
\nonumber
const struct labcomm
_
signature *signature);
\end{verbatim}
The value of an unregistered sample reference will be decoded as
\verb
+
null
+
.
\subsection
{
User defined types
}
User defined types are declared with the
\verb
+
typedef
+
reserved word,
and can then be used in type and sample declarations.
\begin{verbatim}
typedef struct
{
...
...
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