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
5fadbdfe
Commit
5fadbdfe
authored
Sep 15, 2016
by
garciay
Browse files
Changes after test session in Livorno (20160613-14)
parent
7ab73a70
Changes
3
Hide whitespace changes
Inline
Side-by-side
javasrc/adapter/org/etsi/its/adapter/PcapMultiplexer.java
View file @
5fadbdfe
...
...
@@ -253,7 +253,7 @@ public class PcapMultiplexer implements Runnable {
return
null
;
}
public
void
resetFilter
(
String
pcapFilter
)
{
public
void
resetFilter
(
String
pcapFilter
)
{
// Sanity check
if
((
pcapFilter
==
null
)
||
pcapFilter
.
isEmpty
())
{
return
;
...
...
@@ -270,7 +270,10 @@ public class PcapMultiplexer implements Runnable {
if
(
r
!=
Pcap
.
OK
)
{
TERFactory
.
getInstance
().
logError
(
"Filter error: "
+
pcap
.
getErr
());
}
pcap
.
setFilter
(
bpfFilter
);
r
=
pcap
.
setFilter
(
bpfFilter
);
if
(
r
!=
Pcap
.
OK
)
{
TERFactory
.
getInstance
().
logError
(
"Filter error: "
+
pcap
.
getErr
());
}
}
/**
...
...
javasrc/adapter/org/etsi/its/adapter/layers/CommsigniaLayer.java
View file @
5fadbdfe
...
...
@@ -27,10 +27,11 @@ import com.commsignia.v2x.client.model.dev.FacilityModule;
public
class
CommsigniaLayer
extends
Layer
implements
IEthernetSpecific
{
private
static
final
byte
[]
DeviceMacAddress
=
new
byte
[]
{
(
byte
)
0x70
,
(
byte
)
0xb3
,
(
byte
)
0xd5
,
(
byte
)
0xf2
,
(
byte
)
0xa1
,
(
byte
)
0xe3
};
private
static
final
String
TargetHost
=
"1
72
.1
7
.1
5.38
"
;
private
static
final
String
TargetHost
=
"1
0.200
.1.1
01
"
;
private
static
final
int
TargetPort
=
7942
;
private
static
final
int
SourcePort
=
7943
;
private
static
final
int
ItsAid
=
5
;
private
static
final
int
InterfaceID
=
2
;
private
static
final
int
TxPowerDbm
=
-
10
;
// Max value: -33dBm, RSU: -30dBm, Lab: -10dBm
private
static
String
pcapFilter
=
null
;
...
...
@@ -65,18 +66,6 @@ public class CommsigniaLayer extends Layer implements IEthernetSpecific {
System
.
out
.
println
(
deviceInfoResponse
);
itsApplication
.
setFacilityModuleStatus
(
FacilityModule
.
BSM
,
false
);
itsApplication
.
setFacilityModuleStatus
(
FacilityModule
.
CAM
,
false
);
// itsApplication.addEventListener(new ITSEventAdapter() {
// @Override
// public void onGnNotification(GNNotification notification) {
// ByteBuffer buffer = ByteBuffer.wrap(notification.getData());
//
// System.out.printf("GN GBC receive. GN address: %s Sequence number: %d RSSI: %d dBm\n",
// notification.getGNAddress(),
// buffer.getInt(),
// notification.getRssi()
// );
// }
// });
itsApplication
.
gnBindBlocking
(
BTPType
.
NONE
,
65535
);
}
catch
(
TimeoutException
e
)
{
e
.
printStackTrace
();
...
...
@@ -129,7 +118,7 @@ public class CommsigniaLayer extends Layer implements IEthernetSpecific {
for
(
int
i
=
1
;
i
<
localMacAddress
.
length
;
i
++)
{
strMacAddress
+=
String
.
format
(
":%02x"
,
localMacAddress
[
i
]);
}
//udp dst port 74 && wlan src 8b:ad:f0:0d:01:02
//udp dst port 74
93
&& wlan src 8b:ad:f0:0d:01:02
pcapFilter
=
pcapFilter
+
"not wlan src "
+
strMacAddress
;
// Reset filter
PcapMultiplexer
.
getInstance
().
resetFilter
(
pcapFilter
);
...
...
@@ -146,6 +135,10 @@ public class CommsigniaLayer extends Layer implements IEthernetSpecific {
public
void
receive
(
byte
[]
message
,
Map
<
String
,
Object
>
lowerInfo
)
{
TERFactory
.
getInstance
().
logDebug
(
">>> CommsigniaLayer.receive: "
+
ByteHelper
.
byteArrayToString
(
message
));
if
(
message
.
length
<=
20
+
8
+
29
+
26
)
{
// TODO To be refine
// Skip it
return
;
}
ByteBuffer
byteBuffer
=
ByteBuffer
.
wrap
(
message
);
// Skip C2P protocol
...
...
@@ -168,7 +161,7 @@ public class CommsigniaLayer extends Layer implements IEthernetSpecific {
byteBuffer
.
position
(
byteBuffer
.
position
()
+
10
);
// Skip LLC header
byteBuffer
.
position
(
byteBuffer
.
position
()
+
6
);
byteBuffer
.
position
(
byteBuffer
.
position
()
+
8
);
// Extract FrameType info
byte
[]
rawFrameType
=
new
byte
[
2
];
...
...
@@ -231,7 +224,7 @@ public class CommsigniaLayer extends Layer implements IEthernetSpecific {
.
withDstAddress
(
dstAddress
)
.
withSrcAddress
(
srcAddress
)
.
withType
(
Type
.
GNP
)
.
withInterfaceID
(
2
)
.
withInterfaceID
(
InterfaceID
)
.
withTxPowerDbm
(
TxPowerDbm
)
.
withData
(
message
);
InjectData
injectData
=
build
.
build
();
...
...
javasrc/tool/org/etsi/its/tool/elvior/res/ta.properties
View file @
5fadbdfe
...
...
@@ -30,8 +30,8 @@ ipv6OverGeoNetworkingPort=Debug
#fsapPort=FSAP/UdpIp
#UpperTesterSettings=192.168.42.1:12345
UpperTesterSettings
=
1
72
.1
7
.1
5.38
:12345
ConfigTesterSettings
=
1
72
.1
7
.1
5.39
:12346
UpperTesterSettings
=
1
0.200
.1.1
02
:12345
ConfigTesterSettings
=
1
0.200
.1.1
02
:12346
# Peer ITS station
#LinkLayer_Peer=8BADF00D0199
...
...
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