Added maximum communication timeout; MAX_TIMEOUT.

This commit is contained in:
Ron Sluiter
2005-10-20 20:01:41 +00:00
parent 898884c76e
commit aec6bcfe7b
2 changed files with 9 additions and 5 deletions
+4 -3
View File
@@ -3,9 +3,9 @@ FILENAME: motordevCom.cc
USAGE... This file contains device functions that are common to all motor
record device support modules.
Version: $Revision: 1.7 $
Version: $Revision: 1.8 $
Modified By: $Author: sluiter $
Last Modified: $Date: 2005-06-07 14:30:36 $
Last Modified: $Date: 2005-10-20 20:01:41 $
*/
/*
@@ -45,6 +45,7 @@ Last Modified: $Date: 2005-06-07 14:30:36 $
* .06 02/03/04 rls Initialize PID parameters from motor_init_record_com().
* .07 06/07/05 rls Use RDBD as threshold for controller's position takes
* precedence over the save/restore value at initialization.
* .08 10/18/05 rls Use MAX_TIMEOUT.
*/
@@ -353,7 +354,7 @@ long motor_init_record_com(struct motorRecord *mr, int brdcnt, struct driver_tab
(*pdset->end_trans)(mr);
/* Wait for callback w/timeout */
if (ptrans->initSem->wait(1.0) == FALSE)
if (ptrans->initSem->wait(MAX_TIMEOUT) == FALSE)
recGblRecordError(S_dev_NoInit, (void *) mr,
(char *) "dev_NoInit (init_record_com: callback2 timeout");
delete(ptrans->initSem);
+5 -2
View File
@@ -4,9 +4,9 @@ FILENAME... motordrvCom.h
USAGE... This file contains definitions and structures that
are common to all motor record driver support modules.
Version: $Revision: 1.15 $
Version: $Revision: 1.16 $
Modified By: $Author: sluiter $
Last Modified: $Date: 2005-05-10 16:29:33 $
Last Modified: $Date: 2005-10-20 20:01:40 $
*/
/*
@@ -41,6 +41,7 @@ Last Modified: $Date: 2005-05-10 16:29:33 $
* .03 12-12-03 rls Converted MSTA #define's to bit field.
* .04 09-20-04 rls support for 32 axes / controller, maximum.
* .05 05/10/05 rls Added "update_delay" for "Stale data delay" bug fix.
* .06 10/18/05 rls Added MAX_TIMEOUT for all devices drivers.
*/
@@ -57,6 +58,8 @@ Last Modified: $Date: 2005-05-10 16:29:33 $
#include "motor.h"
#define MAX_IDENT_LEN 100
#define MAX_TIMEOUT 5.0 /* Maximum communication timeout for all devices
drivers (in sec.). */
/* Controller communication port type, followed by status. */
enum PortType