Home
last modified time | relevance | path

Searched refs:value (Results 1 – 25 of 183) sorted by relevance

12345678

/openthread-latest/tools/tcat_ble_client/dataset/
Ddataset_entries.py38 value = getattr(self, attr_name)
39 if not inspect.ismethod(value):
40 if isinstance(value, bytes):
41 value = value.hex()
72 (value,) = struct.unpack('>Q', tlv.value)
73 self.ubit = value & 0x1
74 self.ticks = (value >> 1) & 0x7FFF
75 self.seconds = (value >> 16) & 0xFFFF
78 value = (self.seconds << 16) | (self.ticks << 1) | self.ubit
79 tlv = struct.pack('>BBQ', self.type.value, self.length, value)
[all …]
/openthread-latest/src/lib/url/
Durl.cpp125 long long value; in ParseUint32() local
129 value = strtoll(str, nullptr, 0); in ParseUint32()
130 VerifyOrExit(0 <= value && value <= UINT32_MAX, error = OT_ERROR_INVALID_ARGS); in ParseUint32()
131 aValue = static_cast<uint32_t>(value); in ParseUint32()
140 uint32_t value; in ParseUint16() local
142 SuccessOrExit(error = ParseUint32(aName, value)); in ParseUint16()
143 VerifyOrExit(value <= UINT16_MAX, error = OT_ERROR_INVALID_ARGS); in ParseUint16()
144 aValue = static_cast<uint16_t>(value); in ParseUint16()
153 uint32_t value; in ParseUint8() local
155 SuccessOrExit(error = ParseUint32(aName, value)); in ParseUint8()
[all …]
/openthread-latest/src/posix/platform/
Dsettings.cpp289 uint8_t value[sizeof(data)]; in main() local
290 uint16_t length = sizeof(value); in main()
292 assert(otPlatSettingsGet(instance, 0, 0, value, &length) == OT_ERROR_NOT_FOUND); in main()
300 uint8_t value[sizeof(data)]; in main() local
301 uint16_t length = sizeof(value); in main()
307 length = sizeof(value); in main()
308 assert(otPlatSettingsGet(instance, 0, 0, value, &length) == OT_ERROR_NONE); in main()
310 assert(0 == memcmp(value, data, length)); in main()
314 value[length] = 0; in main()
315 assert(otPlatSettingsGet(instance, 0, 0, value, &length) == OT_ERROR_NONE); in main()
[all …]
Dconfiguration.cpp94 char value[kMaxValueSize]; in GetDomain() local
98 …while (mProductConfigFile.Get(kKeyRegionDomainMapping, iterator, value, sizeof(value)) == OT_ERROR… in GetDomain()
100 if ((str = strtok_r(value, kCommaDelimiter, &psave)) == nullptr) in GetDomain()
109 ExitNow(error = aDomain.Set(value)); in GetDomain()
127 char value[kMaxValueSize]; in GetChannelMask() local
133 while (mProductConfigFile.Get(aKey, iterator, value, sizeof(value)) == OT_ERROR_NONE) in GetChannelMask()
135 if (((str = strtok_r(value, kCommaDelimiter, &psave)) == nullptr) || (aDomain != str)) in GetChannelMask()
208 char value[kMaxValueSize]; in UpdateCalibratedPower() local
215 if (calibrationFile->Get(kKeyCalibratedPower, iterator, value, sizeof(value)) != OT_ERROR_NONE) in UpdateCalibratedPower()
224 … while (calibrationFile->Get(kKeyCalibratedPower, iterator, value, sizeof(value)) == OT_ERROR_NONE) in UpdateCalibratedPower()
[all …]
/openthread-latest/examples/platforms/utils/
Dencoding.h53 uint64_t value = 0; in otEncodingReadUint64Le() local
55 value |= (uint64_t)aSource[0]; in otEncodingReadUint64Le()
56 value |= ((uint64_t)aSource[1]) << 8; in otEncodingReadUint64Le()
57 value |= ((uint64_t)aSource[2]) << 16; in otEncodingReadUint64Le()
58 value |= ((uint64_t)aSource[3]) << 24; in otEncodingReadUint64Le()
59 value |= ((uint64_t)aSource[4]) << 32; in otEncodingReadUint64Le()
60 value |= ((uint64_t)aSource[5]) << 40; in otEncodingReadUint64Le()
61 value |= ((uint64_t)aSource[6]) << 48; in otEncodingReadUint64Le()
62 value |= ((uint64_t)aSource[7]) << 56; in otEncodingReadUint64Le()
64 return value; in otEncodingReadUint64Le()
/openthread-latest/src/core/utils/
Dparse_cmdline.cpp92 uint64_t value; in ParseUint() local
94 SuccessOrExit(error = ParseAsUint64(aString, value)); in ParseUint()
96 VerifyOrExit(value <= NumericLimits<UintType>::kMax, error = kErrorInvalidArgs); in ParseUint()
97 aUint = static_cast<UintType>(value); in ParseUint()
112 uint64_t value = 0; in ParseAsUint64() local
136 …VerifyOrExit(value <= (isHex ? kMaxHexBeforeOverflow : kMaxDecBeforeOverflow), error = kErrorInval… in ParseAsUint64()
137 value = isHex ? (value << 4) : (value * 10); in ParseAsUint64()
138 newValue = value + digit; in ParseAsUint64()
139 VerifyOrExit(newValue >= value, error = kErrorInvalidArgs); in ParseAsUint64()
140 value = newValue; in ParseAsUint64()
[all …]
/openthread-latest/third_party/mbedtls/repo/scripts/
Dconfig.py34 def __init__(self, active, name, value='', section=None): argument
37 self.value = value
85 return self.settings[name].value
96 return self.settings[name].value
100 def __setitem__(self, name, value): argument
105 self.settings[name].value = value
107 def set(self, name, value=None): argument
115 if value is not None:
116 self.settings[name].value = value
119 self.settings[name] = Setting(True, name, value=value)
[all …]
/openthread-latest/tests/scripts/thread-cert/
Dtest_coap.py51 value = None
52 while value is None:
53 value = random.getrandbits(4)
54 if value == 13 or value == 14:
55 value = None
57 return value
61 value = None
62 while value is None:
63 value = random.getrandbits(4)
64 if value > 12:
[all …]
Dcommon.py74 def _convert_value_to_ip_address(self, value): argument
75 if isinstance(value, bytearray):
76 value = bytes(value)
78 return ipaddress.ip_address(value)
85 def source_ipv6(self, value): argument
86 self._source_ipv6 = self._convert_value_to_ip_address(value)
93 def destination_ipv6(self, value): argument
94 self._destination_ipv6 = self._convert_value_to_ip_address(value)
101 def src_port(self, value): argument
102 self._src_port = value
[all …]
/openthread-latest/third_party/mbedtls/repo/tests/suites/
Dtest_suite_debug.data16 Debug print return value #1
17 mbedtls_debug_print_ret:"MyFile":999:"Test return value":0:"MyFile(0999)\: Test return value() retu…
19 Debug print return value #2
20 mbedtls_debug_print_ret:"MyFile":999:"Test return value":-0x1000:"MyFile(0999)\: Test return value(…
22 Debug print return value #3
23 mbedtls_debug_print_ret:"MyFile":999:"Test return value":-0xFFFF:"MyFile(0999)\: Test return value(…
26 mbedtls_debug_print_buf:"MyFile":999:"Test return value":"":"MyFile(0999)\: dumping 'Test return va…
29 …bedtls_debug_print_buf:"MyFile":999:"Test return value":"00":"MyFile(0999)\: dumping 'Test return
32 …int_buf:"MyFile":999:"Test return value":"000102030405060708090A0B0C0D0E0F":"MyFile(0999)\: dumpin…
35 …nt_buf:"MyFile":999:"Test return value":"000102030405060708090A0B0C0D0E0F00":"MyFile(0999)\: dumpi…
[all …]
Dtest_suite_base64.function22 for (unsigned value = 0; value < 64; value++) {
23 mbedtls_test_set_step(value);
24 TEST_CF_SECRET(&value, sizeof(value));
25 unsigned char digit = mbedtls_ct_base64_enc_char(value);
26 TEST_CF_PUBLIC(&value, sizeof(value));
28 TEST_EQUAL(digit, base64_digits[value]);
/openthread-latest/third_party/mbedtls/repo/tests/scripts/
Dpsa_collect_statuses.py42 value, function, tail = line.split(':', 2)
46 if value not in self.functions[function]:
47 fdata[value] = []
48 fdata[value].append(tail)
49 self.codes.add(int(value))
53 values = [str(value) for value in self.codes]
56 for value, name in zip(values, output.rstrip().split('\n')):
57 self.status_names[value] = name
66 names = [self.status_names[value] for value in fdata.keys()]
/openthread-latest/tools/tcat_ble_client/cli/
Dbase_commands.py103 return TLV(TcatTLVType.APPLICATION.value, bytes('Hello world!', 'ascii')).to_bytes()
117 return TLV(TcatTLVType.ACTIVE_DATASET.value, dataset_bytes).to_bytes()
129 return TLV(TcatTLVType.DECOMMISSION.value, bytes()).to_bytes()
141 return TLV(TcatTLVType.GET_DEVICE_ID.value, bytes()).to_bytes()
153 return TLV(TcatTLVType.GET_EXT_PAN_ID.value, bytes()).to_bytes()
165 return TLV(TcatTLVType.GET_PROVISIONING_URL.value, bytes()).to_bytes()
177 return TLV(TcatTLVType.GET_NETWORK_NAME.value, bytes()).to_bytes()
194 tlv_type = TcatTLVType.PRESENT_PSKD_HASH.value
197 tlv_type = TcatTLVType.PRESENT_PSKC_HASH.value
200 tlv_type = TcatTLVType.PRESENT_INSTALL_CODE_HASH.value
[all …]
/openthread-latest/src/core/common/
Dsettings_driver.hpp107 const uint8_t *value = reinterpret_cast<const uint8_t *>(aValue); in Add() local
110 error = mFlash.Add(aKey, value, aValueLength); in Add()
112 error = otPlatSettingsAdd(GetInstancePtr(), aKey, value, aValueLength); in Add()
158 uint8_t *value = reinterpret_cast<uint8_t *>(aValue); in Get() local
161 error = mFlash.Get(aKey, aIndex, value, aValueLength); in Get()
163 error = otPlatSettingsGet(GetInstancePtr(), aKey, aIndex, value, aValueLength); in Get()
202 const uint8_t *value = reinterpret_cast<const uint8_t *>(aValue); in Set() local
205 error = mFlash.Set(aKey, value, aValueLength); in Set()
207 error = otPlatSettingsSet(GetInstancePtr(), aKey, value, aValueLength); in Set()
/openthread-latest/examples/platforms/simulation/
Dmdns_socket.c100 int value; in OpenIp4Socket() local
117 value = aInfraIfIndex; in OpenIp4Socket()
118 ret = setsockopt(fd, IPPROTO_IP, IP_BOUND_IF, &value, sizeof(value)); in OpenIp4Socket()
125 value = 255; in OpenIp4Socket()
126 ret = setsockopt(fd, IPPROTO_IP, IP_TTL, &value, sizeof(value)); in OpenIp4Socket()
184 int value; in OpenIp6Socket() local
201 value = aInfraIfIndex; in OpenIp6Socket()
202 ret = setsockopt(fd, IPPROTO_IPV6, IPV6_BOUND_IF, &value, sizeof(value)); in OpenIp6Socket()
205 value = 255; in OpenIp6Socket()
206 ret = setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &value, sizeof(value)); in OpenIp6Socket()
[all …]
/openthread-latest/third_party/mbedtls/repo/tests/data_files/
Dtest_certs.h.jinja211 {% for mode, name, value in macros %}
13 /* This is taken from {{value}}. */
14 /* BEGIN FILE string macro {{name}} {{value}} */
16 {% for line in value | read_lines %}
24 /* This is generated from {{value}}. */
25 /* BEGIN FILE binary macro {{name}} {{value}} */
27 {% for line in value | read_as_c_array %}
39 #define {{name}} "{{value}}"
/openthread-latest/tools/ot-fct/
Dcli.cpp56 char value[kMaxValueSize]; in GetNextTargetPower() local
60 … while (mProductConfigFile.Get(kKeyTargetPower, aIterator, value, sizeof(value)) == OT_ERROR_NONE) in GetNextTargetPower()
62 if (((domain = strtok_r(value, kCommaDelimiter, &psave)) == nullptr) || (aDomain != domain)) in GetNextTargetPower()
77 char value[kMaxValueSize]; in GetNextDomain() local
80 …while (mProductConfigFile.Get(kKeyRegionDomainMapping, aIterator, value, sizeof(value)) == OT_ERRO… in GetNextDomain()
82 if ((str = strtok(value, kCommaDelimiter)) == nullptr) in GetNextDomain()
124 char value[kMaxValueSize]; in ProcessRegionDomainTable() local
128 …while (mProductConfigFile.Get(kKeyRegionDomainMapping, iterator, value, sizeof(value)) == OT_ERROR… in ProcessRegionDomainTable()
130 printf("%s\r\n", value); in ProcessRegionDomainTable()
186 char value[kMaxValueSize]; in ProcessCalibrationTable() local
[all …]
/openthread-latest/third_party/mbedtls/repo/programs/psa/
Dpsa_constant_names.c57 unsigned long value) in append_integer() argument
59 size_t n = snprintf(*buffer, buffer_size - *required_size, format, value); in append_integer()
200 long value = strtol(*argp, &end, 0); in process_signed() local
205 if (value < min || (errno == ERANGE && value < 0)) { in process_signed()
209 if (value > max || (errno == ERANGE && value > 0)) { in process_signed()
217 (psa_status_t) value); in process_signed()
239 unsigned long value = strtoul(*argp, &end, 0); in process_unsigned() local
244 if (value > max || errno == ERANGE) { in process_unsigned()
252 (psa_algorithm_t) value); in process_unsigned()
256 (psa_ecc_family_t) value); in process_unsigned()
[all …]
/openthread-latest/tools/tcat_ble_client/tlv/
Dtlv.py35 def __init__(self, type: int = None, value: bytes = None):
37 self.value: bytes = value
66 self.value = data[header_len:header_len + length]
69 has_long_header = len(self.value) >= 254
71 len_bytes = len(self.value).to_bytes(header_len // 2, byteorder='big')
76 return header + self.value
Dadvertised_tlv.py38 def __init__(self, type: int = None, size: int = None, value: bytes = None):
41 self._value: bytes = value
85 value = data[header_len:header_len + size]
88 res = DeviceTypeStatusTlv(type, size, value)
90 res = CapabilitiesTlv(type, size, value)
92 res = AdvertisedTlv(type, size, value)
/openthread-latest/tests/nexus/platform/
Dnexus_settings.cpp76 const Entry::Value *value; in Get() local
82 value = entry->mValues.FindMatching(IndexMatcher); in Get()
83 VerifyOrExit(value != nullptr, error = kErrorNotFound); in Get()
88 uint16_t length = value->mData.GetLength(); in Get()
94 memcpy(aValue, value->mData.GetBytes(), Min(size, length)); in Get()
105 Entry::Value *value; in SetOrAdd() local
117 value = Entry::Value::Allocate(); in SetOrAdd()
118 VerifyOrQuit(value != nullptr); in SetOrAdd()
119 SuccessOrQuit(value->mData.SetFrom(aValue, aValueLength)); in SetOrAdd()
126 entry->mValues.Push(*value); in SetOrAdd()
/openthread-latest/third_party/mbedtls/repo/library/
Dbase64.c26 unsigned char mbedtls_ct_base64_enc_char(unsigned char value) in mbedtls_ct_base64_enc_char() argument
32 digit |= mbedtls_ct_uchar_in_range_if(0, 25, value, 'A' + value); in mbedtls_ct_base64_enc_char()
33 digit |= mbedtls_ct_uchar_in_range_if(26, 51, value, 'a' + value - 26); in mbedtls_ct_base64_enc_char()
34 digit |= mbedtls_ct_uchar_in_range_if(52, 61, value, '0' + value - 52); in mbedtls_ct_base64_enc_char()
35 digit |= mbedtls_ct_uchar_in_range_if(62, 62, value, '+'); in mbedtls_ct_base64_enc_char()
36 digit |= mbedtls_ct_uchar_in_range_if(63, 63, value, '/'); in mbedtls_ct_base64_enc_char()
Doid.c928 unsigned int value = 0; in FN_OID_TYPED_FROM_ASN1() local
942 if (value > (UINT_MAX >> 7)) { in FN_OID_TYPED_FROM_ASN1()
945 if ((value == 0) && ((oid->p[i]) == 0x80)) { in FN_OID_TYPED_FROM_ASN1()
950 value <<= 7; in FN_OID_TYPED_FROM_ASN1()
951 value |= oid->p[i] & 0x7F; in FN_OID_TYPED_FROM_ASN1()
959 if (value >= 80) { in FN_OID_TYPED_FROM_ASN1()
961 component2 = value - 80; in FN_OID_TYPED_FROM_ASN1()
962 } else if (value >= 40) { in FN_OID_TYPED_FROM_ASN1()
964 component2 = value - 40; in FN_OID_TYPED_FROM_ASN1()
967 component2 = value; in FN_OID_TYPED_FROM_ASN1()
[all …]
/openthread-latest/src/core/thread/
Dlink_metrics.cpp766 uint16_t value; in ScaleLinkMarginToRawValue() local
768 value = Min(aLinkMargin, kMaxLinkMargin); in ScaleLinkMarginToRawValue()
769 value = value * NumericLimits<uint8_t>::kMax; in ScaleLinkMarginToRawValue()
770 value = DivideAndRoundToClosest<uint16_t>(value, kMaxLinkMargin); in ScaleLinkMarginToRawValue()
772 return static_cast<uint8_t>(value); in ScaleLinkMarginToRawValue()
779 uint16_t value = aRawValue; in ScaleRawValueToLinkMargin() local
781 value = value * kMaxLinkMargin; in ScaleRawValueToLinkMargin()
782 value = DivideAndRoundToClosest<uint16_t>(value, NumericLimits<uint8_t>::kMax); in ScaleRawValueToLinkMargin()
783 return static_cast<uint8_t>(value); in ScaleRawValueToLinkMargin()
791 int32_t value = aRssi; in ScaleRssiToRawValue() local
[all …]
/openthread-latest/tools/harness-automation/autothreadharness/
Dopen_thread_controller.py86 def __exit__(self, type, value, traceback): argument
293 def networkname(self, value): argument
294 self._req('networkname %s' % value)
302 def mode(self, value): argument
303 self._req('mode %s' % value)
326 def channel(self, value): argument
327 self._req('channel %d' % value)
335 def panid(self, value): argument
336 self._req('panid %s' % value)
344 def extpanid(self, value): argument
[all …]

12345678