2015-04-05 22:04:50 +08:00
|
|
|
#ifndef __MESSAGES_H
|
|
|
|
#define __MESSAGES_H
|
|
|
|
|
2015-04-06 19:40:12 +08:00
|
|
|
#include <stdarg.h>
|
2015-08-02 11:41:05 +08:00
|
|
|
#include <stddef.h>
|
2015-04-06 19:40:12 +08:00
|
|
|
|
2015-04-05 22:04:50 +08:00
|
|
|
enum {
|
2015-08-02 11:41:05 +08:00
|
|
|
MESSAGE_TYPE_LOAD_REPLY,
|
2015-05-02 23:41:49 +08:00
|
|
|
MESSAGE_TYPE_NOW_INIT_REQUEST,
|
|
|
|
MESSAGE_TYPE_NOW_INIT_REPLY,
|
|
|
|
MESSAGE_TYPE_NOW_SAVE,
|
2015-04-05 22:04:50 +08:00
|
|
|
MESSAGE_TYPE_FINISHED,
|
2015-04-06 19:40:12 +08:00
|
|
|
MESSAGE_TYPE_EXCEPTION,
|
2015-04-29 12:58:37 +08:00
|
|
|
MESSAGE_TYPE_WATCHDOG_SET_REQUEST,
|
|
|
|
MESSAGE_TYPE_WATCHDOG_SET_REPLY,
|
|
|
|
MESSAGE_TYPE_WATCHDOG_CLEAR,
|
2015-08-09 07:25:58 +08:00
|
|
|
MESSAGE_TYPE_RPC_SEND,
|
2015-08-09 07:17:19 +08:00
|
|
|
MESSAGE_TYPE_RPC_RECV_REQUEST,
|
|
|
|
MESSAGE_TYPE_RPC_RECV_REPLY,
|
2015-04-16 21:47:05 +08:00
|
|
|
MESSAGE_TYPE_LOG,
|
2015-04-05 22:04:50 +08:00
|
|
|
|
2015-04-16 21:47:05 +08:00
|
|
|
MESSAGE_TYPE_BRG_READY,
|
2015-05-02 12:16:09 +08:00
|
|
|
MESSAGE_TYPE_BRG_TTL_O,
|
|
|
|
MESSAGE_TYPE_BRG_TTL_OE,
|
2015-05-09 17:11:34 +08:00
|
|
|
MESSAGE_TYPE_BRG_DDS_INITALL,
|
2015-04-16 21:47:05 +08:00
|
|
|
MESSAGE_TYPE_BRG_DDS_SEL,
|
|
|
|
MESSAGE_TYPE_BRG_DDS_RESET,
|
|
|
|
MESSAGE_TYPE_BRG_DDS_READ_REQUEST,
|
|
|
|
MESSAGE_TYPE_BRG_DDS_READ_REPLY,
|
|
|
|
MESSAGE_TYPE_BRG_DDS_WRITE,
|
|
|
|
MESSAGE_TYPE_BRG_DDS_FUD,
|
2015-04-05 22:04:50 +08:00
|
|
|
};
|
|
|
|
|
2015-04-16 21:47:05 +08:00
|
|
|
struct msg_base {
|
2015-04-05 22:04:50 +08:00
|
|
|
int type;
|
|
|
|
};
|
|
|
|
|
2015-04-16 21:47:05 +08:00
|
|
|
/* kernel messages */
|
|
|
|
|
2015-08-02 11:41:05 +08:00
|
|
|
struct msg_load_request {
|
2015-08-08 21:01:08 +08:00
|
|
|
const void *library;
|
2015-08-02 11:41:05 +08:00
|
|
|
struct dyld_info *library_info;
|
2015-08-07 13:49:57 +08:00
|
|
|
int run_kernel;
|
2015-08-02 11:41:05 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_load_reply {
|
|
|
|
int type;
|
|
|
|
const char *error;
|
|
|
|
};
|
|
|
|
|
2015-05-02 23:41:49 +08:00
|
|
|
struct msg_now_init_reply {
|
|
|
|
int type;
|
|
|
|
long long int now;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_now_save {
|
|
|
|
int type;
|
|
|
|
long long int now;
|
|
|
|
};
|
|
|
|
|
2015-04-05 22:04:50 +08:00
|
|
|
struct msg_exception {
|
|
|
|
int type;
|
2015-08-02 11:41:05 +08:00
|
|
|
struct artiq_exception *exception;
|
|
|
|
struct artiq_backtrace_item *backtrace;
|
|
|
|
size_t backtrace_size;
|
2015-04-05 22:04:50 +08:00
|
|
|
};
|
|
|
|
|
2015-04-29 12:58:37 +08:00
|
|
|
struct msg_watchdog_set_request {
|
|
|
|
int type;
|
|
|
|
int ms;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_watchdog_set_reply {
|
|
|
|
int type;
|
|
|
|
int id;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_watchdog_clear {
|
|
|
|
int type;
|
|
|
|
int id;
|
|
|
|
};
|
|
|
|
|
2015-08-09 07:25:58 +08:00
|
|
|
struct msg_rpc_send {
|
2015-04-06 19:40:12 +08:00
|
|
|
int type;
|
2015-08-09 07:17:19 +08:00
|
|
|
int service;
|
|
|
|
const char *tag;
|
2015-04-06 19:40:12 +08:00
|
|
|
va_list args;
|
|
|
|
};
|
|
|
|
|
2015-08-09 07:17:19 +08:00
|
|
|
struct msg_rpc_recv_request {
|
2015-08-08 21:01:08 +08:00
|
|
|
int type;
|
2015-08-10 01:17:00 +08:00
|
|
|
void *slot;
|
2015-08-09 07:17:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_rpc_recv_reply {
|
|
|
|
int type;
|
2015-08-09 21:16:41 +08:00
|
|
|
int alloc_size;
|
2015-08-02 11:41:05 +08:00
|
|
|
struct artiq_exception *exception;
|
2015-04-06 19:40:12 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_log {
|
|
|
|
int type;
|
|
|
|
const char *fmt;
|
2015-08-02 11:33:12 +08:00
|
|
|
int no_newline;
|
2015-04-06 19:40:12 +08:00
|
|
|
va_list args;
|
|
|
|
};
|
|
|
|
|
2015-04-16 21:47:05 +08:00
|
|
|
/* bridge messages */
|
|
|
|
|
|
|
|
struct msg_brg_ttl_out {
|
2015-05-02 12:16:09 +08:00
|
|
|
/* used for OE and O */
|
2015-04-16 21:47:05 +08:00
|
|
|
int type;
|
|
|
|
int channel;
|
|
|
|
int value;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_brg_dds_sel {
|
|
|
|
int type;
|
|
|
|
int channel;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_brg_dds_read_request {
|
|
|
|
int type;
|
|
|
|
unsigned int address;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_brg_dds_read_reply {
|
|
|
|
int type;
|
|
|
|
unsigned int data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_brg_dds_write {
|
|
|
|
int type;
|
|
|
|
unsigned int address;
|
|
|
|
unsigned int data;
|
|
|
|
};
|
|
|
|
|
2015-04-05 22:04:50 +08:00
|
|
|
#endif /* __MESSAGES_H */
|