269/* define macros to get the high and low bytes of a word */
270#define EIPS_LO(l) (uint8)(l&0x00FF)
271#define EIPS_HI(h) (uint8)((h&0xFF00)>>8)
272
273#define RTA_MAX(a,b) (a>b?a:b)
274#define RTA_MIN(a,b) (a<b?a:b)
275
276/* Define the number of path words included in a single
277 explicit message. This should be at least 10. */
278#define EIPS_USER_MSGRTR_PATH_WORDS 50
279
280/* Define the number of extended error words included in
281 a single explicit message. This should be at least 2. */
282#define EIPS_USER_MSGRTR_EXTSTAT_SIZE 16
283
284/* Define the max number of I/O bytes that can be transmitted in
285 each direction. */
286#ifdef EUROTHERM_VXWORKS
287#define EIPS_USER_IOBUF_SIZ 600
288#else
289#define EIPS_USER_IOBUF_SIZ 200
290#endif
291
292/* Define the amount of data that can sent in a single explicit message. */
293#define EIPS_USER_MSGRTR_DATA_SIZE (RTA_MAX((EIPS_USER_IOBUF_SIZ+25),600)) /* this number should the larger of the max I/O and max EM, plus a few bytes for overhead */
294
295/* Define the max size of the encapsulated message. This should
296 be at least 600, but can go up to 64K based on the needs of
297 the customer. The NOP command is the only command that is
298 supported that can be larger than 600 bytes, but the stack
299 handles the NOP in a special fashion to save on RAM. */