Loading javasrc/org/etsi/its/adapter/TraceParser.java +5 −3 Original line number Diff line number Diff line Loading @@ -14,8 +14,9 @@ import de.tu_berlin.cs.uebb.ttcn.runtime.OctetString; public class TraceParser { private List<List<TransactionStructure>> traceList = new ArrayList<List<TransactionStructure>>(); private String startCommandStr = ": trace"; private String falseCommandStr = ": trace c"; // private String startCommandStr = "trace"; // private String falseCommandStr = "trace c"; private String matchTrace = ".*:\\s.*trace$"; private String stopCommandStr = "Those were the most recent"; private String filePath; Loading Loading @@ -43,7 +44,8 @@ public class TraceParser { boolean transactionStarted=false; while(null!=(line=br.readLine())) { // if (line.startsWith("here the dump starts ---------->")) { if (line.startsWith(startCommandStr) && !line.startsWith(falseCommandStr)){ // if (line.startsWith(startCommandStr) && !line.startsWith(falseCommandStr)){ if (line.matches(matchTrace)){ transactionStarted = true; transactions = new ArrayList<TransactionStructure>(); traceList.add(transactions); Loading javasrc/org/etsi/its/adapter/TracePortPlugin.java +13 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import org.etsi.ttcn.tri.TriSignatureId; import org.etsi.ttcn.tri.TriStatus; import org.etsi.ttcn.tri.TriTestCaseId; import com.testingtech.ttcn.logging.RTLoggingConstants; import com.testingtech.ttcn.tri.AbstractPlugin; import com.testingtech.ttcn.tri.ISAPlugin; import com.testingtech.ttcn.tri.PluginIdentifier; Loading Loading @@ -75,6 +76,12 @@ public class TracePortPlugin extends AbstractPlugin implements ISAPlugin { if ("setTraceFile".equals(signatureName)) { TriParameter tracePathParam = parameterList.get(0); String tracePath = getCharstringParameterData(tracePathParam); //attaching the trace file to the log file File traceFile = new File(tracePath); RB.getTciTLProvidedV321TT().tliRT("", System.nanoTime(), "", -1, null, RTLoggingConstants.RT_LOG_INFO, "attach;EMBED;FILE=" + traceFile.getAbsolutePath()); boolean result = setTraceFile(tracePath); BooleanReturn(componentId, portId, address, signatureId, parameterList, result); Loading Loading @@ -197,6 +204,12 @@ public class TracePortPlugin extends AbstractPlugin implements ISAPlugin { payload = new byte[]{};//TODO for empty messages it is null instead of empty array } RB.getTriCommunicationTE().triEnqueueMsg(tsiPortId, new TriAddressImpl(address.getEncodedMessage()), componentId, new TriMessageImpl(payload)); // This sleep is added as a workaround so that the exchanged of the messages between the components is shoed synchronized try { Thread.sleep(100); } catch (InterruptedException e) { //ignore } } return result; } Loading Loading
javasrc/org/etsi/its/adapter/TraceParser.java +5 −3 Original line number Diff line number Diff line Loading @@ -14,8 +14,9 @@ import de.tu_berlin.cs.uebb.ttcn.runtime.OctetString; public class TraceParser { private List<List<TransactionStructure>> traceList = new ArrayList<List<TransactionStructure>>(); private String startCommandStr = ": trace"; private String falseCommandStr = ": trace c"; // private String startCommandStr = "trace"; // private String falseCommandStr = "trace c"; private String matchTrace = ".*:\\s.*trace$"; private String stopCommandStr = "Those were the most recent"; private String filePath; Loading Loading @@ -43,7 +44,8 @@ public class TraceParser { boolean transactionStarted=false; while(null!=(line=br.readLine())) { // if (line.startsWith("here the dump starts ---------->")) { if (line.startsWith(startCommandStr) && !line.startsWith(falseCommandStr)){ // if (line.startsWith(startCommandStr) && !line.startsWith(falseCommandStr)){ if (line.matches(matchTrace)){ transactionStarted = true; transactions = new ArrayList<TransactionStructure>(); traceList.add(transactions); Loading
javasrc/org/etsi/its/adapter/TracePortPlugin.java +13 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import org.etsi.ttcn.tri.TriSignatureId; import org.etsi.ttcn.tri.TriStatus; import org.etsi.ttcn.tri.TriTestCaseId; import com.testingtech.ttcn.logging.RTLoggingConstants; import com.testingtech.ttcn.tri.AbstractPlugin; import com.testingtech.ttcn.tri.ISAPlugin; import com.testingtech.ttcn.tri.PluginIdentifier; Loading Loading @@ -75,6 +76,12 @@ public class TracePortPlugin extends AbstractPlugin implements ISAPlugin { if ("setTraceFile".equals(signatureName)) { TriParameter tracePathParam = parameterList.get(0); String tracePath = getCharstringParameterData(tracePathParam); //attaching the trace file to the log file File traceFile = new File(tracePath); RB.getTciTLProvidedV321TT().tliRT("", System.nanoTime(), "", -1, null, RTLoggingConstants.RT_LOG_INFO, "attach;EMBED;FILE=" + traceFile.getAbsolutePath()); boolean result = setTraceFile(tracePath); BooleanReturn(componentId, portId, address, signatureId, parameterList, result); Loading Loading @@ -197,6 +204,12 @@ public class TracePortPlugin extends AbstractPlugin implements ISAPlugin { payload = new byte[]{};//TODO for empty messages it is null instead of empty array } RB.getTriCommunicationTE().triEnqueueMsg(tsiPortId, new TriAddressImpl(address.getEncodedMessage()), componentId, new TriMessageImpl(payload)); // This sleep is added as a workaround so that the exchanged of the messages between the components is shoed synchronized try { Thread.sleep(100); } catch (InterruptedException e) { //ignore } } return result; } Loading