//----------------------------------------------------------------------------
///
///
///
//----------------------------------------------------------------------------


#include <fosh/command.h>
//#include <stdio.h>
#include <lepto/signal.h>

#ifdef STM32
   //#include <arena/platform.h>
   #include <biwak/rtc.hpp>
#endif

class CCommandSignal: public CCommand
{
   private:
      CSignal<int, int, const char *[]> m_signal;

   public:
      /** \brief  constructeur
       * 
       *          example: 
       *             new CCommandSignal( "eraseflash", "Erase media flash"
       *                      , pCanDis, &CCanDis::eraseFlash )
       */
      template <class slotClass >
      CCommandSignal(const char *_name, const char *desc, slotClass *slotObject, int (slotClass::*_methodPtr)( int, const char *[] ))
         :CCommand( _name, desc )
      {
         m_signal.connect(slotObject, _methodPtr);
      }
      virtual int exec(int argc, const char *argv[]) const;
};


//---fin----------------------------------------------------------------------
