1 /* ***********************************************************
 2    *                                                         *
 3    * Copyright, (C) Honeywell Bull Inc., 1987                *
 4    *                                                         *
 5    * Copyright, (C) Honeywell Information Systems Inc., 1986 *
 6    *                                                         *
 7    *********************************************************** */
 8 
 9 /* HISTORY COMMENTS:
10   1) change(86-06-01,ASmith), approve(87-07-13,MCR7580),
11      audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072):
12      Created.
13   2) change(86-07-24,Westcott), approve(87-07-13,MCR7580),
14      audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072):
15      Call to send_i_mess.
16                                                    END HISTORY COMMENTS */
17 
18 /* : PROCEDURE FUNCTION (i_execom)
19 
20 User interrupt routine that creates an execute_command message.
21 */
22 
23 #include <ws.h>
24 #include <ws_error.h>
25 #include <ws_dcls.h>
26 #include <ws_msg.h>
27 #include <wsmincap.h>
28 
29 #define MAX_CMD_LEN     128
30 
31 extern char mysystem;
32 
33 i_execom (p_param)
34 
35 struct execom_struc *p_param;
36 {
37 static int CMD_ID_CNT;
38 struct execom_msg exemsg;
39 
40 /* : Increment command counter  */
41 
42    p_param -> cmd_id = ++CMD_ID_CNT;
43 
44 /* : Initialize message */
45 
46    exemsg.system = (char) p_param -> system;
47    exemsg.major = WSMAJCAP;
48    exemsg.minor = WS_EXECUTE_COMMAND;
49    exemsg.source_major = (char) p_param -> major;
50    exemsg.source_system = mysystem;
51    exemsg.cmd_id = p_param -> cmd_id;
52 
53 /* : Send message */
54 
55    p_param -> status = send_i_mess (&exemsg.system, sizeof(exemsg) - 1,
56       &p_param -> command,p_param -> com_len);
57 
58    return (p_param -> status);
59 }
60 ^Z