Code for sensor nodes connected by radio receiver with gateway

Dependencies:   mbed WakeUp coapRadioClient DHT11

msg.h

Committer:
Ka_myk
Date:
2019-01-24
Revision:
0:4c0d384fd5cf
Child:
3:4ffffdb5230f

File content as of revision 0:4c0d384fd5cf:

#ifndef MBEDDED_MSG_H
#define MBEDDED_MSG_H

#include<stdint.h>

class Msg {
public:

    static void construct_data_msg(uint8_t sensor_id, int data, uint8_t buffer[], int buffer_len);

    static void deconstruct_data_msg(uint8_t* sensor_id, int* data, uint8_t buffer[], int buffer_len);

    static void construct_config_msg(uint8_t sensor_id, int interval, uint8_t buffer[], int buffer_len);

    static void deconstruct_config_msg(uint8_t sensor_id, int interval, uint8_t buffer[], int buffer_len);
};

#endif //MBEDDED_MSG_H