rsslVAConsumer Application Description

--------
Summary:
--------

The purpose of this application is to demonstrate contributing data to 
TRCE service  using ValueAdd components.  It is a single-threaded
client application.

The consumer application implements callbacks that process information
received by the provider.  It creates the RsslReactor, creates the
desired connections, then dispatches from the RsslReactor for events and
messages.  Once it has received the event indicating that the channel is 
ready, it will send a login request message to the provider.
The resulting decoded responses from the provider are displayed on the console.

This application opens tunnel streams to a provider that supports them (via the -tunnel option)
after the provider accepts the login request. Then, it will authenticate using
credentials when the tunneling channel has been established successfully.

After that, the application will contribute data using the tunneling channel.
The data are hard-coded into a simple MARKET_PRICE update message that contains
only BID and ASK fields.

This application is intended as a basic usage example.  Some of the design choices
were made to favor simplicity and readability over performance.  This application 
is not intended to be used for measuring performance.
 
-----------------
Application Name:
-----------------

VAConsumerContribution

-------------------
Command line usage:
-------------------  

VAConsumerContribution [[-tcp [<hostname>:<port>]] [<domain>:<item name>,...] ] [-uname <LoginUsername>] [-runtime <seconds>] [-tunnel] [-trceUser <username>] [-trcePass <password>] [-trcePostItem <itemName>] [-x] [-runtime]

-tcp specifies creating a channel on the given host and port.

	Example Usage: -tcp localhost:14002

Specifying the -runtime option controls the time the application will run
before exiting, in seconds.

The -tunnel option opens a tunnel stream to the provider for exchanging simple messages.

-trceUser is a username to be sent to AAA system.

-trcePass is a password to be sent to AAA system.

-trcePostItem is an item name to be of contributing data.

-x provides an XML trace of messages



- VAConsumer -? displays command line options.  

- Pressing the CTRL+C buttons terminates the program.  

-----------------
Compiling Source:
-----------------

Place this example in the same folder as the VAConsumer example.

- Version 1.1.x
    The location will be <REALTIME_SDK_ROOT_FOLDER>\Eta\Applications\Examples.

    The included makefile is set up to run from the file
    locations as presented through the distribution package.
    It is set up for building on the Transport API supported 
    Linux platforms using the supported compilers.

    The VA_CUSTOM_BUILT_LIBS value in the makefile is used to 
    link in the Transport API ValueAdd components compiled from the provided
    source code.  If a custom library is used, VA_CUSTOM_BUILT_LIBS 
    should be set to Yes.  In addition, the user should point the 
    VA_INCLUDE locations to the location where the directory of 
    the current platform's library is built.

    The LINKTYPE value in the makefile is used to control
    whether the application is built using Transport API static or
    shared libraries. The default build uses Transport API static
    libraries. To use Transport API shared libraries,
    set LINKTYPE=Shared.

    To compile, run the gmake command.

    Gmake can be obtained at http://www.gnu.org/software/make/

- Version 1.2.x
For Windows, please set a variable environment named 'EtaInstallPath' point to <REALTIMESDK_ROOT_FOLDER>\Cpp-C\Eta folder.
	Then, run a VisualStudio 2103 project file (VAConsumerContribution_VS120.vcxproj) in the VAConsumerContribution folder.

For Linux, Place this example in <REALTIME_SDK_ROOT_FOLDER>\Cpp-C\Eta\Applications\Examples.

    The included CMakeLists.txt is used to generate a makefile using
    cmake command.

    Firstly, navigate back to <REALTIME_SDK_ROOT_FOLDER>\Cpp-C\Eta\Applications folder,
	edit the CMakeLists.txt in this folder to include the VAConsumerContribution tutorial.
	
	For example:
	--------------------------------------------------------------------------------------------
	*		if (BUILD_ETA_EXAMPLES)                                                            *
	*		DEBUG_PRINT(BUILD_ETA_EXAMPLES)                                                    *
	*                                                                                          *
	*		set(CMAKE_ENABLE_EXPORTS OFF)                                                      *
	*		add_subdirectory( Examples/Consumer )                                              *
	*		add_subdirectory( Examples/EncDecExample )                                         *
	*		add_subdirectory( Examples/NIProvider )                                            *
	*		add_subdirectory( Examples/Provider )                                              *
	*		if(NOT BUILD_32_BIT_ETA)                                                           *
	*			add_subdirectory( Examples/AuthLock )                                          *
	*			add_subdirectory( Examples/VAProvider )                                        *
	*			add_subdirectory( Examples/VAConsumer )                                        *
	*			add_subdirectory( Examples/VAConsumerContribution )                            * < Add this line
	*			add_subdirectory( Examples/VANIProvider )                                      *
	*			add_subdirectory( Examples/WatchlistConsumer )                                 *
	*		endif()                                                                            *
	*	else()                                                                                 *
	*		message(STATUS                                                                     *
	*				"Skipping Eta Exampls Build: BUILD_ETA_EXAMPLES:${BUILD_ETA_EXAMPLES}")    *
	*                                                                                          *
	--------------------------------------------------------------------------------------------
	
	Secondly, generate a makefile using Cmake. You can refer to the following link for more detail.
	(https://developers.refinitiv.com/en/article-catalog/article/using-cmake-and-cmake-gui-elektron-sdk-c)
	
	Go to the <REALTIME_SDK_ROOT_FOLDER> folder and execute the following command.
	./cmake -H. -Bbuildfiles_debug -DBUILD_EMA_UNIT_TESTS=OFF -DBUILD_ETA_APPLICATIONS=ON -DBUILD_UNIT_TESTS=OFF -DBUILD_ETA_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug
	
	Thirdly, navigate to the directory specified in the -B option above, execute a gmake command with a target VAConsumerContribution.
	./gmake VAConsumerContribution
	
	Finally, you can search the executable file in the gmake running output. For instance:
		
	--------------------------------------------------------------------------------------------------------------------------------------------------------------
	*	[100%] Built target librsslVA                                                                                                                            *
	*	[100%] Building C object Cpp-C/Eta/Applications/Examples/VAConsumerContribution/CMakeFiles/VAConsumerContribution.dir/rsslConsumerContribution.c.o       *
	*	[100%] Building C object Cpp-C/Eta/Applications/Examples/VAConsumerContribution/CMakeFiles/VAConsumerContribution.dir/simpleTunnelMsgHandler.c.o         *
	*	[100%] Building C object Cpp-C/Eta/Applications/Examples/VAConsumerContribution/CMakeFiles/VAConsumerContribution.dir/tunnelStreamHandler.c.o            *
	*	[100%] Building C object Cpp-C/Eta/Applications/Examples/VAConsumerContribution/CMakeFiles/VAConsumerContribution.dir/rsslLoginConsumer.c.o              *
	*	[100%] Building C object Cpp-C/Eta/Applications/Examples/VAConsumerContribution/CMakeFiles/VAConsumerContribution.dir/__/VACommon/rsslVASendMessage.c.o  *
	*	[100%] Linking C executable ../../../../../../Cpp-C/Eta/Executables/OL7_64_GCC482/Debug/VAConsumerContribution                                           *
	*	[100%] Built target VAConsumerContribution                                                                                                               *
	--------------------------------------------------------------------------------------------------------------------------------------------------------------
	
----------------
Example Content:
----------------

Included for this application are:

- Source files.

- This document.

--------------------
Detailed Description
--------------------

rsslConsumer.c - The main file for the rsslVAConsumer application. Provides the default message callback.

rsslLoginConsumer.c - Provides the login message callback.

rsslVASendMessage.c - Utility functions for sending messages.

tunnelStreamHandler.c - Provides tunnel stream management, used by the SimpleTunnelStreamMsgHandler and QueueMsgHandler.

simpleTunnelMsgHandler.c - Provides functionality for sending and receiving basic messages via a tunnel stream.