#ifndef OpenTestSystem_DiagManager_NoneOtxDiagApi_INoneOtxDiag_H
#define OpenTestSystem_DiagManager_NoneOtxDiagApi_INoneOtxDiag_H

#include "ApiDefs.h"
#include <string>
#include <vector>
#include <map>
namespace OpenTestSystem { namespace OtxDiagManager { namespace NoneOtxDiagApi {
	/// <summary>
	/// Contains methods which are not covered by the OTX standard
	/// </summary>
	class API_EXPORTS INoneOtxDiag
	{
	protected:
		INoneOtxDiag() {};
	public:
		/// <summary>
		/// Levels for logging of diagnostic communication
		/// </summary>
		enum LogLevels : int{
			/// <summary>
			/// No log file will be written. The logging is switched off.
			/// </summary>
			OFF = 0,
			/// <summary>
			/// Only header will be written.
			/// </summary>
			HEADER = 1,
			/// <summary>
			/// PDUs and header will be written.
			/// </summary>
			PDU = 2,
			/// <summary>
			/// Shortnames, PDUs and header will be written.
			/// </summary>
			SHORTNAMES = 3,
			/// <summary>
			/// All available information will be written.
			/// </summary>
			ALL = 4
		};
		virtual ~INoneOtxDiag() {}
		/// <summary>
		/// Returns the short names of installed D-PDU API's, see RDF file
		/// </summary>
		/// <returns>Short names of all installed D-PDU API's as a list of String</returns>
		virtual std::vector<std::string> GetPduApiNameList() = 0;
		/// <summary>
		/// Switches between different, installed D-PDU API's
		/// </summary>
		/// <param name="shortName">Short name of selected D-PDU API</param>
		virtual void SwitchPduApi(const std::string & shortName) = 0;
		/// <summary>
		/// Initializes and prepares the hardware interfaces of the diagnostic runtime system. This method is called if a client wants to perform any diagnostics without manually selecting the VCIs or VCI resources itself. The method call to this function is mutual exclusive to a call to MCDSystem::prepareVCIAccessLayer.
		/// </summary>
		virtual void PrepareInterface() = 0;
		/// <summary>
		/// Initializes and prepares the hardware interfaces of the diagnostic runtime system. This method is called if a client wants to perform any diagnostics and select the VCIs or VCI resources itself. The method call to this function is mutual exclusive to a call to MCDSystem::prepareInterface.
		/// </summary>
		virtual void PrepareVciAccessLayer() = 0;
		/// <summary>
		/// Uninitializes the Interfaces (drivers and hardware) of the diagnostic runtime system. The method call to this function is mutual exclusive to MCDSystem::unprepareVCIAccessLayer()
		/// </summary>
		virtual void UnprepareInterface() = 0;
		/// <summary>
		/// Uninitializes the interfaces (drivers and hardware) of the diagnostic runtime system. The method call to this function is mutual exclusive to a call to MCDSystem::unprepareInterface.
		/// </summary>
		virtual void UnprepareVciAccessLayer() = 0;
		/// <summary>
		/// Depending on the communication mode, UnprepareInterface or UnprepareVciAccessLayer is called and all resources, e.g. LogicalLinks are released
		/// </summary>
		virtual void CloseVciConnection() = 0;
		/// <summary>
		/// With simple communication in extended mode, it is not clear which interface is to be used for communication. The command transfers the interface handle from the previously e.g. ComInterface.ConnectComInterface called at DoIP.
		/// </summary>
		/// <param name="shortName">Short name of the selected interface</param>
		virtual void SetPreferredInterface(const std::string & shortName) = 0;
		/// <summary>
		/// Deletes the diagnostic service from the handle dictionary and releases all ressources
		/// </summary>
		/// <param name="diagServiceHandle">Handle of DiagService</param>
		/// <param name="diagServiceName">Short name of DiagService</param>
		/// <param name="comChannelHandle">Handle of ComChannel</param>
		virtual void ReleaseDiagService(long long diagServiceHandle, const std::string & diagServiceName, long long comChannelHandle) = 0;
		/// <summary>
		/// Deletes the bus monitoring link from the handle dictionary and releases all ressources
		/// </summary>
		/// <param name="handle">Handle of MonitoringLink</param>
		virtual void ReleaseMonitoring(long long handle) = 0;
		/// <summary>
		/// Returns the current state of the specified clamp
		/// </summary>
		/// <param name="clampName">manufacturer specific name of the clamp, e.g. "IgnitionClamp"</param>
		/// <returns>Returns TRUE if the given clamp state is switched on, otherwise FALSE</returns>
		virtual bool GetIgnitionState(const std::string & clampName) = 0;
		/// <summary>
	   /// Diagnostic logging for a testing is started using the StartDiagLogging command. A new log file is always created when starting.
	   /// </summary>
	   /// <param name="testObjectName">Name of the test object</param>
	   /// <param name="headerMap">Additional header information</param>
	   /// <param name="isAsync">Mode of the logger. The logger can work synchronously or asynchronously within its own thread.</param>
	   /// <param name="logLevel">Sets the log level for diagnostic logging</param>
	   /// <param name="logFolder">Sets the directory for the log files</param>
		virtual void StartDiagLoggging(const std::string &testObjectName, std::map<std::string, std::string>  headerMap, bool isAsync, LogLevels logLevel, const std::string &logFolder) = 0;
		/// <summary>
		/// Diagnostic logging for a testing is closed using the StopDiagLogging command. 
		/// When closing, the recording is ended and the log file is closed. 
		/// The log file is also closed when the DiagManager is closed without calling this command.
		/// </summary>
		virtual void StopDiagLogging() = 0;
		/// <summary>
		/// Deselects the currently selected project. The method call to this function is mutual exclusive to a call to MCDSystem::deselectProject().
		/// </summary>
		virtual void DeselectProject() = 0;
		/// <summary>
		/// Returns the ShortName of the MCDDbEcuMem of the related flash session.
		/// </summary>
		virtual std::string GetDbEcuMemOfFlashSession(const std::string & flashSessionName) = 0;

		/// <summary>
		/// Returns the version of the diagnostic runtime system as a string with format "Major.Minor.Revision". In case of an MVCI server the appropriate method is MCDSystem::getVersion.
		/// </summary>
		/// <returns>The version of the diagnostic runtime system</returns>
		virtual std::string GetDiagRuntimeSystemVersion() = 0;

		/// <summary>
		/// Returns the version of the interface firmware as a string with format "Major.Minor.Revision". In case of an MVCI server the appropriate method is MCDInterface::getFirmwareVersion.
		/// </summary>
		/// <param name="interfaceShortName">Short name of the interface</param>
		/// <returns>The version of the interface firmware</returns>
		virtual std::string GetInterfaceFirmwareVersion(const std::string & interfaceShortName) = 0;

		/// <summary>
		/// Returns the name of the interface firmware as a string. In case of an MVCI server the appropriate method is MCDInterface::getFirmwareName.
		/// </summary>
		/// <param name="interfaceShortName">Short name of the interface</param>
		/// <returns>The name of the interface firmware as a string</returns>
		virtual std::string GetInterfaceFirmwareName(const std::string & interfaceShortName) = 0;

		/// <summary>
		/// Returns the name of the interface hardware name (VCI) as a string. In case of an MVCI server the appropriate method is MCDInterface::getHardwareName.
		/// </summary>
		/// <param name="interfaceShortName">Short name of the interface</param>
		/// <returns>The name of the interface hardware name (VCI)</returns>
		virtual std::string GetInterfaceHardwareName(const std::string & interfaceShortName) = 0;

		/// <summary>
		/// Returns the serial number of the interface hardware (VCI) as an unsigned integer number. In case of an MVCI server the appropriate method is MCDInterface::getHardwareSerialNumber.
		/// </summary>
		/// <param name="interfaceShortName">Short name of the interface</param>
		/// <returns>The serial number of the interface hardware (VCI)</returns>
		virtual unsigned int GetInterfaceHardwareSerialNumber(const std::string & interfaceShortName) = 0;

	};
}}}
#endif // OpenTestSystem_DiagManager_NoneOtxDiagApi_INoneOtxDiag_H