{
	"logging_config": {
		"name": "Basic Config",
		"file_prefix": "basic_config",
		"write_to_file": true,
		"default_result_view": "0",
		"default_result_file": "0"
	},


	"view_config": {
		"update_rate_ms": 100
	},
	"views": [
		"basic_view",
		"current_values_view"
	],
	"basic_view": {
		"name": "Basic Graph",
		"view_type": "basic_graph",
		"window_size": 5,
		"group": "basic_data_group"
	},
	"current_values_view": {
		"name": "Current Values",
		"view_type": "current_values",
		"group": "basic_data_group"
	},


	"data_groups": [
		"basic_data_group"
	],
	"basic_data_group": {
		"group_name": "Basic Data Group",
		"group_period_ms": 1000,
		"is_stream": false,

		"device_serial_numbers": ["1", "2"],
		"1": {
			"registers": [{
				"name": "AIN0",
				"human_name": "Analog Input 0",
				"format": "default",
				"enable_logging": true,
				"enable_view": true
			}]
		},
		"2": {
			"registers": [{
				"name": "AIN0",
				"human_name": "Analog Input 0",
				"format": "custom_func",
				"format_func": "for(var i = 0; i < 9999; i++) {var a = 1; val = val + a;}",
				"format_func": "val = require('./file.js').run(val);",
				"enable_logging": true,
				"enable_view": true
			}]
		},
		"defined_user_values": ["temp", "humidity", "promiseVal"],
		"user_values": {
			"temp": {
				"name": "temp",
				"human_name": "Temp. K",
				"exec_method": "sync",
				"func": " val = 273.15 + data['1'].results.AIN0.result; // Fill the 'val' variable with the calculated value",
				"func": "val = require('./file.js').getTemp(data); // Fill the 'val' variable with the calculated value",
				"func": "val = data['1'].results.AIN0.result; // Fill the 'val' variable with the calculated values",
				"enable_logging": true,
				"enable_view": true
			},
			"humidity": {
				"name": "humidity",
				"human_name": "RH %",
				"exec_method": "async",
				"func": "require('./sub_dir/sub_file.js').getHumidity(data, cb); // finish by calling the cb function.",
				"func": "cb(data['1'].results.AIN0.result); // finish by calling the cb function.",
				"enable_logging": true,
				"enable_view": true
			},
			"promiseVal": {
				"name": "promiseVal",
				"human_name": "Arbitrary Promise",
				"exec_method": "q",
				"func": "defered.resolve(data['1'].results.AIN0.result);",
				"enable_logging": true,
				"enable_view": true
			}
		},
		
		"logging_options": {
			"write_to_file": true,
			"file_prefix": "basic_group",
			"max_samples_per_file": 3,
			"data_collector_config": {
				"REPORT_DEVICE_IS_ACTIVE_VALUES": true,
				"REPORT_DEFAULT_VALUES_WHEN_LATE": false
			}
		}
	},

	"stop_trigger": {
		"relation": "and",
		"triggers": [{
			"attr_type": "num_logged", "data_group": "basic_data_group", "val": 1
		}]
	}
}