Home
last modified time | relevance | path

Searched refs:aValue (Results 1 – 25 of 56) sorted by relevance

123

/openthread-3.4.0/src/core/common/
Dencoding.hpp113 template <typename UintType> UintType HostSwap(UintType aValue);
115 template <> inline uint8_t HostSwap(uint8_t aValue) { return aValue; } in HostSwap() argument
116 template <> inline uint16_t HostSwap(uint16_t aValue) { return HostSwap16(aValue); } in HostSwap() argument
117 template <> inline uint32_t HostSwap(uint32_t aValue) { return HostSwap32(aValue); } in HostSwap() argument
118 template <> inline uint64_t HostSwap(uint64_t aValue) { return HostSwap64(aValue); } in HostSwap() argument
181 inline void WriteUint16(uint16_t aValue, uint8_t *aBuffer) in WriteUint16() argument
183 aBuffer[0] = (aValue >> 8) & 0xff; in WriteUint16()
184 aBuffer[1] = (aValue >> 0) & 0xff; in WriteUint16()
194 inline void WriteUint24(uint32_t aValue, uint8_t *aBuffer) in WriteUint24() argument
196 aBuffer[0] = (aValue >> 16) & 0xff; in WriteUint24()
[all …]
Dtlvs.hpp191 …static Error ReadTlvValue(const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aMinLen…
207 …ic Error Read(const Message &aMessage, uint16_t aOffset, typename SimpleTlvType::ValueType &aValue) in Read() argument
209 return ReadTlvValue(aMessage, aOffset, &aValue, sizeof(aValue)); in Read()
226 … Error Read(const Message &aMessage, uint16_t aOffset, typename UintTlvType::UintValueType &aValue) in Read() argument
228 return ReadUintTlv(aMessage, aOffset, aValue); in Read()
245 …c Error Read(const Message &aMessage, uint16_t aOffset, typename StringTlvType::StringType &aValue) in Read() argument
247 return ReadStringTlv(aMessage, aOffset, StringTlvType::kMaxStringLength, aValue); in Read()
337 …template <typename TlvType> static Error Find(const Message &aMessage, void *aValue, uint8_t aLeng… in Find() argument
339 return FindTlv(aMessage, TlvType::kType, aValue, aLength); in Find()
363 static Error Find(const Message &aMessage, typename SimpleTlvType::ValueType &aValue) in Find() argument
[all …]
Dtlvs.cpp185 …v::ReadStringTlv(const Message &aMessage, uint16_t aOffset, uint8_t aMaxStringLength, char *aValue) in ReadStringTlv() argument
195 aMessage.ReadBytes(info.mValueOffset, aValue, length); in ReadStringTlv()
196 aValue[length] = '\0'; in ReadStringTlv()
202 …ename UintType> Error Tlv::ReadUintTlv(const Message &aMessage, uint16_t aOffset, UintType &aValue) in ReadUintTlv() argument
206 SuccessOrExit(error = ReadTlvValue(aMessage, aOffset, &aValue, sizeof(aValue))); in ReadUintTlv()
207 aValue = Encoding::BigEndian::HostSwap<UintType>(aValue); in ReadUintTlv()
214 template Error Tlv::ReadUintTlv<uint8_t>(const Message &aMessage, uint16_t aOffset, uint8_t &aValue
215 …late Error Tlv::ReadUintTlv<uint16_t>(const Message &aMessage, uint16_t aOffset, uint16_t &aValue);
216 …late Error Tlv::ReadUintTlv<uint32_t>(const Message &aMessage, uint16_t aOffset, uint32_t &aValue);
218 Error Tlv::ReadTlvValue(const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aMinLength) in ReadTlvValue() argument
[all …]
Dsettings_driver.hpp108 Error Add(uint16_t aKey, const void *aValue, uint16_t aValueLength) in Add() argument
111 const uint8_t *value = reinterpret_cast<const uint8_t *>(aValue); in Add()
161 Error Get(uint16_t aKey, int aIndex, void *aValue, uint16_t *aValueLength) const in Get() argument
164 uint8_t *value = reinterpret_cast<uint8_t *>(aValue); in Get()
190 …Error Get(uint16_t aKey, void *aValue, uint16_t *aValueLength) const { return Get(aKey, 0, aValue,… in Get() argument
207 Error Set(uint16_t aKey, const void *aValue, uint16_t aValueLength) in Set() argument
210 const uint8_t *value = reinterpret_cast<const uint8_t *>(aValue); in Set()
Dsettings.cpp406 Error Settings::ReadEntry(Key aKey, void *aValue, uint16_t aMaxLength) const in ReadEntry() argument
411 error = Get<SettingsDriver>().Get(aKey, aValue, &length); in ReadEntry()
412 Log(kActionRead, error, aKey, aValue); in ReadEntry()
417 Error Settings::SaveEntry(Key aKey, const void *aValue, void *aPrev, uint16_t aLength) in SaveEntry() argument
424 (memcmp(aValue, aPrev, aLength) == 0)) in SaveEntry()
430 error = Get<SettingsDriver>().Set(aKey, aValue, aLength); in SaveEntry()
433 Log(action, error, aKey, aValue); in SaveEntry()
447 void Settings::Log(Action aAction, Error aError, Key aKey, const void *aValue) in Log() argument
452 OT_UNUSED_VARIABLE(aValue); in Log()
503 if (aValue != nullptr) in Log()
[all …]
Dnum_utils.hpp86 template <typename Type> Type Clamp(Type aValue, Type aMin, Type aMax) in Clamp() argument
88 Type value = Max(aValue, aMin); in Clamp()
105 template <typename UintType> uint8_t ClampToUint8(UintType aValue) in ClampToUint8() argument
111 return static_cast<uint8_t>(Min(aValue, static_cast<UintType>(NumericLimits<uint8_t>::kMax))); in ClampToUint8()
126 template <typename UintType> uint16_t ClampToUint16(UintType aValue) in ClampToUint16() argument
131 return static_cast<uint16_t>(Min(aValue, static_cast<UintType>(NumericLimits<uint16_t>::kMax))); in ClampToUint16()
Dtime.hpp87 explicit Time(uint32_t aValue) { SetValue(aValue); } in Time() argument
103 void SetValue(uint32_t aValue) { mValue = aValue; } in SetValue() argument
Drandom.cpp159 uint32_t AddJitter(uint32_t aValue, uint16_t aJitter) in AddJitter() argument
161 aJitter = (aJitter <= aValue) ? aJitter : static_cast<uint16_t>(aValue); in AddJitter()
163 return aValue + GetUint32InRange(0, 2 * aJitter + 1) - aJitter; in AddJitter()
Dbit_vector.hpp87 void Set(uint16_t aIndex, bool aValue) in Set() argument
91 if (aValue) in Set()
/openthread-3.4.0/src/core/utils/
Dparse_cmdline.hpp542 template <typename Type> otError ParseAs(Type &aValue) const;
660 template <> inline otError Arg::ParseAs(uint8_t &aValue) const { return ParseAsUint8(aValue); } in ParseAs()
662 template <> inline otError Arg::ParseAs(uint16_t &aValue) const { return ParseAsUint16(aValue); } in ParseAs()
664 template <> inline otError Arg::ParseAs(uint32_t &aValue) const { return ParseAsUint32(aValue); } in ParseAs()
666 template <> inline otError Arg::ParseAs(uint64_t &aValue) const { return ParseAsUint64(aValue); } in ParseAs()
668 template <> inline otError Arg::ParseAs(bool &aValue) const { return ParseAsBool(aValue); } in ParseAs()
670 template <> inline otError Arg::ParseAs(int8_t &aValue) const { return ParseAsInt8(aValue); } in ParseAs()
672 template <> inline otError Arg::ParseAs(int16_t &aValue) const { return ParseAsInt16(aValue); } in ParseAs()
674 template <> inline otError Arg::ParseAs(int32_t &aValue) const { return ParseAsInt32(aValue); } in ParseAs()
676 template <> inline otError Arg::ParseAs(const char *&aValue) const in ParseAs()
[all …]
Dflash.cpp117 Error Flash::Get(uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) const in Get() argument
141 if (aValue && aValueLength) in Get()
150 … otPlatFlashRead(&GetInstance(), mSwapIndex, offset + sizeof(record), aValue, readLength); in Get()
168 Error Flash::Set(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in Set() argument
170 return Add(aKey, true, aValue, aValueLength); in Set()
173 Error Flash::Add(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in Add() argument
177 return Add(aKey, first, aValue, aValueLength); in Add()
180 Error Flash::Add(uint16_t aKey, bool aFirst, const uint8_t *aValue, uint16_t aValueLength) in Add() argument
186 record.SetData(aValue, aValueLength); in Add()
Dflash.hpp86 Error Get(uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) const;
103 Error Set(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
117 Error Add(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
216 Error Add(uint16_t aKey, bool aFirst, const uint8_t *aValue, uint16_t aValueLength);
Dparse_cmdline.cpp51 static Error ParseDigit(char aDigitChar, uint8_t &aValue) in ParseDigit() argument
56 aValue = static_cast<uint8_t>(aDigitChar - '0'); in ParseDigit()
62 static Error ParseHexDigit(char aHexChar, uint8_t &aValue) in ParseHexDigit() argument
68 ExitNow(aValue = static_cast<uint8_t>(aHexChar - 'A' + 10)); in ParseHexDigit()
73 ExitNow(aValue = static_cast<uint8_t>(aHexChar - 'a' + 10)); in ParseHexDigit()
76 error = ParseDigit(aHexChar, aValue); in ParseHexDigit()
/openthread-3.4.0/src/core/coap/
Dcoap_message.cpp106 uint8_t Message::WriteExtendedOptionField(uint16_t aValue, uint8_t *&aBuffer) in WriteExtendedOptionField() argument
129 if (aValue < kOption1ByteExtensionOffset) in WriteExtendedOptionField()
131 rval = static_cast<uint8_t>(aValue); in WriteExtendedOptionField()
133 else if (aValue < kOption2ByteExtensionOffset) in WriteExtendedOptionField()
136 *aBuffer = static_cast<uint8_t>(aValue - kOption1ByteExtensionOffset); in WriteExtendedOptionField()
142 Encoding::BigEndian::WriteUint16(aValue - kOption2ByteExtensionOffset, aBuffer); in WriteExtendedOptionField()
149 Error Message::AppendOption(uint16_t aNumber, uint16_t aLength, const void *aValue) in AppendOption() argument
170 SuccessOrExit(error = AppendBytes(aValue, aLength)); in AppendOption()
180 Error Message::AppendUintOption(uint16_t aNumber, uint32_t aValue) in AppendUintOption() argument
186 Encoding::BigEndian::WriteUint32(aValue, buffer); in AppendUintOption()
[all …]
/openthread-3.4.0/examples/platforms/utils/
Dsettings_ram.c71 otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16… in otPlatSettingsGet() argument
93 if (aValue != NULL && aValueLength != NULL) in otPlatSettingsGet()
101 memcpy(aValue, &sSettingsBuf[i + sizeof(struct settingsBlock)], readLength); in otPlatSettingsGet()
123 otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa… in otPlatSettingsSet() argument
154 return otPlatSettingsAdd(aInstance, aKey, aValue, aValueLength); in otPlatSettingsSet()
157 otError otPlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa… in otPlatSettingsAdd() argument
171 … memcpy(&sSettingsBuf[sSettingsBufLength + sizeof(struct settingsBlock)], aValue, aValueLength); in otPlatSettingsAdd()
/openthread-3.4.0/src/posix/platform/
Dconfig_file.cpp53 otError ConfigFile::Get(const char *aKey, int &aIterator, char *aValue, int aValueLength) in Get() argument
61 VerifyOrExit((aKey != nullptr) && (aValue != nullptr), error = OT_ERROR_INVALID_ARGS); in Get()
97 memcpy(aValue, value, static_cast<size_t>(aValueLength)); in Get()
98 aValue[aValueLength] = '\0'; in Get()
116 otError ConfigFile::Add(const char *aKey, const char *aValue) in Add() argument
124 VerifyOrExit((aKey != nullptr) && (aValue != nullptr), error = OT_ERROR_INVALID_ARGS); in Add()
134 VerifyOrDie(fprintf(fp, "%s=%s\n", aKey, aValue) > 0, OT_EXIT_ERROR_ERRNO); in Add()
Dsettings.hpp48 otError PlatformSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint…
59 void PlatformSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVal…
70 void PlatformSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVal…
Dsettings.cpp240 otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16… in otPlatSettingsGet() argument
250 error = otPosixSecureSettingsGet(aInstance, aKey, aIndex, aValue, aValueLength); in otPlatSettingsGet()
255 error = ot::Posix::PlatformSettingsGet(aInstance, aKey, aIndex, aValue, aValueLength); in otPlatSettingsGet()
263 otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa… in otPlatSettingsSet() argument
270 error = otPosixSecureSettingsSet(aInstance, aKey, aValue, aValueLength); in otPlatSettingsSet()
275 ot::Posix::PlatformSettingsSet(aInstance, aKey, aValue, aValueLength); in otPlatSettingsSet()
281 otError otPlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa… in otPlatSettingsAdd() argument
290 error = otPosixSecureSettingsAdd(aInstance, aKey, aValue, aValueLength); in otPlatSettingsAdd()
295 ot::Posix::PlatformSettingsAdd(aInstance, aKey, aValue, aValueLength); in otPlatSettingsAdd()
332 otError PlatformSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint… in PlatformSettingsGet() argument
[all …]
Dconfig_file.hpp68 otError Get(const char *aKey, int &aIterator, char *aValue, int aValueLength);
80 otError Add(const char *aKey, const char *aValue);
/openthread-3.4.0/src/posix/platform/include/openthread/platform/
Dsecure_settings.h100 uint8_t *aValue,
120 otError otPosixSecureSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint1…
142 otError otPosixSecureSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint1…
/openthread-3.4.0/examples/platforms/simulation/
Ddiag.c78 otError otPlatDiagGpioSet(uint32_t aGpio, bool aValue) in otPlatDiagGpioSet() argument
83 sGpioValue = aValue; in otPlatDiagGpioSet()
89 otError otPlatDiagGpioGet(uint32_t aGpio, bool *aValue) in otPlatDiagGpioGet() argument
93 otEXPECT_ACTION((aGpio == SIM_GPIO) && (aValue != NULL), error = OT_ERROR_INVALID_ARGS); in otPlatDiagGpioGet()
94 *aValue = sGpioValue; in otPlatDiagGpioGet()
/openthread-3.4.0/include/openthread/platform/
Dsettings.h147 otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16…
176 otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa…
212 otError otPlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa…
/openthread-3.4.0/src/core/meshcop/
Ddataset.hpp766 Error SetTlv(Tlv::Type aType, const void *aValue, uint8_t aLength);
780 template <typename ValueType> Error SetTlv(Tlv::Type aType, const ValueType &aValue) in SetTlv() argument
784 return SetTlv(aType, &aValue, sizeof(ValueType)); in SetTlv()
933 template <> inline Error Dataset::SetTlv(Tlv::Type aType, const uint16_t &aValue) in SetTlv() argument
935 uint16_t value = Encoding::BigEndian::HostSwap16(aValue); in SetTlv()
950 template <> inline Error Dataset::SetTlv(Tlv::Type aType, const uint32_t &aValue) in SetTlv() argument
952 uint32_t value = Encoding::BigEndian::HostSwap32(aValue); in SetTlv()
/openthread-3.4.0/src/core/api/
Dcoap_api.cpp82 …oapMessageAppendOption(otMessage *aMessage, uint16_t aNumber, uint16_t aLength, const void *aValue) in otCoapMessageAppendOption() argument
84 return AsCoapMessage(aMessage).AppendOption(aNumber, aLength, aValue); in otCoapMessageAppendOption()
87 otError otCoapMessageAppendUintOption(otMessage *aMessage, uint16_t aNumber, uint32_t aValue) in otCoapMessageAppendUintOption() argument
89 return AsCoapMessage(aMessage).AppendUintOption(aNumber, aValue); in otCoapMessageAppendUintOption()
191 otError otCoapOptionIteratorGetOptionUintValue(otCoapOptionIterator *aIterator, uint64_t *aValue) in otCoapOptionIteratorGetOptionUintValue() argument
193 return AsCoreType(aIterator).ReadOptionValue(*aValue); in otCoapOptionIteratorGetOptionUintValue()
196 otError otCoapOptionIteratorGetOptionValue(otCoapOptionIterator *aIterator, void *aValue) in otCoapOptionIteratorGetOptionValue() argument
198 return AsCoreType(aIterator).ReadOptionValue(aValue); in otCoapOptionIteratorGetOptionValue()
Drandom_noncrypto_api.cpp63 uint32_t otRandomNonCryptoAddJitter(uint32_t aValue, uint16_t aJitter) in otRandomNonCryptoAddJitter() argument
65 return Random::NonCrypto::AddJitter(aValue, aJitter); in otRandomNonCryptoAddJitter()

123