53 #define PDSERV_VERSION(major,minor,patchlevel) \ 54 (((major) << 16) + ((minor) << 8) + (patchlevel)) 55 #define PDSERV_VERSION_CODE \ 57 #define PDSERV_VERSION_MAJOR 3 58 #define PDSERV_VERSION_MINOR 2 59 #define PDSERV_VERSION_PATCH 3 74 #define HAS_VERSION_CODE 155 #define pd_double_T 1 156 #define pd_single_T 2 159 #define pd_uint16_T 5 160 #define pd_sint16_T 6 161 #define pd_uint32_T 7 162 #define pd_sint32_T 8 163 #define pd_uint64_T 9 164 #define pd_sint64_T 10 165 #define pd_boolean_T 11 166 #define pd_schar_T 12 168 #define pd_uchar_T 14 169 #define pd_short_T 15 170 #define pd_ushort_T 16 174 #define pd_ulong_T 20 175 #define pd_longlong_T 21 176 #define pd_ulonglong_T 22 177 #define pd_ssize_T 23 180 #define pd_datatype_end 25 228 struct pdserv* pdserv,
243 struct pdserv* pdserv,
244 void (*fn)(
int lock,
void* priv_data),
258 struct pdserv* pdserv,
274 struct pdtask* pdtask,
275 void (*fn)(
int lock,
void* priv_data),
333 struct pdtask* pdtask,
334 unsigned int decimation,
352 typedef int (*read_signal_t)(
const struct pdvariable *signal,
void *dst,
353 const void *src,
size_t len,
struct timespec* time,
void *priv_data);
355 void pdserv_signal_set_read_cb(
struct pdvariable* signal,
356 read_signal_t read_signal_cb,
void* priv_data
357 ) __attribute__((deprecated(
"use pdserv_signal() instead")));
359 struct pdvariable *pdserv_signal_cb(
struct pdtask* pdtask,
360 unsigned int decimation,
const char *path,
int datatype,
361 const void *addr,
size_t n,
const size_t *dim,
362 read_signal_t read_signal_cb,
void* priv_data
363 ) __attribute__((deprecated(
"use pdserv_signal() instead")));;
394 #define RESET_EVENT 0 395 #define EMERG_EVENT 1 396 #define ALERT_EVENT 2 398 #define ERROR_EVENT 4 400 #define NOTICE_EVENT 6 402 #define DEBUG_EVENT 8 412 struct pdserv* pdserv,
420 struct pdevent* event,
421 const char *
const *text
435 const struct pdevent *event,
447 const struct timespec *t
456 const struct pdevent *event,
458 const struct timespec *t
475 const struct pdevent *event,
476 const unsigned int * level,
490 const struct timespec *t
519 const struct pdvariable *param,
523 struct timespec* time,
542 struct pdserv* pdserv,
568 struct pdvariable *variable,
574 struct pdvariable *variable,
580 struct pdvariable *variable,
596 struct pdserv* pdserv
605 struct pdtask* pdtask,
617 struct pdtask* pdtask,
618 const struct timespec *t
int(* gettime_t)(struct timespec *)
Definition: pdserv.h:195
void pdserv_update_statistics(struct pdtask *pdtask, double exec_time, double cycle_time, unsigned int overrun)
struct pdvariable * pdserv_parameter(struct pdserv *pdserv, const char *path, unsigned int mode, int datatype, void *addr, size_t n, const size_t *dim, write_parameter_t write_cb, void *priv_data)
struct pdtask * pdserv_create_task(struct pdserv *pdserv, double tsample, const char *name)
const char *const pdserv_version_str
String of pdserv version code "major.minor.patch".
void pdserv_event_reset(const struct pdevent *event, size_t element, const struct timespec *t)
void pdserv_exit(struct pdserv *)
int pdserv_prepare(struct pdserv *pdserv)
void pdserv_update(struct pdtask *pdtask, const struct timespec *t)
void pdserv_compound_add_field(int compound, const char *name, int data_type, size_t offset, size_t ndim, const size_t *dim)
void pdserv_set_unit(struct pdvariable *variable, const char *unit)
void pdserv_set_alias(struct pdvariable *variable, const char *alias)
void pdserv_set_comment(struct pdvariable *variable, const char *comment)
const char *const pdserv_full_version
Full String of pdserv version, generated by git describe.
struct pdvariable * pdserv_signal(struct pdtask *pdtask, unsigned int decimation, const char *path, int datatype, const void *addr, size_t n, const size_t *dim)
void pdserv_event_set_all(const struct pdevent *event, const unsigned int *level, const struct timespec *t)
void pdserv_set_signal_readlock_cb(struct pdtask *pdtask, void(*fn)(int lock, void *priv_data), void *priv_data)
int pdserv_create_compound(const char *name, size_t size)
int(* write_parameter_t)(const struct pdvariable *param, void *dst, const void *src, size_t len, struct timespec *time, void *priv_data)
Definition: pdserv.h:518
void pdserv_event_set_text(struct pdevent *event, const char *const *text)
void pdserv_config_file(struct pdserv *pdserv, const char *file)
void pdserv_set_parameter_writelock_cb(struct pdserv *pdserv, void(*fn)(int lock, void *priv_data), void *priv_data)
struct pdevent * pdserv_event(struct pdserv *pdserv, const char *path, size_t n)
void pdserv_event_set(const struct pdevent *event, size_t element, int priority, const struct timespec *t)
struct pdserv * pdserv_create(const char *name, const char *version, gettime_t gettime_cb)