Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sven Gestegård Robertz
LabComm
Commits
ceb0da14
Commit
ceb0da14
authored
Feb 21, 2013
by
Sven Robertz
Browse files
now the csharp lib compiles. Still not tested, though
parent
f08fd69f
Changes
3
Show whitespace changes
Inline
Side-by-side
lib/csharp/se/lth/control/labcomm/LabCommDecoderChannel.cs
View file @
ceb0da14
...
...
@@ -169,7 +169,7 @@ namespace se.lth.control.labcomm {
do
{
byte
c
=
decodeByte
();
res
|=
(
c
&
0x7f
)
<<
7
*
i
;
res
|=
(
uint
)
(
(
c
&
0x7f
)
<<
7
*
i
)
;
cont
=
(
c
&
0x80
)
!=
0
;
i
++;
}
while
(
cont
);
...
...
lib/csharp/se/lth/control/labcomm/LabCommEncoder.cs
View file @
ceb0da14
...
...
@@ -15,6 +15,7 @@ namespace se.lth.control.labcomm {
void
encodeFloat
(
float
value
);
void
encodeDouble
(
double
value
);
void
encodeString
(
String
value
);
void
encodePacked32
(
Int64
value
);
}
...
...
lib/csharp/se/lth/control/labcomm/LabCommEncoderChannel.cs
View file @
ceb0da14
...
...
@@ -84,7 +84,7 @@ namespace se.lth.control.labcomm {
public
void
encodeString
(
String
value
)
{
byte
[]
buf
=
Encoding
.
UTF8
.
GetBytes
(
value
);
E
ncodePacked32
(
buf
.
Length
,
4
);
e
ncodePacked32
(
buf
.
Length
);
bytes
.
Write
(
buf
,
0
,
buf
.
Length
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment