00001 /* ----------------------------------------------------------------------------------- 00002 * 00003 * Copyright (c) 2005 Neobotix (www.neobotix.de) 00004 * 00005 * This software is allowed to be used and modified only in association with a Neobotix 00006 * robot platform. It is allowed to include the software into applications and 00007 * to distribute it with a Neobotix robot platform. 00008 * It is not allowed to distribute the software without a Neobotix robot platform. 00009 * 00010 * This software is provided WITHOUT ANY WARRANTY; without even the 00011 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 * PURPOSE. See the Neobotix License (Version 1.0) for more details. 00013 * 00014 * You should have received a copy of the Neobotix License 00015 * along with this software; if not, write to the 00016 * Gesellschaft fuer Produktionssysteme, Neobotix, Nobelstrasse 12, 70569 Stuttgart, Germany 00017 * 00018 * ----------------------------------------------------------------------------------- 00019 */ 00020 00021 00022 #ifndef CANITF_INCLUDEDEF_H 00023 #define CANITF_INCLUDEDEF_H 00024 //----------------------------------------------- 00025 #include "CanMsg.h" 00026 //#include <Neobotix/Drivers/Can/CanMsgRCS5000.h> 00027 //----------------------------------------------- 00028 00033 class CanItf 00034 { 00035 public: 00036 enum CanItfType { 00037 CAN_PEAK = 0, 00038 CAN_PEAK_USN = 1, 00039 CAN_ESD = 2, 00040 CAN_DUMMY = 3, 00041 CAN_BECKHOFF = 4 00042 }; 00043 00048 virtual ~CanItf() { 00049 } 00050 00054 virtual void init() = 0; 00055 00061 virtual bool transmitMsg(CanMsg CMsg, bool bBlocking = true) = 0; 00062 00067 virtual bool receiveMsg(CanMsg* pCMsg) = 0; 00068 00076 virtual bool receiveMsgRetry(CanMsg* pCMsg, int iNrOfRetry) = 0; 00077 00082 virtual bool isObjectMode() = 0; 00083 00089 void setCanItfType(CanItfType iType) { m_iCanItfType = iType; } 00090 00096 CanItfType getCanItfType() { return m_iCanItfType; } 00097 00098 private: 00100 CanItfType m_iCanItfType; 00101 }; 00102 //----------------------------------------------- 00103 00104 #endif