• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2021 Advanced Micro Devices, Inc.
3  *
4  * SPDX-License-Identifier: MIT
5  */
6 
7 #ifndef AC_MSGPACK_H
8 #define AC_MSGPACK_H
9 
10 struct ac_msgpack {
11    uint8_t *mem;
12    uint32_t mem_size;
13    uint32_t offset;
14 };
15 
16 void ac_msgpack_init(struct ac_msgpack *msgpack);
17 void ac_msgpack_destroy(struct ac_msgpack *msgpack);
18 int ac_msgpack_resize_if_required(struct ac_msgpack *msgpack,
19                                   uint32_t data_size);
20 void ac_msgpack_add_fixmap_op(struct ac_msgpack *msgpack, uint32_t n);
21 void ac_msgpack_add_fixarray_op(struct ac_msgpack *msgpack, uint32_t n);
22 void ac_msgpack_add_fixstr(struct ac_msgpack *msgpack, const char *str);
23 void ac_msgpack_add_uint(struct ac_msgpack *msgpack, uint64_t val);
24 
25 #endif
26