Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
3304abf6
Commit
3304abf6
authored
Jun 01, 2017
by
garciay
Browse files
GeoNetworking codecs ongoing
Add GeoNetworkingLayer
parent
99930cfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
ccsrc/EncDec/LibItsGeoNetworking_Encdec.cc
View file @
3304abf6
...
@@ -13,9 +13,11 @@ BITSTRING fx__enc__GeoNetworkingReq(LibItsGeoNetworking__TestSystem::GeoNetworki
...
@@ -13,9 +13,11 @@ BITSTRING fx__enc__GeoNetworkingReq(LibItsGeoNetworking__TestSystem::GeoNetworki
{
{
loggers
::
loggers
::
log
(
"fx__enc__GeoNetworkingReq"
);
loggers
::
loggers
::
log
(
"fx__enc__GeoNetworkingReq"
);
GeoNetworkingCodec
codec
;
GeoNetworkingCodec
codec
;
OCTETSTRING
os
;
const
LibItsGeoNetworking__TypesAndValues
::
GeoNetworkingPdu
&
pdu
=
p_geoNetworkingReq
.
msgOut
();
const
LibItsGeoNetworking__TypesAndValues
::
GeoNetworkingPdu
&
pdu
=
p_geoNetworkingReq
.
msgOut
();
OCTETSTRING
os
;
codec
.
encode
(
pdu
,
os
);
codec
.
encode
(
pdu
,
os
);
const
unsigned
char
mac_address
[]
=
{
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
};
os
+=
OCTETSTRING
(
sizeof
(
mac_address
),
static_cast
<
const
unsigned
char
*>
(
mac_address
));
return
oct2bit
(
os
);
return
oct2bit
(
os
);
}
}
...
@@ -28,7 +30,19 @@ BITSTRING fx__enc__GeoNetworkingReq(LibItsGeoNetworking__TestSystem::GeoNetworki
...
@@ -28,7 +30,19 @@ BITSTRING fx__enc__GeoNetworkingReq(LibItsGeoNetworking__TestSystem::GeoNetworki
INTEGER
fx__dec__GeoNetworkingReq
(
BITSTRING
&
b
,
LibItsGeoNetworking__TestSystem
::
GeoNetworkingReq
&
p
)
INTEGER
fx__dec__GeoNetworkingReq
(
BITSTRING
&
b
,
LibItsGeoNetworking__TestSystem
::
GeoNetworkingReq
&
p
)
{
{
loggers
::
loggers
::
log
(
"fx__dec__GeoNetworkingReq"
);
loggers
::
loggers
::
log
(
"fx__dec__GeoNetworkingReq"
);
return
-
1
;
GeoNetworkingCodec
codec
;
LibItsGeoNetworking__TypesAndValues
::
GeoNetworkingPdu
pdu
;
OCTETSTRING
is
=
bit2oct
(
b
);
if
(
codec
.
decode
(
OCTETSTRING
(
is
.
lengthof
()
-
6
,
static_cast
<
const
unsigned
char
*>
(
is
)),
pdu
)
==
-
1
)
{
return
-
1
;
}
const
unsigned
char
mac_address
[]
=
{
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
};
p
=
LibItsGeoNetworking__TestSystem
::
GeoNetworkingReq
(
pdu
,
OCTETSTRING
(
sizeof
(
mac_address
),
static_cast
<
const
unsigned
char
*>
(
mac_address
)),
0
);
return
0
;
}
}
/****************************************************
/****************************************************
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment