Commit 75913aa9 authored by garciay's avatar garciay
Browse files

Bug fixed on AcStartPassBeaconing

parent a5fd7160
......@@ -106,7 +106,7 @@ public class AdapterControlPort extends AdapterPort implements IPort, IObservabl
Management.getInstance(getComponentName()).stopBeaconing();
break;
case AcStartPassBeaconing:
ProcessAcStartPassBeaconing(data);
Management.getInstance(getComponentName()).startEnqueueingBeacons(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
......
......@@ -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
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment