Changeset 11695 for trunk/FACT++/dim
- Timestamp:
- 07/29/11 09:54:56 (13 years ago)
- Location:
- trunk/FACT++/dim
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/dim/README_v19.txt
r11121 r11695 1 1 2 DIM version 19.2 2Release Notes2 DIM version 19.23 Release Notes 3 3 4 4 Notes 1 and 2 for Unix Users only … … 17 17 Dns </dev/null >& dns.log & 18 18 19 NOTE 3: The Version Number service provided by servers is now set to 1922. 19 NOTE 3: The Version Number service provided by servers is now set to 1923. 20 21 15/07/2011 22 Changes for version 19.23: 23 - The new functions: 24 int DimClient::inCallback() 25 int DimServer::inCallback() 26 Can be used to find out if the function is being called in the context of a DIM callback 27 handler (they return 1 if yes, 0 if no). 28 - There was no way to "remove" an errorHandler or exitHandler in C++. 29 Now the following functions accept 0 as parameter: 30 DimClient::addErrorHandler(0) 31 DimServer::addErrorHandler(0) 32 DimServer::addExitHandler(0) 33 DimServer::addClientExitHandler(0) 34 In order to remove them. 35 - The Windows Visual Studio Manifest file distributed since version v19r19 was wrong, so the latest 36 DIM versions did not work on Windows machines without Visual Studio 8 installed - Fixed. 37 20 38 21 39 21/06/2011 -
trunk/FACT++/dim/dim/dic.hxx
r11071 r11695 462 462 static void setNoDataCopy(); 463 463 static int getNoDataCopy(); 464 static int inCallback(); 464 465 }; 465 466 -
trunk/FACT++/dim/dim/dim.h
r11121 r11695 14 14 #include "dim_common.h" 15 15 16 #define DIM_VERSION_NUMBER 192 216 #define DIM_VERSION_NUMBER 1923 17 17 18 18 #define MY_LITTLE_ENDIAN 0x1 -
trunk/FACT++/dim/dim/dis.hxx
r11071 r11695 136 136 virtual void serviceHandler() {}; 137 137 virtual void commandHandler() {}; 138 static int inCallback(); 138 139 }; 139 140 -
trunk/FACT++/dim/src/diccpp.cxx
r11071 r11695 1111 1111 1112 1112 DimCore::inCallback = 2; 1113 DimClient::itsCltError->errorHandler(severity, code, msg); 1113 if(DimClient::itsCltError != 0) 1114 DimClient::itsCltError->errorHandler(severity, code, msg); 1114 1115 DimCore::inCallback = 0; 1115 1116 } … … 1118 1119 void DimClient::addErrorHandler(DimErrorHandler *handler) 1119 1120 { 1120 DimClient::itsCltError = handler; 1121 dic_add_error_handler(clt_error_user_routine); 1121 if(handler == 0) 1122 { 1123 dic_add_error_handler(0); 1124 DimClient::itsCltError = 0; 1125 } 1126 else 1127 { 1128 DimClient::itsCltError = handler; 1129 dic_add_error_handler(clt_error_user_routine); 1130 } 1122 1131 } 1123 1132 … … 1207 1216 return list; 1208 1217 } 1218 1219 int DimClient::inCallback() 1220 { 1221 if(DimCore::inCallback) 1222 return 1; 1223 return 0; 1224 } -
trunk/FACT++/dim/src/discpp.cxx
r11071 r11695 612 612 void DimServer::addClientExitHandler(DimClientExitHandler *handler) 613 613 { 614 DimServer::itsClientExit = handler; 615 dis_add_client_exit_handler(client_exit_user_routine); 614 if(handler == 0) 615 { 616 dis_add_client_exit_handler(0); 617 DimServer::itsClientExit = 0; 618 } 619 else 620 { 621 DimServer::itsClientExit = handler; 622 dis_add_client_exit_handler(client_exit_user_routine); 623 } 616 624 } 617 625 … … 624 632 void DimServer::addExitHandler(DimExitHandler *handler) 625 633 { 626 DimServer::itsExit = handler; 627 dis_add_exit_handler(exit_user_routine); 634 if(handler == 0) 635 { 636 dis_add_exit_handler(0); 637 DimServer::itsExit = 0; 638 } 639 else 640 { 641 DimServer::itsExit = handler; 642 dis_add_exit_handler(exit_user_routine); 643 } 628 644 } 629 645 630 646 void DimServer::addErrorHandler(DimErrorHandler *handler) 631 647 { 632 DimServer::itsSrvError = handler; 633 dis_add_error_handler(srv_error_user_routine); 648 if(handler == 0) 649 { 650 dis_add_error_handler(0); 651 DimServer::itsSrvError = 0; 652 } 653 else 654 { 655 DimServer::itsSrvError = handler; 656 dis_add_error_handler(srv_error_user_routine); 657 } 634 658 } 635 659 … … 686 710 } 687 711 712 int DimServer::inCallback() 713 { 714 if(DimCore::inCallback) 715 return 1; 716 return 0; 717 } 718 688 719 extern "C" { 689 720 static void client_exit_user_routine(int *idp) … … 711 742 712 743 DimCore::inCallback = 2; 713 DimServer::itsSrvError->errorHandler(severity, code, msg); 744 if(DimServer::itsSrvError != 0) 745 DimServer::itsSrvError->errorHandler(severity, code, msg); 714 746 DimCore::inCallback = 0; 715 747 } -
trunk/FACT++/dim/src/examples/test_client.cxx
r11071 r11695 39 39 index++; 40 40 } 41 int inCallback = DimClient::inCallback(); 42 cout << "infoHandler: In callback "<< inCallback << endl; 41 43 } 42 44 public : … … 83 85 cout << "Current INTVAL : " << servint.getInt() << endl; 84 86 DimClient::sendCommand("TEST/CMND","UPDATE_STRVAL"); 87 int inCallback = DimClient::inCallback(); 88 cout << "main: In callback "<< inCallback << endl; 89 90 DimClient::addErrorHandler(0); 85 91 } 86 92 return 0; -
trunk/FACT++/dim/src/examples/test_server.cxx
r11071 r11695 183 183 } 184 184 */ 185 186 185 while(1) 187 186 { 188 187 sleep(5); 188 189 189 /* 190 190 while(cmdsvr.hasNext()) … … 200 200 boolval = 0; 201 201 ival++; 202 203 int inCallback = DimServer::inCallback(); 204 cout << "main: In callback "<< inCallback << endl; 202 205 servint.updateService(); 203 206 if(extraDns)
Note:
See TracChangeset
for help on using the changeset viewer.