100{
101 setbuf(stdout, NULL);
102 setbuf(stderr, NULL);
103
104 signal(SIGPIPE, SIG_IGN);
105
106 std::string
name =
"";
107
108 if (argc == 2) {
110 } else {
112 }
113
115
118 printf("Cannot connect, bye.\n");
119 return 1;
120 }
121
122
123
127
128
131 eq->SetStatus(
"Starting...",
"white");
132 eq->ZeroStatistics();
133 eq->WriteStatistics();
134
136
138
140
141
142
143
144
145
147
149
151
154
155 eq->SetStatus(
"Started...",
"white");
156
159 }
160
162
163 return 0;
164}
void RegisterRpcHandler(TMFeRpcHandlerInterface *handler)
RPC handlers are executed from the RPC thread, if started.
static std::string GetThreadId()
return identification of this thread
void StartPeriodicThread()
TMFeResult Connect(const char *progname=NULL, const char *hostname=NULL, const char *exptname=NULL)
std::atomic_bool fShutdownRequested
shutdown was requested by Ctrl-C or by RPC command
void RegisterPeriodicHandler(TMFeEquipment *eq, TMFePeriodicHandlerInterface *handler)
periodic handlers are executed from the periodic thread, if started
TMFeError RegisterEquipment(TMFeEquipment *eq)