Commit 4aafefc7 authored by Federico Vaga's avatar Federico Vaga

wrtd: port rt-fd commands to librt

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>


NOTE
This commit has been created by `git subtree` on the Mock Turtle repository
on tag mock-turtle-2.0

This commit will not compile
parent b8252869
......@@ -105,6 +105,8 @@ enum wrtd_in_actions {
};
enum wrtd_out_actions {
WRTD_OUT_ACTION_SW_TRIG = __RT_ACTION_RECV_STANDARD_NUMBER,
WRTD_OUT_ACTION_TRIG_IDX,
WRTD_OUT_ACTION_TRIG_ORD,
WRTD_OUT_ACTION_LOG,
};
......@@ -129,6 +131,8 @@ enum wrtd_in_structures_indexes {
enum wrtd_out_variables_indexes {
OUT_VAR_DEVICE_TIME_S=0,
OUT_VAR_DEVICE_TIME_T,
OUT_VAR_DEVICE_COUNTER_MESG,
OUT_VAR_DEVICE_COUNTER_LOOP,
__WRTD_OUT_VAR_MAX,
};
enum wrtd_out_structures_indexes {
......@@ -137,7 +141,6 @@ enum wrtd_out_structures_indexes {
OUT_STRUCT_CHAN_1,
OUT_STRUCT_CHAN_2,
OUT_STRUCT_CHAN_3,
OUT_STRUCT_CHAN_4,
__WRTD_OUT_STRUCT_MAX,
};
......@@ -378,21 +381,17 @@ struct lrt_output_rule {
uint16_t delay_frac;
uint16_t state; /**< State of the rule (empty, disabled,
conditional action, condition, etc.) */
struct lrt_output_rule *cond_ptr; /**< Pointer to conditional action.
Used for rules that define
triggering conditions. */
uint32_t cond_ptr; /**< index pointing do the condition trigger */
uint32_t latency_worst; /**< Worst-case latency (in 8ns ticks)*/
uint32_t latency_avg_sum; /**< Average latency accumulator and
number of samples */
uint32_t latency_avg_nsamples;
int hits; /**< Number of times the rule has successfully produced
a pulse */
int misses; /**< Number of times the rule has missed a pulse
(for any reason) */
uint32_t hits; /**< Number of times the rule has successfully produced
a pulse */
uint32_t misses; /**< Number of times the rule has missed a pulse
(for any reason) */
};
#define ENTRY_FLAG_VALID (1 << 0)
/* Structure describing a single pulse in the Fine Delay software output queue */
struct pulse_queue_entry {
/* Trigger that produced the pulse */
......@@ -409,6 +408,14 @@ struct lrt_pulse_queue {
int head, tail, count;
};
struct wrtd_out_trigger {
unsigned int flags;
struct wrtd_trig_id id; /**< trigger identifier */
struct lrt_output_rule ocfg[FD_NUM_CHANNELS]; /**< specific rule
for each channel*/
};
#define ENTRY_FLAG_VALID (1 << 0)
struct wrtd_out_channel_stats {
unsigned int hits;
unsigned int miss_timeout;
......
This diff is collapsed.
......@@ -8,5 +8,6 @@ WRNC = ../../../../
EXTRA_CFLAGS += -I../../include
EXTRA_CFLAGS += -I../common
EXTRA_CFLAGS += -DLIBRT_ERROR
EXTRA_CFLAGS += -DLIBRT_DEBUG
RT_USE_LIBRT := 1
include $(WRNC)/applications/common/rt/Makefile
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment