Data Center Software Series: Using the Command Line

The Data Center Software is Total Phase’s free bus monitoring software that is used with our line of protocol analyzers and offers a variety of ways to monitor and debug data in real time. A feature that engineers often find beneficial is the ability to interface with the software through a command line. In this blog, we will discuss what the command line is and how to use the Command Line Window in the software. But first, we will provide a brief overview of the Data Center Software.

Data Center Software

 

About the Data Center Software

We at Total Phase provide a variety of debugging and development tools to assist engineers with testing and analyzing I2C, SPI, USB, CAN, eSPI, and A2B applications. Our protocol analyzers in particular allow users to monitor and capture bus data in real time, providing insight into low-level bus events and errors.

These protocol analyzers, including the line of Beagle Protocol Analyzers, USB Power Delivery Analyzer, Promira Serial Platform, and Komodo CAN Interfaces, are used in conjunction with the Data Center Software, which provides an interface to capture and display USB, I2C, SPI, USB Type-C Power Delivery, eSPI and CAN bus data. The Data Center Software is the only protocol analysis software in the industry with true, real-time performance and cross-platform support for Windows, Linux, and Mac OS X.

The software is packed with useful and time-saving features. One of the features that users find beneficial is the Command Line Window.

Command Line Window

Because the command line is a commonly used interface by those with a technical background to instruct the computer to perform specific tasks, this capability is also included directly in the Data Center Software itself.

While the Data Center Software provides users with easy-to-use features to interface with their application, the Command Line Window provides an alternative method to interact with the Data Center application. All operations that can be done through interfacing with the software directly can also be done via the command line. When an operation is performed in the application, its corresponding command line input is displayed in the command line output and added to the command line history. By using the arrow keys in the command line input box, users can scroll back through the command line history and edit or repeat previous commands.

Command Line Window tab Command Line Window

 

What are the Commands?

When interfacing with a command line, it is important to know what commands need to be used. To make it easy, the Data Center Software includes a library of accessible commands directly in the command line itself. To view all available commands, type “help” into the command line. If you would like additional help on a certain command, simply type “help COMMAND” to see help for a particular command.

Command Line Help Interface in the Data Center Software Command Line "help" interface

When the command line input is in focus, pressing the escape key once will clear the command line input box, and double pressing the escape key will clear the command line output and history.

What Languages Can be Used in the Command Line Window?

The Command Line Window uses the Python syntax and behaves similarly to the command line found in the Python interpreter. This means that local variables can be defined and control structures can be used as well. The arguments passed to the Data Center Software commands are generally singleton values (such as integers, strings, or True/False), lists, or dictionaries. For more information on Python syntax and data structures, please refer to the Python website.

How to Enable the Command Line Window

To enable the command line in the software, users can simply navigate to the top menu panel.

Data Center Software top menu panel Data Center Software top menu panel

Once there, navigate and click on the “Command Line” button.

Command Line button in the top menu panel of the Data Center Software Command Line button in the top menu panel

 

Once enabled, users will see the Command Line Window become available at the bottom of the Data Center Software screen.

Command Line Window in the Data Center Software Command Line Window in the Data Center Software

 

Additional Command Line Options

Users can also launch the Data Center application from the command line and perform many of the same functions as within the Command Line Window directly. This can be done by using the script located in the bin directory in the software package. Users can perform the following options:

  • -b FILE, Run the given file in batch mode.
  • -c, Create a command line interface.
  • -mminimized, Start in a minimized state.
  • -r PORT, Create a remote console on the given TCP port.

Batch Mode

While users can use the Command Line Window to consecutively execute different functions of the Data Center Software, users can also execute batch scripts in the command line to automate such operations. Instead of having to manually set up the software to meet the needed criteria, users can simply execute the script as needed.  The -b FILE option allows for the specified file to be run in batch mode when the Data Center application is launched. The file can contain commands in the same format as those entered in the Command Line Window

Command Line Console

Users that have launched the Data Center Software using the command line can also create a command line console in this location. This can be executed by using the -c option. Commands that can be entered in the Command Line Window can also be entered in the console.

Minimized State

Using the -m or minimized option will launch Data Center in minimized mode. This allows users to launch the application, use the Command Line Console, and never see the GUI on screen.

Remote Console

The -r PORT option will create a remote console on the given port. Connecting to this port via Telnet will give the user a command line console similar to the one found in the Command Line Window. This allows users to control the Data Center application from a remote location.

Summary

The Command Line Window is a useful feature when it comes to interfacing with our Data Center software. It is easy and intuitive to use and enables a more standard and familiar way to interface with the software. For more information on the Command Line or other Total Phase related solutions, please contact us at www.totalphase.com.