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
75913aa9
Commit
75913aa9
authored
Oct 20, 2016
by
garciay
Browse files
Bug fixed on AcStartPassBeaconing
parent
a5fd7160
Changes
2
Hide whitespace changes
Inline
Side-by-side
javasrc/adapter/org/etsi/its/adapter/ports/AdapterControlPort.java
View file @
75913aa9
...
...
@@ -106,7 +106,7 @@ public class AdapterControlPort extends AdapterPort implements IPort, IObservabl
Management
.
getInstance
(
getComponentName
()).
stopBeaconing
();
break
;
case
AcStartPassBeaconing:
ProcessAcStartPass
Beacon
ing
(
data
);
Management
.
getInstance
(
getComponentName
()).
startEnqueueing
Beacon
s
(
data
);
break
;
case
AcStopPassBeaconing:
Management
.
getInstance
(
getComponentName
()).
stopEnqueueingBeacons
();
...
...
@@ -231,15 +231,6 @@ public class AdapterControlPort extends AdapterPort implements IPort, IObservabl
}).
start
();
}
private
void
ProcessAcStartPassBeaconing
(
final
byte
[]
beacon
)
{
byte
[]
response
=
{(
byte
)
AcGnResponse
,
(
byte
)
AcGnResponseFailure
,
(
byte
)
AcFalse
};
Management
.
getInstance
(
getComponentName
()).
startEnqueueingBeacons
(
beacon
);
setChanged
();
notifyObservers
(
new
PortEvent
(
response
,
getPortName
(),
getComponentName
()));
}
private
void
LoadScenario
(
final
int
scenario
)
{
new
Thread
(
new
Runnable
()
{
@Override
...
...
javasrc/adapter/org/etsi/its/adapter/ports/GnPort.java
View file @
75913aa9
...
...
@@ -98,9 +98,8 @@ public class GnPort extends ProtocolPort implements Runnable, IEthernetSpecific
long
currentTime
=
System
.
currentTimeMillis
();
byte
[]
tst
=
ByteHelper
.
intToByteArray
((
int
)(((
currentTime
-
1072915200000L
)
%
modulo
)
-
3000
),
4
);
System
.
arraycopy
(
tst
,
0
,
beaconHeader
,
20
,
4
);
/* TODO Uncomment to get secured beacon*/
if
(!
management
.
isSecuredModeSet
())
{
// Secure mode disabled
if
(!
management
.
isSecuredModeSet
())
{
// Secure mode disabled
send
(
beaconHeader
,
params
);
/* TODO Uncomment to get secured beacon*/
}
else
{
// Send a secured beacon
byte
[]
securedBeaconHeader
=
buildSecuredBeacon
(
beaconHeader
,
tst
,
currentTime
,
false
);
// triggerTime = currentTime;
...
...
@@ -108,7 +107,6 @@ public class GnPort extends ProtocolPort implements Runnable, IEthernetSpecific
//TERFactory.getInstance().logDebug("GnPort: Call send " + ByteHelper.byteArrayToString(securedBeaconHeader));
send
(
securedBeaconHeader
,
params
);
}
/* TODO Uncomment to get secured beacon*/
try
{
Thread
.
sleep
(
management
.
getGnBeaconInterval
());
}
catch
(
InterruptedException
e
)
{
...
...
@@ -194,7 +192,7 @@ public class GnPort extends ProtocolPort implements Runnable, IEthernetSpecific
management
.
getLongitude
(),
// Longitude
new
byte
[]
{
(
byte
)
0x00
,
(
byte
)
0x00
},
// Elevation
new
byte
[]
{
(
byte
)
0x05
// Its-aid
(
byte
)
0x05
// Its-aid
},
b
);
...
...
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