mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-24 19:13:47 +08:00
Common message for single slave selections.
This commit is contained in:
+14
-2
@@ -80,20 +80,32 @@ string Command::numericInfo()
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
void Command::throwInvalidUsageException(const stringstream &s)
|
||||
void Command::throwInvalidUsageException(const stringstream &s) const
|
||||
{
|
||||
throw InvalidUsageException(s);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
void Command::throwCommandException(const stringstream &s)
|
||||
void Command::throwCommandException(const stringstream &s) const
|
||||
{
|
||||
throw CommandException(s);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
void Command::throwSingleSlaveRequired(unsigned int size) const
|
||||
{
|
||||
stringstream err;
|
||||
|
||||
err << "The slave selection matches " << size << "slaves. '"
|
||||
<< name << "' requires a single slave.";
|
||||
|
||||
throwInvalidUsageException(err);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
Command::SlaveList Command::selectedSlaves(MasterDevice &m)
|
||||
{
|
||||
unsigned int numSlaves = m.slaveCount(), i, aliasIndex;
|
||||
|
||||
Reference in New Issue
Block a user