21 #ifndef SELKIELoggerMP_Serial
22 #define SELKIELoggerMP_Serial
41 #define MP_SERIAL_BUFF 4096
68 void mp_pack_numarray(msgpack_packer *pack,
const size_t entries,
const float *fa);
void mp_pack_numarray(msgpack_packer *pack, const size_t entries, const float *fa)
Pack numeric/floating point array.
void mp_pack_strarray(msgpack_packer *pack, const strarray *sa)
Pack string array.
int mp_openConnection(const char *port, const int baudRate)
Set up a connection to the specified port.
bool mp_readMessage_buf(int handle, msg_t *out, uint8_t buf[MP_SERIAL_BUFF], int *index, int *hw)
Read data from handle, and parse message if able.
bool mp_readMessage(int handle, msg_t *out)
Static wrapper around mp_readMessage_buf.
bool mp_unpack_strarray(strarray *sa, msgpack_object_array *obj)
Unpack msgpack array into string array.
#define MP_SERIAL_BUFF
Default serial buffer allocation size.
void mp_closeConnection(int handle)
Close existing connection.
bool mp_writeData(int handle, const msg_t *out)
Send message data (only!) to attached device.
bool mp_packMessage(msgpack_sbuffer *sbuf, const msg_t *out)
Pack a message into a buffer.
bool mp_writeMessage(int handle, const msg_t *out)
Send message to attached device.
size_t mp_unpack_numarray(float **sa, msgpack_object_array *obj)
Allocate array of floats and unpack a msgpack array into it.