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 1 59 #define PDSERV_VERSION_PATCH 1 71 #define HAS_VERSION_CODE 151 #define pd_double_T 1 152 #define pd_single_T 2 155 #define pd_uint16_T 5 156 #define pd_sint16_T 6 157 #define pd_uint32_T 7 158 #define pd_sint32_T 8 159 #define pd_uint64_T 9 160 #define pd_sint64_T 10 161 #define pd_boolean_T 11 162 #define pd_schar_T 12 164 #define pd_uchar_T 14 165 #define pd_short_T 15 166 #define pd_ushort_T 16 170 #define pd_ulong_T 20 171 #define pd_longlong_T 21 172 #define pd_ulonglong_T 22 173 #define pd_ssize_T 23 176 #define pd_datatype_end 25 224 struct pdserv* pdserv,
239 struct pdserv* pdserv,
240 void (*fn)(
int lock,
void* priv_data),
254 struct pdserv* pdserv,
270 struct pdtask* pdtask,
271 void (*fn)(
int lock,
void* priv_data),
329 struct pdtask* pdtask,
330 unsigned int decimation,
348 typedef int (*read_signal_t)(
const struct pdvariable *signal,
void *dst,
349 const void *src,
size_t len,
struct timespec* time,
void *priv_data);
351 void pdserv_signal_set_read_cb(
struct pdvariable* signal,
352 read_signal_t read_signal_cb,
void* priv_data
353 ) __attribute__((deprecated(
"use pdserv_signal() instead")));
355 struct pdvariable *pdserv_signal_cb(
struct pdtask* pdtask,
356 unsigned int decimation,
const char *path,
int datatype,
357 const void *addr,
size_t n,
const size_t *dim,
358 read_signal_t read_signal_cb,
void* priv_data
359 ) __attribute__((deprecated(
"use pdserv_signal() instead")));;
390 #define RESET_EVENT 0 391 #define EMERG_EVENT 1 392 #define ALERT_EVENT 2 394 #define ERROR_EVENT 4 396 #define NOTICE_EVENT 6 398 #define DEBUG_EVENT 8 408 struct pdserv* pdserv,
416 struct pdevent* event,
417 const char *
const *text
431 const struct pdevent *event,
443 const struct timespec *t
452 const struct pdevent *event,
454 const struct timespec *t
471 const struct pdevent *event,
472 const unsigned int * level,
486 const struct timespec *t
515 const struct pdvariable *param,
519 struct timespec* time,
538 struct pdserv* pdserv,
564 struct pdvariable *variable,
570 struct pdvariable *variable,
576 struct pdvariable *variable,
592 struct pdserv* pdserv
601 struct pdtask* pdtask,
613 struct pdtask* pdtask,
614 const struct timespec *t
int(* gettime_t)(struct timespec *)
Definition: pdserv.h:191
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 * 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)
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:514
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)