16 static const uint8_t ipAddr_ipsoRD[] = {0x26, 0x07, 0xf7, 0x40, 0x00, 0x00, 0x00, 0x3f, \
17 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x29};
18 static const uint8_t ipAddr_motesEecs[] = {0x20, 0x01, 0x04, 0x70, 0x00, 0x66, 0x00, 0x19, \
19 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02};
20 static const uint8_t ipAddr_local[] = {0x26, 0x07, 0xf1, 0x40, 0x04, 0x00, 0x10, 0x36, \
21 0x4d, 0xcd, 0xab, 0x54, 0x81, 0x99, 0xc1, 0xf7};
23 static const uint8_t ipAddr_motedata[] = {0x20, 0x01, 0x04, 0x70, 0x00, 0x66, 0x00, 0x17, \
24 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02};
27 #define MAX_COAP_OPTIONS 10 //3 before but we want gets with more options
30 #define COAP_MAX_TKL 8
32 #define COAP_PAYLOAD_MARKER 0xFF
34 #define COAP_VERSION 1
owerror_t opencoap_send(OpenQueueEntry_t *msg, coap_type_t type, coap_code_t code, uint8_t TKL, coap_resource_desc_t *descSender)
Send a CoAP request.
Definition: opencoap.c:413
callbackRx_cbt callbackRx
Definition: opencoap.h:136
uint8_t path0len
Definition: opencoap.h:129
Definition: opencoap.h:46
Definition: opencoap.h:69
Definition: opencoap.h:72
Definition: opencoap.h:37
Definition: opencoap.h:53
Definition: opencoap.h:99
Definition: opencoap.h:49
owerror_t(* callbackRx_cbt)(OpenQueueEntry_t *msg, coap_header_iht *coap_header, coap_option_iht *coap_options)
Definition: opencoap.h:120
Definition: opencoap.h:100
coap_resource_desc_t * next
Definition: opencoap.h:138
uint8_t token
Definition: opencoap.h:135
Definition: opencoap.h:85
Definition: opencoap.h:143
Definition: opencoap.h:78
Definition: opencoap.h:114
Definition: opencoap.h:128
void(* callbackSendDone_cbt)(OpenQueueEntry_t *msg, owerror_t error)
Definition: opencoap.h:123
Definition: opencoap.h:95
Definition: opencoap.h:65
Definition: opencoap.h:86
Definition: opencoap.h:54
uint8_t owerror_t
Definition: openwsn.h:265
callbackSendDone_cbt callbackSendDone
Definition: opencoap.h:137
uint8_t * path0val
Definition: opencoap.h:130
Definition: opencoap.h:80
void opencoap_register(coap_resource_desc_t *desc)
Register a new CoAP resource.
Definition: opencoap.c:373
void opencoap_receive(OpenQueueEntry_t *msg)
Indicate a CoAP messages was received.
Definition: opencoap.c:47
Definition: opencoap.h:40
Definition: opencoap.h:56
Definition: opencoap.h:88
void opencoap_writeLinks(OpenQueueEntry_t *msg)
Writes the links to all the resources on this mote into the message.
Definition: opencoap.c:321
bool busySending
Definition: opencoap.h:145
Definition: opencoap.h:98
Definition: opencoap.h:81
coap_option_t
Definition: opencoap.h:76
coap_type_t
Definition: opencoap.h:36
Definition: opencoap.h:97
Definition: opencoap.h:60
uint8_t * path1val
Definition: opencoap.h:132
Definition: opencoap.h:66
Definition: opencoap.h:71
Definition: opencoap.h:64
Definition: opencoap.h:55
uint8_t length
Definition: opencoap.h:116
uint8_t delayCounter
Definition: opencoap.h:146
Definition: opencoap.h:96
coap_media_type_t
Definition: opencoap.h:94
void opencoap_sendDone(OpenQueueEntry_t *msg, owerror_t error)
Indicates that the CoAP response has been sent.
Definition: opencoap.c:277
Definition: opencoap.h:58
Definition: opencoap.h:61
Definition: opencoap.h:47
Definition: opencoap.h:84
Definition: opencoap.h:90
Definition: opencoap.h:59
Definition: opencoap.h:91
void opencoap_init()
Initialize this module.
Definition: opencoap.c:29
Definition: opencoap.h:82
Definition: opencoap.h:77
coap_resource_desc_t * resources
Definition: opencoap.h:144
uint16_t messageID
Definition: opencoap.h:147
Definition: opencoap.h:52
Definition: opencoap.h:63
uint16_t messageID
Definition: opencoap.h:134
Definition: opencoap.h:62
uint8_t componentID
Definition: opencoap.h:133
Definition: opencoap.h:89
Definition: openwsn.h:288
Definition: opencoap.h:73
#define COAP_MAX_TKL
Definition: opencoap.h:30
uint8_t * pValue
Definition: opencoap.h:117
Definition: opencoap.h:38
Definition: opencoap.h:87
Definition: opencoap.h:39
Definition: opencoap.h:70
Definition: opencoap.h:68
coap_code_t
Definition: opencoap.h:43
Definition: opencoap.h:48
Definition: opencoap.h:79
Definition: opencoap.h:83
uint8_t path1len
Definition: opencoap.h:131
Definition: opencoap.h:44
coap_option_t type
Definition: opencoap.h:115