Home
last modified time | relevance | path

Searched full:0 (Results 1 – 25 of 77) sorted by relevance

1234

/mcumgr-2.7.6/cborattr/test/src/testcases/
Dcborattr_encode_simple.c86 [0] = { in TEST_CASE_SELF()
118 { 0 } in TEST_CASE_SELF()
122 { 0 } in TEST_CASE_SELF()
125 0xbf, 0x64, 0x6e, 0x75, 0x6c, 0x6c, 0xf6, 0x64, in TEST_CASE_SELF()
126 0x62, 0x6f, 0x6f, 0x6c, 0xf5, 0x63, 0x69, 0x6e, in TEST_CASE_SELF()
127 0x74, 0x38, 0x62, 0x64, 0x75, 0x69, 0x6e, 0x74, in TEST_CASE_SELF()
128 0x19, 0x20, 0xfa, 0x65, 0x66, 0x6c, 0x6f, 0x61, in TEST_CASE_SELF()
129 0x74, 0xfa, 0x41, 0x00, 0x00, 0x00, 0x66, 0x64, in TEST_CASE_SELF()
130 0x6f, 0x75, 0x62, 0x6c, 0x65, 0xfb, 0x40, 0x30, in TEST_CASE_SELF()
131 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x62, in TEST_CASE_SELF()
[all …]
Dcborattr_encode_omit.c94 [0] = { in TEST_CASE_SELF()
127 { 0 } in TEST_CASE_SELF()
132 { 0 } in TEST_CASE_SELF()
135 0xbf, 0x63, 0x73, 0x74, 0x72, 0x65, 0x6d, 0x79, in TEST_CASE_SELF()
136 0x73, 0x74, 0x72, 0xff, in TEST_CASE_SELF()
Dcborattr_decode_object.c43 return 0; in test_cbor_wr()
52 test_cbor_len = 0; in test_encode_data()
53 cbor_encoder_init(&test_encoder, &test_writer, 0); in test_encode_data()
76 test_cbor_len = 0; in test_encode_data_complex()
78 cbor_encoder_init(&test_encoder, &test_writer, 0); in test_encode_data_complex()
113 int64_t bm_val = 0; in TEST_CASE()
115 [0] = { in TEST_CASE()
126 [0] = { in TEST_CASE()
136 int64_t a_val = 0; in TEST_CASE()
137 int64_t i_val = 0; in TEST_CASE()
[all …]
Dcborattr_decode_string_array.c43 return 0; in test_cbor_wr()
52 test_cbor_len = 0; in test_encode_string_array_one()
53 cbor_encoder_init(&test_encoder, &test_writer, 0); in test_encode_string_array_one()
75 test_cbor_len = 0; in test_encode_string_array_three()
76 cbor_encoder_init(&test_encoder, &test_writer, 0); in test_encode_string_array_three()
102 int arr_cnt = 0; in TEST_CASE()
104 [0] = { in TEST_CASE()
112 .addr.array.maxlen = sizeof(arr_data) / sizeof(arr_data[0]), in TEST_CASE()
123 TEST_ASSERT(rc == 0); in TEST_CASE()
125 TEST_ASSERT(!strcmp(str_ptrs[0], "asdf")); in TEST_CASE()
[all …]
Dcborattr_decode_simple.c43 return 0; in test_cbor_wr()
50 uint8_t data[4] = { 0, 1, 2 }; in test_encode_data()
52 cbor_encoder_init(&test_encoder, &test_writer, 0); in test_encode_data()
68 * c:0x000102 in test_encode_data()
86 uint64_t a_val = 0; in TEST_CASE()
87 int64_t b_val = 0; in TEST_CASE()
91 [0] = { in TEST_CASE()
118 TEST_ASSERT(rc == 0); in TEST_CASE()
122 TEST_ASSERT(c_data[0] == 0 && c_data[1] == 1 && c_data[2] == 2); in TEST_CASE()
/mcumgr-2.7.6/samples/smp_svr/mynewt/src/
Dgatt_svr.c39 BLE_UUID128_INIT(0x2d, 0x71, 0xa2, 0x59, 0xb4, 0x58, 0xc8, 0x12,
40 0x99, 0x99, 0x43, 0x95, 0x12, 0x2f, 0x46, 0x59);
44 BLE_UUID128_INIT(0xf6, 0x6d, 0xc9, 0x07, 0x71, 0x00, 0x16, 0xb0,
45 0xe1, 0x45, 0x7e, 0x89, 0x9e, 0x65, 0x3a, 0x5c);
49 BLE_UUID128_INIT(0xf7, 0x6d, 0xc9, 0x07, 0x71, 0x00, 0x16, 0xb0,
50 0xe1, 0x45, 0x7e, 0x89, 0x9e, 0x65, 0x3a, 0x5c);
76 0, /* No more characteristics in this service. */
81 0, /* No more services. */
98 if (rc != 0) { in gatt_svr_chr_write()
102 return 0; in gatt_svr_chr_write()
[all …]
Dmain.c46 #define SMP_SVR_LOG_MODULE (LOG_MODULE_PERUSER + 0)
65 u8p[5], u8p[4], u8p[3], u8p[2], u8p[1], u8p[0]); in print_addr()
111 rc = ble_hs_id_infer_auto(0, &own_addr_type); in smp_svr_advertise()
112 if (rc != 0) { in smp_svr_advertise()
124 memset(&fields, 0, sizeof fields); in smp_svr_advertise()
146 if (rc != 0) { in smp_svr_advertise()
152 memset(&adv_params, 0, sizeof adv_params); in smp_svr_advertise()
157 if (rc != 0) { in smp_svr_advertise()
173 * @return 0 if the application successfully handled the
188 event->connect.status == 0 ? "established" : "failed", in smp_svr_gap_event()
[all …]
/mcumgr-2.7.6/cborattr/test/src/
Dtest_cborattr_utils.c25 0xa5, 0x61, 0x61, 0x61, 0x41, 0x61, 0x62, 0x61,
26 0x42, 0x61, 0x63, 0x61, 0x43, 0x61, 0x64, 0x61,
27 0x44, 0x61, 0x65, 0x61, 0x45
45 TEST_ASSERT_FATAL(rc == 0); in cborattr_test_util_encode()
47 TEST_ASSERT(os_mbuf_cmpf(om, 0, expected, len) == 0); in cborattr_test_util_encode()
/mcumgr-2.7.6/
Dprotocol.md71 #define MGMT_OP_READ 0
89 0 1 2 3
90 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
112 Op: 0 # NMGR_OP_READ
113 Flags: 0
114 Len: 0 # No payload present
115 Group: 0 # 0x00 = NMGR_GROUP_ID_DEFAULT
116 Seq: 0
117 Id: 2 # 0x02 in group 0x00 = OS_MGMT_ID_TASKSTAT
118 Data: [] # No payload (len = 0 above)
[all …]
Drepository.yml22 "0.0.0": "master"
23 "0.1.0": "mcumgr_0_1_0_tag"
24 "0.2.0": "mcumgr_0_2_0_tag"
27 "0-dev": "0.0.0" # master
28 "0-latest": "0.2.0" # latest release
/mcumgr-2.7.6/transport/
Dsmp-console.md15 offset 0: 0x06 0x09
21 offset ?: 0x0a (newline)
27 offset 0: 0x04 0x14
32 offset ?: 0x0a (newline)
40 | 0x06 0x09 | Byte pair indicating the start of a packet. |
41 | 0x04 0x14 | Byte pair indicating the start of a continuation frame. |
45 | Newline | A 0x0a byte; terminates a frame. |
56 | Polynomial | 0x1021 |
57 | Initial Value | 0 |
/mcumgr-2.7.6/cmd/img_mgmt/src/
Dimg_mgmt.c58 sizeof(img_mgmt_handlers) / sizeof(img_mgmt_handlers[0])
89 if (rc != 0) { in img_mgmt_find_tlvs()
102 return 0; in img_mgmt_find_tlvs()
114 uint8_t dummy_hash[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, in img_mgmt_read_info()
115 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77}; in img_mgmt_read_info()
118 return 0; in img_mgmt_read_info()
126 memset(ver, 0xff, sizeof *ver); in img_mgmt_read_info()
130 *flags = 0; in img_mgmt_read_info()
133 return 0; in img_mgmt_read_info()
146 if (rc != 0) { in img_mgmt_read_info()
[all …]
Dimg_mgmt_state.c39 assert(query_slot == 0 || query_slot == 1); in img_mgmt_state_flags()
41 flags = 0; in img_mgmt_state_flags()
80 /* Slot 0 is always active. */ in img_mgmt_state_flags()
81 /* XXX: The slot 0 assumption only holds when running from flash. */ in img_mgmt_state_flags()
96 return img_mgmt_state_flags(0) & IMG_MGMT_STATE_F_PENDING || in img_mgmt_state_any_pending()
134 if (state_flags & IMG_MGMT_STATE_F_CONFIRMED && slot != 0) { in img_mgmt_state_set_pending()
140 if (rc != 0) { in img_mgmt_state_set_pending()
177 if (rc != 0) { in img_mgmt_state_confirm()
203 err = 0; in img_mgmt_state_read()
208 for (i = 0; i < 2; i++) { in img_mgmt_state_read()
[all …]
/mcumgr-2.7.6/samples/smp_svr/zephyr/src/
Dmain.c79 0x84, 0xaa, 0x60, 0x74, 0x52, 0x8a, 0x8b, 0x86,
80 0xd3, 0x4c, 0xb7, 0x1d, 0x1d, 0xdc, 0x53, 0x8d),
89 rc = bt_le_adv_start(BT_LE_ADV_CONN_NAME, ad, ARRAY_SIZE(ad), NULL, 0); in advertise()
101 printk("Connection failed (err 0x%02x)\n", err); in connected()
109 printk("Disconnected (reason 0x%02x)\n", reason); in disconnected()
136 assert(rc == 0); in main()
141 if (rc < 0) { in main()
162 if (rc != 0) { in main()
/mcumgr-2.7.6/cmd/img_mgmt/port/zephyr/src/
Dzephyr_img_mgmt.c56 if (rc != 0) { in zephyr_img_mgmt_flash_check_empty()
60 assert(fa->fa_size % 4 == 0); in zephyr_img_mgmt_flash_check_empty()
66 for (addr = 0; addr < end; addr += sizeof data) { in zephyr_img_mgmt_flash_check_empty()
74 if (rc != 0) { in zephyr_img_mgmt_flash_check_empty()
79 for (i = 0; i < bytes_to_read / 4; i++) { in zephyr_img_mgmt_flash_check_empty()
83 return 0; in zephyr_img_mgmt_flash_check_empty()
90 return 0; in zephyr_img_mgmt_flash_check_empty()
95 * for Zephyr, as slot 0 of image 0 is image_0, slot 0 of image 1 is
97 * slot number starting at 0.
105 case 0: in zephyr_img_mgmt_flash_area_id()
[all …]
/mcumgr-2.7.6/cmd/fs_mgmt/port/zephyr/src/
Dzephyr_fs_mgmt.c31 if (rc != 0) { in fs_mgmt_impl_filelen()
41 return 0; in fs_mgmt_impl_filelen()
54 if (rc != 0) { in fs_mgmt_impl_read()
59 if (rc != 0) { in fs_mgmt_impl_read()
64 if (bytes_read < 0) { in fs_mgmt_impl_read()
73 if (rc != 0) { in fs_mgmt_impl_read()
76 return 0; in fs_mgmt_impl_read()
90 if (rc == 0) { in zephyr_fs_mgmt_truncate()
101 if (rc != 0) { in zephyr_fs_mgmt_truncate()
106 return 0; in zephyr_fs_mgmt_truncate()
[all …]
/mcumgr-2.7.6/cmd/img_mgmt/port/mynewt/src/
Dmynewt_img_mgmt.c37 for (i = 0; i < 2; i++) { in img_mgmt_find_best_area_id()
39 if (rc < 0) { in img_mgmt_find_best_area_id()
42 if (rc == 0) { in img_mgmt_find_best_area_id()
59 if (best >= 0) { in img_mgmt_find_best_area_id()
72 * @return 0 if a = b
98 return 0; in img_mgmt_vercmp()
112 * @return 0 if processing should occur;
128 memset(action, 0, sizeof *action); in img_mgmt_impl_upload_inspect()
136 if (req->off == 0) { in img_mgmt_impl_upload_inspect()
169 if ((req->data_sha_len > 0) && (g_img_mgmt_state.area_id != -1)) { in img_mgmt_impl_upload_inspect()
[all …]
/mcumgr-2.7.6/cmd/fs_mgmt/port/mynewt/src/
Dmynewt_fs_mgmt.c31 if (rc != 0) { in fs_mgmt_impl_filelen()
37 if (rc != 0) { in fs_mgmt_impl_filelen()
41 return 0; in fs_mgmt_impl_filelen()
53 if (rc != 0) { in fs_mgmt_impl_read()
58 if (rc != 0) { in fs_mgmt_impl_read()
63 if (rc != 0) { in fs_mgmt_impl_read()
72 if (rc != 0) { in fs_mgmt_impl_read()
76 return 0; in fs_mgmt_impl_read()
88 if (offset == 0) { in fs_mgmt_impl_write()
95 if (rc != 0) { in fs_mgmt_impl_write()
[all …]
/mcumgr-2.7.6/cmd/log_mgmt/src/
Dlog_mgmt.c70 sizeof log_mgmt_handlers / sizeof log_mgmt_handlers[0]
90 bytes_encoded = 0; in log_mgmt_encode_entry()
91 /* If offset is 0, we encode the keys for maps and other fields which are in log_mgmt_encode_entry()
95 if (entry->offset == 0) { in log_mgmt_encode_entry()
138 for (off = 0; off < entry->len; off += entry->chunklen) { in log_mgmt_encode_entry()
177 if (err != 0) { in log_mgmt_encode_entry()
197 if (entry->offset == 0) { in log_mgmt_cb_encode()
205 cbor_encoder_cust_writer_init(&cnt_encoder, &cnt_writer.enc, 0); in log_mgmt_cb_encode()
207 cbor_encoder_init(&cnt_encoder, &cnt_writer.enc, 0); in log_mgmt_cb_encode()
210 if (rc != 0) { in log_mgmt_cb_encode()
[all …]
/mcumgr-2.7.6/util/src/
Dmcumgr_util.c33 for (len = 0; copy != 0; len++) { in ull_to_s()
37 /* A value of 0 still requires one character ("0"). */ in ull_to_s()
38 if (len == 0) { in ull_to_s()
49 dst[off--] = '\0'; in ull_to_s()
52 dst[off--] = '0' + digit; in ull_to_s()
55 } while (val > 0); in ull_to_s()
65 if (val < 0) { in ll_to_s()
70 dst[0] = '-'; in ll_to_s()
/mcumgr-2.7.6/cmd/fs_mgmt/src/
Dfs_mgmt.c50 (sizeof fs_mgmt_handlers / sizeof fs_mgmt_handlers[0])
84 { 0 }, in fs_mgmt_file_download()
89 if (rc != 0 || off == ULLONG_MAX) { in fs_mgmt_file_download()
96 if (off == 0) { in fs_mgmt_file_download()
98 if (rc != 0) { in fs_mgmt_file_download()
106 if (rc != 0) { in fs_mgmt_file_download()
111 err = 0; in fs_mgmt_file_download()
118 if (off == 0) { in fs_mgmt_file_download()
123 if (err != 0) { in fs_mgmt_file_download()
127 return 0; in fs_mgmt_file_download()
[all …]
/mcumgr-2.7.6/omp/src/
Domp.c37 if (rc != 0) { in omp_encode_mgmt_hdr()
46 if (rc != 0) { in omp_encode_mgmt_hdr()
50 return 0; in omp_encode_mgmt_hdr()
61 if (rc != 0) { in omp_send_err_rsp()
66 if (rc != 0) { in omp_send_err_rsp()
71 if (rc != 0) { in omp_send_err_rsp()
75 return 0; in omp_send_err_rsp()
85 [0] = { in omp_read_hdr()
93 [1] = { 0 } in omp_read_hdr()
97 if (rc != 0 || hlen != sizeof *out_hdr) { in omp_read_hdr()
[all …]
/mcumgr-2.7.6/cmd/os_mgmt/src/
Dos_mgmt.c57 (sizeof os_mgmt_group_handlers / sizeof os_mgmt_group_handlers[0])
76 [0] = { in os_mgmt_echo()
88 echo_buf[0] = '\0'; in os_mgmt_echo()
91 if (err != 0) { in os_mgmt_echo()
98 if (err != 0) { in os_mgmt_echo()
102 return 0; in os_mgmt_echo()
117 err = 0; in os_mgmt_taskstat_encode_one()
140 if (err != 0) { in os_mgmt_taskstat_encode_one()
144 return 0; in os_mgmt_taskstat_encode_one()
159 err = 0; in os_mgmt_taskstat_read()
[all …]
/mcumgr-2.7.6/smp/src/
Dsmp.c36 if (rem == 0) { in smp_align4()
60 .nh_len = 0, in smp_init_rsp_hdr()
61 .nh_flags = 0, in smp_init_rsp_hdr()
80 reader->cpy(reader, (char *)dst_hdr, 0, sizeof *dst_hdr); in smp_read_hdr()
81 return 0; in smp_read_hdr()
89 rc = mgmt_streamer_write_at(&streamer->mgmt_stmr, 0, src_hdr, in smp_write_hdr()
105 if (rc != 0) { in smp_build_err_rsp()
111 if (rc != 0) { in smp_build_err_rsp()
116 if (rc != 0) { in smp_build_err_rsp()
121 if (rc != 0) { in smp_build_err_rsp()
[all …]
/mcumgr-2.7.6/samples/omp_svr/mynewt/src/
Domp_svr.h34 #define GATT_SVR_SVC_ALERT_UUID 0x1811
35 #define GATT_SVR_CHR_SUP_NEW_ALERT_CAT_UUID 0x2A47
36 #define GATT_SVR_CHR_NEW_ALERT 0x2A46
37 #define GATT_SVR_CHR_SUP_UNR_ALERT_CAT_UUID 0x2A48
38 #define GATT_SVR_CHR_UNR_ALERT_STAT_UUID 0x2A45
39 #define GATT_SVR_CHR_ALERT_NOT_CTRL_PT 0x2A44

1234