Commit a209f984 authored by garciay's avatar garciay
Browse files

Update ByteHelper package reference

parent fcd11460
package org.etsi.its.tool.elvior; package org.etsi.its.tool.elvior;
import org.etsi.adapter.TERFactory;
import org.elvior.ttcn.tritci.IntegerValueEx; import org.elvior.ttcn.tritci.IntegerValueEx;
import org.etsi.ttcn.tci.BitstringValue; import org.etsi.ttcn.tci.BitstringValue;
import org.etsi.ttcn.tci.BooleanValue; import org.etsi.ttcn.tci.BooleanValue;
......
package org.etsi.its.tool.elvior; package org.etsi.its.tool.elvior;
import org.elvior.ttcn.tritci.TriProvider; import org.elvior.ttcn.tritci.TriProvider;
import org.etsi.common.ByteHelper; import org.etsi.ttcn.common.ByteHelper;
import org.etsi.ttcn.tci.Type; import org.etsi.ttcn.tci.Type;
import org.etsi.ttcn.tci.Value; import org.etsi.ttcn.tci.Value;
import org.etsi.ttcn.tri.TriMessage; import org.etsi.ttcn.tri.TriMessage;
......
...@@ -7,7 +7,7 @@ import org.elvior.ttcn.tritci.IntegerValueEx; ...@@ -7,7 +7,7 @@ import org.elvior.ttcn.tritci.IntegerValueEx;
import org.elvior.ttcn.tritci.TciProvider; import org.elvior.ttcn.tritci.TciProvider;
import org.elvior.ttcn.tritci.TriMessageEx; import org.elvior.ttcn.tritci.TriMessageEx;
import org.elvior.ttcn.tritci.TriProvider; import org.elvior.ttcn.tritci.TriProvider;
import org.etsi.common.ByteHelper; import org.etsi.ttcn.common.ByteHelper;
import org.etsi.ttcn.tci.RecordValue; import org.etsi.ttcn.tci.RecordValue;
import org.etsi.ttcn.tci.TciCDProvided; import org.etsi.ttcn.tci.TciCDProvided;
import org.etsi.ttcn.tci.TciTypeClass; import org.etsi.ttcn.tci.TciTypeClass;
......
...@@ -82,25 +82,27 @@ public class PluginAdapter implements TriCommunicationSA, TriCommunicationTE, xT ...@@ -82,25 +82,27 @@ public class PluginAdapter implements TriCommunicationSA, TriCommunicationTE, xT
_logger.entering("PluginAdapter", "Constructor"); _logger.entering("PluginAdapter", "Constructor");
// Load TA settings // Load TA settings
Level level = Level.ALL;
try { try {
_properties.load(MainTA.class.getResourceAsStream("/org/etsi/its/tool/elvior/res/ta.properties")); _properties.load(MainTA.class.getResourceAsStream("/org/etsi/its/tool/elvior/res/ta.properties"));
String debugLevel = _properties.getProperty("DEBUG_ENABLED", "OFF");
level = Level.OFF;
if (debugLevel.equalsIgnoreCase("ALL")) {
level = Level.ALL;
} else if (debugLevel.equalsIgnoreCase("INFO")) {
level = Level.INFO;
} else if (debugLevel.equalsIgnoreCase("SEVERE")) {
level = Level.SEVERE;
} else if (!debugLevel.equalsIgnoreCase("OFF")) {
TERFactory.getInstance().logError("Unsupported logging level: " + debugLevel);
}
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
String debugLevel = _properties.getProperty("DEBUG_ENABLED", "OFF");
Level level = Level.OFF;
if (debugLevel.equalsIgnoreCase("ALL")) {
level = Level.ALL;
} else if (debugLevel.equalsIgnoreCase("INFO")) {
level = Level.INFO;
} else if (debugLevel.equalsIgnoreCase("SEVERE")) {
level = Level.SEVERE;
} else if (!debugLevel.equalsIgnoreCase("OFF")) {
TERFactory.getInstance().logError("Unsupported logging level: " + debugLevel);
}
_logger.addHandler(new ConsoleHandler()); _logger.addHandler(new ConsoleHandler());
_logger.setUseParentHandlers(false);
_logger.setLevel(level); _logger.setLevel(level);
_logger.getHandlers()[0].setLevel(level); // _logger.getHandlers()[0].setLevel(level);
// Register this object as the instance implementing the TRI-SA interface // Register this object as the instance implementing the TRI-SA interface
TriProvider.getInstance().setTriCommunicationSA(this); TriProvider.getInstance().setTriCommunicationSA(this);
......
# Debug level - Authorized values: OFF, ALL, INFO, SEVERE # Debug level - Authorized values: OFF, ALL, INFO, SEVERE
DEBUG_ENABLED=OFF DEBUG_ENABLED=ALL
# Define the port/layer configuration for CAM # Define the port/layer configuration for CAM
camPort=BTP/GN/ETH camPort=BTP/GN/ETH
# Define the port/layer configuration for DENM # Define the port/layer configuration for DENM
...@@ -24,7 +24,7 @@ fsapPort=FSAP/UdpIp ...@@ -24,7 +24,7 @@ fsapPort=FSAP/UdpIp
fsapPort=FSAP/UdpIp fsapPort=FSAP/UdpIp
#UpperTesterSettings=192.168.42.1:12345 #UpperTesterSettings=192.168.42.1:12345
UpperTesterSettings=172.17.15.39:12345 UpperTesterSettings=172.17.15.38:12345
# Peer ITS station # Peer ITS station
LinkLayer_Peer=8BADF00D0099 LinkLayer_Peer=8BADF00D0099
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
package org.etsi.tool.elvior; package org.etsi.tool.elvior;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.logging.Logger;
import org.elvior.ttcn.tritci.IntegerValueEx; import org.elvior.ttcn.tritci.IntegerValueEx;
import org.elvior.ttcn.tritci.TciProvider; import org.elvior.ttcn.tritci.TciProvider;
...@@ -32,8 +33,10 @@ public class TciCDWrapper implements ITciCDWrapper { ...@@ -32,8 +33,10 @@ public class TciCDWrapper implements ITciCDWrapper {
private TciCDRequired _tciFactory = TciProvider.getInstance().getTciCDRequired(); private TciCDRequired _tciFactory = TciProvider.getInstance().getTciCDRequired();
private Logger _logger;
public TciCDWrapper() { public TciCDWrapper() {
// Nothing to do _logger = Logger.getLogger("org.etsi.its");
} }
@Override @Override
...@@ -149,4 +152,14 @@ public class TciCDWrapper implements ITciCDWrapper { ...@@ -149,4 +152,14 @@ public class TciCDWrapper implements ITciCDWrapper {
intValue.setInteger(value); intValue.setInteger(value);
} }
@Override
public void logDebug(String debugMessage) {
_logger.info(debugMessage);
}
@Override
public void logError(String errorMessage) {
_logger.severe(errorMessage);
}
} // End of class TciCDWrapper } // End of class TciCDWrapper
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
package org.etsi.tool.testingtech; package org.etsi.tool.testingtech;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.logging.Logger;
import org.etsi.codec.ITciCDWrapper; import org.etsi.codec.ITciCDWrapper;
import org.etsi.ttcn.tci.BooleanValue; import org.etsi.ttcn.tci.BooleanValue;
...@@ -32,13 +33,16 @@ public class TciCDWrapper implements ITciCDWrapper { ...@@ -32,13 +33,16 @@ public class TciCDWrapper implements ITciCDWrapper {
* RuntimeBehavior instance reference * RuntimeBehavior instance reference
*/ */
private RB _rb; private RB _rb;
private Logger _logger;
/** /**
* Specialized ctor * Specialized ctor
* @param rb TTCN-3 runtime reference * @param rb TTCN-3 runtime reference
*/ */
public TciCDWrapper(final RB rb) { public TciCDWrapper(final RB rb) {
_rb = rb; _rb = rb;
_logger = Logger.getLogger("org.etsi.its");
} }
@Override @Override
...@@ -145,4 +149,14 @@ public class TciCDWrapper implements ITciCDWrapper { ...@@ -145,4 +149,14 @@ public class TciCDWrapper implements ITciCDWrapper {
return (EnumeratedValue) _rb.getTciCDRequired().getTypeForName(typeName); return (EnumeratedValue) _rb.getTciCDRequired().getTypeForName(typeName);
} }
@Override
public void logDebug(String debugMessage) {
_logger.info(debugMessage);
}
@Override
public void logError(String errorMessage) {
_logger.severe(errorMessage);
}
} // End of class TciCDWrapper } // End of class TciCDWrapper
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