return function(gate)
	Gate.cb(gate, bool_to_int[Gate.getportstate(gate, 1)])
end