43 #include <boost/thread.hpp>
116 static deviceCommand
createCommand (
const bool lightSwitch );
218 #endif // FLASHLIGHT_H
void configureSerialInterface()
Set options of serial interface for USB relais.
void switchInternal(const bool lightSwitch)
Internal routine to switch relais on or off.
static void switchOff() noexcept
Switch off red alarm flash light.
Compatibility macros for older versions of the GCC.
boost::mutex _serialLineMutex
Mutex to protect device access.
const std::string _deviceNode
Path to the device file.
static const unsigned int deviceBaudRate
Constant for baud rate.
static void switchOn() noexcept
Switch on red alarm flash light.
void closeSerialInterface()
Close the device handle.
std::vector< uint8_t > deviceCommand
Type for storing commands to the device.
Namespace for Alarm Notifications application.
void writeSerialInteface(const deviceCommand command)
Write command sequence to the USB relais.
bool _fdOpen
File descriptor use flag.
#define noexcept
Allow using the noexcept keyword with GCC < 4.6.
void openSerialInterface()
Open serial interface.
static deviceCommand createCommand(const bool lightSwitch)
Assemble command sequence.
static FlashLight & instance() noexcept
Get singleton instance.
Controller for USB relais of red alarm flash light.