tool/CommandSlaves.h
author Florian Pose <fp@igh-essen.com>
Thu, 09 Oct 2008 09:00:48 +0000
changeset 1250 642048176899
parent 1151 1fc1535dec29
child 1363 11c0b2caa253
permissions -rw-r--r--
Applied patch by Mario Witkowski to support the new class/device
interface from kernel 2.6.26.
/*****************************************************************************
 *
 * $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 &, const SlaveList &);
        void showSlaves(MasterDevice &, const SlaveList &);
        
        static bool slaveInList( const ec_ioctl_slave_t &, const SlaveList &);
};

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

#endif