/**********************************************************************
- * 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
* 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;
* 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
// ------------------------------------------------------------------------
* 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.
*/
* 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.
*/
* 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
*/