tool/MasterDevice.h
changeset 1136 a0982873d655
parent 1126 b09fd81894cb
child 1141 7ffbca63fc72
equal deleted inserted replaced
1135:807ec6498502 1136:a0982873d655
     6 
     6 
     7 #ifndef __EC_MASTER_H__
     7 #ifndef __EC_MASTER_H__
     8 #define __EC_MASTER_H__
     8 #define __EC_MASTER_H__
     9 
     9 
    10 #include <stdexcept>
    10 #include <stdexcept>
       
    11 #include <sstream>
    11 using namespace std;
    12 using namespace std;
    12 
    13 
    13 #include "../include/ecrt.h"
    14 #include "../include/ecrt.h"
    14 #include "../master/ioctl.h"
    15 #include "../master/ioctl.h"
    15 
    16 
    16 /****************************************************************************/
    17 /****************************************************************************/
    17 
    18 
    18 class MasterDeviceException:
    19 class MasterDeviceException:
    19     public runtime_error
    20     public runtime_error
    20 {
    21 {
    21     public:
    22     friend class MasterDevice;
       
    23     
       
    24     protected:
    22         /** Constructor with std::string parameter. */
    25         /** Constructor with std::string parameter. */
    23         MasterDeviceException(
    26         MasterDeviceException(
    24                 const string &s /**< Message. */
    27                 const stringstream &s /**< Message. */
    25                 ): runtime_error(s) {}
    28                 ): runtime_error(s.str()) {}
    26 };
    29 };
    27 
    30 
    28 /****************************************************************************/
    31 /****************************************************************************/
    29 
    32 
    30 class MasterDevice
    33 class MasterDevice