tool/Command.cpp
changeset 1870 0cee1fb7f0fd
parent 1869 14f634f5b613
child 1880 f46bec1b5f21
equal deleted inserted replaced
1869:14f634f5b613 1870:0cee1fb7f0fd
   207 	return indices;
   207 	return indices;
   208 }
   208 }
   209 
   209 
   210 /*****************************************************************************/
   210 /*****************************************************************************/
   211 
   211 
       
   212 unsigned int Command::getSingleMasterIndex() const
       
   213 {
       
   214 	MasterIndexList masterIndices = getMasterIndices();
       
   215     if (masterIndices.size() != 1) {
       
   216 		stringstream err;
       
   217         err << getName() << " requires to select a single master!";
       
   218         throwInvalidUsageException(err);
       
   219     }
       
   220 	return masterIndices.front();
       
   221 }
       
   222 
       
   223 /*****************************************************************************/
       
   224 
   212 Command::SlaveList Command::selectedSlaves(MasterDevice &m)
   225 Command::SlaveList Command::selectedSlaves(MasterDevice &m)
   213 {
   226 {
   214     ec_ioctl_master_t master;
   227     ec_ioctl_master_t master;
   215     unsigned int i, aliasIndex;
   228     unsigned int i, aliasIndex;
   216     uint16_t lastAlias;
   229     uint16_t lastAlias;