tmf: lttngControl: mi: basic listing support
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.control.ui / src / org / eclipse / linuxtools / internal / lttng2 / control / ui / views / service / LTTngControlServiceConstants.java
index 4fe28bbdbf5942d365ebc532b541b6097d6bee33..44e9b0eab0f83c6fb6c44e7599a796da09a65024 100644 (file)
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2012, 2013 Ericsson
+ * Copyright (c) 2012, 2014 Ericsson
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -10,6 +10,7 @@
  *   Bernd Hufmann - Initial API and implementation
  *   Bernd Hufmann - Updated for support of LTTng Tools 2.1
  *   Simon Delisle - Updated for support of LTTng Tools 2.2
+ *   Marc-Andre Laperle - Support for creating a live session
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
 
@@ -39,7 +40,20 @@ public interface LTTngControlServiceConstants {
      * Unused value
      */
     static final int UNUSED_VALUE = -1;
+    /**
+     * String representation of numerical true element
+     */
+    static final String TRUE_NUMERICAL = "1"; //$NON-NLS-1$
+
+    // ------------------------------------------------------------------------
+    // LTTng Machine Interface constants
+    // ------------------------------------------------------------------------
 
+    /**
+     * Name of the XSD to validate against the xml machine interface
+     * output from LTTng
+     */
+    static final String MI_XSD_FILENAME = "mi_lttng.xsd"; //$NON-NLS-1$
     // ------------------------------------------------------------------------
     // Command constants
     // ------------------------------------------------------------------------
@@ -47,6 +61,14 @@ public interface LTTngControlServiceConstants {
      * The lttng tools command.
      */
     static final String CONTROL_COMMAND = "lttng"; //$NON-NLS-1$
+    /**
+     * The lttng tools machine interface command.
+     */
+    static final String CONTROL_COMMAND_MI = CONTROL_COMMAND + " --mi "; //$NON-NLS-1$
+    /**
+     * The lttng tools XML machine interface command.
+     */
+    static final String CONTROL_COMMAND_MI_XML = CONTROL_COMMAND_MI + " xml "; //$NON-NLS-1$
     /**
      * Command: lttng version.
      */
@@ -139,6 +161,10 @@ public interface LTTngControlServiceConstants {
      * Command line option for output path.
      */
     static final String OPTION_SNAPSHOT = " --snapshot "; //$NON-NLS-1$
+    /**
+     * Command line option for live
+     */
+    static final String OPTION_LIVE = " --live "; //$NON-NLS-1$
     /**
      * Command line option for kernel tracer.
      */
@@ -284,6 +310,11 @@ public interface LTTngControlServiceConstants {
      * Note: file for protocol is not considered as network trace since local consumer will be used.
      */
     static final Pattern TRACE_NETWORK_PATH_PATTERN = Pattern.compile("\\s*Trace\\s+path\\:\\s+(net|net4|net6|tcp|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$
+    /**
+     * Pattern to match session path for network tracing
+     * Note: file for protocol is not considered as network trace since local consumer will be used.
+     */
+    static final Pattern TRACE_NETWORK_PATTERN = Pattern.compile("\\s*(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$
     /**
      * Sub-pattern to pattern TRACE_NETWORK_PATH_PATTERN to match file protocol
      */
@@ -323,7 +354,7 @@ public interface LTTngControlServiceConstants {
     /**
      * Pattern to match for event information (lttng list <session>)
      */
-    static final Pattern EVENT_PATTERN = Pattern.compile("\\s+(.*)\\s+\\(loglevel:\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)\\s+\\[(enabled|disabled)\\]\\s*(\\[.*\\]){0,1}.*"); //$NON-NLS-1$
+    static final Pattern EVENT_PATTERN = Pattern.compile("\\s+(.*)\\s+\\(loglevel\\s*(:|<=|==)\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)\\s+\\[(enabled|disabled)\\]\\s*(\\[.*\\]){0,1}.*"); //$NON-NLS-1$
     /**
      * Pattern to match a wildcarded event information (lttng list <session>)
      */
This page took 0.027177 seconds and 5 git commands to generate.