{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"title": "TTIP Configuration",
	"description": "Trigger-Timestamping-Unit/IP configuration",
	"type": "object",
	"properties": {
		"ttip_version": {
			"description": "following main.sub.ss.sss",
			"type": "integer",
			"minimum": 0
		},
		"num_channel": {
			"description": "number of input/output channels",
			"type": "integer",
			"minimum": 0
		},
		"ext_channel": {
			"description": "ID of channel used as external trigger input, 32 indicates none",
			"type": "integer",
			"minimum": 0
		},
		"ext_signal": {
			"description": "0 .. use input signal, 1 .. use output signal of channel",
			"type": "integer",
			"minimum": 0
		},
		"ext_delay": {
			"description": "external trigger, time delay [0.1 msec]",
			"type": "integer",
			"minimum": 0
		},
		"ext_subdivider": {
			"description": "reduces the frequency, default 1",
			"type": "integer",
			"minimum": 0
		},
		"ext_bitmask": {
			"description": "defines which of the internal pulse generators are to be started",
			"type": "integer",
			"minimum": 0
		},
		"dmi_incr": {
			"description": "dmi, increment in ticks",
			"type": "integer"
		},
		"dmi_min_time": {
			"description": "dmi, minimum time interval between trigger events [0.1 msec]",
			"type": "integer",
			"minimum": 0
		},
		"dmi_max_time": {
			"description": "dmi, maximum time interval between trigger events [0.1 msec]",
			"type": "integer",
			"minimum": 0
		},
		"dmi_dist_per_tick": {
			"description": "dmi, distance per tick, just informative [m]",
			"type": "number"
		},
		"channel": {
			"description": "ID of input/output channel",
			"type": "integer",
			"minimum": 0
		},
		"output_descr": {
			"description": "descriptive string",
			"type": "string"
		},
		"input_descr": {
			"description": "descriptive string",
			"type": "string"
		},
		"output_usage": {
			"description": "0 .. no output, 1 .. output derived from internal clock, 2 .. output derived from dmi, 3 .. output derived from external signal, 4 .. output static low, 5 .. output static high",
			"type": "integer",
			"minimum": 0
		},
		"input_usage": {
			"description": "0 .. deactivated, 1 .. just detecting and timestamping",
			"type": "integer",
			"minimum": 0
		},
		"out_polarity": {
			"description": "0 .. positive edge, 1 .. negative edge",
			"type": "integer",
			"minimum": 0
		},
		"out_duration": {
			"description": "output pulse duration [0.1 msec]",
			"type": "integer",
			"minimum": 0
		},
		"out_interval": {
			"description": "output pulse interval [0.1 msec]",
			"type": "integer",
			"minimum": 0
		},
		"out_delay": {
			"description": "output pulse initial delay after start [0.1 msec]",
			"type": "integer",
			"minimum": 0
		},
		"out_num_pulses": {
			"description": "number of output pulses to be generated, 0 .. infinite",
			"type": "integer",
			"minimum": 0
		},
		"in_polarity": {
			"description": "0 .. positive edge, 1 .. negative edge",
			"type": "integer",
			"minimum": 0
		},
		"in_min_duration": {
			"description": "input signals with smaller pulse durations are ignored [0.1 msec]",
			"type": "integer",
			"minimum": 0
		},
		"in_max_duration": {
			"description": "stops measurement of pulse duration of input signal [0.1 msec]",
			"type": "integer",
			"minimum": 0
		},
		"in_max_delay": {
			"description": "maximum delay to output pulse before fake event is generated [0.1 msec], zero indicates that no fake events are generated",
			"type": "integer",
			"minimum": 0
		}
	},
	"required": [
		"ttip_version",
		"num_channel",
		"ext_channel",
		"ext_signal",
		"ext_delay",
		"ext_subdivider",
		"ext_bitmask",
		"dmi_incr",
		"dmi_min_time",
		"dmi_max_time",
		"dmi_dist_per_tick",
		"channel",
		"output_descr",
		"input_descr",
		"output_usage",
		"input_usage",
		"out_polarity",
		"out_duration",
		"out_interval",
		"out_delay",
		"out_num_pulses",
		"in_polarity",
		"in_min_duration",
		"in_max_duration",
		"in_max_delay"
	]
}