tool/SdoCommand.h
author Florian Pose <fp@igh-essen.com>
Fri, 30 Jan 2009 10:50:21 +0000
changeset 1348 8db0f72ace11
parent 1184 75cd6681eb08
child 1363 11c0b2caa253
permissions -rw-r--r--
Fixed usage of internal request states.
/*****************************************************************************
 *
 * $Id$
 *
 ****************************************************************************/

#ifndef __SDOCOMMAND_H__
#define __SDOCOMMAND_H__

#include "Command.h"

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

class SdoCommand:
    public Command
{
    public:
        SdoCommand(const string &, const string &);

        struct DataType {
            const char *name;
            uint16_t coeCode;
            unsigned int byteSize;
        };
        static const DataType *findDataType(const string &);
        static const DataType *findDataType(uint16_t);
        static const char *abortText(uint32_t);

    private:
        struct AbortMessage {
            uint32_t code;
            const char *message;
        };

        static const DataType dataTypes[];
        static const AbortMessage abortMessages[];
};

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

#endif