<?xml version="1.0" encoding="UTF-8"?>
<EmaConfig>

<!-- ConsumerGroup provides set of detailed configurations to be used by named consumers				-->
<!-- Application specifies which configuration to use by setting OmmConsumerConfig::consumerName()		-->
<ConsumerGroup>
	<!-- DefaultConsumer parameter defines which consumer configuration is used by OmmConsumer			-->
	<!-- if application does not specify it through OmmConsumerConfig::consumerName()					-->
	<!-- first consumer on the ConsumerList is a DefaultConsumer if this parameter is not specified		-->
	<DefaultConsumer value="Consumer_1"/>
	<ConsumerList>
		<Consumer>
			<!-- Name is mandatory																		-->
			<Name value="Consumer_1"/>

			<!-- Channel is optional: defaulted to "RSSL_SOCKET + localhost + 14002"					-->
			<!-- Channel or ChannelSet may be specified													-->
			<Channel value="Channel_1"/>

			<!-- Logger is optional: defaulted to "File + Success"										-->
			<Logger value="Logger_1"/>

			<!-- Dictionary is optional: defaulted to "ChannelDictionary"								-->
			<Dictionary value="Dictionary_1"/>
			<XmlTraceToStdout value="0"/>
		</Consumer>
		
		<Consumer>
			<Name value="Consumer_2"/>
			
			<!-- ChannelSet specifies an ordered list of Channels to which OmmConsumer will attempt to	-->
			<!-- connect, one at a time, if the previous one fails to connect							-->
			<ChannelSet value="Channel_1, Channel_2"/>
			
			<Logger value="Logger_2"/>
			<Dictionary value="Dictionary_2"/>
			<XmlTraceToStdout value="0"/>
		</Consumer>
		
	</ConsumerList>
</ConsumerGroup>

<!-- NiProviderGroup provides set of detailed configurations to be used by named providers				-->
<!-- Application specifies which configuration to use by setting OmmNiProviderConfig::providerName()	-->
<NiProviderGroup>
	<!-- DefaultNiProvider parameter defines which provider configuration is used by OmmProvider		-->
	<!-- if application does not specify it through OmmNiProviderConfig::providerName()					-->
	<!-- first provider on the NiProviderList is a DefaultNiProvider if this parameter is not specified	-->
	<DefaultNiProvider value="Provider_1"/>
	<NiProviderList>
		<NiProvider>
			<!-- Name is mandatory																		-->
			<Name value="Provider_1"/>
			
			<!-- Channel is optional: defaulted to "RSSL_SOCKET + localhost + 14003"					-->
			<Channel value="Channel_10"/>
			
			<!-- Directory is optional.																	-->
			<!-- the EMA provides hardcoded directory containing a single service named "NI_PUB".		-->
			<!-- the EMA defaults the OmmNiProviderConfig::adminControlDirectory() to ApiControlEnum.	-->
			<!-- the applications may just use the hardcoded "NI_PUB" service to publish all the items.	-->
			<!-- if desired, a custom directory may be configured, named and used instead of the		-->
			<!-- hardcoded one.	Please see examples in the DirectoryGroup.								-->
			<!-- the directory may also be specified using OmmNiProviderConfig::addAdminMsg().			-->
			<!-- if desired the OmmNiProviderConfig::adminControlDirectory() to UserControlEnum			-->
			<!-- which allows applications to specify and control the directory.						-->
			<Directory value="Directory_1"/>
			
			<Logger value="Logger_1"/>

			<XmlTraceToStdout value="0"/>
		</NiProvider>
		
		<NiProvider>
			<Name value="Provider_2"/>
		
			<Channel value="Channel_4"/>
			
			<Directory value="Directory_2"/>
			
			<Logger value="Logger_1"/>

			<XmlTraceToStdout value="0"/>
		</NiProvider>
		
	</NiProviderList>
</NiProviderGroup>

<!-- IProviderGroup provides set of detailed configurations to be used by named providers                -->
<!-- Application specifies which configuration to use by setting OmmIProviderConfig::providerName()      -->
<IProviderGroup>
    <!-- DefaultIProvider parameter defines which provider configuration is used by OmmProvider          -->
    <!-- if application does not specify it through OmmIProviderConfig::providerName()                   -->
    <!-- first provider on the IProviderList is a default provider if this parameter is not specified    -->
    <DefaultIProvider value="Provider_1"/>
    <IProviderList>
        <IProvider>
            <!-- Name is mandatory                                                                       -->
            <Name value="Provider_1"/>
            <!-- Server is optional: defaulted to "RSSL_SOCKET + 14002"                                  -->
            <Server value="Server_1"/>
            <!-- Directory is optional: defaulted to AdminControl::UserControlEnum                       -->
            <!-- source directory configuration to use if OmmIProviderConfig::adminModel()               -->
            <!-- was set to ApiControlEnum                                                               -->
            <!-- this configuration also decides which dictionaries will be loaded at startup            -->
            <!-- this configuration may be overwritten by OmmIProviderConfig::addAdminMsg()              -->
            <Directory value="Directory_2"/>
            <Logger value="Logger_1"/>
			
			<ItemCountHint value="10000"/>
			
			<ServiceCountHint value="10000" />
			
			<DispatchTimeoutApiThread value="500" />
			
			<CatchUnhandledException value="0" />

			<MaxDispatchCountApiThread value="500" />
			
			<MaxDispatchCountUserThread value="500" />
			
			<PipePort value="9009" />
			
			<RefreshFirstRequired value="1" />
		
        </IProvider>
    </IProviderList>
</IProviderGroup>

<ChannelGroup>
	<ChannelList>
		<Channel>
			<Name value="Channel_1"/>

			<!-- ChannelType possible values are:														-->
			<!-- ChannelType::RSSL_SOCKET    - TCP IP connection type									-->
			<!-- ChannelType::RSSL_HTTP      - Http tunnel connection type								-->
			<!-- ChannelType::RSSL_ENCRYPTED - Https tunnel connection type								-->
			<!-- ChannelType::RSSL_RELIABLE_MCAST - Reliable multicast connection type					-->
			<ChannelType value="ChannelType::RSSL_SOCKET"/>

			<!-- CompressionType is optional: defaulted to None											-->
			<!-- possible values: None, ZLib, LZ4														-->
			<CompressionType value="CompressionType::None"/>
			<GuaranteedOutputBuffers value="5000"/>

			<!-- ConnectionPingTimeout is optional: defaulted to 30000									-->
			<ConnectionPingTimeout value="30000"/>
			
			<!-- TcpNodelay is optional: defaulted to 1 												-->
			<!-- possible values: 1 (tcp_nodelay option set), 0 (tcp_nodelay not set)					-->
			<TcpNodelay value="1"/>
			<Host value="10.55.4.41"/>
			<Port value="14002"/>
		</Channel>
		<Channel>
			<Name value="Channel_2"/>
			<ChannelType value="ChannelType::RSSL_SOCKET"/>
			<CompressionType value="CompressionType::None"/>
			<GuaranteedOutputBuffers value="5000"/>
			<Host value="122.1.1.100"/>
			<Port value="14002"/>
		</Channel>
		<Channel>
			<Name value="Channel_3"/>
			<ChannelType value="ChannelType::RSSL_ENCRYPTED"/>
			<CompressionType value="CompressionType::None"/>
			<GuaranteedOutputBuffers value="5000"/>
			<Host value="122.1.1.100"/>
			<Port value="14002"/>
			<!-- ObjectName is optional: defaulted to ""												-->
			<ObjectName value=""/>
		</Channel>
		<Channel>
			<Name value="Channel_4"/>
			<ChannelType value="ChannelType::RSSL_HTTP"/>
			<CompressionType value="CompressionType::None"/>
			<GuaranteedOutputBuffers value="5000"/>
			<Host value="122.1.1.100"/>
			<Port value="14002"/>
			<!-- ObjectName is optional: defaulted to ""												-->
			<ObjectName value=""/>
		</Channel>
		<Channel>
			<Name value="Channel_5"/>
			<ChannelType value="ChannelType::RSSL_RELIABLE_MCAST"/>
			<RecvAddress value="235.5.2.6"/>
			<RecvPort value="15008"/>
			<SendAddress value="235.5.2.2"/>
			<SendPort value="15007"/>
			<UnicastPort value="40102"/>
			<InterfaceName value="localhost"/>
		</Channel>
		<Channel>
			<Name value="Channel_10"/>
			<ChannelType value="ChannelType::RSSL_SOCKET"/>
			<GuaranteedOutputBuffers value="5000"/>
			<ConnectionPingTimeout value="30000"/>
			<TcpNodelay value="1"/>
			<Host value="localhost"/>
			<Port value="14003"/>
		</Channel>
	</ChannelList>
</ChannelGroup>

<ServerGroup>
    <ServerList>
        <Server>
            <Name value="Server_1"/>
            <ServerType value="ServerType::RSSL_SOCKET"/>
            <!-- CompressionType is optional: defaulted to None -->
            <!-- possible values: None, ZLib, LZ4 -->
            <CompressionType value="CompressionType::None"/>
            <GuaranteedOutputBuffers value="5000"/>
            <!-- ConnectionPingTimeout is optional: defaulted to 30000 -->
            <ConnectionPingTimeout value="30000"/>
            <!-- TcpNodelay is optional: defaulted to 1 -->
            <!-- possible values: 1 (tcp_nodelay option set), 0 (tcp_nodelay not set) -->
            <TcpNodelay value="1"/>
            <Port value="14002"/>
        </Server>
    </ServerList>
</ServerGroup>

<LoggerGroup>
	<LoggerList>
		<Logger>
			<Name value="Logger_1"/>

			<!-- LoggerType is optional:  defaulted to "File"											-->
			<!-- possible values: Stdout, File															-->
			<LoggerType value="LoggerType::Stdout"/>

			<!-- LoggerSeverity is optional: defaulted to "Success"										-->
			<!-- possible values: Verbose, Success, Warning, Error, NoLogMsg							-->
			<LoggerSeverity value="LoggerSeverity::Success"/>
		</Logger>
		<Logger>
			<Name value="Logger_2"/>
			<LoggerType value="LoggerType::File"/>
			<!-- FileName is optional: defaulted to "emaLog_<process id>.log"							-->
			<FileName value="emaLog"/>
			<LoggerSeverity value="LoggerSeverity::Success"/>
		</Logger>
	</LoggerList>
</LoggerGroup>

<!-- source directory refresh configuration used by provider											-->
<DirectoryGroup>

	<!-- DefaultDirectory specifies Directory used as default if providers do not specify Directory name -->
	<DefaultDirectory value="Directory_1"/>
	<DirectoryList>
		<!-- providers refer to the Directory by name													-->
		<!-- Directory is a set of Services (one or more) on which a provider will provide item data	--> 
		<Directory>
			<Name value="Directory_1"/>
			
			<Service>
				<Name value="TEST_NI_PUB"/>

				<InfoFilter>
					<!-- optional value; if not specified EMA will assign it							-->
					<ServiceId value="0"/>
					
					<!-- optional value																	-->
					<Vendor value="company name"/>

					<!-- possible values: 0 - means consolidation service, 1 - means original provider	-->
					<IsSource value="0"/>

					<!-- an array of market domains supported by this service							-->
					<!-- domains defined in the RDM Usage Guide may be refered by name					-->
					<!-- names of the RDM defined domains are listed in the EmaRdm.h file				-->
					<!-- e.g. MMT_MARKET_PRICE, MMT_MARKET_BY_ORDER										-->
					<!-- note that the capabilities may be specified with names and or numbers			-->
					<Capabilities>
						<CapabilitiesEntry value="MMT_MARKET_PRICE"/>
						<CapabilitiesEntry value="MMT_MARKET_BY_ORDER"/>
					</Capabilities>

					<!-- list of dictionary names specified in the DictionaryGroup						-->
					<!-- EMA will populate the Service::InfoFilter::DictionariesProvided element		-->
					<!-- with the respective <>ItemName values											-->
					<DictionariesProvided>
						<DictionariesProvidedEntry value="Dictionary_1"/>
						<DictionariesProvidedEntry value="Dictionary_3"/>
					</DictionariesProvided>
					
					<!-- list of dictionary names specified in the DictionaryGroup						-->
					<!-- EMA will populate the Service::InfoFilter::DictionariesUsed element			-->
					<!-- with the respective <>ItemName values											-->
					<DictionariesUsed>
						<DictionariesUsedEntry value="Dictionary_1"/>
					</DictionariesUsed>

					<!-- list of QoS values supported by this service									-->
					<!-- possible values are listed in the OmmQos.h file of the EMA						-->
					<QoS>
						<QoSEntry>
							<Timeliness value="Timeliness::RealTime"/>
							<Rate value="Rate::TickByTick"/>
						</QoSEntry>
						<QoSEntry>
							<Timeliness value="Timeliness::InexactDelayed"/>
							<Rate value="Rate::JustInTimeConflated"/>
						</QoSEntry>
					</QoS>
					
					<!-- 0 means does not support, 1 - means supports QoS range							-->
					<SupportsQoSRange value="0"/>
					
					<!-- name of item list																-->
					<ItemList value="#.itemlist"/>

					<!-- 0 means does not accept, 1 - means accepts consumer status						-->
					<AcceptingConsumerStatus value="0"/>

					<!-- 0 means does not support, 1 - means supports out of band snapshots				-->
					<SupportsOutOfBandSnapshots value="0"/>
				</InfoFilter>
				
				<!-- StateFilter is optional															-->
				<!-- EMA will default the values as follows:											-->
				<!-- for interactive provider															-->
				<!--	- ServiceState is "up" and AcceptingRequests is "Yes"							-->
				<!-- for non interactive provider														-->
				<!--	- ServiceState is "up" and AcceptingRequests is "No"							-->
				<StateFilter>
					<!-- 0 means service is down, 1 - means service is up (default; 1)					-->
					<ServiceState value="1"/>

					<!-- 0 means service does not accept, 1 - means service accepts (default; 1)		-->
					<AcceptingRequests value="1"/>
					
					<!-- optional; specifies status change to apply to all items provided by this service -->
					<!-- possible values are listed in the OmmState.h file of the EMA					-->
					<Status>
						<!-- possible values are: Open, Close, CloseRecover								-->
						<StreamState value="StreamState::Open"/> 
						<!-- possibe values are: NoChange, Ok, Suspect									-->
						<DataState value="DataState::Ok"/>
						<!-- possible values are: None, DacsDown, etc									-->
						<StatusCode value="StatusCode::None"/>
						<!-- a text field																-->
						<StatusText value=""/>
					</Status>
				</StateFilter>
			</Service>
			
			<Service>
				<Name value="NI_PUB"/>		
				<InfoFilter>
					<DictionariesProvided>
						<DictionariesProvidedEntry value="Dictionary_1"/>
					</DictionariesProvided>
					<DictionariesUsed>
						<DictionariesUsedEntry value="Dictionary_2"/>
					</DictionariesUsed>

					<Vendor value="company name"/>
					<IsSource value="0"/>
					<Capabilities>
						<CapabilitiesEntry value="6"/>
						<CapabilitiesEntry value="MMT_MARKET_BY_ORDER"/>
					</Capabilities>
					<QoS>
						<QoSEntry>
							<Timeliness value="Timeliness::RealTime"/>
							<Rate value="Rate::TickByTick"/>
						</QoSEntry>
					</QoS>
					<SupportsQoSRange value="0"/>
					<ItemList value="#.itemlist"/>
					<AcceptingConsumerStatus value="0"/>
					<SupportsOutOfBandSnapshots value="0"/>
				</InfoFilter>
				
				<StateFilter>
					<ServiceState value="1"/>
					<AcceptingRequests value="1"/>
					<Status>
						<StreamState value="StreamState::Open"/>
						<DataState value="DataState::Ok"/>
						<StatusCode value="StatusCode::None"/>
						<StatusText value=""/>
					</Status>
				</StateFilter>
			</Service>
		</Directory>
		
		<Directory>
			<Name value="Directory_2"/>
			<Service>
				<Name value="DIRECT_FEED"/>
				<InfoFilter>
					<ServiceId value="1"/>
					<DictionariesProvided>
						<DictionariesProvidedEntry value="Dictionary_3"/>
					</DictionariesProvided>

					<DictionariesUsed>
						<DictionariesUsedEntry value="Dictionary_3"/>
					</DictionariesUsed>

					<Vendor value="company name"/>
					<IsSource value="0"/>
					<Capabilities>
						<CapabilitiesEntry value="MMT_DICTIONARY"/>
						<CapabilitiesEntry value="MMT_MARKET_PRICE"/>
						<CapabilitiesEntry value="MMT_MARKET_BY_ORDER"/>
						<CapabilitiesEntry value="MMT_MARKET_BY_PRICE"/>
						<CapabilitiesEntry value="200"/>
					</Capabilities>

					<QoS>
						<QoSEntry>
							<Timeliness value="Timeliness::RealTime"/>
							<Rate value="Rate::TickByTick"/>
						</QoSEntry>
						<QoSEntry>
							<Timeliness value="100"/>
							<Rate value="100"/>
						</QoSEntry>
					</QoS>
					
					<SupportsQoSRange value="0"/>
					<ItemList value="#.itemlist"/>
					<AcceptingConsumerStatus value="0"/>
					<SupportsOutOfBandSnapshots value="0"/>
				</InfoFilter>

				<StateFilter>
					<ServiceState value="1"/>
					<AcceptingRequests value="1"/>
				</StateFilter>
			</Service>
			
		</Directory>
		
	</DirectoryList>
	
</DirectoryGroup>

<DictionaryGroup>

	<DictionaryList>
		<Dictionary>
			<Name value="Dictionary_1"/>

			<!-- dictionaryType is optional: defaulted to ChannelDictionary" -->
			<!-- possible values: ChannelDictionary, FileDictionary -->
			<!-- if dictionaryType is set to ChannelDictionary, file names are ignored -->
			<DictionaryType value="DictionaryType::ChannelDictionary"/>
		</Dictionary>
		
		<Dictionary>
			<Name value="Dictionary_2"/>
			<DictionaryType value="DictionaryType::FileDictionary"/>

			<!-- dictionary names are optional: defaulted to RDMFieldDictionary and enumtype.def -->
			<RdmFieldDictionaryFileName value="./RDMFieldDictionary"/>
			<EnumTypeDefFileName value="./enumtype.def"/>
		</Dictionary>

		<Dictionary>
			<Name value="Dictionary_3"/>
			<!-- providers always assume DictionaryType = DictionaryType::FileDictionary -->
			<DictionaryType value="DictionaryType::FileDictionary"/>

			<!-- dictionary file names are optional: defaulted to ./RDMFieldDictionary and ./enumtype.def -->
			<RdmFieldDictionaryFileName value="./RDMFieldDictionary"/>
			<EnumTypeDefFileName value="./enumtype.def"/>
			
			<!-- <dictionary>ItemName represents the names shown in DictionariesProvided and DictionariesUsed
				elements of the Directory InfoFilter -->
			<!-- <dictionary>ItemName is optional; default values are "RWFFld" for the RdmFieldDictionary
				and "RWFEnum" for the enumtype.def -->
			<RdmFieldDictionaryItemName value="RWFFld"/>
			<EnumTypeDefItemName value="RWFEnum"/>
		</Dictionary>

		<Dictionary>
			<Name value="Dictionary_4"/>
			<DictionaryType value="DictionaryType::FileDictionary"/>
			<RdmFieldDictionaryFileName value="./RDMFieldDictionary_ID4"/>
			<EnumTypeDefFileName value="./enumtype_ID4.def"/>
			<RdmFieldDictionaryItemName value="RWFFld_ID4"/>
			<EnumTypeDefItemName value="RWFEnum_ID4"/>
		</Dictionary>

	</DictionaryList>
	
</DictionaryGroup>

</EmaConfig>