ACQ400_XRM (xrmIoc)
Toggle main menu visibility
Loading...
Searching...
No Matches
acq400_INST.h
Go to the documentation of this file.
1
/** @file acq400_INST.h
2
* @brief class provides launch framework for instrumentation streaming.
3
*
4
* Created on: 9 Apr 2026
5
* Author: pgm
6
*/
7
8
#ifndef XRMIOCAPP_SRC_ACQ400_INST_H_
9
#define XRMIOCAPP_SRC_ACQ400_INST_H_
10
11
#include "acq400_asyn_common.h"
12
#include "
xrm_structs.h
"
13
#include "
acq400_FMT.h
"
14
#include "
SamplePrams.h
"
15
16
#define PS_INST_STRATEGY "INST_STRATEGY"
// master or spy
17
18
#define PS_REDIS_HOST "REDIS_HOST"
// HOST ip or DNS name
19
#define PS_REDIS_PORT "REDIS_PORT"
// HOST port (default:xxx)
20
#define PS_REDIS_MKEY "REDIS_MKEY"
// Major key (OUTPUT)
21
22
#define PS_REDIS_BCOUNT "REDIS_BCOUNT"
// buffers (cycles) processed
23
#define PS_REDIS_STATUS "REDIS_STATUS"
// status good/bad
24
#define PS_REDIS_MMKEY "REDIS_MMKEY"
// Major+Minor key (INPUT)
25
#define PS_ACQ_PORT "ACQ_PORT"
// source port for spawned app (if used)
26
#define PS_STREAM_SUBSET_MASK "STREAM_SUBSET_MASK"
// to allow a SPY to handle subset mask
27
28
#define FAKE_SPY "/usr/local/xrm/epics/scripts/inst-spy-fake"
29
30
struct
child_process_info
{
31
pid_t pid;
32
int
fd;
33
};
34
35
#define MAXREAD_BACKLOG 2
36
37
/** provides launch framework for instrumentation streaming.
38
*
39
*/
40
class
acq400_INST:
public
acq400_asynPortDriver
{
41
static
int
verbose;
42
protected
:
43
static
int
nice;
44
const
char
* cmd;
45
bool
send_buffer_numbers;
46
bool
block_on_new_buffer;
47
int
read_backlog[MAXREAD_BACKLOG+1];
48
49
virtual
void
task();
50
static
void
task_runner(
void
*drvPvt);
51
52
child_process_info
run_socket_fork_exec();
53
54
int
P_INST_STRATEGY
;
/**< Instrumentation strategy "STReam" or "SPY" (output).
55
- SPY is non-intrusive and recommended.
56
*/
57
int
P_REDIS_HOST
;
/**< REDIS server DNS-name or IP. (input) */
58
int
P_REDIS_PORT
;
/**< REDIS port to send to. (input) */
59
int
P_REDIS_MKEY
;
/**< REDIS major key. (input) */
60
int
P_REDIS_BCOUNT
;
/**< REDIS byte count (output) */
61
int
P_REDIS_STATUS
;
/**< REDIS status (output) */
62
int
P_REDIS_MMKEY
;
/**< REDIS current major.minor key (output) */
63
int
P_ACQ_PORT
;
/**< Port used on acq400 (4210=STReam, 53667=SPY) */
64
int
P_STREAM_SUBSET_MASK
;
/**< SPY client would need to know this */
65
66
char
*
make_kev_from_ip
(
const
char
* ps_name,
int
p_key);
67
/**< returns new char[] key-equals-value string from INTEGER param.
68
* conventionally ps_name is the PS_xxx def from above, but it doesn't _have_ to be.
69
* client to delete
70
*/
71
72
char
*
make_kev_from_sp
(
const
char
* ps_name,
int
p_key);
73
/**< returns new char[] key-equals-value string from STRING param.
74
* conventionally ps_name is the PS_xxx def from above, but it doesn't _have_ to be.
75
* client to delete
76
*/
77
public
:
78
acq400_INST(
const
char
* portName,
const
char
* _strategy);
79
80
asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
81
};
82
83
84
#endif
/* XRMIOCAPP_SRC_ACQ400_INST_H_ */
SamplePrams.h
defines SamplePrams, sample geometry definition struct.
acq400_FMT.h
Fermi Multicast Table Abstract Base Class Created on: 16 Feb 2026 Author: pgm.
acq400_INST::make_kev_from_ip
char * make_kev_from_ip(const char *ps_name, int p_key)
Definition
acq400_INST.cpp:207
acq400_INST::P_REDIS_MKEY
int P_REDIS_MKEY
Definition
acq400_INST.h:59
acq400_INST::P_REDIS_HOST
int P_REDIS_HOST
Definition
acq400_INST.h:57
acq400_INST::P_REDIS_STATUS
int P_REDIS_STATUS
Definition
acq400_INST.h:61
acq400_INST::P_STREAM_SUBSET_MASK
int P_STREAM_SUBSET_MASK
Definition
acq400_INST.h:64
acq400_INST::P_REDIS_BCOUNT
int P_REDIS_BCOUNT
Definition
acq400_INST.h:60
acq400_INST::P_REDIS_PORT
int P_REDIS_PORT
Definition
acq400_INST.h:58
acq400_INST::P_REDIS_MMKEY
int P_REDIS_MMKEY
Definition
acq400_INST.h:62
acq400_INST::P_ACQ_PORT
int P_ACQ_PORT
Definition
acq400_INST.h:63
acq400_INST::make_kev_from_sp
char * make_kev_from_sp(const char *ps_name, int p_key)
Definition
acq400_INST.cpp:216
acq400_INST::P_INST_STRATEGY
int P_INST_STRATEGY
Definition
acq400_INST.h:54
acq400_asynPortDriver::acq400_asynPortDriver
acq400_asynPortDriver(const char *portName, int maxAddr, int interfaceMask, int interruptMask, int asynFlags, int autoConnect, int priority, int stackSize)
Definition
acq400_asynPortDriver.cpp:16
child_process_info
Definition
acq400_INST.h:30
xrm_structs.h
Declarations for key XRM structures for internal and wire (external) use.
xrmIocApp
src
acq400_INST.h
Generated by
1.17.0