tool/Command.cpp
author Martin Troxler <martin.troxler@komaxgroup.com>
Tue, 01 Dec 2009 14:24:57 +0100
changeset 1596 ea8d2b4ee742
parent 1363 11c0b2caa253
child 1804 742607c464c4
permissions -rw-r--r--
Moved sdo request queue to slaves
1142
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
/*****************************************************************************
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
 *
1363
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
     3
 *  $Id$
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
     4
 *
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
     5
 *  Copyright (C) 2006-2009  Florian Pose, Ingenieurgemeinschaft IgH
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
     6
 *
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
     7
 *  This file is part of the IgH EtherCAT Master.
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
     8
 *
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
     9
 *  The IgH EtherCAT Master is free software; you can redistribute it and/or
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    10
 *  modify it under the terms of the GNU General Public License version 2, as
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    11
 *  published by the Free Software Foundation.
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    12
 *
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    13
 *  The IgH EtherCAT Master is distributed in the hope that it will be useful,
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    16
 *  Public License for more details.
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    17
 *
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    18
 *  You should have received a copy of the GNU General Public License along
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    19
 *  with the IgH EtherCAT Master; if not, write to the Free Software
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    20
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    21
 *
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    22
 *  ---
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    23
 *
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    24
 *  The license mentioned above concerns the source code only. Using the
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    25
 *  EtherCAT technology and brand is only permitted in compliance with the
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1337
diff changeset
    26
 *  industrial property and similar rights of Beckhoff Automation GmbH.
1142
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
 *
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
 ****************************************************************************/
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    30
#include "Command.h"
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    31
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
/*****************************************************************************/
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
Command::Command(const string &name, const string &briefDesc):
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
    name(name),
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    36
    briefDesc(briefDesc),
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
    verbosity(Normal)
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    38
{
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
}
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    40
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
/*****************************************************************************/
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
Command::~Command()
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
{
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
}
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    47
/*****************************************************************************/
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    48
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    49
void Command::setVerbosity(Verbosity v)
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    50
{
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    51
	verbosity = v;
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    52
};
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    53
1151
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    54
/*****************************************************************************/
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    55
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    56
void Command::setAlias(int a)
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    57
{
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    58
	alias = a;
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    59
};
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    60
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    61
/*****************************************************************************/
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    62
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    63
void Command::setPosition(int p)
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    64
{
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    65
	position = p;
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    66
};
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
    67
1166
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    68
/*****************************************************************************/
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    69
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    70
void Command::setDomain(int d)
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    71
{
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    72
	domain = d;
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    73
};
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    74
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    75
/*****************************************************************************/
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    76
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    77
void Command::setDataType(const string &t)
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    78
{
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    79
	dataType = t;
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    80
};
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    81
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    82
/*****************************************************************************/
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    83
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    84
void Command::setForce(bool f)
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    85
{
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    86
	force = f;
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    87
};
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
    88
1335
09c6fce1ae45 merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents: 1199
diff changeset
    89
/*****************************************************************************/
09c6fce1ae45 merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents: 1199
diff changeset
    90
09c6fce1ae45 merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents: 1199
diff changeset
    91
void Command::setOutputFile(const string &f)
09c6fce1ae45 merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents: 1199
diff changeset
    92
{
09c6fce1ae45 merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents: 1199
diff changeset
    93
	outputFile = f;
09c6fce1ae45 merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents: 1199
diff changeset
    94
};
09c6fce1ae45 merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents: 1199
diff changeset
    95
1142
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    96
/****************************************************************************/
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    97
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    98
bool Command::matchesSubstr(const string &cmd) const
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    99
{
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   100
    return name.substr(0, cmd.length()) == cmd;
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   101
}
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   102
    
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   103
/****************************************************************************/
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   104
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   105
bool Command::matchesAbbrev(const string &abb) const
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   106
{
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   107
    unsigned int i;
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   108
    size_t pos = 0;
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   109
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   110
    for (i = 0; i < abb.length(); i++) {
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   111
        pos = name.find(abb[i], pos);
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   112
        if (pos == string::npos)
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   113
            return false;
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   114
    }
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   115
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   116
    return true;
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   117
}
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   118
    
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   119
/*****************************************************************************/
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   120
1144
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   121
string Command::numericInfo()
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   122
{
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   123
    stringstream str;
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   124
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   125
    str << "Numerical values can be specified either with decimal (no" << endl
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   126
        << "prefix), octal (prefix '0') or hexadecimal (prefix '0x') base."
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   127
        << endl;
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   128
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   129
    return str.str();
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   130
}
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   131
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   132
/*****************************************************************************/
7dbfdd61812c Bugfixes and improvements.
Florian Pose <fp@igh-essen.com>
parents: 1142
diff changeset
   133
1155
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   134
void Command::throwInvalidUsageException(const stringstream &s) const
1142
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   135
{
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   136
    throw InvalidUsageException(s);
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   137
}
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   138
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   139
/*****************************************************************************/
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   140
1155
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   141
void Command::throwCommandException(const stringstream &s) const
1142
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   142
{
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   143
    throw CommandException(s);
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   144
}
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   145
1151
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   146
/*****************************************************************************/
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   147
1155
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   148
void Command::throwSingleSlaveRequired(unsigned int size) const
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   149
{
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   150
    stringstream err;
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   151
1199
30714bab3a04 Fixed spacing.
Florian Pose <fp@igh-essen.com>
parents: 1166
diff changeset
   152
    err << "The slave selection matches " << size << " slaves. '"
1155
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   153
        << name << "' requires a single slave.";
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   154
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   155
    throwInvalidUsageException(err);
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   156
}
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   157
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   158
/*****************************************************************************/
bd4e5b544473 Common message for single slave selections.
Florian Pose <fp@igh-essen.com>
parents: 1151
diff changeset
   159
1151
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   160
Command::SlaveList Command::selectedSlaves(MasterDevice &m)
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   161
{
1160
f02ff486b313 Removed MasterDevice::slaveCount().
Florian Pose <fp@igh-essen.com>
parents: 1159
diff changeset
   162
    ec_ioctl_master_t master;
f02ff486b313 Removed MasterDevice::slaveCount().
Florian Pose <fp@igh-essen.com>
parents: 1159
diff changeset
   163
    unsigned int i, aliasIndex;
1151
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   164
    uint16_t lastAlias;
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   165
    ec_ioctl_slave_t slave;
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   166
    SlaveList list;
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   167
1160
f02ff486b313 Removed MasterDevice::slaveCount().
Florian Pose <fp@igh-essen.com>
parents: 1159
diff changeset
   168
    m.getMaster(&master);
f02ff486b313 Removed MasterDevice::slaveCount().
Florian Pose <fp@igh-essen.com>
parents: 1159
diff changeset
   169
1151
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   170
    if (alias == -1) { // no alias given
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   171
        if (position == -1) { // no alias and position given
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   172
            // all items
1160
f02ff486b313 Removed MasterDevice::slaveCount().
Florian Pose <fp@igh-essen.com>
parents: 1159
diff changeset
   173
            for (i = 0; i < master.slave_count; i++) {
1151
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   174
                m.getSlave(&slave, i);
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   175
                list.push_back(slave);
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   176
            }
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   177
        } else { // no alias, but position given
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   178
            // one item by position
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   179
            m.getSlave(&slave, position);
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   180
            list.push_back(slave);
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   181
        }
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   182
    } else { // alias given
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   183
        if (position == -1) { // alias, but no position given
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   184
            // take all items with a given alias
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   185
            lastAlias = 0;
1160
f02ff486b313 Removed MasterDevice::slaveCount().
Florian Pose <fp@igh-essen.com>
parents: 1159
diff changeset
   186
            for (i = 0; i < master.slave_count; i++) {
1151
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   187
                m.getSlave(&slave, i);
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   188
                if (slave.alias) {
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   189
                    lastAlias = slave.alias;
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   190
                }
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   191
                if (lastAlias == (uint16_t) alias) {
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   192
                    list.push_back(slave);
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   193
                }
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   194
            }
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   195
        } else { // alias and position given
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   196
            lastAlias = 0;
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   197
            aliasIndex = 0;
1160
f02ff486b313 Removed MasterDevice::slaveCount().
Florian Pose <fp@igh-essen.com>
parents: 1159
diff changeset
   198
            for (i = 0; i < master.slave_count; i++) {
1151
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   199
                m.getSlave(&slave, i);
1159
25cc77cf3993 Improved alias/position addressing in case od duplicated aliases.
Florian Pose <fp@igh-essen.com>
parents: 1157
diff changeset
   200
                if (slave.alias && slave.alias == (uint16_t) alias) {
1151
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   201
                    lastAlias = slave.alias;
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   202
                    aliasIndex = 0;
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   203
                }
1159
25cc77cf3993 Improved alias/position addressing in case od duplicated aliases.
Florian Pose <fp@igh-essen.com>
parents: 1157
diff changeset
   204
                if (lastAlias && aliasIndex == (unsigned int) position) {
1151
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   205
                    list.push_back(slave);
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   206
                }
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   207
                aliasIndex++;
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   208
            }
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   209
        }
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   210
    }
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   211
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   212
    return list;
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   213
}
1fc1535dec29 Alias/Position selection.
Florian Pose <fp@igh-essen.com>
parents: 1146
diff changeset
   214
1156
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   215
/*****************************************************************************/
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   216
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   217
bool operator<(
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   218
        const ec_ioctl_config_t &a,
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   219
        const ec_ioctl_config_t &b
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   220
        )
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   221
{
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   222
    return a.alias < b.alias
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   223
        || (a.alias == b.alias && a.position < b.position);
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   224
}
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   225
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   226
/*****************************************************************************/
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   227
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   228
Command::ConfigList Command::selectedConfigs(MasterDevice &m)
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   229
{
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   230
    unsigned int i;
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   231
    ec_ioctl_master_t master;
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   232
    ec_ioctl_config_t config;
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   233
    ConfigList list;
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   234
    stringstream err;
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   235
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   236
    m.getMaster(&master);
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   237
1157
04d1c950cf9d Added --help for alias and position parameters.
Florian Pose <fp@igh-essen.com>
parents: 1156
diff changeset
   238
    if (alias == -1) { // no alias given
1156
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   239
        if (position == -1) { // no alias and position given
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   240
            // all items
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   241
            for (i = 0; i < master.config_count; i++) {
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   242
                m.getConfig(&config, i);
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   243
                list.push_back(config);
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   244
            }
1157
04d1c950cf9d Added --help for alias and position parameters.
Florian Pose <fp@igh-essen.com>
parents: 1156
diff changeset
   245
        } else { // no alias, but position given
04d1c950cf9d Added --help for alias and position parameters.
Florian Pose <fp@igh-essen.com>
parents: 1156
diff changeset
   246
            for (i = 0; i < master.config_count; i++) {
04d1c950cf9d Added --help for alias and position parameters.
Florian Pose <fp@igh-essen.com>
parents: 1156
diff changeset
   247
                m.getConfig(&config, i);
04d1c950cf9d Added --help for alias and position parameters.
Florian Pose <fp@igh-essen.com>
parents: 1156
diff changeset
   248
                if (!config.alias && config.position == position) {
04d1c950cf9d Added --help for alias and position parameters.
Florian Pose <fp@igh-essen.com>
parents: 1156
diff changeset
   249
                    list.push_back(config);
04d1c950cf9d Added --help for alias and position parameters.
Florian Pose <fp@igh-essen.com>
parents: 1156
diff changeset
   250
                    break; // there can be at most one matching
04d1c950cf9d Added --help for alias and position parameters.
Florian Pose <fp@igh-essen.com>
parents: 1156
diff changeset
   251
                }
04d1c950cf9d Added --help for alias and position parameters.
Florian Pose <fp@igh-essen.com>
parents: 1156
diff changeset
   252
            }
1156
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   253
        }
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   254
    } else { // alias given
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   255
        if (position == -1) { // alias, but no position given
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   256
            // take all items with a given alias
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   257
            for (i = 0; i < master.config_count; i++) {
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   258
                m.getConfig(&config, i);
1157
04d1c950cf9d Added --help for alias and position parameters.
Florian Pose <fp@igh-essen.com>
parents: 1156
diff changeset
   259
                if (config.alias == alias) {
1156
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   260
                    list.push_back(config);
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   261
                }
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   262
            }
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   263
        } else { // alias and position given
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   264
            for (i = 0; i < master.config_count; i++) {
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   265
                m.getConfig(&config, i);
1157
04d1c950cf9d Added --help for alias and position parameters.
Florian Pose <fp@igh-essen.com>
parents: 1156
diff changeset
   266
                if (config.alias == alias && config.position == position) {
1156
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   267
                    list.push_back(config);
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   268
                    break; // there can be at most one matching
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   269
                }
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   270
            }
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   271
        }
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   272
    }
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   273
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   274
    list.sort();
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   275
    return list;
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   276
}
ecaf2a896ea3 Implemented alias and position for configs.
Florian Pose <fp@igh-essen.com>
parents: 1155
diff changeset
   277
1142
59be91dfcbe1 Redesigned command interface.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   278
/****************************************************************************/
1146
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   279
1166
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   280
Command::DomainList Command::selectedDomains(MasterDevice &m)
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   281
{
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   282
	ec_ioctl_domain_t d;
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   283
	DomainList list;
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   284
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   285
    if (domain == -1) {
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   286
		ec_ioctl_master_t master;
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   287
        unsigned int i;
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   288
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   289
        m.getMaster(&master);
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   290
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   291
        for (i = 0; i < master.domain_count; i++) {
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   292
			m.getDomain(&d, i);
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   293
			list.push_back(d);
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   294
        }
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   295
    } else {
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   296
		m.getDomain(&d, domain);
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   297
		list.push_back(d);
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   298
    }
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   299
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   300
	return list;
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   301
}
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   302
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   303
/****************************************************************************/
006244d53f68 Removed global variables.
Florian Pose <fp@igh-essen.com>
parents: 1160
diff changeset
   304
1146
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   305
string Command::alStateString(uint8_t state)
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   306
{
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   307
    switch (state) {
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   308
        case 1: return "INIT";
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   309
        case 2: return "PREOP";
1337
0253c74d0940 merge -c1619 branches/1.4-foe: Implemented going to bootstrap state BOOT.
Florian Pose <fp@igh-essen.com>
parents: 1335
diff changeset
   310
        case 3: return "BOOT";
1146
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   311
        case 4: return "SAFEOP";
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   312
        case 8: return "OP";
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   313
        default: return "???";
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   314
    }
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   315
}
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   316
f18d124d7fbc Moved slaveState() to Command::alStateString().
Florian Pose <fp@igh-essen.com>
parents: 1144
diff changeset
   317
/****************************************************************************/