fp@1389: /***************************************************************************** fp@1389: * fp@1389: * $Id$ fp@1389: * fp@1389: * Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH fp@1389: * fp@1389: * This file is part of the IgH EtherCAT Master. fp@1389: * fp@1389: * The IgH EtherCAT Master is free software; you can redistribute it and/or fp@1389: * modify it under the terms of the GNU General Public License version 2, as fp@1389: * published by the Free Software Foundation. fp@1389: * fp@1389: * The IgH EtherCAT Master is distributed in the hope that it will be useful, fp@1389: * but WITHOUT ANY WARRANTY; without even the implied warranty of fp@1389: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General fp@1389: * Public License for more details. fp@1389: * fp@1389: * You should have received a copy of the GNU General Public License along fp@1389: * with the IgH EtherCAT Master; if not, write to the Free Software fp@1389: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@1389: * fp@1389: * --- fp@1389: * fp@1389: * The license mentioned above concerns the source code only. Using the fp@1389: * EtherCAT technology and brand is only permitted in compliance with the fp@1389: * industrial property and similar rights of Beckhoff Automation GmbH. fp@1389: * fp@1389: ****************************************************************************/ fp@1389: fp@1389: #include "CommandReg.h" fp@1389: fp@1389: /*****************************************************************************/ fp@1389: fp@1389: CommandReg::CommandReg(const string &name, const string &briefDesc): fp@1389: Command(name, briefDesc) fp@1389: { fp@1389: } fp@1389: fp@1389: /****************************************************************************/ fp@1389: fp@1389: const CommandReg::DataType *CommandReg::findDataType( fp@1389: const string &str fp@1389: ) fp@1389: { fp@1389: const DataType *d; fp@1389: fp@1389: for (d = dataTypes; d->name; d++) fp@1389: if (str == d->name) fp@1389: return d; fp@1389: fp@1389: return NULL; fp@1389: } fp@1389: fp@1389: /****************************************************************************/ fp@1389: fp@1389: const CommandReg::DataType CommandReg::dataTypes[] = { fp@1389: {"int8", 1}, fp@1389: {"int16", 2}, fp@1389: {"int32", 4}, fp@1389: {"int64", 8}, fp@1389: {"uint8", 1}, fp@1389: {"uint16", 2}, fp@1389: {"uint32", 4}, fp@1389: {"uint64", 8}, fp@1389: {"string", 0}, fp@1389: {"raw", 0}, fp@1389: {} fp@1389: }; fp@1389: fp@1389: /*****************************************************************************/