2021-01-11 08:23:05 +08:00
|
|
|
|
## object\_wbuffer\_t
|
|
|
|
|
### 概述
|
|
|
|
|
![image](images/object_wbuffer_t_0.png)
|
|
|
|
|
|
|
|
|
|
将wbuffer包装成object。
|
|
|
|
|
----------------------------------
|
|
|
|
|
### 函数
|
|
|
|
|
<p id="object_wbuffer_t_methods">
|
|
|
|
|
|
|
|
|
|
| 函数名称 | 说明 |
|
|
|
|
|
| -------- | ------------ |
|
2022-12-05 12:10:53 +08:00
|
|
|
|
| <a href="#object_wbuffer_t_object_wbuffer_cast">object\_wbuffer\_cast</a> | 转换为object_wbuffer对象。 |
|
2021-01-11 08:23:05 +08:00
|
|
|
|
| <a href="#object_wbuffer_t_object_wbuffer_create">object\_wbuffer\_create</a> | 创建wbuffer对象。 |
|
|
|
|
|
| <a href="#object_wbuffer_t_object_wbuffer_create_extendable">object\_wbuffer\_create\_extendable</a> | 创建可扩展的wbuffer对象。 |
|
|
|
|
|
### 属性
|
|
|
|
|
<p id="object_wbuffer_t_properties">
|
|
|
|
|
|
|
|
|
|
| 属性名称 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | ------------ |
|
|
|
|
|
| <a href="#object_wbuffer_t_wbuffer">wbuffer</a> | wbuffer\_t* | wbuffer对象。 |
|
2022-12-05 12:10:53 +08:00
|
|
|
|
#### object\_wbuffer\_cast 函数
|
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
* 函数功能:
|
|
|
|
|
|
|
|
|
|
> <p id="object_wbuffer_t_object_wbuffer_cast">转换为object_wbuffer对象。
|
|
|
|
|
|
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
object_wbuffer_t* object_wbuffer_cast (tk_object_t* obj);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | object\_wbuffer\_t* | object\_wbuffer对象。 |
|
|
|
|
|
| obj | tk\_object\_t* | object\_wbuffer对象。 |
|
2021-01-11 08:23:05 +08:00
|
|
|
|
#### object\_wbuffer\_create 函数
|
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
* 函数功能:
|
|
|
|
|
|
|
|
|
|
> <p id="object_wbuffer_t_object_wbuffer_create">创建wbuffer对象。
|
|
|
|
|
|
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
2023-06-29 10:44:29 +08:00
|
|
|
|
tk_object_t* object_wbuffer_create (uint8_t* data, uint32_t capacity);
|
2021-01-11 08:23:05 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
2022-12-05 12:10:53 +08:00
|
|
|
|
| 返回值 | tk\_object\_t* | 返回object对象。 |
|
2021-01-11 08:23:05 +08:00
|
|
|
|
| data | uint8\_t* | 缓冲区。 |
|
2023-06-29 10:44:29 +08:00
|
|
|
|
| capacity | uint32\_t | 缓冲区的容量。 |
|
2021-01-11 08:23:05 +08:00
|
|
|
|
#### object\_wbuffer\_create\_extendable 函数
|
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
* 函数功能:
|
|
|
|
|
|
|
|
|
|
> <p id="object_wbuffer_t_object_wbuffer_create_extendable">创建可扩展的wbuffer对象。
|
|
|
|
|
|
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
2022-12-05 12:10:53 +08:00
|
|
|
|
tk_object_t* object_wbuffer_create_extendable ();
|
2021-01-11 08:23:05 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
2022-12-05 12:10:53 +08:00
|
|
|
|
| 返回值 | tk\_object\_t* | 返回object对象。 |
|
2021-01-11 08:23:05 +08:00
|
|
|
|
#### wbuffer 属性
|
|
|
|
|
-----------------------
|
|
|
|
|
> <p id="object_wbuffer_t_wbuffer">wbuffer对象。
|
|
|
|
|
|
|
|
|
|
* 类型:wbuffer\_t*
|
|
|
|
|
|
|
|
|
|
| 特性 | 是否支持 |
|
|
|
|
|
| -------- | ----- |
|
|
|
|
|
| 可直接读取 | 是 |
|
|
|
|
|
| 可直接修改 | 否 |
|