#include <stdio.h>
#include <stdarg.h>
#include <assert.h>
#include <sys/time.h>
#include "tmfe_rev0.h"
#include "midas.h"
#include "msystem.h"
#include "mrpc.h"
#include "mstrlcpy.h"
Go to the source code of this file.
◆ rpc_callback()
| static INT rpc_callback |
( |
INT |
index, |
|
|
void * |
prpc_param[] |
|
) |
| |
|
static |
Definition at line 389 of file tmfe_rev0.cxx.
390{
394 int return_max_length =
CINT(3);
395
396 cm_msg(
MINFO,
"rpc_callback",
"--------> rpc_callback: index %d, max_length %d, cmd [%s], args [%s]",
index, return_max_length, cmd, args);
397
399
402 if (r.length() > 0) {
403
404 mstrlcpy(return_buf, r.c_str(), return_max_length);
406 }
407 }
408
409 return_buf[0] = 0;
411}
std::vector< TMFeRpcHandlerInterface * > fRpcHandlers
INT cm_msg(INT message_type, const char *filename, INT line, const char *routine, const char *format,...)
◆ tmfe_periodic_thread()
| static int tmfe_periodic_thread |
( |
void * |
param | ) |
|
|
static |
Definition at line 232 of file tmfe_rev0.cxx.
233{
234 fprintf(stderr, "tmfe_periodic_thread: periodic thread started\n");
242 fprintf(stderr,
"tmfe_periodic_thread: ss_susend() status %d, shutdown requested...\n",
status);
243 }
244 }
246 fprintf(stderr, "tmfe_periodic_thread: periodic thread stopped\n");
249}
bool fPeriodicThreadShutdownRequested
void EquipmentPeriodicTasks()
bool fPeriodicThreadRunning
std::atomic_bool fShutdownRequested
shutdown was requested by Ctrl-C or by RPC command
INT ss_suspend(INT millisec, INT msg)
◆ tmfe_rpc_thread()
| static int tmfe_rpc_thread |
( |
void * |
param | ) |
|
|
static |
Definition at line 209 of file tmfe_rev0.cxx.
210{
211 fprintf(stderr, "tmfe_rpc_thread: RPC thread started\n");
212
213 int msec = 1000;
218
220
223 fprintf(stderr,
"tmfe_rpc_thread: cm_yield(%d) status %d, shutdown requested...\n", msec,
status);
224 }
225 }
227 fprintf(stderr, "tmfe_rpc_thread: RPC thread stopped\n");
230}
std::atomic_bool fRpcThreadShutdownRequested
std::atomic_bool fRpcThreadRunning
INT cm_yield(INT millisec)
INT ss_suspend_set_rpc_thread(midas_thread_t thread_id)
midas_thread_t ss_gettid(void)
◆ tr_pause()
| static INT tr_pause |
( |
INT |
runno, |
|
|
char * |
errstr |
|
) |
| |
|
static |
◆ tr_resume()
| static INT tr_resume |
( |
INT |
runno, |
|
|
char * |
errstr |
|
) |
| |
|
static |
◆ tr_start()
| static INT tr_start |
( |
INT |
runno, |
|
|
char * |
errstr |
|
) |
| |
|
static |
Definition at line 413 of file tmfe_rev0.cxx.
414{
416
418
422 }
423
426 }
427
429}
std::vector< TMFeEquipment * > fEquipments
◆ tr_startabort()
| static INT tr_startabort |
( |
INT |
runno, |
|
|
char * |
errstr |
|
) |
| |
|
static |
◆ tr_stop()
| static INT tr_stop |
( |
INT |
runno, |
|
|
char * |
errstr |
|
) |
| |
|
static |
Definition at line 431 of file tmfe_rev0.cxx.
432{
434
438 }
439
442 }
443
444
446}