SDOSegmented.h
Go to the documentation of this file.
00001 /****************************************************************
00002  *
00003  * Copyright (c) 2010
00004  *
00005  * Fraunhofer Institute for Manufacturing Engineering   
00006  * and Automation (IPA)
00007  *
00008  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00009  *
00010  * Project name: care-o-bot
00011  * ROS stack name: cob_driver
00012  * ROS package name: cob_canopen_motor
00013  * Description: This class is used to collect data that is uploaded to the master in an segmented SDO transfer. Additionally, it includes some administrative functions for this proccess.
00014  *                                                              
00015  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00016  *                      
00017  * Author: Philipp Köhler
00018  * Supervised by: Christian Connette, email:christian.connette@ipa.fhg.de
00019  *
00020  * Date of creation: Mar 2010
00021  * ToDo:
00022  *
00023  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00024  *
00025  * Redistribution and use in source and binary forms, with or without
00026  * modification, are permitted provided that the following conditions are met:
00027  *
00028  *     * Redistributions of source code must retain the above copyright
00029  *       notice, this list of conditions and the following disclaimer.
00030  *     * Redistributions in binary form must reproduce the above copyright
00031  *       notice, this list of conditions and the following disclaimer in the
00032  *       documentation and/or other materials provided with the distribution.
00033  *     * Neither the name of the Fraunhofer Institute for Manufacturing 
00034  *       Engineering and Automation (IPA) nor the names of its
00035  *       contributors may be used to endorse or promote products derived from
00036  *       this software without specific prior written permission.
00037  *
00038  * This program is free software: you can redistribute it and/or modify
00039  * it under the terms of the GNU Lesser General Public License LGPL as 
00040  * published by the Free Software Foundation, either version 3 of the 
00041  * License, or (at your option) any later version.
00042  * 
00043  * This program is distributed in the hope that it will be useful,
00044  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00045  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00046  * GNU Lesser General Public License LGPL for more details.
00047  * 
00048  * You should have received a copy of the GNU Lesser General Public 
00049  * License LGPL along with this program. 
00050  * If not, see <http://www.gnu.org/licenses/>.
00051  *
00052  ****************************************************************/
00053 
00054 #ifndef _SDOSegmented_H
00055 #define _SDOSegmented_H
00056 
00057 #include <vector>
00058 
00063 class segData {
00064 
00065         public:    
00066 
00070                 enum SDOStatusFlag {
00071                         SDO_SEG_FREE = 0, 
00072                         SDO_SEG_WAITING = 3, 
00073                         SDO_SEG_COLLECTING = 2, 
00074                         SDO_SEG_PROCESSING = 1, 
00075                 };
00076 
00077                 segData() {
00078                         objectID = 0x0000;
00079                         objectSubID = 0x00;
00080                         toggleBit = false;
00081                         statusFlag = SDO_SEG_FREE;
00082                 }
00083 
00084                 ~segData() {}
00085 
00089                 void resetTransferData() {
00090                         data.clear();
00091                         objectID = 0x0000;
00092                         objectSubID = 0x00;
00093                         toggleBit = false;
00094                         statusFlag = SDO_SEG_FREE;
00095                 }
00096 
00097                 //public attributes
00098                 //all attributes are public, as this class is used only as ~data array
00099 
00107                 int statusFlag;
00108         
00112                 int objectID;
00113                 
00117                 int objectSubID;
00118 
00122                 bool toggleBit;
00123 
00127                 unsigned int numTotalBytes;
00128 
00132                 std::vector<unsigned char> data;
00133 };
00134 
00135 #endif


cob_canopen_motor
Author(s): Christian Connette
autogenerated on Sun Oct 5 2014 23:02:12