w===============================================================================
USBHub CMD Line Example
===============================================================================

This is a basic CMD line example that was designed for the USBHub2x4, USBHub3p
and USBHub3c but could easily be adapted to our other products.  It depends on
an external header implementation "cxxopts.h".  The source for this file can be
found at: https://github.com/jarro2783/cxxopts.

Example execution:
-h            //Prints the help information.
-p 0 -e 0     //Disables port 0
-p 0 -e 1     //Enables port 0
-p 0 -e 0 -b  //Disables just the data lines of port 0
-p 0 -e 0 -a  //Disables just the power lines of port 0

Notes:
===============================================================================

# To build, copy the "lib" directory from the "api" folder into this directory.
    The lib directory contains the required header files, and the Brainstem2 DLL and
    LIB files.

# The project is setup with 3x different configurations. These configurations
  can be changed within Visual Studio by changing the solutions configuration at
  the top of the IDE. It can also be built from the command line with the correct 
  configuration flags. Examples are given below; however, you must first load
  Visual Studio build tools in order to have access to MSBuild (vcvarsall.bat).
    - Debug - Linked to the BrainStem2.dll
        * MSBuild /property:Configuration=Debug AcronameHubCLI.vcxproj
    - Release - Linked to the BrainStem2.dll
        * MSBuild /property:Configuration=Release AcronameHubCLI.vcxproj
    - Static - Linked to BrainStem2static.lib for easy deployment. 
        * MSBuild /property:Configuration=Static AcronameHubCLI.vcxproj

# For Debug and Release configurations a post build step has been added to the project 
  that copies the dll into the output directory. The dll must be next to the executable
  or installed into the local system.

# Linking to the static library to create a stand-alone executable is possible
    with modifications to the Visual Studio project. If you wish to link against the
    static library follow these instructions.

      - Open the associated project in Visual Studio
      - Open the Solution Explorer
      - Right click on Solution 'AcronameHubCLI', select Configuration Manager...
      - Under Active solution configuration, select <New...>
      - In New Solution Configuration Window, enter Static for the name,
        Copy settings from Release and check Create new project configurations.
        Select OK.
      - Close Configuration Manager window.  Static should be selected as the
        active configuration.
      - Select the AcronameHubCLI project properties.
      - From the AcronameHubCLI Properties Pages, under C/C++, select
        Code Generation. Select Multi-Threaded (/MT) for the Runtime Library.
        Click the Apply button.
      - On the AcronameHubCLI Properties Pages, under Linker, select Input.
        Edit the Additional Dependencies and replace lib/BrainStem2.lib with
        lib/w32/BrainStem2static.Lib and append the list with iphlpapi.lib,
        ws2_32.lib, winusb.lib and setupapi.lib.  Click OK.
      - Also under Linker, select Debugging and set Generate Debugging Info
        to No. Click the OK button to exit the AcronameHubCLI Properties Pages.
      - Right click the AcronameHubCLI project in the solution explorer and
        select Build.

    Upon successful build, the stand-alone executable file is found in the
    Win32_AcronameHubCLI/Static folder of the project folder.

If you have questions, please see the reference, or check out our guides
at www.acroname.com.
