Home
last modified time | relevance | path

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

123

/openthread-latest/src/core/common/
Dencoding.hpp112 template <typename UintType> UintType HostSwap(UintType aValue);
114 template <> inline uint8_t HostSwap(uint8_t aValue) { return aValue; } in HostSwap() argument
115 template <> inline uint16_t HostSwap(uint16_t aValue) { return HostSwap16(aValue); } in HostSwap() argument
116 template <> inline uint32_t HostSwap(uint32_t aValue) { return HostSwap32(aValue); } in HostSwap() argument
117 template <> inline uint64_t HostSwap(uint64_t aValue) { return HostSwap64(aValue); } in HostSwap() argument
197 inline void WriteUint16(uint16_t aValue, uint8_t *aBuffer) in WriteUint16() argument
199 aBuffer[0] = (aValue >> 8) & 0xff; in WriteUint16()
200 aBuffer[1] = (aValue >> 0) & 0xff; in WriteUint16()
210 inline void WriteUint24(uint32_t aValue, uint8_t *aBuffer) in WriteUint24() argument
212 aBuffer[0] = (aValue >> 16) & 0xff; in WriteUint24()
[all …]
Dtlvs.hpp223 …emplate <typename SimpleTlvType> void WriteValueAs(const typename SimpleTlvType::ValueType &aValue) in WriteValueAs() argument
225 memcpy(this + 1, &aValue, sizeof(aValue)); in WriteValueAs()
240 template <typename UintTlvType> void WriteValueAs(typename UintTlvType::UintValueType aValue) in WriteValueAs() argument
242 …return BigEndian::Write<typename UintTlvType::UintValueType>(aValue, reinterpret_cast<uint8_t *>(t… in WriteValueAs()
327 …static Error ReadTlvValue(const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aMinLen…
343 …ic Error Read(const Message &aMessage, uint16_t aOffset, typename SimpleTlvType::ValueType &aValue) in Read() argument
345 return ReadTlvValue(aMessage, aOffset, &aValue, sizeof(aValue)); in Read()
362 … Error Read(const Message &aMessage, uint16_t aOffset, typename UintTlvType::UintValueType &aValue) in Read() argument
364 return ReadUintTlv(aMessage, aOffset, aValue); in Read()
381 …c Error Read(const Message &aMessage, uint16_t aOffset, typename StringTlvType::StringType &aValue) in Read() argument
[all …]
Dtlvs.cpp165 …v::ReadStringTlv(const Message &aMessage, uint16_t aOffset, uint8_t aMaxStringLength, char *aValue) in ReadStringTlv() argument
173 aMessage.ReadBytes(info.mValueOffsetRange, aValue); in ReadStringTlv()
174 aValue[info.mValueOffsetRange.GetLength()] = kNullChar; in ReadStringTlv()
180 …ename UintType> Error Tlv::ReadUintTlv(const Message &aMessage, uint16_t aOffset, UintType &aValue) in ReadUintTlv() argument
184 SuccessOrExit(error = ReadTlvValue(aMessage, aOffset, &aValue, sizeof(aValue))); in ReadUintTlv()
185 aValue = BigEndian::HostSwap<UintType>(aValue); in ReadUintTlv()
192 template Error Tlv::ReadUintTlv<uint8_t>(const Message &aMessage, uint16_t aOffset, uint8_t &aValue
193 …late Error Tlv::ReadUintTlv<uint16_t>(const Message &aMessage, uint16_t aOffset, uint16_t &aValue);
194 …late Error Tlv::ReadUintTlv<uint32_t>(const Message &aMessage, uint16_t aOffset, uint32_t &aValue);
196 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.cpp396 Error Settings::ReadEntry(Key aKey, void *aValue, uint16_t aMaxLength) const in ReadEntry() argument
401 error = Get<SettingsDriver>().Get(aKey, aValue, &length); in ReadEntry()
402 Log(kActionRead, error, aKey, aValue); in ReadEntry()
407 Error Settings::SaveEntry(Key aKey, const void *aValue, void *aPrev, uint16_t aLength) in SaveEntry() argument
414 (memcmp(aValue, aPrev, aLength) == 0)) in SaveEntry()
420 error = Get<SettingsDriver>().Set(aKey, aValue, aLength); in SaveEntry()
423 Log(action, error, aKey, aValue); in SaveEntry()
437 void Settings::Log(Action aAction, Error aError, Key aKey, const void *aValue) in Log() argument
442 OT_UNUSED_VARIABLE(aValue); in Log()
493 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()
147 template <typename IntType> int8_t ClampToInt8(IntType aValue) in ClampToInt8() argument
153 return static_cast<int8_t>(Clamp(aValue, static_cast<IntType>(NumericLimits<int8_t>::kMin), in ClampToInt8()
Drandom.cpp159 uint32_t AddJitter(uint32_t aValue, uint16_t aJitter) in AddJitter() argument
163 VerifyOrExit(aValue != 0); in AddJitter()
165 aJitter = (aJitter <= aValue) ? aJitter : static_cast<uint16_t>(aValue); in AddJitter()
166 delay = aValue + GetUint32InRange(0, 2 * aJitter + 1) - aJitter; in AddJitter()
Dtime.hpp88 explicit Time(uint32_t aValue) { SetValue(aValue); } in Time() argument
104 void SetValue(uint32_t aValue) { mValue = aValue; } in SetValue() argument
/openthread-latest/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()
Dverhoeff_checksum.cpp76 uint8_t VerhoeffChecksum::Permute(uint8_t aPosition, uint8_t aValue) in Permute() argument
83 return Lookup(aValue, kPermutation[aPosition]); in Permute()
86 uint8_t VerhoeffChecksum::InverseOf(uint8_t aValue) in InverseOf() argument
90 return Lookup(aValue, kInverse); in InverseOf()
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);
/openthread-latest/src/lib/url/
Durl.cpp121 otError Url::ParseUint32(const char *aName, uint32_t &aValue) const in ParseUint32()
131 aValue = static_cast<uint32_t>(value); in ParseUint32()
137 otError Url::ParseUint16(const char *aName, uint16_t &aValue) const in ParseUint16()
144 aValue = static_cast<uint16_t>(value); in ParseUint16()
150 otError Url::ParseUint8(const char *aName, uint8_t &aValue) const in ParseUint8()
157 aValue = static_cast<uint8_t>(value); in ParseUint8()
163 otError Url::ParseInt32(const char *aName, int32_t &aValue) const in ParseInt32()
173 aValue = static_cast<int32_t>(value); in ParseInt32()
179 otError Url::ParseInt16(const char *aName, int16_t &aValue) const in ParseInt16()
186 aValue = static_cast<int16_t>(value); in ParseInt16()
[all …]
Durl.hpp124 otError ParseUint32(const char *aName, uint32_t &aValue) const;
140 otError ParseUint16(const char *aName, uint16_t &aValue) const;
156 otError ParseUint8(const char *aName, uint8_t &aValue) const;
173 otError ParseInt32(const char *aName, int32_t &aValue) const;
190 otError ParseInt16(const char *aName, int16_t &aValue) const;
207 otError ParseInt8(const char *aName, int8_t &aValue) const;
/openthread-latest/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 BigEndian::WriteUint16(aValue - kOption2ByteExtensionOffset, aBuffer); in WriteExtendedOptionField()
181 Error Message::AppendOption(uint16_t aNumber, uint16_t aLength, const void *aValue) in AppendOption() argument
186 SuccessOrExit(error = AppendBytes(aValue, aLength)); in AppendOption()
207 Error Message::AppendUintOption(uint16_t aNumber, uint32_t aValue) in AppendUintOption() argument
213 BigEndian::WriteUint32(aValue, buffer); in AppendUintOption()
[all …]
/openthread-latest/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-latest/src/posix/platform/
Dconfig_file.cpp62 otError ConfigFile::Get(const char *aKey, int &aIterator, char *aValue, int aValueLength) const in Get() argument
104 if (aValue != nullptr) in Get()
109 memcpy(aValue, value, static_cast<size_t>(aValueLength)); in Get()
110 aValue[aValueLength] = '\0'; in Get()
129 otError ConfigFile::Add(const char *aKey, const char *aValue) in Add() argument
137 VerifyOrExit((aKey != nullptr) && (aValue != nullptr), error = OT_ERROR_INVALID_ARGS); in Add()
147 VerifyOrDie(fprintf(fp, "%s=%s\n", aKey, aValue) > 0, OT_EXIT_ERROR_ERRNO); in Add()
Dsettings.cpp241 otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16… in otPlatSettingsGet() argument
251 error = otPosixSecureSettingsGet(aInstance, aKey, aIndex, aValue, aValueLength); in otPlatSettingsGet()
256 error = ot::Posix::PlatformSettingsGet(aInstance, aKey, aIndex, aValue, aValueLength); in otPlatSettingsGet()
264 otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa… in otPlatSettingsSet() argument
271 error = otPosixSecureSettingsSet(aInstance, aKey, aValue, aValueLength); in otPlatSettingsSet()
276 ot::Posix::PlatformSettingsSet(aInstance, aKey, aValue, aValueLength); in otPlatSettingsSet()
282 otError otPlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aVa… in otPlatSettingsAdd() argument
291 error = otPosixSecureSettingsAdd(aInstance, aKey, aValue, aValueLength); in otPlatSettingsAdd()
296 ot::Posix::PlatformSettingsAdd(aInstance, aKey, aValue, aValueLength); in otPlatSettingsAdd()
333 otError PlatformSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint… in PlatformSettingsGet() argument
[all …]
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…
/openthread-latest/src/lib/utils/
Dendian.hpp61 inline void WriteUint16(uint16_t aValue, uint8_t *aBuffer) in WriteUint16() argument
63 aBuffer[0] = (aValue >> 0) & 0xff; in WriteUint16()
64 aBuffer[1] = (aValue >> 8) & 0xff; in WriteUint16()
/openthread-latest/src/core/meshcop/
Ddataset.hpp341 template <typename SimpleTlvType> Error Read(typename SimpleTlvType::ValueType &aValue) const in Read()
345 …return (tlv == nullptr) ? kErrorNotFound : (aValue = tlv->ReadValueAs<SimpleTlvType>(), kErrorNone… in Read()
361 template <typename UintTlvType> Error Read(typename UintTlvType::UintValueType &aValue) const in Read()
365 … return (tlv == nullptr) ? kErrorNotFound : (aValue = tlv->ReadValueAs<UintTlvType>(), kErrorNone); in Read()
394 Error WriteTlv(Tlv::Type aType, const void *aValue, uint8_t aLength);
409 template <typename SimpleTlvType> Error Write(const typename SimpleTlvType::ValueType &aValue) in Write() argument
411 return WriteTlv(static_cast<Tlv::Type>(SimpleTlvType::kType), &aValue, sizeof(aValue)); in Write()
427 template <typename UintTlvType> Error Write(typename UintTlvType::UintValueType aValue) in Write() argument
429 typename UintTlvType::UintValueType value = BigEndian::HostSwap(aValue); in Write()
/openthread-latest/examples/platforms/simulation/
Ddiag.c85 otError otPlatDiagGpioSet(uint32_t aGpio, bool aValue) in otPlatDiagGpioSet() argument
90 sGpioValue = aValue; in otPlatDiagGpioSet()
96 otError otPlatDiagGpioGet(uint32_t aGpio, bool *aValue) in otPlatDiagGpioGet() argument
100 otEXPECT_ACTION((aGpio == SIM_GPIO) && (aValue != NULL), error = OT_ERROR_INVALID_ARGS); in otPlatDiagGpioGet()
101 *aValue = sGpioValue; in otPlatDiagGpioGet()
/openthread-latest/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-latest/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-latest/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()
196 otError otCoapOptionIteratorGetOptionUintValue(otCoapOptionIterator *aIterator, uint64_t *aValue) in otCoapOptionIteratorGetOptionUintValue() argument
198 return AsCoreType(aIterator).ReadOptionValue(*aValue); in otCoapOptionIteratorGetOptionUintValue()
201 otError otCoapOptionIteratorGetOptionValue(otCoapOptionIterator *aIterator, void *aValue) in otCoapOptionIteratorGetOptionValue() argument
203 return AsCoreType(aIterator).ReadOptionValue(aValue); in otCoapOptionIteratorGetOptionValue()

123