#include <stdio.h>
#include "midas.h"
#include "msystem.h"
#include "mcstd.h"
Go to the source code of this file.
|
INT | cnaf16 (DWORD cmd, DWORD b, DWORD c, DWORD n, DWORD a, DWORD f, WORD *pdata, DWORD *size, DWORD *x, DWORD *q) |
|
INT | cnaf24 (DWORD cmd, DWORD b, DWORD c, DWORD n, DWORD a, DWORD f, DWORD *pdata, DWORD *size, DWORD *x, DWORD *q) |
|
INT | rpc_dispatch (INT index, void *prpc_param[]) |
|
| main (int argc, char *argv[]) |
|
◆ cnaf16()
Definition at line 21 of file camacsrv.cxx.
23{
26
27
29
30 switch (cmd) {
31
32
35 break;
38 break;
41 break;
44 break;
45
47 break;
48
49
50
53 if (f < 16)
55 else
57 break;
58
61 if (f < 16)
63
64
66 break;
67
68 default:
69 printf(
"cnaf: Unknown command 0x%X\n", cmd);
70 }
71
73 printf(
"cmd=%d c=%d n=%d a=%d f=%d d=%X x=%d q=%d\n", cmd,
c,
n, a, f, *
pdata, *x,
75
77}
EXTERNAL void EXPRT cam16i_q(const int c, const int n, const int a, const int f, WORD *d, int *x, int *q)
EXTERNAL void EXPRT cam_inhibit_set(const int c)
EXTERNAL void EXPRT cam_inhibit_clear(const int c)
EXTERNAL void EXPRT cam16o_q(const int c, const int n, const int a, const int f, WORD d, int *x, int *q)
EXTERNAL void EXPRT cam_crate_clear(const int c)
EXTERNAL void EXPRT cam16i_rq(const int c, const int n, const int a, const int f, WORD **d, const int r)
EXTERNAL void EXPRT cam_crate_zinit(const int c)
static std::string q(const char *s)
#define CNAF_INHIBIT_CLEAR
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
◆ cnaf24()
Definition at line 81 of file camacsrv.cxx.
83{
86
87
89
90 switch (cmd) {
93 if (f < 16)
95 else
97 break;
98
101 if (f < 16)
103
104
106 break;
107
108 default:
109 printf(
"cnaf: Unknown command 0x%X\n", cmd);
110 }
111
113 printf(
"cmd=%d c=%d n=%d a=%d f=%d d=%X x=%d q=%d\n", cmd,
c,
n, a, f, *
pdata, *x,
115
117}
EXTERNAL void EXPRT cam24o_q(const int c, const int n, const int a, const int f, DWORD d, int *x, int *q)
EXTERNAL void EXPRT cam24i_q(const int c, const int n, const int a, const int f, DWORD *d, int *x, int *q)
EXTERNAL void EXPRT cam24i_rq(const int c, const int n, const int a, const int f, DWORD **d, const int r)
◆ main()
Definition at line 145 of file camacsrv.cxx.
146{
148
149 port = 1750;
152 printf(
"Cannot start server\n");
153 return 1;
154 }
157 printf(
"CAMAC server started (debugging mode)\n");
158 } else {
160 printf(
"CAMAC server started\n");
161 }
162
167
169
171
173
174 return 0;
175}
INT rpc_dispatch(INT index, void *prpc_param[])
INT cm_yield(INT millisec)
EXTERNAL int EXPRT cam_init(void)
RPC_LIST * rpc_get_internal_list(INT flag)
INT rpc_register_server(int port, int *plsock, int *pport)
INT rpc_register_functions(const RPC_LIST *new_list, RPC_HANDLER func)
INT rpc_server_shutdown(void)
INT rpc_register_function(INT id, INT(*func)(INT, void **))
◆ rpc_dispatch()
INT rpc_dispatch |
( |
INT |
index, |
|
|
void * |
prpc_param[] |
|
) |
| |
Definition at line 121 of file camacsrv.cxx.
122{
124
129 break;
130
134 break;
135
136 default:
137 cm_msg(
MERROR,
"rpc_dispatch",
"received unrecognized command");
138 }
139
141}
INT cnaf24(DWORD cmd, DWORD b, DWORD c, DWORD n, DWORD a, DWORD f, DWORD *pdata, DWORD *size, DWORD *x, DWORD *q)
INT cnaf16(DWORD cmd, DWORD b, DWORD c, DWORD n, DWORD a, DWORD f, WORD *pdata, DWORD *size, DWORD *x, DWORD *q)
INT cm_msg(INT message_type, const char *filename, INT line, const char *routine, const char *format,...)
◆ debug