tool/CommandSlaves.h
author Florian Pose <fp@igh-essen.com>
Thu, 24 Jul 2008 13:29:13 +0000
changeset 1143 09ee878d7214
parent 1142 59be91dfcbe1
child 1146 f18d124d7fbc
permissions -rw-r--r--
Fixed duplicate alias command.
/*****************************************************************************
 *
 * $Id$
 *
 ****************************************************************************/

#ifndef __COMMANDSLAVES_H__
#define __COMMANDSLAVES_H__

#include "Command.h"

/****************************************************************************/

class CommandSlaves:
    public Command
{
    public:
        CommandSlaves();

        string helpString() const;
        void execute(MasterDevice &, const StringVector &);

    protected:
        struct Info {
            string pos;
            string alias;
            string relPos;
            string state;
            string flag;
            string name;
        };

        void listSlaves(MasterDevice &, int);
        void showSlave(MasterDevice &, uint16_t);

        static string slaveState(uint8_t);
};

/****************************************************************************/

#endif