ACQ400_XRM (xrmIoc)
Toggle main menu visibility
Loading...
Searching...
No Matches
acq400_FMT.h
Go to the documentation of this file.
1
/** @file acq400_FMT.h
2
* @brief Fermi Multicast Table Abstract Base Class
3
* Created on: 16 Feb 2026
4
* Author: pgm
5
*/
6
7
#ifndef XRMIOCAPP_SRC_ACQ400_FMT_H_
8
#define XRMIOCAPP_SRC_ACQ400_FMT_H_
9
10
#include "
acq400_asynPortDriver.h
"
11
12
#include "
xrm_structs.h
"
13
#include "Multicast.h"
14
15
#define PS_FMT_MC_GRP "FMT_MC_GRP"
/* string, r/set on PINI */
16
#define PS_FMT_MC_PORT "FMT_MC_PORT"
/* asynInt32, r/set on PINI */
17
18
#define PS_FMT_COL_ROWNUM "FMT_COL_ROWNUM"
/* cosmetic for display, NOT part of FMT */
19
#define PS_FMT_COL_EVENT "FMT_COL_EVENT"
/* asynInt16Array, ro */
20
#define PS_FMT_COL_PAD "FMT_COL_PAD"
/* asynInt16Array, ro */
21
#define PS_FMT_COL_CLIDAT "FMT_COL_CLIDAT"
/* asynInt32Array, ro */
22
#define PS_FMT_COL_TS "FMT_COL_TS"
/* asynInt64Array, ro */
23
24
/** Fermi Multicast Table Abstract Base Class
25
* - We represent the data as an NTTABLE for display purposes (usually subject to RATE_LIM)
26
* - This is a column-major representation, unsuited for FMT in general.
27
* - The FMT itself is published as a flat binary array of u32.
28
*/
29
class
acq400_FMT_abc:
public
acq400_asynPortDriver
{
30
public
:
31
32
protected
:
33
static
int
verbose;
34
35
const
int
n_cache;
36
FMT
*
fmt_cache
;
/**< FMT binary instance */
37
38
/** EPICS NTTABLE is a convenient display mechanism,
39
* but unfortunately it needs the data in columns.
40
*
41
* @@todo : for dynamic update, we want a NTGROUP per row,
42
* ie 64 groups of 4 scalar pvs, that's a lot of PV names.. rather than one array..
43
*/
44
struct
COLUMNS
{
45
epicsInt8 c_rownum[
FMT_ROWS
];
46
epicsInt16 c_event[
FMT_ROWS
];
47
epicsInt16 c_pad[
FMT_ROWS
];
48
epicsInt32 c_client_data[
FMT_ROWS
];
49
epicsInt64 c_timestamp[
FMT_ROWS
];
50
} cols;
51
52
char
mc_group[80];
53
int
mc_port;
54
55
virtual
void
update_fmt(
FMT
& fmt,
bool
first_time =
false
) = 0;
56
virtual
void
update_fmt_columns(
const
FMT
& fmt);
57
virtual
void
update_fmt_callbacks(
bool
call_array_callbacks);
58
void
init_mc_url(
char
* group,
int
maxgroup,
int
* port);
59
MultiCast
& mc_factory(MultiCast::MC txrx);
60
61
static
int
nice;
62
63
virtual
void
task() = 0;
64
65
static
void
task_runner(
void
*drvPvt);
66
67
epicsInt64 now_us;
68
69
int
P_FMT_MC_GRP
;
/**< MultiCast Group eg 224.x.x.x */
70
int
P_FMT_MC_PORT
;
/**< MultiCast Port */
71
int
P_FMT_COL_ROWNUM
;
/**< NTTABLE column-major view, Row Number */
72
int
P_FMT_COL_EVENT
;
/**< NTTABLE column-major view, Event */
73
int
P_FMT_COL_PAD
;
/**< NTTABLE column-major view, PAD */
74
int
P_FMT_COL_CLIDAT
;
/**< NTTABLE column-major view, CLIDAT client data */
75
int
P_FMT_COL_TS
;
/**< NTTABLE column-major view, Timestamp */
76
77
acq400_FMT_abc(
const
char
*portName,
int
maxAddr,
int
n_cache,
int
interfaceMask,
int
interruptMask,
78
int
asynFlags,
int
autoConnect,
int
priority,
int
stackSize);
79
virtual
~acq400_FMT_abc() {}
80
81
public
:
82
};
83
84
85
86
#endif
/* XRMIOCAPP_SRC_ACQ400_FMT_H_ */
acq400_asynPortDriver.h
common base class connects all acq400 PortDriver implementations
MultiCast
Definition
Multicast.h:11
acq400_FMT_abc::P_FMT_COL_CLIDAT
int P_FMT_COL_CLIDAT
Definition
acq400_FMT.h:74
acq400_FMT_abc::P_FMT_MC_PORT
int P_FMT_MC_PORT
Definition
acq400_FMT.h:70
acq400_FMT_abc::P_FMT_COL_PAD
int P_FMT_COL_PAD
Definition
acq400_FMT.h:73
acq400_FMT_abc::P_FMT_COL_EVENT
int P_FMT_COL_EVENT
Definition
acq400_FMT.h:72
acq400_FMT_abc::P_FMT_COL_ROWNUM
int P_FMT_COL_ROWNUM
Definition
acq400_FMT.h:71
acq400_FMT_abc::P_FMT_COL_TS
int P_FMT_COL_TS
Definition
acq400_FMT.h:75
acq400_FMT_abc::P_FMT_MC_GRP
int P_FMT_MC_GRP
Definition
acq400_FMT.h:69
acq400_FMT_abc::fmt_cache
FMT * fmt_cache
Definition
acq400_FMT.h:36
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
acq400_FMT_abc::COLUMNS
Definition
acq400_FMT.h:44
xrm_structs.h
Declarations for key XRM structures for internal and wire (external) use.
FMT
struct FMT_ROW FMT[FMT_ROWS]
FMT : FNAL Multicast Table.
Definition
xrm_structs.h:57
FMT_ROWS
const int FMT_ROWS
Definition
xrm_structs.h:37
xrmIocApp
src
acq400_FMT.h
Generated by
1.17.0