- Timestamp:
- Jun 3, 2015, 3:42:58 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CanGateway/driver/CanDriver.h
r59 r86 15 15 16 16 17 18 17 #ifndef _CANDRIVER_H_ 19 18 #define _CANDRIVER_H_ 20 19 21 20 22 #define VECTOR_CAN_DRIVER 1 23 #define NI_CAN_DRIVER 2 24 #define VECTOR_CANXL_DRIVER 3 25 #define PEAK_CAN_DRIVER 4 26 #define IGEP_CAN_DRIVER 5 27 #define PEAK_CAN_DRIVER 6 21 #define VECTOR_CAN_DRIVER 1 22 #define NI_CAN_DRIVER 2 23 #define VECTOR_CANXL_DRIVER 3 24 #define PEAK_CAN_DRIVER 4 25 #define IGEP_CAN_DRIVER 5 26 #define PEAK_CAN_DRIVER_WIN 6 27 #define SOFTING_CAN_DRIVER 7 28 28 29 29 30 #if CAN_DRIVER_TYPE == VECTOR_CAN_DRIVER … … 33 34 #include "NiCanDriver.h" 34 35 #define CanDriverType NiCanDriver 36 #elif CAN_DRIVER_TYPE == VECTOR_CANXL_DRIVER 37 #include "XLVectorCanDriver.h" 38 #define CanDriverType XLVectorCanDriver 35 39 #elif CAN_DRIVER_TYPE == PEAK_CAN_DRIVER 36 40 #include "PeakCanDriver.h" 37 41 #define CanDriverType PeakCanDriver 42 #elif CAN_DRIVER_TYPE == IGEP_CAN_DRIVER 43 #include "igepCanDriver.h" 44 #define CanDriverType igepCanDriver 38 45 #elif CAN_DRIVER_TYPE == PEAK_CAN_DRIVER_WIN 39 46 #include "PeakCanDriverWin.h" 40 47 #define CanDriverType PeakCanDriverWin 41 #elif CAN_DRIVER_TYPE == IGEP_CAN_DRIVER 42 #include "igepCanDriver.h" 43 #define CanDriverType igepCanDriver 44 #elif CAN_DRIVER_TYPE == VECTOR_CANXL_DRIVER 45 #include "XLVectorCanDriver.h" 46 #define CanDriverType XLVectorCanDriver 48 #elif CAN_DRIVER_TYPE == SOFTING_CAN_DRIVER 49 #include "SoftingCanDriver.h" 50 #define CanDriverType SoftingCanDriver 47 51 #else 48 52 #define CanDriverType CanDriverUnknown -
trunk/PacpusSocket/PacpusUDPSocket.cpp
r85 r86 47 47 48 48 49 //////////////////////////////////////////////////////////////////////////////// 50 // AddOutputs 51 //////////////////////////////////////////////////////////////////////////////// 52 void PacpusUDPSocket::addOutputs() 53 { 54 addOutput<QString, PacpusUDPSocket>("udpSocketOutput"); 55 } 56 57 49 58 ////////////////////////////////////////////////////////////////////////// 50 59 // Called by the ComponentManager to pass the XML parameters to the … … 96 105 97 106 connect(udpSocket_, SIGNAL(readyRead()), this, SLOT(readPendingDatagrams())); 98 } 99 100 107 108 updSocketOutput_ = getTypedOutput<QString, PacpusUDPSocket>("udpSocketOutput"); 109 } 110 111 112 ////////////////////////////////////////////////////////////////////////// 113 // Send datagram QString 114 ////////////////////////////////////////////////////////////////////////// 101 115 void PacpusUDPSocket::sendDatagrams(QString frame) 102 116 { … … 119 133 120 134 135 ////////////////////////////////////////////////////////////////////////// 136 // Send datagram QByteArray 137 ////////////////////////////////////////////////////////////////////////// 121 138 void PacpusUDPSocket::sendDatagrams(QByteArray frame) 122 139 { … … 139 156 140 157 158 ////////////////////////////////////////////////////////////////////////// 159 // Called when the socket receive a new datagram 160 ////////////////////////////////////////////////////////////////////////// 141 161 void PacpusUDPSocket::readPendingDatagrams() 142 162 { … … 164 184 } 165 185 166 // Output 186 if (updSocketOutput_ && updSocketOutput_->hasConnection()) 187 updSocketOutput_->send(QString(datagram.data())); 167 188 } 168 189 else -
trunk/PacpusSocket/PacpusUDPSocket.h
r85 r86 83 83 virtual void stopActivity(); 84 84 virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config); 85 86 OutputInterface<QString, PacpusUDPSocket>* udpSocketOutput_; 85 87 86 88 QUdpSocket * udpSocket_;
Note:
See TracChangeset
for help on using the changeset viewer.