Lines Matching full:out
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
181 struct lwm2m_output_context *out; member
246 static int json_add_separator(struct lwm2m_output_context *out, struct json_out_formatter_data *fd) in json_add_separator() argument
254 len = buf_append(CPKT_BUF_WRITE(out->out_cpkt), &separator, sizeof(separator)); in json_add_separator()
268 static int json_float_object_write(struct lwm2m_output_context *out, in json_float_object_write() argument
277 len = json_add_separator(out, fd); in json_float_object_write()
297 CPKT_BUF_W_REGION(out->out_cpkt)); in json_float_object_write()
303 out->out_cpkt->offset += len; in json_float_object_write()
308 static int json_string_object_write(struct lwm2m_output_context *out, in json_string_object_write() argument
317 len = json_add_separator(out, fd); in json_string_object_write()
336 CPKT_BUF_W_REGION(out->out_cpkt)); in json_string_object_write()
342 out->out_cpkt->offset += len; in json_string_object_write()
347 static int json_boolean_object_write(struct lwm2m_output_context *out, in json_boolean_object_write() argument
356 len = json_add_separator(out, fd); in json_boolean_object_write()
375 CPKT_BUF_W_REGION(out->out_cpkt)); in json_boolean_object_write()
381 out->out_cpkt->offset += len; in json_boolean_object_write()
386 static int json_objlnk_object_write(struct lwm2m_output_context *out, in json_objlnk_object_write() argument
395 len = json_add_separator(out, fd); in json_objlnk_object_write()
414 CPKT_BUF_W_REGION(out->out_cpkt)); in json_objlnk_object_write()
420 out->out_cpkt->offset += len; in json_objlnk_object_write()
425 static int put_begin(struct lwm2m_output_context *out, in put_begin() argument
444 res = buf_append(CPKT_BUF_WRITE(out->out_cpkt), pt_buffer, len); in put_begin()
452 static int put_end(struct lwm2m_output_context *out, in put_end() argument
457 res = buf_append(CPKT_BUF_WRITE(out->out_cpkt), "]}", 2); in put_end()
465 static int put_begin_ri(struct lwm2m_output_context *out, in put_begin_ri() argument
470 fd = engine_get_out_user_data(out); in put_begin_ri()
479 static int put_end_ri(struct lwm2m_output_context *out, in put_end_ri() argument
484 fd = engine_get_out_user_data(out); in put_end_ri()
493 static int put_s32(struct lwm2m_output_context *out, struct lwm2m_obj_path *path, int32_t value) in put_s32() argument
498 fd = engine_get_out_user_data(out); in put_s32()
500 if (!out->out_cpkt || !fd) { in put_s32()
513 return json_float_object_write(out, fd, len); in put_s32()
516 static int put_s16(struct lwm2m_output_context *out, in put_s16() argument
519 return put_s32(out, path, (int32_t)value); in put_s16()
522 static int put_s8(struct lwm2m_output_context *out, struct lwm2m_obj_path *path, in put_s8() argument
525 return put_s32(out, path, (int32_t)value); in put_s8()
528 static int put_s64(struct lwm2m_output_context *out, in put_s64() argument
534 fd = engine_get_out_user_data(out); in put_s64()
536 if (!out->out_cpkt || !fd) { in put_s64()
549 return json_float_object_write(out, fd, len); in put_s64()
552 static int put_time(struct lwm2m_output_context *out, struct lwm2m_obj_path *path, time_t value) in put_time() argument
554 return put_s64(out, path, (int64_t) value); in put_time()
557 static int put_string(struct lwm2m_output_context *out, in put_string() argument
562 fd = engine_get_out_user_data(out); in put_string()
564 if (!out->out_cpkt || !fd) { in put_string()
572 return json_string_object_write(out, fd, buf); in put_string()
575 static int put_float(struct lwm2m_output_context *out, in put_float() argument
581 fd = engine_get_out_user_data(out); in put_float()
583 if (!out->out_cpkt || !fd) { in put_float()
596 return json_float_object_write(out, fd, len); in put_float()
599 static int put_bool(struct lwm2m_output_context *out, in put_bool() argument
604 fd = engine_get_out_user_data(out); in put_bool()
606 if (!out->out_cpkt || !fd) { in put_bool()
614 return json_boolean_object_write(out, fd, value); in put_bool()
617 static int put_objlnk(struct lwm2m_output_context *out, in put_objlnk() argument
622 fd = engine_get_out_user_data(out); in put_objlnk()
624 if (!out->out_cpkt || !fd) { in put_objlnk()
636 return json_objlnk_object_write(out, fd); in put_objlnk()
892 engine_set_out_user_data(&msg->out, &fd); in do_read_op_json()
894 engine_clear_out_user_data(&msg->out); in do_read_op_json()