MIDAS
Loading...
Searching...
No Matches
minirc.c
Go to the documentation of this file.
1/********************************************************************\
2
3 Name: minirc.c
4 Created by: Stefan Ritt
5
6 Contents: A "Mini-Run Control" program showing the basic concept
7 of starting/stopping runs in the MIDAS system
8
9 $Id$
10
11\********************************************************************/
12
13#include <stdio.h>
14#include <stdlib.h>
15#include "midas.h"
16
17/*------------------------------------------------------------------*/
18
19int main()
20{
22 char host_name[256];
23 char str[256];
24
25 printf("Host to connect: ");
26 ss_gets(host_name, 256);
27
28 /* connect to experiment */
29 status = cm_connect_experiment(host_name, "", "MiniRC", NULL);
30 if (status != CM_SUCCESS)
31 return 1;
32
33 printf("Enter run number: ");
34 ss_gets(str, 256);
35 run_number = atoi(str);
36
37 printf("Start run\n");
38
39 /* start run */
41 printf("%s", str);
42
43 printf("Hit RETURN to stop run");
44 getchar();
45
46 /* stop run */
48 printf("%s", str);
49
51
52 return 1;
53}
INT cm_connect_experiment(const char *host_name, const char *exp_name, const char *client_name, void(*func)(char *))
Definition midas.cxx:2278
INT cm_transition(INT transition, INT run_number, char *errstr, INT errstr_size, INT async_flag, INT debug_flag)
Definition midas.cxx:5286
INT cm_disconnect_experiment(void)
Definition midas.cxx:2846
#define CM_SUCCESS
Definition midas.h:582
#define TR_START
Definition midas.h:405
#define MT_INFO
Definition midas.h:543
#define TR_STOP
Definition midas.h:406
#define BM_WAIT
Definition midas.h:365
char * ss_gets(char *string, int size)
Definition system.cxx:7770
INT run_number[2]
Definition mana.cxx:246
char host_name[HOST_NAME_LENGTH]
Definition mana.cxx:242
int INT
Definition midas.h:129
int main()
Definition minirc.c:19
char str[256]
Definition odbhist.cxx:33
DWORD status
Definition odbhist.cxx:39