Changeset 1266
- Timestamp:
- 04/04/02 13:17:33 (23 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Changelog
r1141 r1266 1 1 -*-*- END -*-*- 2 3 2002/04/04 - Thomas Bretz: 4 5 * cosy.cc: 6 - redirected logging output also to screen 7 8 * base/msgqueue.cc: 9 - qualified void-pointer in delete-statements 10 11 * candrv/canopen.cc, candrv/vmodican.cc, candrv/network.cc: 12 - added some more output 13 14 * candrv/vmodican.cc: 15 - added a more informative ouput in case of open fails and exit 16 17 * videodev/Camera.cc: 18 - qualified return value of mmap 19 20 2 21 3 22 2001/12/21 - Thomas Bretz: -
trunk/MagicSoft/Cosy/base/msgqueue.cc
r909 r1266 3 3 #include <iostream.h> 4 4 5 #include <unistd.h> // usleep 5 6 #include <sys/resource.h> // PRIO_PROCESS 6 7 … … 14 15 { 15 16 pthread_cancel(fThread); 16 delete fMp;17 delete (unsigned char*)fMp; 17 18 } 18 19 … … 87 88 fMsg = msg; 88 89 89 delete fMp;90 delete (unsigned char*)fMp; 90 91 fMp = new unsigned char[size]; 91 92 -
trunk/MagicSoft/Cosy/candrv/canopen.cc
r1140 r1266 51 51 pthread_mutex_lock(&fPdoMux[i][j]); 52 52 } 53 54 lout << "- CanOpen initialized." << endl; 53 55 } 54 56 -
trunk/MagicSoft/Cosy/candrv/network.cc
r1140 r1266 74 74 for (int i=0; i<32; i++) 75 75 fNodes[i] = NULL; 76 77 lout << "- Network initialized." << endl; 76 78 } 77 79 … … 233 235 if (fNodes[i]) 234 236 { 235 lout << "- InitializingNode #" << dec << i << endl;237 lout << "- Setting up Node #" << dec << i << endl; 236 238 fNodes[i]->InitDevice(this); 237 239 fNodeInitialized[i] = TRUE; 238 240 } 239 lout << "- All Nodes initialized." << endl;241 lout << "- All Nodes setup." << endl; 240 242 } 241 243 -
trunk/MagicSoft/Cosy/candrv/nodedrv.cc
r1140 r1266 73 73 fName += (int)nodeid; 74 74 } 75 76 lout << "- Node #" << nodeid << " (" << name << ") initialized." << endl; 75 77 } 76 78 -
trunk/MagicSoft/Cosy/candrv/vmodican.cc
r1140 r1266 39 39 #include <unistd.h> // read 40 40 #include <pthread.h> // pthread_create 41 #include <sys/time.h> // gettimeofday 41 42 #include <sys/ioctl.h> // ioctl 42 43 #include <sys/resource.h> // PRIO_PROCESS … … 592 593 { 593 594 lout << "Error: Opening device '" << devname << "' (rc=" << fd << ")" << endl; 595 lout << strerror(errno) << endl; 594 596 return FALSE; 595 597 } 596 598 597 lout << "- Device " << devname << " open." << endl;599 lout << "- Device " << devname << " #" << fd << " open." << endl; 598 600 599 601 return TRUE; … … 921 923 Detach(); 922 924 923 Open(dev); // open module 925 if (!Open(dev)) 926 { 927 cout << "Cannot open device '" << dev << "'... exit." << endl; 928 cout << strerror(errno) << endl; 929 exit(1); // open module 930 } 924 931 Reset(); 925 932 EnableFifo(); // connect to host (in interrupt mode) … … 931 938 EnableFastCan(50, 50); 932 939 SetTermination(0); 933 */ 940 */ 941 942 lout << "- VmodIcan initialized." << endl; 943 934 944 } 935 945 -
trunk/MagicSoft/Cosy/cosy.cc
r924 r1266 12 12 13 13 #define clog(txt) \ 14 lout << edev(MLog::eStdout) << txt << endl << ddev(MLog::eStdout) 14 { \ 15 const Bool_t is = lout.IsOutputDeviceEnabled(MLog::eStdout); \ 16 lout << edev(MLog::eStdout) << txt << endl; \ 17 if (is) \ 18 lout.EnableOutputDevice(MLog::eStdout); \ 19 } 15 20 16 21 int main(int argc, char **argv) … … 23 28 // 24 29 MLog lout("log/cosy.log", kTRUE); 30 lout.EnableOutputDevice(MLog::eStdout); 25 31 26 32 clog("Starting Cosy at " << time.GetTimeStr() << " ..."); … … 37 43 // Create the Network. Device: /dev/dpm_00, Rate: 500kbps 38 44 // 45 clog("- Constructing MCosy."); 39 46 MCosy *cosy = new MCosy("/dev/dpm_00", 500, lout); 47 48 clog("- Starting MCosy."); 40 49 cosy->Start(); 41 50 -
trunk/MagicSoft/Cosy/videodev/Camera.cc
r1111 r1266 154 154 // map file (device) into memory 155 155 // 156 pMapBuffer = mmap(0, iBufferSize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);156 pMapBuffer = (char*)mmap(0, iBufferSize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); 157 157 158 158 if ((int)pMapBuffer == -1) -
trunk/MagicSoft/Cosy/videodev/Camera.h
r1111 r1266 10 10 #include <TROOT.h> 11 11 #include <pthread.h> 12 #include <unistd.h> 12 13 #include <sys/time.h> 13 14 #endif -
trunk/MagicSoft/Mars/Changelog
r1265 r1266 1 1 -*-*- END -*-*- 2 3 2002/04/04: Thomas Bretz 4 5 * mbase/MLog.cc: 6 - stripped last character (CR) from output redirected to GUI 7 8 2 9 3 10 2002/03/21: Thomas Bretz -
trunk/MagicSoft/Mars/mbase/MLog.cc
r1080 r1266 142 142 if (fDevice&eGui && fgui) 143 143 { 144 char *dummy = new char[len +1];145 memcpy(dummy, fBase, len );146 *(dummy+len )='\0';144 char *dummy = new char[len]; 145 memcpy(dummy, fBase, len-1); 146 *(dummy+len-1)='\0'; 147 147 fgui->AddEntry(dummy, fGuiLineId); 148 148 fgui->SetTopEntry(fGuiLineId++);
Note:
See TracChangeset
for help on using the changeset viewer.