Commit b4b3bc03 authored by garciay's avatar garciay

Bug fixed in ItsAid decoding

Remove sysout
parent 59804da6
......@@ -62,8 +62,6 @@ public class CommsigniaLayer extends Layer implements IEthernetSpecific {
try {
itsApplication.connect(1000);
itsApplication.registerBlocking();
DeviceInfoResponse deviceInfoResponse = itsApplication.requestDeviceInfoBlocking();
System.out.println(deviceInfoResponse);
itsApplication.setFacilityModuleStatus(FacilityModule.BSM, false);
itsApplication.setFacilityModuleStatus(FacilityModule.CAM, false);
itsApplication. gnBindBlocking(BTPType.NONE, 65535);
......
......@@ -271,7 +271,6 @@ public class GnPort extends ProtocolPort implements Runnable, IEthernetSpecific
}
// ByteHelper.dump("GnPort.send", message);
//System.out.println("\n\n");
return send(message, params);
}
......
......@@ -100,13 +100,13 @@ public class UpperTesterPort extends AdapterPort implements IPort, IObservable {
_certificate = new ByteArrayOutputStream();
CertificatesIOFactory.getInstance().loadCertificates(_utSecuredRootPath, _utSecuredConfiId);
if (CertificatesIOFactory.getInstance().readCertificate(CertificateId, _certificate)) {
// System.out.println("UpperTesterPort.UpperTesterPort: _certificate=" + ByteHelper.byteArrayToString(_certificate.toByteArray()));
// TERFactory.getInstance().logDebug("UpperTesterPort.UpperTesterPort: _certificate=" + ByteHelper.byteArrayToString(_certificate.toByteArray()));
_hashedId8 = new ByteArrayOutputStream();
_signingPrivateKey = new ByteArrayOutputStream();
CertificatesIOFactory.getInstance().readCertificateDigest(CertificateId, _hashedId8);
// System.out.println("UpperTesterPort.UpperTesterPort: _hashedId8=" + ByteHelper.byteArrayToString(_hashedId8.toByteArray()));
// TERFactory.getInstance().logDebug("UpperTesterPort.UpperTesterPort: _hashedId8=" + ByteHelper.byteArrayToString(_hashedId8.toByteArray()));
CertificatesIOFactory.getInstance().readSigningKey(CertificateId, _signingPrivateKey);
// System.out.println("UpperTesterPort.UpperTesterPort: _signingPrivateKey=" + ByteHelper.byteArrayToString(_signingPrivateKey.toByteArray()));
// TERFactory.getInstance().logDebug("UpperTesterPort.UpperTesterPort: _signingPrivateKey=" + ByteHelper.byteArrayToString(_signingPrivateKey.toByteArray()));
_isSecuredMode = true;
}
......@@ -561,20 +561,20 @@ public class UpperTesterPort extends AdapterPort implements IPort, IObservable {
16, // Set position at the beginning of the public keys
32
);
// System.out.println("UpperTesterPort.DispatchMessage: aaSigningPublicKeyX:" + ByteHelper.byteArrayToString(aaSigningPublicKeyX));
// TERFactory.getInstance().logDebug("UpperTesterPort.DispatchMessage: aaSigningPublicKeyX:" + ByteHelper.byteArrayToString(aaSigningPublicKeyX));
byte[] aaSigningPublicKeyY = ByteHelper.extract(
_certificate.toByteArray(),
16 + 32,
32
);
// System.out.println("UpperTesterPort.DispatchMessage: aaSigningPublicKeyY:" + ByteHelper.byteArrayToString(aaSigningPublicKeyY));
// TERFactory.getInstance().logDebug("UpperTesterPort.DispatchMessage: aaSigningPublicKeyY:" + ByteHelper.byteArrayToString(aaSigningPublicKeyY));
// Build the generation time value
byte[] generationTime = ByteHelper.longToByteArray(
System.currentTimeMillis(),
Long.SIZE / Byte.SIZE
); // In microseconds
// System.out.println("UpperTesterPort.buildToBeSignedData: generationTime=" + ByteHelper.byteArrayToString(generationTime));
// TERFactory.getInstance().logDebug("UpperTesterPort.buildToBeSignedData: generationTime=" + ByteHelper.byteArrayToString(generationTime));
byte[] headersField = ByteHelper.concat(
ByteHelper.concat( // SecuredMessage HeaderFields
signerInfo, // signerInfo
......@@ -600,7 +600,7 @@ public class UpperTesterPort extends AdapterPort implements IPort, IObservable {
b
);
byte[] headersFieldLength = SecurityHelper.getInstance().size2tls(headersField.length);
// System.out.println("UpperTesterPort.buildToBeSignedData: headersField=" + ByteHelper.byteArrayToString(headersField));
// TERFactory.getInstance().logDebug("UpperTesterPort.buildToBeSignedData: headersField=" + ByteHelper.byteArrayToString(headersField));
byte[] payload = p_securedData.toByteArray();
byte[] toBeSignedData = ByteHelper.concat(
new byte[] { // SecuredMessage version
......@@ -616,20 +616,20 @@ public class UpperTesterPort extends AdapterPort implements IPort, IObservable {
new byte[] { (byte)0x43 }, // Signature length
new byte[] { (byte)0x01 } // Signature
);
// System.out.println("UpperTesterPort.buildToBeSignedData: toBeSignedData=" + ByteHelper.byteArrayToString(toBeSignedData));
// TERFactory.getInstance().logDebug("UpperTesterPort.buildToBeSignedData: toBeSignedData=" + ByteHelper.byteArrayToString(toBeSignedData));
p_toBeSignedData.write(toBeSignedData);
}
private void signSecuredMessage(final ByteArrayOutputStream p_toBeSignedData, final ByteArrayOutputStream p_securedMessage) throws Exception {
// System.out.println("UpperTesterPort.signSecuredMessage: toBeSignedData: " + ByteHelper.byteArrayToString(p_toBeSignedData.toByteArray()));
// TERFactory.getInstance().logDebug("UpperTesterPort.signSecuredMessage: toBeSignedData: " + ByteHelper.byteArrayToString(p_toBeSignedData.toByteArray()));
// Calculate the hash
byte[] hash = CryptoLib.hashWithSha256(p_toBeSignedData.toByteArray());
// System.out.println("UpperTesterPort.signSecuredMessage: hash=" + ByteHelper.byteArrayToString(hash));
// TERFactory.getInstance().logDebug("UpperTesterPort.signSecuredMessage: hash=" + ByteHelper.byteArrayToString(hash));
byte[] securedBeaconHeader = null;
// Signed the hash
byte[] signatureBytes = CryptoLib.signWithEcdsaNistp256WithSha256(hash, new BigInteger(_signingPrivateKey.toByteArray()));
// System.out.println("UpperTesterPort.signSecuredMessage: signatureBytes=" + ByteHelper.byteArrayToString(signatureBytes));
// TERFactory.getInstance().logDebug("UpperTesterPort.signSecuredMessage: signatureBytes=" + ByteHelper.byteArrayToString(signatureBytes));
// Add signature
securedBeaconHeader = ByteHelper.concat(
p_toBeSignedData.toByteArray(),
......@@ -640,7 +640,7 @@ public class UpperTesterPort extends AdapterPort implements IPort, IObservable {
ByteHelper.extract(signatureBytes, 2, signatureBytes.length - 2)
);
p_securedMessage.write(securedBeaconHeader);
// System.out.println("<<< UpperTesterPort.signSecuredMessage: sendBeacon: " + ByteHelper.byteArrayToString(p_securedMessage.toByteArray()));
// TERFactory.getInstance().logDebug("<<< UpperTesterPort.signSecuredMessage: sendBeacon: " + ByteHelper.byteArrayToString(p_securedMessage.toByteArray()));
}
} // End of class UpperTesterPort
......@@ -149,7 +149,7 @@ public class CertificatesIO implements ICertificatesIO {
*/
@Override
public boolean readCertificate(final String key, final ByteArrayOutputStream certificate) {
// System.out.println(">>> CertificatesIO.readCertificate: " + key);
// TERFactory.getInstance().logDebug(">>> CertificatesIO.readCertificate: " + key);
String certKey;
if (_cachedReverseCertificatesDigest.containsKey(key)) {
......@@ -173,7 +173,7 @@ public class CertificatesIO implements ICertificatesIO {
@Override
public boolean readCertificateDigest(final String certificateId, final ByteArrayOutputStream digest) {
// System.out.println(">>> CertificatesIO.readCertificateDigest: " + certificateId);
// TERFactory.getInstance().logDebug(">>> CertificatesIO.readCertificateDigest: " + certificateId);
// Sanity check
if (!_cachedCertificatesDigest.containsKey(certificateId)) {
......@@ -199,7 +199,7 @@ public class CertificatesIO implements ICertificatesIO {
*/
@Override
public boolean readSigningKey(final String keyName, final ByteArrayOutputStream key) {
// System.out.println(">>> CertificatesIO.readSigningKey: " + keyName);
// TERFactory.getInstance().logDebug(">>> CertificatesIO.readSigningKey: " + keyName);
try {
String certKey;
......@@ -305,11 +305,11 @@ public class CertificatesIO implements ICertificatesIO {
return;
}
_cachedCertificatesDigest.put(certName, bytes);
// System.out.println("CertificatesIO.addDigestItem: Store digest: " + ByteHelper.byteArrayToString(bytes) + " - " + certName);
// TERFactory.getInstance().logDebug("CertificatesIO.addDigestItem: Store digest: " + ByteHelper.byteArrayToString(bytes) + " - " + certName);
}
private void addCertItem(final File p_certFile) throws FileNotFoundException, IOException {
// System.out.println(">>> CertificatesIO.addItem: " + p_certFile);
// TERFactory.getInstance().logDebug(">>> CertificatesIO.addItem: " + p_certFile);
// Load the keys file name
String filename = p_certFile.getName();
......@@ -322,14 +322,14 @@ public class CertificatesIO implements ICertificatesIO {
fsKeys.close();
bytes = ByteHelper.hexStringToByteArray(new String(bytes));
_cachedCertificates.put(certName, bytes);
// System.out.println("CertificatesIO.addItem: Store cert " + certName + " - " + ByteHelper.byteArrayToString(bytes));
// TERFactory.getInstance().logDebug("CertificatesIO.addItem: Store cert " + certName + " - " + ByteHelper.byteArrayToString(bytes));
// calculate digest
bytes = calculateDigestFromCertificate(bytes);
_cachedCertificatesDigest.put(certName, bytes);
// System.out.println("CertificatesIO.addItem: Store digest: " + ByteHelper.byteArrayToString(bytes) + " - " + certName);
// TERFactory.getInstance().logDebug("CertificatesIO.addItem: Store digest: " + ByteHelper.byteArrayToString(bytes) + " - " + certName);
_cachedReverseCertificatesDigest.put(ByteHelper.byteArrayToString(bytes), certName);
// System.out.println("CertificatesIO.addItem: Store reverse digest " + ByteHelper.byteArrayToString(bytes) + " - " + certName);
// TERFactory.getInstance().logDebug("CertificatesIO.addItem: Store reverse digest " + ByteHelper.byteArrayToString(bytes) + " - " + certName);
// Load Private Keys
filename = p_certFile.getPath();
......
......@@ -132,10 +132,10 @@ public class CodecBuffer {
* @see setMarkers()
*/
public void runCallbacks() {
// System.out.println("Running callbacks...");
// TERFactory.getInstance().logDebug("Running callbacks...");
for(Map.Entry<String, Marker> entry : markers.entrySet()) {
String key = entry.getKey();
// System.out.println("Running callback: " + key);
// TERFactory.getInstance().logDebug("Running callback: " + key);
Marker marker = entry.getValue();
IMarkerCallback callback = marker.getCallback();
if(callback != null) {
......
......@@ -9,6 +9,7 @@ import java.util.Map;
import java.util.TreeMap;
import org.etsi.codec.ITciCDWrapper;
import org.etsi.common.ByteHelper;
import org.etsi.ttcn.tci.TciCDProvided;
import org.etsi.ttcn.tci.Type;
import org.etsi.ttcn.tci.Value;
......@@ -34,28 +35,30 @@ public class MainCodec extends ICodec {
@Override
public Value decode(CodecBuffer buf, Type decodingHypothesis) {
// TERFactory.getInstance().logDebug(">>> MainCodec.decode: " + decodingHypothesis.getName());
// ByteHelper.dump(">>> MainCodec.decode: ", buf.getBytes());
ByteHelper.dump(">>> MainCodec.decode: ", buf.getBytes());
CodecFactory cf = CodecFactory.getInstance();
try {
TciCDProvided extCodec = cf.getExternalCodec(decodingHypothesis.getTypeEncoding());
if(extCodec != null) {
return extCodec.decode(new TriMessageImpl(buf.getBytes()), decodingHypothesis);
} else {
ICodec codec = cf.getCodec(
this,
decodingHypothesis.getTypeClass(),
decodingHypothesis.getTypeEncoding(),
decodingHypothesis.getName()
);
codec.preDecode(buf, decodingHypothesis);
// TODO To be removed, for debug purpose only
Value v = extCodec.decode(new TriMessageImpl(buf.getBytes()), decodingHypothesis);
if (v != null) {
return v;//extCodec.decode(new TriMessageImpl(buf.getBytes()), decodingHypothesis);
} // else continue
}
ICodec codec = cf.getCodec(
this,
decodingHypothesis.getTypeClass(),
decodingHypothesis.getTypeEncoding(),
decodingHypothesis.getName()
);
codec.preDecode(buf, decodingHypothesis);
// TODO To be removed, for debug purpose only
// Value decValue = codec.decode(buf, decodingHypothesis);
// TERFactory.getInstance().logDebug("<<< MainCodec.decode: " + decValue);
// return decValue;
return codec.decode(buf, decodingHypothesis);
}
return codec.decode(buf, decodingHypothesis);
} catch(Throwable e) {
e.printStackTrace();
return null;
......@@ -68,25 +71,26 @@ public class MainCodec extends ICodec {
CodecFactory cf = CodecFactory.getInstance();
TciCDProvided extCodec = cf.getExternalCodec(value.getValueEncoding());
if(extCodec != null) {
return new CodecBuffer(extCodec.encode(value).getEncodedMessage());
TriMessage enc = extCodec.encode(value);
if (enc != null) {
return new CodecBuffer(enc.getEncodedMessage()/*extCodec.encode(value).getEncodedMessage()*/);
} // else continue
}
else {
ICodec codec = CodecFactory.getInstance().getCodec(
this,
value.getType().getTypeClass(),
value.getValueEncoding(),
value.getType().getName()
);
CodecBuffer preBuf = codec.preEncode(value);
CodecBuffer buf = codec.encode(value);
if(preBuf != null) {
preBuf.append(buf);
buf = preBuf;
}
// ByteHelper.dump("<<< MainCodec.encode: ", buf.getBytes());
return buf;
ICodec codec = CodecFactory.getInstance().getCodec(
this,
value.getType().getTypeClass(),
value.getValueEncoding(),
value.getType().getName()
);
CodecBuffer preBuf = codec.preEncode(value);
CodecBuffer buf = codec.encode(value);
if(preBuf != null) {
preBuf.append(buf);
buf = preBuf;
}
//ByteHelper.dump("<<< MainCodec.encode: ", buf.getBytes());
return buf;
}
public String getHint(String key) {
......
......@@ -27,7 +27,7 @@ public class Integer extends ICodec {
@Override
public Value decode(CodecBuffer buf, Type decodingHypothesis) {
// System.out.println(">>> Integer.decode: " + decodingHypothesis.getName());
//TERFactory.getInstance().logDebug(">>> Integer.decode: " + decodingHypothesis.getName());
IntegerValue iv = null;
int lengthInBits;
......@@ -65,7 +65,7 @@ public class Integer extends ICodec {
}
}
catch(Exception e) {
// System.out.println("Integer.encode: " + decodingHypothesis.getTypeEncoding() + ", " + decodingHypothesis.getTypeEncodingVariant());
// TERFactory.getInstance().logDebug("Integer.encode: " + decodingHypothesis.getTypeEncoding() + ", " + decodingHypothesis.getTypeEncodingVariant());
// Assume unsigned integer
if(lengthInBits >= java.lang.Integer.SIZE) {
iv = mainCodec.getTciCDRequired().setInteger(new BigInteger(1, value));
......@@ -80,7 +80,7 @@ public class Integer extends ICodec {
@Override
public CodecBuffer encode(Value value) {
// System.out.println(">>> Integer.encode: " + value.getType().getName());
// TERFactory.getInstance().logDebug(">>> Integer.encode: " + value.getType().getName());
IntegerValue iv = (IntegerValue)value;
byte[] encoded = null;
......
......@@ -20,7 +20,7 @@ public class FacilitiesInd extends Record {
@Override
protected void preDecode(CodecBuffer buf, Type decodingHypothesis) {
// System.out.println(">>> FacilitiesInd.preDecode: " + decodingHypothesis);
// TERFactory.getInstance().logDebug(">>> FacilitiesInd.preDecode: " + decodingHypothesis);
int msgLen = buf.getNbBits() - 8 - 8 - 8 - 32 - 8 - 16 - 16 - 256 - 32; // FIXME Add support of SSP (Bit256) & ITS-AID (UInt32) extra fields: fixed size (256) is not nice!
int offset = 0;
......
......@@ -32,7 +32,7 @@ public class CommonHeader extends Record implements IMarkerCallback {
@Override
protected void postEncodeField(String fieldName, CodecBuffer buf) {
// System.out.println(">>> CommonHeader.postEncodeField: " + fieldName);
// TERFactory.getInstance().logDebug(">>> CommonHeader.postEncodeField: " + fieldName);
if(fieldName.equals("nextHeader")) {
int nh = buf.getBits(buf.getNbBits() - 4, 4)[0];
......@@ -44,12 +44,12 @@ public class CommonHeader extends Record implements IMarkerCallback {
@Override
protected void preDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) {
// System.out.println(">>> CommonHeader.preDecodeField: " + fieldName + ", " + decodingHypothesis);
// TERFactory.getInstance().logDebug(">>> CommonHeader.preDecodeField: " + fieldName + ", " + decodingHypothesis);
}
@Override
protected void postDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) {
// System.out.println(">>> CommonHeader.postDecodeField: " + fieldName + ", " + decodingHypothesis);
// TERFactory.getInstance().logDebug(">>> CommonHeader.postDecodeField: " + fieldName + ", " + decodingHypothesis);
if(fieldName.equals("nextHeader")) {
int nh = ((EnumeratedValue)(rv.getField(fieldName))).getInt();
......@@ -72,7 +72,7 @@ public class CommonHeader extends Record implements IMarkerCallback {
@Override
public void run(String markerName, CodecBuffer leftBuf, CodecBuffer rightBuf) {
// System.out.println(">>> CommonHeader.run");
// TERFactory.getInstance().logDebug(">>> CommonHeader.run");
if(markerName.equals("plLength")) {
int pl = java.lang.Integer.parseInt(mainCodec.getHint("payloadLength"));
......
......@@ -61,7 +61,7 @@ public class GeoNetworkingPacket extends Record {
packetValue = null; // Reset value
Value result = super.decode(buf, decodingHypothesis); // Normal decoding
// TERFactory.getInstance().logDebug("GeoNetworkingPacket.decode: Normal decoding=" + result);
if(isSecuredMode) {
if(isSecuredMode && (result != null)) {
// Override 'packet' field
RecordValue rv = (RecordValue) result;
rv.setField("packet", packetValue);
......
......@@ -23,12 +23,12 @@ public class GeoNetworkingPdu extends Record {
@Override
protected void preDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) {
// System.out.println(">>> GeoNetworkingPdu.preDecodeField: " + fieldName + ", " + decodingHypothesis.getName() + ", " + rv.getType().getName());
// TERFactory.getInstance().logDebug(">>> GeoNetworkingPdu.preDecodeField: " + fieldName + ", " + decodingHypothesis.getName() + ", " + rv.getType().getName());
}
@Override
protected void postDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) {
// System.out.println(">>> GeoNetworkingPdu.postDecodeField: " + fieldName + ", " + decodingHypothesis.getName() + ", " + rv.getType().getName());
// TERFactory.getInstance().logDebug(">>> GeoNetworkingPdu.postDecodeField: " + fieldName + ", " + decodingHypothesis.getName() + ", " + rv.getType().getName());
}
} // End of class GeoNetworkingPdu
......@@ -19,7 +19,7 @@ public class GeographicRegionContainer extends Union {
@Override
protected void preEncode(CodecBuffer buf, UnionValue uv) {
// System.out.println(">>> GeographicRegionContainer.preEncode: " + uv.getType().getName() + ", " + uv.getPresentVariantName());
// TERFactory.getInstance().logDebug(">>> GeographicRegionContainer.preEncode: " + uv.getType().getName() + ", " + uv.getPresentVariantName());
if (uv.getPresentVariantName().equals("other_region")) {
// FIXME Check for opaque<var> length encoding depending of the length value : <= 127 or > 127
......
......@@ -51,6 +51,7 @@ public class HeaderField extends Record {
@Override
protected void preDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) {
// TERFactory.getInstance().logDebug(">>> HeaderField.preDecodeField: " + fieldName + ", " + decodingHypothesis.getName() + ", " + rv.getType().getName());
if (fieldName.equals("type_")) {
byte type_ = buf.getBytes(0, 1)[0];
switch (type_) {
......
......@@ -37,6 +37,7 @@ public class IntX extends Integer {
byte msb = buf.getBytes(0, 1)[0];
if ((msb & 0x80) == 0x00) { // Integer < 128
mainCodec.setHint("IntXLen", "8");
mainCodec.setHint("HeaderFieldContainer.its_aidLen", "8"); // TCT3 workaround, i don't know how to abstract this :-(
return super.decode(buf, decodingHypothesis);
} else {
// Decode the length. The encoding of the length shall use at most 7 bits set to 1 (see Draft ETSI TS 103 097 V1.1.14 Clause 4.2.1 IntX)
......@@ -47,6 +48,7 @@ public class IntX extends Integer {
} while (bit != 0x00);
// Set the IntX length
mainCodec.setHint(decodingHypothesis.getName() + "Len", String.valueOf(byteLen * Byte.SIZE ));
mainCodec.setHint("HeaderFieldContainer.its_aid" + "Len", String.valueOf(byteLen * Byte.SIZE )); // TCT3 workaround, i don't know how to abstract this :-(
// Remove the length from the real integer value
byte[] newBuf = buf.getBytes();
newBuf[0] &= (byte)(Math.pow(2.0, 8 - byteLen + 1) - 1);
......
......@@ -23,7 +23,7 @@ public class RecordOf extends org.etsi.ttcn.codec.generic.RecordOf {
public Value decode(CodecBuffer buf, Type decodingHypothesis) {
// TERFactory.getInstance().logDebug(">>> security.RecordOf.decode: " + decodingHypothesis.getName());
int len = (int) TlsHelper.getInstance().tls2size(buf);// buf.readBytes(1)[0]; // Get number of items into the RecordOf
int len = (int) TlsHelper.getInstance().tls2size(buf);
// TERFactory.getInstance().logDebug("security.RecordOf.decode: length=" + len);
if (len == 0) {
RecordOfValue rov = (RecordOfValue)decodingHypothesis.newInstance();
......@@ -36,6 +36,7 @@ public class RecordOf extends org.etsi.ttcn.codec.generic.RecordOf {
RecordOfValue rov = (RecordOfValue)decodingHypothesis.newInstance();
while (newBuf.getNbBits() != 0) {
recordOf.add(mainCodec.decode(newBuf, rov.getElementType()));
// TERFactory.getInstance().logDebug("security.RecordOf.decode: new len=" + newBuf.getNbBits() / Byte.SIZE + "/" + len);
}
// Fill it
......
......@@ -203,7 +203,6 @@ public class ItsExternalFunctionsProvider implements IItsExternalFunctionsProvid
long d = Math.round(Math.sqrt(Math.pow(dlat * rbis, 2) + Math.pow(dlong * rbis * Math.cos(dlat), 2)));
dist.setFloat(d);
// System.out.println("Distance: " + d);
return dist;
} // End of method fx_computeDistance
......@@ -765,13 +764,11 @@ public class ItsExternalFunctionsProvider implements IItsExternalFunctionsProvid
(long)_tcicdWrapper.getInteger((IntegerValue)(rv.getField("latitude"))),
(long)_tcicdWrapper.getInteger((IntegerValue)(rv.getField("longitude")))
));
// System.out.println("fx_isLocationInsidePolygonalRegion: add " + polygonalArea.get(polygonalArea.size() - 1));
} // End of 'for' statement
WGS84 location = new WGS84( // Location
(long)_tcicdWrapper.getInteger((IntegerValue)(p_location.getField("latitude"))),
(long)_tcicdWrapper.getInteger((IntegerValue)(p_location.getField("longitude")))
);
// System.out.println("fx_isLocationInsidePolygonalRegion: location= " + location);
// Call Geodesic function
BooleanValue result = _tcicdWrapper.getBoolean();
......
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