Skip to content
Snippets Groups Projects

Remove exposure of libcoap internals

Closed Jacopo Zorzetto requested to merge jacopo/eddie:virt_mr into main
1 unresolved thread
4 files
+ 503
37
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -12,6 +12,26 @@
std::string get_local_node_ip();
typedef enum {GET, POST, PUT, DELETE} coap_method;
coap_method coap_method_from_s(const std::string& input);
static std::string pdu_type_to_string(coap_pdu_type_t type);
static std::string pdu_code_to_string(coap_pdu_code_t code);
static const char *msg_option_string(uint8_t code, uint16_t option_type);
static unsigned int
print_content_format(unsigned int format_type, unsigned char *result, unsigned int buf_len);
int is_binary(int content_format);
static size_t print_readable(const uint8_t *data, size_t len, unsigned char *result,
size_t buf_len, int encode_always);
std::string pdu_to_string(coap_pdu_t *pdu);
class CoapNode {
private:
CoapClient *client = nullptr;
@@ -32,10 +52,10 @@ public:
std::string discover();
int send_message(coap_pdu_code_t method, const char *dst_ip, const char *dst_port,
int send_message(coap_method method, const char *dst_ip, const char *dst_port,
const char *dst_res, const char *query, const char *data);
coap_pdu_t *receive_message(int token, int max_timeout);
std::string receive_message(int token, int max_timeout);
};
#endif //EDDIE_COAPNODE_H
Loading