async verifyConfig(config){
		try{
			const Station = new fStation(this);
			const Result = { result: true, msg: new Array()};
			if (config.Provider === "" || config.Provider === null){
				Result.result = false;
				Result.msg.push("Provider not configured");
			}
			if (config.routes && Array.isArray(config.routes)){
				let CounterRoutes = 0;
				for (const element of config.routes){
					CounterRoutes++;
					if (element.enabled === true){
						if (element.station_from === "0" || element.station_from === "" || await Station.verifyStation(element.station_from) === false){
							Result.result = false;
							Result.msg.push({ text: "FahrplanConfigErrorStationFrom", arg1: element.station_from, arg2: CounterRoutes});
						}
						if (element.station_to === "0" || element.station_to === "" || await Station.verifyStation(element.station_to) === false){
							Result.result = false;
							Result.msg.push({ text: "FahrplanConfigErrorStationTo", arg1: element.station_to, arg2: CounterRoutes});
						}
						if (element.station_via !== ""){
							if (element.station_via === "0" || await Station.verifyStation(element.station_via) === false){
								Result.result = false;
								Result.msg.push({ text: "FahrplanConfigErrorStationVia", arg1: element.station_via, arg2: CounterRoutes});
							}
						}
						if (element.station_from === element.station_to){
							Result.result = false;
							Result.msg.push({ text: "FahrplanConfigErrorStationDuplicate", arg1: element.station_to, arg2: CounterRoutes});
						}
						if (! (element.traintype.length > 0) ){
							Result.result = false;
							Result.msg.push({ text: "FahrplanConfigErrorNoProduct", arg1: CounterRoutes});
						}
					}
				}
			}
			if (config.departuretimetable && Array.isArray(config.departuretimetable)){
				let CounterDepTT = 0;
				for (const element of config.departuretimetable){
					if (element.enabled === true){
						if (element.station_from === "0" || element.station_from === "" || await Station.verifyStation(element.station_from) === false){
							Result.result = false;
							Result.msg.push({ text: "FahrplanConfigErrorStationDepTT", arg1: element.station_from, arg2: CounterDepTT});
						}
					}
					if (! (element.traintype.length > 0) ){
						Result.result = false;
						Result.msg.push({ text: "FahrplanConfigErrorProductDepTT", arg1: CounterDepTT});
					}
					CounterDepTT++;
				}
			}
			this.ReportingInfo("Debug", "Adapter", `Config verified: ${JSON.stringify(Result)}`, "fHelpers", "verifyConfig", "", JSON.stringify(Result));
			return Result;
		} catch (e){
			//this.ErrorReporting(e, `Exception verifying config`, "fHelpers", "verifyConfig", "", {config: config});
			return { result: false, msg: "Unknown error in verifying config, please check config"};
		}
	}
/**
	 * Helper function for verifying config in Admin
	 * @param {object} config Configuration object from Admin
	 */
Helper function for verifying config in Admin
@param {object} config Configuration object from Admin
Helper function for verifying config in Admin @param { object } config Configuration object from Admin
async verifyConfig(config){
		try{
			const Station = new fStation(this);
			const Result = { result: true, msg: new Array()};
			if (config.Provider === "" || config.Provider === null){
				Result.result = false;
				Result.msg.push("Provider not configured");
			}
			if (config.routes && Array.isArray(config.routes)){
				let CounterRoutes = 0;
				for (const element of config.routes){
					CounterRoutes++;
					if (element.enabled === true){
						if (element.station_from === "0" || element.station_from === "" || await Station.verifyStation(element.station_from) === false){
							Result.result = false;
							Result.msg.push({ text: "FahrplanConfigErrorStationFrom", arg1: element.station_from, arg2: CounterRoutes});
						}
						if (element.station_to === "0" || element.station_to === "" || await Station.verifyStation(element.station_to) === false){
							Result.result = false;
							Result.msg.push({ text: "FahrplanConfigErrorStationTo", arg1: element.station_to, arg2: CounterRoutes});
						}
						if (element.station_via !== ""){
							if (element.station_via === "0" || await Station.verifyStation(element.station_via) === false){
								Result.result = false;
								Result.msg.push({ text: "FahrplanConfigErrorStationVia", arg1: element.station_via, arg2: CounterRoutes});
							}
						}
						if (element.station_from === element.station_to){
							Result.result = false;
							Result.msg.push({ text: "FahrplanConfigErrorStationDuplicate", arg1: element.station_to, arg2: CounterRoutes});
						}
						if (! (element.traintype.length > 0) ){
							Result.result = false;
							Result.msg.push({ text: "FahrplanConfigErrorNoProduct", arg1: CounterRoutes});
						}
					}
				}
			}
			if (config.departuretimetable && Array.isArray(config.departuretimetable)){
				let CounterDepTT = 0;
				for (const element of config.departuretimetable){
					if (element.enabled === true){
						if (element.station_from === "0" || element.station_from === "" || await Station.verifyStation(element.station_from) === false){
							Result.result = false;
							Result.msg.push({ text: "FahrplanConfigErrorStationDepTT", arg1: element.station_from, arg2: CounterDepTT});
						}
					}
					if (! (element.traintype.length > 0) ){
						Result.result = false;
						Result.msg.push({ text: "FahrplanConfigErrorProductDepTT", arg1: CounterDepTT});
					}
					CounterDepTT++;
				}
			}
			this.ReportingInfo("Debug", "Adapter", `Config verified: ${JSON.stringify(Result)}`, "fHelpers", "verifyConfig", "", JSON.stringify(Result));
			return Result;
		} catch (e){
			return { result: false, msg: "Unknown error in verifying config, please check config"};
		}
	}
async verifyConfig ( config ) { try { const Station = new fStation ( this ) ; const Result = { result : true , msg : new Array ( ) } ; if ( config . Provider === "" || config . Provider === null ) { Result . result = false ; Result . msg . push ( "Provider not configured" ) ; } if ( config . routes && Array . isArray ( config . routes ) ) { let CounterRoutes = 0 ; for ( const element of config . routes ) { CounterRoutes ++ ; if ( element . enabled === true ) { if ( element . station_from === "0" || element . station_from === "" || await Station . verifyStation ( element . station_from ) === false ) { Result . result = false ; Result . msg . push ( { text : "FahrplanConfigErrorStationFrom" , arg1 : element . station_from , arg2 : CounterRoutes } ) ; } if ( element . station_to === "0" || element . station_to === "" || await Station . verifyStation ( element . station_to ) === false ) { Result . result = false ; Result . msg . push ( { text : "FahrplanConfigErrorStationTo" , arg1 : element . station_to , arg2 : CounterRoutes } ) ; } if ( element . station_via !== "" ) { if ( element . station_via === "0" || await Station . verifyStation ( element . station_via ) === false ) { Result . result = false ; Result . msg . push ( { text : "FahrplanConfigErrorStationVia" , arg1 : element . station_via , arg2 : CounterRoutes } ) ; } } if ( element . station_from === element . station_to ) { Result . result = false ; Result . msg . push ( { text : "FahrplanConfigErrorStationDuplicate" , arg1 : element . station_to , arg2 : CounterRoutes } ) ; } if ( ! ( element . traintype . length > 0 ) ) { Result . result = false ; Result . msg . push ( { text : "FahrplanConfigErrorNoProduct" , arg1 : CounterRoutes } ) ; } } } } if ( config . departuretimetable && Array . isArray ( config . departuretimetable ) ) { let CounterDepTT = 0 ; for ( const element of config . departuretimetable ) { if ( element . enabled === true ) { if ( element . station_from === "0" || element . station_from === "" || await Station . verifyStation ( element . station_from ) === false ) { Result . result = false ; Result . msg . push ( { text : "FahrplanConfigErrorStationDepTT" , arg1 : element . station_from , arg2 : CounterDepTT } ) ; } } if ( ! ( element . traintype . length > 0 ) ) { Result . result = false ; Result . msg . push ( { text : "FahrplanConfigErrorProductDepTT" , arg1 : CounterDepTT } ) ; } CounterDepTT ++ ; } } this . ReportingInfo ( "Debug" , "Adapter" , ` ${ JSON . stringify ( Result ) } ` , "fHelpers" , "verifyConfig" , "" , JSON . stringify ( Result ) ) ; return Result ; } catch ( e ) { return { result : false , msg : "Unknown error in verifying config, please check config" } ; } }
Helper function for verifying config in Admin
 @param {object} config Configuration object from Admin
Helper function for verifying config in Admin @param { object } config Configuration object from Admin
//this.ErrorReporting(e, `Exception verifying config`, "fHelpers", "verifyConfig", "", {config: config});