#ifndef OpenTestSystem_OtxDiagManager_OtxDiagApi_IDiagCom_H
#define OpenTestSystem_OtxDiagManager_OtxDiagApi_IDiagCom_H

#include "ApiDefs.h"
#include "TypeDefs.h"
#include "OtxDataTypes/AllClasses.h"
#include "OtxDataTypes/OtxResponseState.h"
#include "OtxDataTypes/OtxResultState.h"
#include <string>
#include <memory>
#include <vector>
#include <map>
#include <functional>
namespace OpenTestSystem {
	namespace OtxDiagManager {
		namespace OtxDiagApi {
			/// <summary>
			/// @snippetdoc DocSnippets.txt OtxDiagApiClassComment
			/// </summary>
			class API_EXPORTS IDiagCom {
			protected:
				IDiagCom() {};
			public:
				virtual ~IDiagCom() {}
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual void SetExecuteAsyncDiagServiceHandler(std::function<void(const OpenTestSystem::OtxDiagManager::OtxDiagApi::OtxDataTypes::IOtxDiagService & diagService)>) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual void SetDiagServiceHasResultHandler(std::function<void(const OpenTestSystem::OtxDiagManager::OtxDiagApi::OtxDataTypes::IOtxDiagService & diagService)>) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxComChannel> GetComChannel(const std::string & identifier, const std::string & ecuVariantName = "", bool performVariantSelection = false) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::vector<std::shared_ptr<OtxDataTypes::IOtxDiagService>> GetDiagServiceListBySemantic(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & semantic) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual int64 GetRepetitionTime(std::shared_ptr<OtxDataTypes::IOtxDiagService> diagService) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetPdu(std::shared_ptr<OtxDataTypes::IOtxMessage> message) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual bool GetDefaultComParameterValueAsBoolean(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetDefaultComParameterValueAsString(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual int64 GetDefaultComParameterValueAsInteger(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual double GetDefaultComParameterValueAsFloat(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetDefaultComParameterValueAsByteField(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual double GetDefaultComParameterValueAsQuantity(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual bool GetParameterValueAsBoolean(std::shared_ptr<OtxDataTypes::IOtxParameter> parameter) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetParameterValueAsString(std::shared_ptr<OtxDataTypes::IOtxParameter> parameter) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual int64 GetParameterValueAsInteger(std::shared_ptr<OtxDataTypes::IOtxParameter> parameter) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual double GetParameterValueAsFloat(std::shared_ptr<OtxDataTypes::IOtxParameter> parameter) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetParameterValueAsByteField(std::shared_ptr<OtxDataTypes::IOtxParameter> parameter) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual double GetParameterValueAsQuantity(std::shared_ptr<OtxDataTypes::IOtxParameter> parameter) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::vector<std::shared_ptr<OtxDataTypes::IOtxParameter>> GetParameterAsList(std::shared_ptr<OtxDataTypes::IOtxParameterContainer> parameter) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxParameter> GetParameterByPath(std::shared_ptr<OtxDataTypes::IOtxParameterContainer> parameterContainer, const std::vector<std::string> & pathList) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxParameter> GetParameterBySemantic(std::shared_ptr<OtxDataTypes::IOtxParameterContainer> parameterContainer, const std::string & semantic) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetParameterName(std::shared_ptr<OtxDataTypes::IOtxParameter> parameter) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetParameterSemantic(std::shared_ptr<OtxDataTypes::IOtxParameter> parameter) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetParameterTextId(std::shared_ptr<OtxDataTypes::IOtxParameter> parameter) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxParameter> GetDefaultComplexComParameter(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetDiagServiceName(std::shared_ptr<OtxDataTypes::IOtxDiagService> diagService) = 0;
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxResponse> GetFirstResponse(std::shared_ptr<OtxDataTypes::IOtxResult> result) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxResult> GetFirstResult(std::shared_ptr<OtxDataTypes::IOtxDiagService> diagService) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::vector<std::shared_ptr<OtxDataTypes::IOtxResult>> GetAllResults(std::shared_ptr<OtxDataTypes::IOtxDiagService> diagService) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::vector<std::shared_ptr<OtxDataTypes::IOtxResult>> GetAllResultsAndClear(std::shared_ptr<OtxDataTypes::IOtxDiagService> diagService) = 0;
					/// <summary>
					/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
					/// </summary>
					virtual std::shared_ptr<OtxDataTypes::IOtxDiagService> GetDiagServiceFromResult(std::shared_ptr<OtxDataTypes::IOtxResult> result) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::vector<std::shared_ptr<OtxDataTypes::IOtxResponse>> GetAllResponses(std::shared_ptr<OtxDataTypes::IOtxResult> result) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxRequest> GetRequest(std::shared_ptr<OtxDataTypes::IOtxDiagService> diagService) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetResponseName(std::shared_ptr<OtxDataTypes::IOtxResponse> response) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual OtxDataTypes::OtxResponseStates GetResponseState(std::shared_ptr<OtxDataTypes::IOtxResponse> response) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual OtxDataTypes::OtxResultStates GetResultState(std::shared_ptr<OtxDataTypes::IOtxResult> result) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetComChannelEcuVariantName(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetComChannelIdentifierFromResponse(std::shared_ptr<OtxDataTypes::IOtxResponse> response) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual bool GetComParameterValueAsBoolean(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetComParameterValueAsString(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
					/// <summary>
					/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
					/// </summary>
					virtual int64 GetComParameterValueAsInteger(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual double GetComParameterValueAsFloat(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::string GetComParameterValueAsByteField(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
					/// <summary>
					/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
					/// </summary>
					virtual double GetComParameterValueAsQuantity(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
					/// <summary>
					/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
					/// </summary>
					virtual std::shared_ptr<OtxDataTypes::IOtxParameter> GetComplexComParameter(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & comParameterName) = 0;
						/// <summary>
						/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
						/// </summary>
						virtual void SetRepetitionTime(std::shared_ptr<OtxDataTypes::IOtxDiagService> diagService, double repetitionTime) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual void SetPdu(std::shared_ptr<OtxDataTypes::IOtxRequest> request, std::vector<unsigned char> pdu) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual void SetComParameter(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & name, const OtxDataTypes::IOtxValue & value) = 0;
					/// <summary>
					/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
					/// </summary>
					virtual void SetComplexComParameter(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, std::shared_ptr<OtxDataTypes::IOtxParameter> parameter) = 0;
					/// <summary>
					/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
					/// </summary>
					virtual void SetParameterValue(std::shared_ptr<OtxDataTypes::IOtxParameter> parameter, const OtxDataTypes::IOtxValue & value) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
					virtual void SetParameterValueBySemantic(std::shared_ptr<OtxDataTypes::IOtxParameterContainer> parameterContainer, const std::string & semantic, const OtxDataTypes::IOtxValue & value) = 0;
					/// <summary>
					/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
					/// </summary>
					virtual void StartRepeatedExecution(std::shared_ptr<OtxDataTypes::IOtxDiagService> diagService) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual void StopRepeatedExecution(std::shared_ptr<OtxDataTypes::IOtxDiagService> diagService) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual void CloseComChannel(std::shared_ptr<OtxDataTypes::IOtxComChannel> & comChannel) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxDiagService> CreateDiagServiceByName(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & name) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxDiagService> CreateDiagServiceBySemantic(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & semantic) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual void IdentifyAndSelectVariant(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual bool IsPositive(std::shared_ptr<OtxDataTypes::IOtxResponse> response) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual bool IsVariant(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, const std::string & ecuVariantName) = 0;
                /// <summary>
                /// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
                /// </summary>
                virtual std::shared_ptr<OtxDataTypes::IOtxResult> ExecuteDiagService(std::shared_ptr<OtxDataTypes::IOtxDiagService> diagservice, std::shared_ptr<OtxDataTypes::IOtxRequestParameters> requestParameters = nullptr, std::vector<std::shared_ptr<OtxDataTypes::IOtxResponseParameters>> * responseParameters = nullptr, OtxDataTypes::OtxResultStates* resultState = nullptr, bool executeAsync = false, bool suppressPositiveResponse = false) = 0;
				/// <summary>
				/// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
				/// </summary>
				virtual std::shared_ptr<OtxDataTypes::IOtxResult> ExecuteHexDiagService(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, std::vector<unsigned char> hexRequest) = 0;
                /// <summary>
                /// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
                /// </summary>
                virtual std::shared_ptr<OtxDataTypes::IOtxResult> ExecuteHexDiagService(std::shared_ptr<OtxDataTypes::IOtxComChannel> comChannel, std::vector<unsigned char> hexRequest, std::vector<unsigned char>& hexResponse) = 0;
                /// <summary>
                /// @snippetdoc DocSnippets.txt OtxDiagApiMethodComment
                /// </summary>
                virtual std::shared_ptr<OtxDataTypes::IOtxDiagService> GetDiagServiceFromException(std::exception& exception) = 0;
			};
		}
	}
}
#endif // OpenTestSystem_OtxDiagManager_OtxDiagApi_IDiagCom_H