Chapter 23. Using DataHub Commands

Table of Contents
23.1. Command Syntax
23.2. Return Syntax
23.3. Sending Commands by TCP

The Cogent DataHub program has an internal command set, documented in the Cogent DataHub Command Set reference. When you change the configuration of a DataHub instance in the Properties window, one or more of these commands is written in the configuration file, and the DataHub instance receives that command every time it starts up. You can use these commands to create custom configuration files. (Please see Section 1.8, “Configuration Files”.)

It is also possible to issue these commands to the DataHub instance during run-time in any of the following ways:

This is how custom applications can interact directly with a DataHub instance. For example, DataSim connects to a DataHub instance by using the DataHub APIs for C++, Java, and .NET.

23.1. Command Syntax

DataHub commands have the following syntax:

(command arg1 arg2 ...)

The whole command must be surrounded by parentheses. The command name and its arguments are each separated by white space—single spaces, tabs, or carriage returns are allowed. For example, the following line of a custom configuration file tells the DataHub instance to create a new data domain, named TestDomain.

(create_domain TestDomain)

Multiple-word strings must be in quotes. Numbers take their own values. Booleans are 0 for false and 1 for true.