Implemented LimitSwitch class