tool/CommandReg.h
author Florian Pose <fp@igh-essen.com>
Wed, 29 Apr 2009 09:43:04 +0000
changeset 1421 043a518831b2
parent 1389 5b392b22a2da
permissions -rw-r--r--
Bus topology calculation.
1389
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
/*****************************************************************************
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
 *
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
 *  $Id$
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
 *
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
 *  Copyright (C) 2006-2009  Florian Pose, Ingenieurgemeinschaft IgH
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
 *
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
 *  This file is part of the IgH EtherCAT Master.
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
 *
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     9
 *  The IgH EtherCAT Master is free software; you can redistribute it and/or
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    10
 *  modify it under the terms of the GNU General Public License version 2, as
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    11
 *  published by the Free Software Foundation.
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
 *
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
 *  The IgH EtherCAT Master is distributed in the hope that it will be useful,
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    16
 *  Public License for more details.
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
 *
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    18
 *  You should have received a copy of the GNU General Public License along
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    19
 *  with the IgH EtherCAT Master; if not, write to the Free Software
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
 *
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
 *  ---
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    23
 *
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    24
 *  The license mentioned above concerns the source code only. Using the
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    25
 *  EtherCAT technology and brand is only permitted in compliance with the
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    26
 *  industrial property and similar rights of Beckhoff Automation GmbH.
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
 *
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
 ****************************************************************************/
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    30
#ifndef __COMMANDREG_H__
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    31
#define __COMMANDREG_H__
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
#include "Command.h"
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
/****************************************************************************/
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    36
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
class CommandReg:
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    38
    public Command
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
{
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    40
    public:
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
        CommandReg(const string &, const string &);
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
    protected:
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
        struct DataType {
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
            const char *name;
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
            unsigned int byteSize;
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    47
        };
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    48
        static const DataType dataTypes[];
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    49
        static const DataType *findDataType(const string &);
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    50
};
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    51
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    52
/****************************************************************************/
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    53
5b392b22a2da reg_write with data types.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    54
#endif