Commit ce26863b authored by Federico Vaga's avatar Federico Vaga

rename: functions and variables

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 391cc7a1
...@@ -342,8 +342,8 @@ struct wrtd_in_channel_config { ...@@ -342,8 +342,8 @@ struct wrtd_in_channel_config {
public, set from the internal public, set from the internal
calibration data of the TDC calibration data of the TDC
driver. */ driver. */
uint32_t flags; /**< Channel flags (enum wrnc_io_flags) */ uint32_t flags; /**< Channel flags (enum trtl_io_flags) */
uint32_t log_level; /**< Log level (enum wrnc_log_level) */ uint32_t log_level; /**< Log level (enum trtl_log_level) */
uint32_t mode; /**< Triggering mode (enum wrtd_triger_mode) */ uint32_t mode; /**< Triggering mode (enum wrtd_triger_mode) */
}; };
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "rt-message.h" #include "rt-message.h"
#endif #endif
static inline int _wrnc_msg_check_buffer( struct wrnc_msg *buf, int n_words ) static inline int _trtl_msg_check_buffer( struct trtl_msg *buf, int n_words )
{ {
#ifndef WRNODE_RT #ifndef WRNODE_RT
if(buf->error) if(buf->error)
...@@ -51,9 +51,9 @@ static inline int _wrnc_msg_check_buffer( struct wrnc_msg *buf, int n_words ) ...@@ -51,9 +51,9 @@ static inline int _wrnc_msg_check_buffer( struct wrnc_msg *buf, int n_words )
return 0; return 0;
} }
static inline int wrnc_msg_int32 ( struct wrnc_msg *buf, int *value ) static inline int trtl_msg_int32 ( struct trtl_msg *buf, int *value )
{ {
if ( _wrnc_msg_check_buffer ( buf, 1 ) < 0 ) if ( _trtl_msg_check_buffer ( buf, 1 ) < 0 )
return -1; return -1;
if (buf->direction == WRNC_MSG_DIR_SEND) if (buf->direction == WRNC_MSG_DIR_SEND)
...@@ -69,9 +69,9 @@ static inline int wrnc_msg_int32 ( struct wrnc_msg *buf, int *value ) ...@@ -69,9 +69,9 @@ static inline int wrnc_msg_int32 ( struct wrnc_msg *buf, int *value )
} }
static inline int wrnc_msg_int16 ( struct wrnc_msg *buf, int16_t *value ) static inline int trtl_msg_int16 ( struct trtl_msg *buf, int16_t *value )
{ {
if ( _wrnc_msg_check_buffer ( buf, 1 ) < 0 ) if ( _trtl_msg_check_buffer ( buf, 1 ) < 0 )
return -1; return -1;
if (buf->direction == WRNC_MSG_DIR_SEND) if (buf->direction == WRNC_MSG_DIR_SEND)
...@@ -86,20 +86,20 @@ static inline int wrnc_msg_int16 ( struct wrnc_msg *buf, int16_t *value ) ...@@ -86,20 +86,20 @@ static inline int wrnc_msg_int16 ( struct wrnc_msg *buf, int16_t *value )
return 0; return 0;
} }
static inline int wrnc_msg_uint32 ( struct wrnc_msg *buf, uint32_t *value ) static inline int trtl_msg_uint32 ( struct trtl_msg *buf, uint32_t *value )
{ {
return wrnc_msg_int32( buf, (int *) value); return trtl_msg_int32( buf, (int *) value);
} }
static inline int wrnc_msg_uint16 ( struct wrnc_msg *buf, uint16_t *value ) static inline int trtl_msg_uint16 ( struct trtl_msg *buf, uint16_t *value )
{ {
return wrnc_msg_int16( buf, (int16_t *) value); return trtl_msg_int16( buf, (int16_t *) value);
} }
static inline int wrnc_msg_header ( struct wrnc_msg *buf, uint32_t *id, uint32_t *seq_no ) static inline int trtl_msg_header ( struct trtl_msg *buf, uint32_t *id, uint32_t *seq_no )
{ {
if (_wrnc_msg_check_buffer ( buf, 2 ) < 0) if (_trtl_msg_check_buffer ( buf, 2 ) < 0)
return -1; return -1;
if (buf->direction == WRNC_MSG_DIR_SEND) if (buf->direction == WRNC_MSG_DIR_SEND)
...@@ -116,24 +116,24 @@ static inline int wrnc_msg_header ( struct wrnc_msg *buf, uint32_t *id, uint32_t ...@@ -116,24 +116,24 @@ static inline int wrnc_msg_header ( struct wrnc_msg *buf, uint32_t *id, uint32_t
return 0; return 0;
} }
static inline void wrnc_msg_skip ( struct wrnc_msg *buf, int n_words ) static inline void trtl_msg_skip ( struct trtl_msg *buf, int n_words )
{ {
_wrnc_msg_check_buffer ( buf, n_words ); _trtl_msg_check_buffer ( buf, n_words );
if (buf->direction == WRNC_MSG_DIR_SEND) if (buf->direction == WRNC_MSG_DIR_SEND)
buf->datalen += n_words; buf->datalen += n_words;
else else
buf->offset += n_words; buf->offset += n_words;
} }
static inline void wrnc_msg_seek ( struct wrnc_msg *buf, int pos ) static inline void trtl_msg_seek ( struct trtl_msg *buf, int pos )
{ {
buf->offset = pos; buf->offset = pos;
buf->datalen = pos; buf->datalen = pos;
} }
static inline int wrtd_msg_timestamp ( struct wrnc_msg *buf, struct wr_timestamp *ts ) static inline int wrtd_msg_timestamp ( struct trtl_msg *buf, struct wr_timestamp *ts )
{ {
if (_wrnc_msg_check_buffer ( buf, 4 ) < 0) if (_trtl_msg_check_buffer ( buf, 4 ) < 0)
return -1; return -1;
if (buf->direction == WRNC_MSG_DIR_SEND) if (buf->direction == WRNC_MSG_DIR_SEND)
...@@ -154,9 +154,9 @@ static inline int wrtd_msg_timestamp ( struct wrnc_msg *buf, struct wr_timestamp ...@@ -154,9 +154,9 @@ static inline int wrtd_msg_timestamp ( struct wrnc_msg *buf, struct wr_timestamp
return 0; return 0;
} }
static inline int wrtd_msg_trig_id ( struct wrnc_msg *buf, struct wrtd_trig_id *id ) static inline int wrtd_msg_trig_id ( struct trtl_msg *buf, struct wrtd_trig_id *id )
{ {
if (_wrnc_msg_check_buffer ( buf, 3 ) < 0) if (_trtl_msg_check_buffer ( buf, 3 ) < 0)
return -1; return -1;
if (buf->direction == WRNC_MSG_DIR_SEND) if (buf->direction == WRNC_MSG_DIR_SEND)
...@@ -175,19 +175,19 @@ static inline int wrtd_msg_trig_id ( struct wrnc_msg *buf, struct wrtd_trig_id * ...@@ -175,19 +175,19 @@ static inline int wrtd_msg_trig_id ( struct wrnc_msg *buf, struct wrtd_trig_id *
return 0; return 0;
} }
static inline int wrtd_msg_trigger_entry ( struct wrnc_msg *buf, struct wrtd_trigger_entry *ent ) static inline int wrtd_msg_trigger_entry ( struct trtl_msg *buf, struct wrtd_trigger_entry *ent )
{ {
if (wrtd_msg_timestamp (buf, &ent->ts) < 0) if (wrtd_msg_timestamp (buf, &ent->ts) < 0)
return -1; return -1;
if (wrtd_msg_trig_id (buf, &ent->id) < 0) if (wrtd_msg_trig_id (buf, &ent->id) < 0)
return -1; return -1;
return wrnc_msg_int32 (buf, (int *) &ent->seq); return trtl_msg_int32 (buf, (int *) &ent->seq);
} }
static inline struct wrnc_msg wrnc_msg_init(int max_size) static inline struct trtl_msg trtl_msg_init(int max_size)
{ {
struct wrnc_msg b; struct trtl_msg b;
b.direction = WRNC_MSG_DIR_SEND; b.direction = WRNC_MSG_DIR_SEND;
b.max_size = max_size; b.max_size = max_size;
...@@ -198,7 +198,7 @@ static inline struct wrnc_msg wrnc_msg_init(int max_size) ...@@ -198,7 +198,7 @@ static inline struct wrnc_msg wrnc_msg_init(int max_size)
return b; return b;
} }
static inline int wrnc_msg_check_error (struct wrnc_msg *buf) static inline int trtl_msg_check_error (struct trtl_msg *buf)
{ {
return buf->error; return buf->error;
} }
......
...@@ -39,14 +39,14 @@ const char *wrtd_errors[] = { ...@@ -39,14 +39,14 @@ const char *wrtd_errors[] = {
/** /**
* It returns a string messages corresponding to a given error code. If * It returns a string messages corresponding to a given error code. If
* it is not a libwrtd error code, it will run wrnc_strerror() * it is not a libwrtd error code, it will run trtl_strerror()
* @param[in] err error code * @param[in] err error code
* @return a message error * @return a message error
*/ */
const char *wrtd_strerror(int err) const char *wrtd_strerror(int err)
{ {
if (err < EWRTD_INVALID_ANSWER_ACK || err >= __EWRTD_MAX_ERROR_NUMBER) if (err < EWRTD_INVALID_ANSWER_ACK || err >= __EWRTD_MAX_ERROR_NUMBER)
return wrnc_strerror(err); return trtl_strerror(err);
return wrtd_errors[err - EWRTD_INVALID_ANSWER_ACK]; return wrtd_errors[err - EWRTD_INVALID_ANSWER_ACK];
} }
...@@ -57,15 +57,15 @@ const char *wrtd_strerror(int err) ...@@ -57,15 +57,15 @@ const char *wrtd_strerror(int err)
* anything else. If you are going to load/unload WRTD devices, then * anything else. If you are going to load/unload WRTD devices, then
* you have to un-load (wrtd_exit()) e reload (wrtd_init()) the library. * you have to un-load (wrtd_exit()) e reload (wrtd_init()) the library.
* *
* This library is based on the libwrnc, so internally, this function also * This library is based on the libmockturtle, so internally, this function also
* run wrnc_init() in order to initialize the WRNC library. * run trtl_init() in order to initialize the WRNC library.
* @return 0 on success, otherwise -1 and errno is appropriately set * @return 0 on success, otherwise -1 and errno is appropriately set
*/ */
int wrtd_init() int wrtd_init()
{ {
int err; int err;
err = wrnc_init(); err = trtl_init();
if (err) if (err)
return err; return err;
...@@ -80,7 +80,7 @@ int wrtd_init() ...@@ -80,7 +80,7 @@ int wrtd_init()
*/ */
void wrtd_exit() void wrtd_exit()
{ {
wrnc_exit(); trtl_exit();
} }
...@@ -93,7 +93,7 @@ void wrtd_exit() ...@@ -93,7 +93,7 @@ void wrtd_exit()
*/ */
int wrtd_version_is_valid(struct wrtd_node *dev) int wrtd_version_is_valid(struct wrtd_node *dev)
{ {
struct wrnc_rt_version version; struct trtl_rt_version version;
int err; int err;
errno = 0; errno = 0;
...@@ -127,21 +127,21 @@ static struct wrtd_node *wrtd_open(uint32_t device_id, unsigned int is_lun) ...@@ -127,21 +127,21 @@ static struct wrtd_node *wrtd_open(uint32_t device_id, unsigned int is_lun)
return NULL; return NULL;
if (is_lun) if (is_lun)
wrtd->wrnc = wrnc_open_by_lun(device_id); wrtd->trtl = trtl_open_by_lun(device_id);
else else
wrtd->wrnc = wrnc_open_by_fmc(device_id); wrtd->trtl = trtl_open_by_fmc(device_id);
if (!wrtd->wrnc) if (!wrtd->trtl)
goto out; goto out;
wrtd->dev_id = device_id; wrtd->dev_id = device_id;
/* Logging interface is always in share mode */ /* Logging interface is always in share mode */
err = wrnc_hmq_share_set(wrtd->wrnc, WRNC_HMQ_OUTCOMING, err = trtl_hmq_share_set(wrtd->trtl, TRTL_HMQ_OUTCOMING,
WRTD_OUT_FD_LOGGING, 1); WRTD_OUT_FD_LOGGING, 1);
if (err) if (err)
goto out; goto out;
err = wrnc_hmq_share_set(wrtd->wrnc, WRNC_HMQ_OUTCOMING, err = trtl_hmq_share_set(wrtd->trtl, TRTL_HMQ_OUTCOMING,
WRTD_OUT_TDC_LOGGING, 1); WRTD_OUT_TDC_LOGGING, 1);
if (err) if (err)
goto out; goto out;
...@@ -187,7 +187,7 @@ void wrtd_close(struct wrtd_node *dev) ...@@ -187,7 +187,7 @@ void wrtd_close(struct wrtd_node *dev)
{ {
struct wrtd_desc *wrtd = (struct wrtd_desc *)dev; struct wrtd_desc *wrtd = (struct wrtd_desc *)dev;
wrnc_close(wrtd->wrnc); trtl_close(wrtd->trtl);
free(wrtd); free(wrtd);
dev = NULL; dev = NULL;
} }
...@@ -199,11 +199,11 @@ void wrtd_close(struct wrtd_node *dev) ...@@ -199,11 +199,11 @@ void wrtd_close(struct wrtd_node *dev)
* @param[in] dev device token * @param[in] dev device token
* @return the WRNC token * @return the WRNC token
*/ */
struct wrnc_dev *wrtd_get_wrnc_dev(struct wrtd_node *dev) struct trtl_dev *wrtd_get_trtl_dev(struct wrtd_node *dev)
{ {
struct wrtd_desc *wrtd = (struct wrtd_desc *)dev; struct wrtd_desc *wrtd = (struct wrtd_desc *)dev;
return (struct wrnc_dev *)wrtd->wrnc; return (struct trtl_dev *)wrtd->trtl;
} }
...@@ -217,16 +217,16 @@ int wrtd_cpu_restart(struct wrtd_node *dev) ...@@ -217,16 +217,16 @@ int wrtd_cpu_restart(struct wrtd_node *dev)
struct wrtd_desc *wrtd = (struct wrtd_desc *)dev; struct wrtd_desc *wrtd = (struct wrtd_desc *)dev;
int err; int err;
err = wrnc_cpu_disable(wrtd->wrnc,WRTD_CPU_TDC); err = trtl_cpu_disable(wrtd->trtl,WRTD_CPU_TDC);
if (err) if (err)
return err; return err;
err = wrnc_cpu_disable(wrtd->wrnc,WRTD_CPU_FD); err = trtl_cpu_disable(wrtd->trtl,WRTD_CPU_FD);
if (err) if (err)
return err; return err;
err = wrnc_cpu_enable(wrtd->wrnc,WRTD_CPU_TDC); err = trtl_cpu_enable(wrtd->trtl,WRTD_CPU_TDC);
if (err) if (err)
return err; return err;
return wrnc_cpu_enable(wrtd->wrnc,WRTD_CPU_FD); return trtl_cpu_enable(wrtd->trtl,WRTD_CPU_FD);
} }
/** /**
...@@ -246,26 +246,26 @@ int wrtd_load_application(struct wrtd_node *dev, char *rt_tdc, ...@@ -246,26 +246,26 @@ int wrtd_load_application(struct wrtd_node *dev, char *rt_tdc,
errno = EWRTD_INVALID_BINARY; errno = EWRTD_INVALID_BINARY;
return -1; return -1;
} }
err = wrnc_cpu_reset_get(wrtd->wrnc, &reg_old); err = trtl_cpu_reset_get(wrtd->trtl, &reg_old);
if (err) if (err)
return err; return err;
/* Keep the CPUs in reset state */ /* Keep the CPUs in reset state */
err = wrnc_cpu_reset_set(wrtd->wrnc, err = trtl_cpu_reset_set(wrtd->trtl,
(1 << WRTD_CPU_TDC) | (1 << WRTD_CPU_FD)); (1 << WRTD_CPU_TDC) | (1 << WRTD_CPU_FD));
if (err) if (err)
return err; return err;
/* Program CPUs application */ /* Program CPUs application */
err = wrnc_cpu_load_application_file(wrtd->wrnc, WRTD_CPU_TDC, rt_tdc); err = trtl_cpu_load_application_file(wrtd->trtl, WRTD_CPU_TDC, rt_tdc);
if (err) if (err)
return err; return err;
err = wrnc_cpu_load_application_file(wrtd->wrnc, WRTD_CPU_FD, rt_fd); err = trtl_cpu_load_application_file(wrtd->trtl, WRTD_CPU_FD, rt_fd);
if (err) if (err)
return err; return err;
/* Re-enable the CPUs */ /* Re-enable the CPUs */
err = wrnc_cpu_reset_set(wrtd->wrnc, reg_old); err = trtl_cpu_reset_set(wrtd->trtl, reg_old);
if (err) if (err)
return err; return err;
......
This diff is collapsed.
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* @param[in] msg message to validate * @param[in] msg message to validate
* @return 0 if it is valid, -1 otherwise and errno is appropriately set * @return 0 if it is valid, -1 otherwise and errno is appropriately set
*/ */
int wrtd_validate_acknowledge(struct wrnc_msg *msg) int wrtd_validate_acknowledge(struct trtl_msg *msg)
{ {
if (msg->datalen != 2 || msg->data[0] != WRTD_REP_ACK_ID) { if (msg->datalen != 2 || msg->data[0] != WRTD_REP_ACK_ID) {
errno = EWRTD_INVALID_ANSWER_ACK; errno = EWRTD_INVALID_ANSWER_ACK;
...@@ -59,24 +59,24 @@ int wrtd_trig_id_cmp(struct wrtd_trig_id *id1, struct wrtd_trig_id *id2) ...@@ -59,24 +59,24 @@ int wrtd_trig_id_cmp(struct wrtd_trig_id *id1, struct wrtd_trig_id *id2)
* Internal helper to send and receive synchronous messages to/from the WRNC * Internal helper to send and receive synchronous messages to/from the WRNC
*/ */
int wrtd_send_and_receive_sync(struct wrtd_desc *wrtd, int wrtd_send_and_receive_sync(struct wrtd_desc *wrtd,
struct wrnc_msg *msg, struct trtl_msg *msg,
enum wrtd_core core) enum wrtd_core core)
{ {
/* Send the message and get answer */ /* Send the message and get answer */
struct wrnc_hmq *hmq; struct trtl_hmq *hmq;
unsigned int hmq_send = core ? WRTD_IN_FD_CONTROL : WRTD_IN_TDC_CONTROL; unsigned int hmq_send = core ? WRTD_IN_FD_CONTROL : WRTD_IN_TDC_CONTROL;
unsigned int hmq_recv = core ? WRTD_OUT_FD_CONTROL : unsigned int hmq_recv = core ? WRTD_OUT_FD_CONTROL :
WRTD_OUT_TDC_CONTROL; WRTD_OUT_TDC_CONTROL;
int err; int err;
hmq = wrnc_hmq_open(wrtd->wrnc, hmq_send, WRNC_HMQ_INCOMING); hmq = trtl_hmq_open(wrtd->trtl, hmq_send, TRTL_HMQ_INCOMING);
if (!hmq) if (!hmq)
return -1; return -1;
err = wrnc_hmq_send_and_receive_sync(hmq, hmq_recv, msg, err = trtl_hmq_send_and_receive_sync(hmq, hmq_recv, msg,
WRTD_DEFAULT_TIMEOUT); WRTD_DEFAULT_TIMEOUT);
wrnc_hmq_close(hmq); trtl_hmq_close(hmq);
return err < 0 ? err : 0; /* ignore timeout */ return err < 0 ? err : 0; /* ignore timeout */
} }
...@@ -86,7 +86,7 @@ int wrtd_send_and_receive_sync(struct wrtd_desc *wrtd, ...@@ -86,7 +86,7 @@ int wrtd_send_and_receive_sync(struct wrtd_desc *wrtd,
* with an ACK * with an ACK
*/ */
int wrtd_trivial_request(struct wrtd_node *dev, int wrtd_trivial_request(struct wrtd_node *dev,
struct wrnc_msg *request_msg, struct trtl_msg *request_msg,
enum wrtd_core core) enum wrtd_core core)
{ {
struct wrtd_desc *wrtd = (struct wrtd_desc *)dev; struct wrtd_desc *wrtd = (struct wrtd_desc *)dev;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* Description of a White-Rabbit Trigger-Distribution device * Description of a White-Rabbit Trigger-Distribution device
*/ */
struct wrtd_desc { struct wrtd_desc {
struct wrnc_dev *wrnc; /**< WRNC device associated */ struct trtl_dev *trtl; /**< WRNC device associated */
uint32_t dev_id; /**< fmc device id */ uint32_t dev_id; /**< fmc device id */
uint32_t app_id; /**< Application id */ uint32_t app_id; /**< Application id */
uint32_t n_cpu; /**< Number of CPUs */ uint32_t n_cpu; /**< Number of CPUs */
...@@ -33,13 +33,13 @@ struct wrtd_desc { ...@@ -33,13 +33,13 @@ struct wrtd_desc {
* @file libwrtd-interal.c * @file libwrtd-interal.c
*/ */
void unbag_ts(uint32_t *buf, int offset, struct wr_timestamp *ts); void unbag_ts(uint32_t *buf, int offset, struct wr_timestamp *ts);
int wrtd_validate_acknowledge(struct wrnc_msg *msg); int wrtd_validate_acknowledge(struct trtl_msg *msg);
int wrtd_trig_id_cmp(struct wrtd_trig_id *id1, struct wrtd_trig_id *id2); int wrtd_trig_id_cmp(struct wrtd_trig_id *id1, struct wrtd_trig_id *id2);
extern int wrtd_trivial_request(struct wrtd_node *dev, extern int wrtd_trivial_request(struct wrtd_node *dev,
struct wrnc_msg *request_msg, struct trtl_msg *request_msg,
enum wrtd_core core); enum wrtd_core core);
extern int wrtd_send_and_receive_sync(struct wrtd_desc *wrtd, extern int wrtd_send_and_receive_sync(struct wrtd_desc *wrtd,
struct wrnc_msg *msg, struct trtl_msg *msg,
enum wrtd_core core); enum wrtd_core core);
extern void wrtd_timestamp_endianess_fix(struct wr_timestamp *ts); extern void wrtd_timestamp_endianess_fix(struct wr_timestamp *ts);
extern void wrtd_output_rule_endianess_fix(struct lrt_output_rule *rule); extern void wrtd_output_rule_endianess_fix(struct lrt_output_rule *rule);
......
...@@ -103,18 +103,18 @@ enum wrtd_log_level wrtd_strlogging_to_level(char *log) ...@@ -103,18 +103,18 @@ enum wrtd_log_level wrtd_strlogging_to_level(char *log)
* @param[in] core WRTD core to use * @param[in] core WRTD core to use
* @return a HMQ token on success, NULL on error and errno is set appropriately * @return a HMQ token on success, NULL on error and errno is set appropriately
*/ */
static struct wrnc_hmq *wrtd_log_open(struct wrtd_node *dev, static struct trtl_hmq *wrtd_log_open(struct wrtd_node *dev,
int channel, int channel,
enum wrtd_core core) enum wrtd_core core)
{ {
struct wrtd_desc *wrtd = (struct wrtd_desc *)dev; struct wrtd_desc *wrtd = (struct wrtd_desc *)dev;
struct wrnc_msg_filter filter = { struct trtl_msg_filter filter = {
.operation = WRNC_MSG_FILTER_EQ, .operation = TRTL_MSG_FILTER_EQ,
.word_offset = 3, /* channel field */ .word_offset = 3, /* channel field */
.mask = 0xFFFF, /* entire field */ .mask = 0xFFFF, /* entire field */
.value = channel, /* required channel */ .value = channel, /* required channel */
}; };
struct wrnc_hmq *hmq = NULL; struct trtl_hmq *hmq = NULL;
int err; int err;
int n_chan = core ? FD_NUM_CHANNELS : TDC_NUM_CHANNELS; int n_chan = core ? FD_NUM_CHANNELS : TDC_NUM_CHANNELS;
unsigned int hmq_back_index = core ? WRTD_OUT_FD_LOGGING : unsigned int hmq_back_index = core ? WRTD_OUT_FD_LOGGING :
...@@ -125,7 +125,7 @@ static struct wrnc_hmq *wrtd_log_open(struct wrtd_node *dev, ...@@ -125,7 +125,7 @@ static struct wrnc_hmq *wrtd_log_open(struct wrtd_node *dev,
return NULL; return NULL;
} }
hmq = wrnc_hmq_open(wrtd->wrnc, hmq_back_index, 0); hmq = trtl_hmq_open(wrtd->trtl, hmq_back_index, 0);
if (!hmq) if (!hmq)
return NULL; return NULL;
...@@ -135,7 +135,7 @@ static struct wrnc_hmq *wrtd_log_open(struct wrtd_node *dev, ...@@ -135,7 +135,7 @@ static struct wrnc_hmq *wrtd_log_open(struct wrtd_node *dev,
filter.word_offset = 6; filter.word_offset = 6;
} }
/* the user want to filter per channel */ /* the user want to filter per channel */
err = wrnc_hmq_filter_add(hmq, &filter); err = trtl_hmq_filter_add(hmq, &filter);
if (err) if (err)
goto out_close; goto out_close;
} }
...@@ -143,7 +143,7 @@ static struct wrnc_hmq *wrtd_log_open(struct wrtd_node *dev, ...@@ -143,7 +143,7 @@ static struct wrnc_hmq *wrtd_log_open(struct wrtd_node *dev,
return hmq; return hmq;
out_close: out_close:
wrnc_hmq_close(hmq); trtl_hmq_close(hmq);
return NULL; return NULL;
} }
...@@ -158,12 +158,12 @@ out_close: ...@@ -158,12 +158,12 @@ out_close:
* @return number of read messages on success (check errno if it returns less * @return number of read messages on success (check errno if it returns less
* messages than expected), -1 on error and errno is set appropriately * messages than expected), -1 on error and errno is set appropriately
*/ */
int wrtd_log_read(struct wrnc_hmq *hmq_log, struct wrtd_log_entry *log, int wrtd_log_read(struct trtl_hmq *hmq_log, struct wrtd_log_entry *log,
int count, int poll_timeout) int count, int poll_timeout)
{ {
struct wrnc_proto_header hdr; struct trtl_proto_header hdr;
struct wrtd_log_entry *cur = log; struct wrtd_log_entry *cur = log;
struct wrnc_msg *msg; struct trtl_msg *msg;
struct pollfd p; struct pollfd p;
int remaining = count; int remaining = count;
int n_read = 0, ret; int n_read = 0, ret;
...@@ -182,13 +182,13 @@ int wrtd_log_read(struct wrnc_hmq *hmq_log, struct wrtd_log_entry *log, ...@@ -182,13 +182,13 @@ int wrtd_log_read(struct wrnc_hmq *hmq_log, struct wrtd_log_entry *log,
if (ret <= 0 || !(p.revents & POLLIN)) if (ret <= 0 || !(p.revents & POLLIN))
break; break;
msg = wrnc_hmq_receive(hmq_log); msg = trtl_hmq_receive(hmq_log);
if (!msg) if (!msg)
break; break;
if (hmq_log->index == WRTD_OUT_FD_LOGGING) { if (hmq_log->index == WRTD_OUT_FD_LOGGING) {
/* Output */ /* Output */
wrnc_msg_header (msg, &id, &seq); trtl_msg_header (msg, &id, &seq);
if (id != WRTD_REP_LOG_MESSAGE) if (id != WRTD_REP_LOG_MESSAGE)
{ {
...@@ -197,23 +197,23 @@ int wrtd_log_read(struct wrnc_hmq *hmq_log, struct wrtd_log_entry *log, ...@@ -197,23 +197,23 @@ int wrtd_log_read(struct wrnc_hmq *hmq_log, struct wrtd_log_entry *log,
break; break;
} }
wrnc_msg_uint32 (msg, &cur->type); trtl_msg_uint32 (msg, &cur->type);
wrnc_msg_int32 (msg, &cur->channel); trtl_msg_int32 (msg, &cur->channel);
wrnc_msg_uint32 (msg, &cur->miss_reason); trtl_msg_uint32 (msg, &cur->miss_reason);
wrtd_msg_trigger_entry(msg, &ent); wrtd_msg_trigger_entry(msg, &ent);
cur->ts = ent.ts; cur->ts = ent.ts;
cur->seq = ent.seq; cur->seq = ent.seq;
cur->id = ent.id; cur->id = ent.id;
if ( wrnc_msg_check_error(msg) ) { if ( trtl_msg_check_error(msg) ) {
free(msg); free(msg);
errno = EWRTD_INVALID_ANSWER_STATE; errno = EWRTD_INVALID_ANSWER_STATE;
break; break;
} }
} else { } else {
/* Input */ /* Input */
wrnc_message_unpack(msg, &hdr, cur); trtl_message_unpack(msg, &hdr, cur);
if (hdr.msg_id != WRTD_IN_ACTION_LOG) { if (hdr.msg_id != WRTD_IN_ACTION_LOG) {
free(msg); free(msg);
errno = EWRTD_INVALID_ANSWER_STATE; errno = EWRTD_INVALID_ANSWER_STATE;
...@@ -235,9 +235,9 @@ int wrtd_log_read(struct wrnc_hmq *hmq_log, struct wrtd_log_entry *log, ...@@ -235,9 +235,9 @@ int wrtd_log_read(struct wrnc_hmq *hmq_log, struct wrtd_log_entry *log,
* It closes the logging interface * It closes the logging interface
* @param[in] hmq HMQ token to close * @param[in] hmq HMQ token to close
*/ */
void wrtd_log_close(struct wrnc_hmq *hmq) void wrtd_log_close(struct trtl_hmq *hmq)
{ {
wrnc_hmq_close(hmq); trtl_hmq_close(hmq);
} }
...@@ -251,13 +251,13 @@ static int wrtd_log_level_set(struct wrtd_node *dev, unsigned int channel, ...@@ -251,13 +251,13 @@ static int wrtd_log_level_set(struct wrtd_node *dev, unsigned int channel,
uint32_t log_level, enum wrtd_core core) uint32_t log_level, enum wrtd_core core)
{ {
struct wrtd_desc *wrtd = (struct wrtd_desc *)dev; struct wrtd_desc *wrtd = (struct wrtd_desc *)dev;
struct wrnc_structure_tlv tlv; struct trtl_structure_tlv tlv;
struct wrnc_proto_header hdr; struct trtl_proto_header hdr;
struct wrtd_out_channel ochan; struct wrtd_out_channel ochan;
struct wrtd_in_channel ichan; struct wrtd_in_channel ichan;
int err; int err;
hdr.flags = WRNC_PROTO_FLAG_SYNC; hdr.flags = TRTL_PROTO_FLAG_SYNC;
if (core) { if (core) {
if (channel >= FD_NUM_CHANNELS) { if (channel >= FD_NUM_CHANNELS) {
errno = EWRTD_INVALID_CHANNEL; errno = EWRTD_INVALID_CHANNEL;
...@@ -282,7 +282,7 @@ static int wrtd_log_level_set(struct wrtd_node *dev, unsigned int channel, ...@@ -282,7 +282,7 @@ static int wrtd_log_level_set(struct wrtd_node *dev, unsigned int channel,
(WRTD_OUT_TDC_CONTROL & 0xF); (WRTD_OUT_TDC_CONTROL & 0xF);
} }
err = wrnc_rt_structure_get(wrtd->wrnc, &hdr, &tlv, 1); err = trtl_rt_structure_get(wrtd->trtl, &hdr, &tlv, 1);
if (err) if (err)
return err; return err;
...@@ -291,7 +291,7 @@ static int wrtd_log_level_set(struct wrtd_node *dev, unsigned int channel, ...@@ -291,7 +291,7 @@ static int wrtd_log_level_set(struct wrtd_node *dev, unsigned int channel,
else else
ichan.config.log_level = log_level; ichan.config.log_level = log_level;
return wrnc_rt_structure_set(wrtd->wrnc, &hdr, &tlv, 1); return trtl_rt_structure_set(wrtd->trtl, &hdr, &tlv, 1);
} }
...@@ -304,7 +304,7 @@ static int wrtd_log_level_set(struct wrtd_node *dev, unsigned int channel, ...@@ -304,7 +304,7 @@ static int wrtd_log_level_set(struct wrtd_node *dev, unsigned int channel,
* specific one. * specific one.
* @return a HMQ token on success, NULL on error and errno is set appropriately * @return a HMQ token on success, NULL on error and errno is set appropriately
*/ */
struct wrnc_hmq *wrtd_out_log_open(struct wrtd_node *dev, int output) struct trtl_hmq *wrtd_out_log_open(struct wrtd_node *dev, int output)
{ {
return wrtd_log_open(dev, output, WRTD_CORE_OUT); return wrtd_log_open(dev, output, WRTD_CORE_OUT);
} }
...@@ -357,7 +357,7 @@ int wrtd_out_log_level_get(struct wrtd_node *dev, unsigned int input, ...@@ -357,7 +357,7 @@ int wrtd_out_log_level_get(struct wrtd_node *dev, unsigned int input,
* specific one. * specific one.
* @return a HMQ token on success, NULL on error and errno is set appropriately * @return a HMQ token on success, NULL on error and errno is set appropriately
*/ */
struct wrnc_hmq *wrtd_in_log_open(struct wrtd_node *dev, int input) struct trtl_hmq *wrtd_in_log_open(struct wrtd_node *dev, int input)
{ {
return wrtd_log_open(dev, input, WRTD_CORE_IN); return wrtd_log_open(dev, input, WRTD_CORE_IN);
} }
......
This diff is collapsed.
...@@ -163,7 +163,7 @@ extern void wrtd_exit(); ...@@ -163,7 +163,7 @@ extern void wrtd_exit();
extern struct wrtd_node *wrtd_open_by_fmc(uint32_t device_id); extern struct wrtd_node *wrtd_open_by_fmc(uint32_t device_id);
extern struct wrtd_node *wrtd_open_by_lun(int lun); extern struct wrtd_node *wrtd_open_by_lun(int lun);
extern void wrtd_close(struct wrtd_node *dev); extern void wrtd_close(struct wrtd_node *dev);
extern struct wrnc_dev *wrtd_get_wrnc_dev(struct wrtd_node *dev); extern struct trtl_dev *wrtd_get_trtl_dev(struct wrtd_node *dev);
extern int wrtd_load_application(struct wrtd_node *dev, char *rt_tdc, extern int wrtd_load_application(struct wrtd_node *dev, char *rt_tdc,
char *rt_fd); char *rt_fd);
extern int wrtd_white_rabbit_sync(struct wrtd_node *dev, extern int wrtd_white_rabbit_sync(struct wrtd_node *dev,
...@@ -197,10 +197,10 @@ extern void wrtd_sec_pico_to_ts(uint64_t sec, uint64_t pico, ...@@ -197,10 +197,10 @@ extern void wrtd_sec_pico_to_ts(uint64_t sec, uint64_t pico,
extern const char *wrtd_strlogging(enum wrtd_log_level lvl); extern const char *wrtd_strlogging(enum wrtd_log_level lvl);
enum wrtd_log_level wrtd_strlogging_to_level(char *log); enum wrtd_log_level wrtd_strlogging_to_level(char *log);
extern void wrtd_strlogging_full(char *buf, uint32_t log_level); extern void wrtd_strlogging_full(char *buf, uint32_t log_level);
extern int wrtd_log_read(struct wrnc_hmq *hmq_log, struct wrtd_log_entry *log, extern int wrtd_log_read(struct trtl_hmq *hmq_log, struct wrtd_log_entry *log,
int count, int poll_timeout); int count, int poll_timeout);
extern void wrtd_log_close(struct wrnc_hmq *hmq); extern void wrtd_log_close(struct trtl_hmq *hmq);
extern struct wrnc_hmq *wrtd_in_log_open(struct wrtd_node *dev, int input); extern struct trtl_hmq *wrtd_in_log_open(struct wrtd_node *dev, int input);
extern int wrtd_in_log_level_set(struct wrtd_node *dev, unsigned int input, extern int wrtd_in_log_level_set(struct wrtd_node *dev, unsigned int input,
uint32_t log_level); uint32_t log_level);
extern int wrtd_in_log_level_get(struct wrtd_node *dev, unsigned int input, extern int wrtd_in_log_level_get(struct wrtd_node *dev, unsigned int input,
...@@ -209,7 +209,7 @@ extern int wrtd_out_log_level_set(struct wrtd_node *dev, unsigned int output, ...@@ -209,7 +209,7 @@ extern int wrtd_out_log_level_set(struct wrtd_node *dev, unsigned int output,
uint32_t log_level); uint32_t log_level);
extern int wrtd_out_log_level_get(struct wrtd_node *dev, unsigned int input, extern int wrtd_out_log_level_get(struct wrtd_node *dev, unsigned int input,
uint32_t *log_level); uint32_t *log_level);
extern struct wrnc_hmq *wrtd_out_log_open(struct wrtd_node *dev, int output); extern struct trtl_hmq *wrtd_out_log_open(struct wrtd_node *dev, int output);
/**@}*/ /**@}*/
...@@ -251,7 +251,7 @@ extern int wrtd_in_has_trigger(struct wrtd_node *dev, unsigned int input, ...@@ -251,7 +251,7 @@ extern int wrtd_in_has_trigger(struct wrtd_node *dev, unsigned int input,
extern int wrtd_in_ping(struct wrtd_node *dev); extern int wrtd_in_ping(struct wrtd_node *dev);
extern int wrtd_in_base_time(struct wrtd_node *dev, struct wr_timestamp *ts); extern int wrtd_in_base_time(struct wrtd_node *dev, struct wr_timestamp *ts);
extern int wrtd_in_version(struct wrtd_node *dev, extern int wrtd_in_version(struct wrtd_node *dev,
struct wrnc_rt_version *version); struct trtl_rt_version *version);
extern int wrtd_in_dead_time_get(struct wrtd_node *dev, unsigned int input, extern int wrtd_in_dead_time_get(struct wrtd_node *dev, unsigned int input,
uint64_t *dead_time_ps); uint64_t *dead_time_ps);
extern int wrtd_in_delay_get(struct wrtd_node *dev, unsigned int input, extern int wrtd_in_delay_get(struct wrtd_node *dev, unsigned int input,
...@@ -304,7 +304,7 @@ extern int wrtd_out_trig_enable(struct wrtd_node *dev, ...@@ -304,7 +304,7 @@ extern int wrtd_out_trig_enable(struct wrtd_node *dev,
extern int wrtd_out_ping(struct wrtd_node *dev); extern int wrtd_out_ping(struct wrtd_node *dev);
extern int wrtd_out_base_time(struct wrtd_node *dev, struct wr_timestamp *ts); extern int wrtd_out_base_time(struct wrtd_node *dev, struct wr_timestamp *ts);
extern int wrtd_out_version(struct wrtd_node *dev, extern int wrtd_out_version(struct wrtd_node *dev,
struct wrnc_rt_version *version); struct trtl_rt_version *version);
extern int wrtd_out_trigger_mode_set(struct wrtd_node *dev, extern int wrtd_out_trigger_mode_set(struct wrtd_node *dev,
unsigned int output, unsigned int output,
enum wrtd_trigger_mode mode); enum wrtd_trigger_mode mode);
......
...@@ -195,7 +195,7 @@ static void ts_adjust_delay(struct wr_timestamp *ts, uint32_t cycles, uint32_t f ...@@ -195,7 +195,7 @@ static void ts_adjust_delay(struct wr_timestamp *ts, uint32_t cycles, uint32_t f
static void log_trigger(int type, int miss_reason, struct wrtd_out_channel *out, static void log_trigger(int type, int miss_reason, struct wrtd_out_channel *out,
struct wrtd_trigger_entry *ent) struct wrtd_trigger_entry *ent)
{ {
struct wrnc_proto_header hdr = { struct trtl_proto_header hdr = {
.rt_app_id = 0, .rt_app_id = 0,
.msg_id = WRTD_OUT_ACTION_LOG, .msg_id = WRTD_OUT_ACTION_LOG,
.slot_io = WRTD_OUT_FD_LOGGING, .slot_io = WRTD_OUT_FD_LOGGING,
...@@ -205,7 +205,7 @@ static void log_trigger(int type, int miss_reason, struct wrtd_out_channel *out, ...@@ -205,7 +205,7 @@ static void log_trigger(int type, int miss_reason, struct wrtd_out_channel *out,
.trans = 0x0, .trans = 0x0,
.time = 0x0, .time = 0x0,
}; };
struct wrnc_msg out_buf; struct trtl_msg out_buf;
struct wrtd_log_entry *log; struct wrtd_log_entry *log;
if (!out && (type != WRTD_LOG_PROMISC || !promiscuous_mode )) if (!out && (type != WRTD_LOG_PROMISC || !promiscuous_mode ))
...@@ -676,8 +676,8 @@ struct wrtd_trigger_sw { ...@@ -676,8 +676,8 @@ struct wrtd_trigger_sw {
* It generate a software trigger accorging to the trigger entry coming * It generate a software trigger accorging to the trigger entry coming
* from the user space. * from the user space.
*/ */
static int wrtd_out_trigger_sw(struct wrnc_proto_header *hin, void *pin, static int wrtd_out_trigger_sw(struct trtl_proto_header *hin, void *pin,
struct wrnc_proto_header *hout, void *pout) struct trtl_proto_header *hout, void *pout)
{ {
struct wrtd_trigger_sw *tsw = pin; struct wrtd_trigger_sw *tsw = pin;
struct pulse_queue_entry *pq_ent; struct pulse_queue_entry *pq_ent;
...@@ -735,8 +735,8 @@ static int wrtd_out_hash_table_free(struct wrtd_trig_id *tid) ...@@ -735,8 +735,8 @@ static int wrtd_out_hash_table_free(struct wrtd_trig_id *tid)
/** /**
* Insert trigger entry in the hash table * Insert trigger entry in the hash table
*/ */
static int wrtd_out_hash_table_insert(struct wrnc_proto_header *hin, void *pin, static int wrtd_out_hash_table_insert(struct trtl_proto_header *hin, void *pin,
struct wrnc_proto_header *hout, void *pout) struct trtl_proto_header *hout, void *pout)
{ {
uint32_t tidx = *(uint32_t *)pin; uint32_t tidx = *(uint32_t *)pin;
int hidx; int hidx;
...@@ -768,8 +768,8 @@ out: ...@@ -768,8 +768,8 @@ out:
/** /**
* Remove trigger entry from the hash table * Remove trigger entry from the hash table
*/ */
static int wrtd_out_hash_table_remove(struct wrnc_proto_header *hin, void *pin, static int wrtd_out_hash_table_remove(struct trtl_proto_header *hin, void *pin,
struct wrnc_proto_header *hout, void *pout) struct trtl_proto_header *hout, void *pout)
{ {
uint32_t tidx = *(uint32_t *)pin; uint32_t tidx = *(uint32_t *)pin;
int hidx; int hidx;
...@@ -798,8 +798,8 @@ static int wrtd_out_hash_table_remove(struct wrnc_proto_header *hin, void *pin, ...@@ -798,8 +798,8 @@ static int wrtd_out_hash_table_remove(struct wrnc_proto_header *hin, void *pin,
/** /**
* It gets the trigger index for a given trigger ID * It gets the trigger index for a given trigger ID
*/ */
static int wrtd_out_trigger_index(struct wrnc_proto_header *hin, void *pin, static int wrtd_out_trigger_index(struct trtl_proto_header *hin, void *pin,
struct wrnc_proto_header *hout, void *pout) struct trtl_proto_header *hout, void *pout)
{ {
struct wrtd_trig_id *id = pin; struct wrtd_trig_id *id = pin;
uint32_t *index = pout; uint32_t *index = pout;
...@@ -844,8 +844,8 @@ err: ...@@ -844,8 +844,8 @@ err:
/** /**
* It disable the given channel and clear its internal queue * It disable the given channel and clear its internal queue
*/ */
static int wrtd_out_disable(struct wrnc_proto_header *hin, void *pin, static int wrtd_out_disable(struct trtl_proto_header *hin, void *pin,
struct wrnc_proto_header *hout, void *pout) struct trtl_proto_header *hout, void *pout)
{ {
uint32_t ch = *((uint32_t *)pin); uint32_t ch = *((uint32_t *)pin);
......
...@@ -77,9 +77,9 @@ static int wrtd_in_trigger_log(int type, int miss_reason, ...@@ -77,9 +77,9 @@ static int wrtd_in_trigger_log(int type, int miss_reason,
struct wrtd_in_channel *st, struct wrtd_in_channel *st,
struct wrtd_trigger_entry *ent) struct wrtd_trigger_entry *ent)
{ {
struct wrnc_msg out_buf; struct trtl_msg out_buf;
struct wrtd_log_entry *log; struct wrtd_log_entry *log;
struct wrnc_proto_header hdr = { struct trtl_proto_header hdr = {
.rt_app_id = 0, .rt_app_id = 0,
.msg_id = WRTD_IN_ACTION_LOG, .msg_id = WRTD_IN_ACTION_LOG,
.slot_io = WRTD_OUT_TDC_LOGGING, .slot_io = WRTD_OUT_TDC_LOGGING,
...@@ -257,8 +257,8 @@ static inline void do_input(void) ...@@ -257,8 +257,8 @@ static inline void do_input(void)
* delay, then this function will add it to the current time to compute * delay, then this function will add it to the current time to compute
* the correct fire time. * the correct fire time.
*/ */
static int wrtd_in_trigger_sw(struct wrnc_proto_header *hin, void *pin, static int wrtd_in_trigger_sw(struct trtl_proto_header *hin, void *pin,
struct wrnc_proto_header *hout, void *pout) struct trtl_proto_header *hout, void *pout)
{ {
struct wrtd_trigger_entry ent; struct wrtd_trigger_entry ent;
struct wr_timestamp ts; struct wr_timestamp ts;
......
...@@ -125,7 +125,7 @@ int main(int argc, char *argv[]) ...@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
uint32_t dev_id = 0; uint32_t dev_id = 0;
char *tdc = NULL, *fd =NULL, c; char *tdc = NULL, *fd =NULL, c;
struct wrtd_node *wrtd; struct wrtd_node *wrtd;
struct wrnc_dev *wrnc; struct trtl_dev *trtl;
int32_t offset; int32_t offset;
atexit(wrtd_exit); atexit(wrtd_exit);
...@@ -157,14 +157,14 @@ int main(int argc, char *argv[]) ...@@ -157,14 +157,14 @@ int main(int argc, char *argv[])
} }
if (!dev_id) { if (!dev_id) {
fprintf(stderr, "Invalid wrnc device\n"); fprintf(stderr, "Invalid trtl device\n");
exit(1); exit(1);
} }
err = wrtd_init(); err = wrtd_init();
if (err) { if (err) {
fprintf(stderr, "Cannot init White Rabbit Trigger Distribution lib: %s\n", fprintf(stderr, "Cannot init White Rabbit Trigger Distribution lib: %s\n",
wrnc_strerror(errno)); trtl_strerror(errno));
exit(1); exit(1);
} }
...@@ -185,15 +185,15 @@ int main(int argc, char *argv[]) ...@@ -185,15 +185,15 @@ int main(int argc, char *argv[])
} }
/* Get the WRNC token */ /* Get the WRNC token */
wrnc = wrtd_get_wrnc_dev(wrtd); trtl = wrtd_get_trtl_dev(wrtd);
fprintf(stdout, "Reboot applications\n"); fprintf(stdout, "Reboot applications\n");
/* Start running application on TDC and FD CPUs */ /* Start running application on TDC and FD CPUs */
err = wrnc_cpu_start(wrnc, 0); err = trtl_cpu_start(trtl, 0);
if (err) if (err)
exit(1); exit(1);
err = wrnc_cpu_start(wrnc, 1); err = trtl_cpu_start(trtl, 1);
if (err) if (err)
exit(1); exit(1);
......
...@@ -340,7 +340,7 @@ int main(int argc, char *argv[]) ...@@ -340,7 +340,7 @@ int main(int argc, char *argv[])
err = wrtd_init(); err = wrtd_init();
if (err) { if (err) {
fprintf(stderr, "Cannot init White Rabbit Trigger Distribution lib: %s\n", fprintf(stderr, "Cannot init White Rabbit Trigger Distribution lib: %s\n",
wrnc_strerror(errno)); trtl_strerror(errno));
exit(1); exit(1);
} }
......
...@@ -42,7 +42,7 @@ static void help() ...@@ -42,7 +42,7 @@ static void help()
static void *logging_thread(void *arg) static void *logging_thread(void *arg)
{ {
struct wrtd_log_th *th_data = arg; struct wrtd_log_th *th_data = arg;
struct wrnc_hmq *hlog; struct trtl_hmq *hlog;
struct wrtd_log_entry log; struct wrtd_log_entry log;
int i, count; int i, count;
...@@ -168,7 +168,7 @@ int main(int argc, char *argv[]) ...@@ -168,7 +168,7 @@ int main(int argc, char *argv[])
err = wrtd_init(); err = wrtd_init();
if (err) { if (err) {
fprintf(stderr, "Cannot init White Rabbit Node Core lib: %s\n", fprintf(stderr, "Cannot init White Rabbit Node Core lib: %s\n",
wrnc_strerror(errno)); trtl_strerror(errno));
exit(1); exit(1);
} }
......
...@@ -606,7 +606,7 @@ int main(int argc, char *argv[]) ...@@ -606,7 +606,7 @@ int main(int argc, char *argv[])
err = wrtd_init(); err = wrtd_init();
if (err) { if (err) {
fprintf(stderr, "Cannot init White Rabbit Node Core lib: %s\n", fprintf(stderr, "Cannot init White Rabbit Node Core lib: %s\n",
wrnc_strerror(errno)); trtl_strerror(errno));
exit(1); exit(1);
} }
......
...@@ -31,7 +31,7 @@ static void print_time(struct wr_timestamp *t) ...@@ -31,7 +31,7 @@ static void print_time(struct wr_timestamp *t)
t->seconds, t->ticks, t->frac); t->seconds, t->ticks, t->frac);
} }
static void print_version(struct wrnc_rt_version *v) static void print_version(struct trtl_rt_version *v)
{ {
fprintf(stdout, "\tRealTime Application Version:"); fprintf(stdout, "\tRealTime Application Version:");
fprintf(stdout, "\tfpga_id\t\t%x\n", fprintf(stdout, "\tfpga_id\t\t%x\n",
...@@ -49,7 +49,7 @@ int main(int argc, char *argv[]) ...@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
{ {
struct wrtd_node *wrtd; struct wrtd_node *wrtd;
uint32_t dev_id = 0, n = 1; uint32_t dev_id = 0, n = 1;
struct wrnc_rt_version vi, vo; struct trtl_rt_version vi, vo;
uint64_t period = 0; uint64_t period = 0;
struct wr_timestamp tsi, tso; struct wr_timestamp tsi, tso;
int err, time = 0, version = 0; int err, time = 0, version = 0;
......
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