#ifndef SRC_LED_FLASHER_H_
#define SRC_LED_FLASHER_H_
#include <pthread.h>
#include <list>

#include <klog.h>

#include "south_device.h"
#include "led.h"

class BUSflasher
{
   cKlog logger;

   cLED *mBUS_led;
   bool mRunning;
   pthread_t *thread_handle;
   std::list<SouthDevice*> mBUS_devices;

   static void * thread_func(void * argument);
   void run();
   cLED *createLED(const char *device);

public:
   BUSflasher();
   ~BUSflasher();

   void addDevice(SouthDevice* device, const char *serial_port);
   void start();
};

class LEDflasher
{
   cKlog logger;

   BUSflasher mBUS1_flasher;
   BUSflasher mBUS2_flasher;
   BUSflasher mBUS3_flasher;
   BUSflasher mBUS4_flasher;


public:
   LEDflasher();
   virtual ~LEDflasher();

   void addDevice(SouthDevice* device, const char *serial_port);

   void start();
};

#endif /* SRC_LED_FLASHER_H_ */
