From 5a9381c060dcc63cf2549beb67aad906f64ef5a9 Mon Sep 17 00:00:00 2001 From: Ron Sluiter Date: Mon, 17 Jul 2000 18:34:02 +0000 Subject: [PATCH] - Enumerate message types. - Removed 'axis_names' from structure; implemented driver specific axis name arrays. - Removed command line termination character from send() arguments. - Added 'axis_names' array to driver_table. --- motorApp/MotorSrc/motordrvCom.h | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/motorApp/MotorSrc/motordrvCom.h b/motorApp/MotorSrc/motordrvCom.h index 8d3d4fea..815750e9 100644 --- a/motorApp/MotorSrc/motordrvCom.h +++ b/motorApp/MotorSrc/motordrvCom.h @@ -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.3 $ +Version: $Revision: 1.4 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2000-06-14 15:09:40 $ +Last Modified: $Date: 2000-07-17 18:34:02 $ */ /* @@ -64,17 +64,23 @@ typedef enum CommStatus CommStatus; #endif /* -Valid command types for the driver. The order is of importance; 0 is +Valid message types for the driver. The order is of importance; 0 is lowest importance. Device support will choose the greatest one to use as the driver transaction type. */ -#define UNDEFINED (unsigned char)0 /* garbage type */ -#define IMMEDIATE (unsigned char)1 /* 'i' an execute immediate, no reply */ -#define MOVE_TERM (unsigned char)2 /* 't' terminate a previous active motion */ -#define MOTION (unsigned char)3 /* 'm' will produce motion updates */ -#define VELOCITY (unsigned char)4 /* 'v' make motion updates till MOVE_TERM */ -#define INFO (unsigned char)5 /* 'f' get curr motor/encoder pos and stat */ +enum msg_types { + UNDEFINED, /* garbage type */ + IMMEDIATE, /* execute immediate, no reply */ + MOVE_TERM, /* terminate a previous active motion */ + MOTION, /* move */ + VELOCITY, /* make motion updates till MOVE_TERM */ + INFO /* get curr motor/encoder pos and stat */ +}; + +#ifndef __cplusplus +typedef enum msg_types msg_types; +#endif /* Macros used to set/clear bits in any_motor_in_motion variable. */ #define SET_MM_ON(v,a) v|=(1<