2022-07-28 01:36:16 +02:00
|
|
|
#include "conn.h"
|
2018-04-09 09:27:38 +02:00
|
|
|
#include "msgset.h"
|
|
|
|
#include "cw.h"
|
|
|
|
|
|
|
|
int cw_write_header(struct cw_ElemHandler * handler, uint8_t * dst, int len)
|
|
|
|
{
|
|
|
|
if (handler->vendor)
|
|
|
|
return len + cw_put_elem_vendor_hdr(dst, handler->vendor, handler->id, len);
|
|
|
|
|
|
|
|
return len + cw_put_elem_hdr(dst, handler->id, len);
|
|
|
|
}
|
|
|
|
|
2022-07-29 12:11:19 +02:00
|
|
|
|
|
|
|
|
2022-07-28 01:36:16 +02:00
|
|
|
int cw_header_len(struct cw_ElemHandler * handler)
|
|
|
|
{
|
|
|
|
return handler->vendor ? 10 : 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|