A Finite State Machine used to analyse traffic sensor data