Changeset 89 in pacpussensors for trunk/CanGateway/Win32CanInterface.cpp
- Timestamp:
- Jul 28, 2015, 3:28:21 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CanGateway/Win32CanInterface.cpp
r41 r89 4 4 // 5 5 // author: Gerald Dherbomez 6 // Copyright Heudiasyc UMR UTC/CNRS 65996 // Copyright Heudiasyc UMR UTC/CNRS 7253 7 7 // 8 8 // version: $Id: $ 9 9 // 10 // purpose: Windows specific management of the Can Interface10 // purpose: Management of the Can Interface 11 11 // 12 12 *********************************************************************/ … … 115 115 case XLVectorCard: 116 116 vectorXlLoop(); 117 case KvaserCard: 118 kvaserLoop(); 117 119 break; 118 120 default: … … 145 147 /// The loop used for waiting CAN data from XL Vector card 146 148 void Win32CanInterface::vectorXlLoop() 149 { 150 while(continue_) { 151 // Wait incoming data from the CAN bus 152 if (canDriver_->receiveFrame(frame_) == 0) { 153 receivedFrames_[counter_].time = road_time(); 154 receivedFrames_[counter_].timerange = 0; 155 memcpy(&(receivedFrames_[counter_].frame), &frame_, sizeof(CanFrame)); 156 semaphore_->release(); 157 counter_++; 158 counter_ = counter_ % receivedFramesArraySize_; 159 } 160 } 161 } 162 163 /************************************************************************/ 164 /// The loop used for waiting CAN data from Kvaser card 165 void Win32CanInterface::kvaserLoop() 147 166 { 148 167 while(continue_) {
Note:
See TracChangeset
for help on using the changeset viewer.