Contiki 3.x
protobuf-handler.h
1 #define PROTBUF_OPCODE_ECHO 0x00
2 #define PROTBUF_OPCODE_LIST 0x01
3 #define PROTBUF_OPCODE_GET_DATA 0x02
4 #define PROTBUF_OPCODE_SET_GAIN 0x03
5 #define PROTBUF_OPCODE_RESPONSE 0xFF
6 
7 #define PROTBUF_MASTER_ADDR 0x00
8 
9 #define PROTBUF_MAX_MESSAGE_LENGTH 128
10 #define PROTOBUF_RETRIES 3
11 
12 void protobuf_process_message(uint8_t *buf, uint8_t bytes);
13 void protobuf_send_message(uint8_t addr, uint8_t opcode, uint8_t *payload, int8_t payload_length);
14 
15 void protobuf_handler_set_writeb(void (*wb)(unsigned char c));
16 
17 void protobuf_register_process_callback(struct process *p, process_event_t ev);
18 
19 void protobuf_init(void);
20 
21 
22 typedef struct{
23  uint8_t length;
24  uint8_t *data;
25 }protobuf_data_t;
26 
static uip_ds6_addr_t * addr
Pointer to a router list entry.
Definition: uip-nd6.c:124