Home
last modified time | relevance | path

Searched refs:aValueLength (Results 1 – 20 of 20) sorted by relevance

/openthread-latest/src/core/common/
Dsettings_driver.hpp104 Error Add(uint16_t aKey, const void *aValue, uint16_t aValueLength) in Add() argument
110 error = mFlash.Add(aKey, value, aValueLength); in Add()
112 error = otPlatSettingsAdd(GetInstancePtr(), aKey, value, aValueLength); in Add()
155 Error Get(uint16_t aKey, int aIndex, void *aValue, uint16_t *aValueLength) const in Get()
161 error = mFlash.Get(aKey, aIndex, value, aValueLength); in Get()
163 error = otPlatSettingsGet(GetInstancePtr(), aKey, aIndex, value, aValueLength); in Get()
183 …r Get(uint16_t aKey, void *aValue, uint16_t *aValueLength) const { return Get(aKey, 0, aValue, aVa… in Get()
199 Error Set(uint16_t aKey, const void *aValue, uint16_t aValueLength) in Set() argument
205 error = mFlash.Set(aKey, value, aValueLength); in Set()
207 error = otPlatSettingsSet(GetInstancePtr(), aKey, value, aValueLength); in Set()
/openthread-latest/tests/nexus/platform/
Dnexus_settings.cpp45 …tingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) in otPlatSettingsGet() argument
47 return AsNode(aInstance).mSettings.Get(aKey, aIndex, aValue, aValueLength); in otPlatSettingsGet()
50 …PlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in otPlatSettingsSet() argument
52 return AsNode(aInstance).mSettings.SetOrAdd(Settings::kSet, aKey, aValue, aValueLength); in otPlatSettingsSet()
55 …PlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in otPlatSettingsAdd() argument
57 return AsNode(aInstance).mSettings.SetOrAdd(Settings::kAdd, aKey, aValue, aValueLength); in otPlatSettingsAdd()
72 Error Settings::Get(uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) const in Get()
85 if (aValueLength != nullptr) in Get()
87 uint16_t size = *aValueLength; in Get()
90 *aValueLength = length; in Get()
[all …]
Dnexus_settings.hpp47 Error Get(uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) const;
48 Error SetOrAdd(SetAddMode aMode, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
/openthread-latest/examples/platforms/utils/
Dsettings_ram.c70 …tingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) in otPlatSettingsGet() argument
92 if (aValue != NULL && aValueLength != NULL) in otPlatSettingsGet()
95 if (readLength > *aValueLength) in otPlatSettingsGet()
97 readLength = *aValueLength; in otPlatSettingsGet()
114 if (aValueLength != NULL) in otPlatSettingsGet()
116 *aValueLength = valueLength; in otPlatSettingsGet()
122 …PlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in otPlatSettingsSet() argument
153 return otPlatSettingsAdd(aInstance, aKey, aValue, aValueLength); in otPlatSettingsSet()
156 …PlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in otPlatSettingsAdd() argument
162 const uint16_t newBlockLength = sizeof(struct settingsBlock) + aValueLength; in otPlatSettingsAdd()
[all …]
/openthread-latest/src/posix/platform/
Dsettings_file.cpp113 otError SettingsFile::Get(uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) in Get() argument
143 if (aValueLength) in Get()
147 uint16_t readLength = (length <= *aValueLength ? length : *aValueLength); in Get()
152 *aValueLength = length; in Get()
171 void SettingsFile::Set(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in Set() argument
189 write(swapFd, &aValueLength, sizeof(aValueLength)) == sizeof(aValueLength) && in Set()
190 write(swapFd, aValue, aValueLength) == aValueLength, in Set()
196 void SettingsFile::Add(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in Add() argument
213 write(swapFd, &aValueLength, sizeof(aValueLength)) == sizeof(aValueLength) && in Add()
214 write(swapFd, aValue, aValueLength) == aValueLength, in Add()
Dsettings.cpp139 …tingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) in otPlatSettingsGet() argument
149 error = otPosixSecureSettingsGet(aInstance, aKey, aIndex, aValue, aValueLength); in otPlatSettingsGet()
154 error = sSettingsFile.Get(aKey, aIndex, aValue, aValueLength); in otPlatSettingsGet()
162 …PlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in otPlatSettingsSet() argument
171 error = otPosixSecureSettingsSet(aInstance, aKey, aValue, aValueLength); in otPlatSettingsSet()
176 sSettingsFile.Set(aKey, aValue, aValueLength); in otPlatSettingsSet()
182 …PlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in otPlatSettingsAdd() argument
191 error = otPosixSecureSettingsAdd(aInstance, aKey, aValue, aValueLength); in otPlatSettingsAdd()
196 sSettingsFile.Add(aKey, aValue, aValueLength); in otPlatSettingsAdd()
Dsettings_file.hpp72 otError Get(uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength);
81 void Set(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
90 void Add(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
Dconfig_file.cpp62 otError ConfigFile::Get(const char *aKey, int &aIterator, char *aValue, int aValueLength) const in Get()
108 aValueLength = OT_MIN(static_cast<int>(strlen(value)), (aValueLength - 1)); in Get()
109 memcpy(aValue, value, static_cast<size_t>(aValueLength)); in Get()
110 aValue[aValueLength] = '\0'; in Get()
Dconfig_file.hpp67 otError Get(const char *aKey, int &aIterator, char *aValue, int aValueLength) const;
Dmdns_socket.hpp164 uint32_t aValueLength,
Dmdns_socket.cpp693 uint32_t aValueLength, in SetSocketOptionValue() argument
698 if (setsockopt(aFd, aLevel, aOption, aValue, aValueLength) != 0) in SetSocketOptionValue()
/openthread-latest/src/core/utils/
Dflash.cpp114 Error Flash::Get(uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) const in Get()
138 if (aValue && aValueLength) in Get()
140 uint16_t readLength = *aValueLength; in Get()
157 if (aValueLength) in Get()
159 *aValueLength = valueLength; in Get()
165 Error Flash::Set(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in Set() argument
167 return Add(aKey, true, aValue, aValueLength); in Set()
170 Error Flash::Add(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in Add() argument
174 return Add(aKey, first, aValue, aValueLength); in Add()
177 Error Flash::Add(uint16_t aKey, bool aFirst, const uint8_t *aValue, uint16_t aValueLength) in Add() argument
[all …]
Dflash.hpp82 Error Get(uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) const;
98 Error Set(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
111 Error Add(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
208 Error Add(uint16_t aKey, bool aFirst, const uint8_t *aValue, uint16_t aValueLength);
/openthread-latest/tests/gtest/
Dfake_platform.cpp212 …latform::SettingsGet(uint16_t aKey, uint16_t aIndex, uint8_t *aValue, uint16_t *aValueLength) const in SettingsGet()
226 if (aValueLength == nullptr) in SettingsGet()
235 *aValueLength = data.size(); in SettingsGet()
239 if (*aValueLength >= data.size()) in SettingsGet()
241 *aValueLength = data.size(); in SettingsGet()
244 memcpy(aValue, &data[0], *aValueLength); in SettingsGet()
249 otError FakePlatform::SettingsSet(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in SettingsSet() argument
251 auto setting = std::vector<uint8_t>(aValue, aValue + aValueLength); in SettingsSet()
259 otError FakePlatform::SettingsAdd(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in SettingsAdd() argument
261 auto setting = std::vector<uint8_t>(aValue, aValue + aValueLength); in SettingsAdd()
[all …]
Dfake_platform.hpp97 …otError SettingsGet(uint16_t aKey, uint16_t aIndex, uint8_t *aValue, uint16_t *aValueLength) const;
98 virtual otError SettingsSet(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
99 virtual otError SettingsAdd(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
/openthread-latest/src/posix/platform/include/openthread/platform/
Dsecure_settings.h97 uint16_t *aValueLength);
115 …ureSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
136 …ureSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
/openthread-latest/include/openthread/platform/
Dsettings.h143 …ingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength);
172 …latSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
208 …latSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength);
/openthread-latest/tests/unit/
Dtest_platform.cpp287 …otPlatSettingsGet(otInstance *, uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) in otPlatSettingsGet() argument
301 if (aValueLength == nullptr) in otPlatSettingsGet()
310 *aValueLength = data.size(); in otPlatSettingsGet()
314 if (*aValueLength >= data.size()) in otPlatSettingsGet()
316 *aValueLength = data.size(); in otPlatSettingsGet()
319 memcpy(aValue, &data[0], *aValueLength); in otPlatSettingsGet()
324 …tError otPlatSettingsSet(otInstance *, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in otPlatSettingsSet() argument
326 auto setting = std::vector<uint8_t>(aValue, aValue + aValueLength); in otPlatSettingsSet()
334 …tError otPlatSettingsAdd(otInstance *, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in otPlatSettingsAdd() argument
336 auto setting = std::vector<uint8_t>(aValue, aValue + aValueLength); in otPlatSettingsAdd()
/openthread-latest/tests/fuzz/
Dfuzzer_platform.cpp475 …tingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) in otPlatSettingsGet() argument
481 OT_UNUSED_VARIABLE(aValueLength); in otPlatSettingsGet()
485 …PlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in otPlatSettingsSet() argument
490 OT_UNUSED_VARIABLE(aValueLength); in otPlatSettingsSet()
494 …PlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength) in otPlatSettingsAdd() argument
499 OT_UNUSED_VARIABLE(aValueLength); in otPlatSettingsAdd()
/openthread-latest/src/core/net/
Ddns_types.hpp1187 …try(const char *aKey, const uint8_t *aValue, uint8_t aValueLength) { Init(aKey, aValue, aValueLeng… in TxtEntry() argument
1196 void Init(const char *aKey, const uint8_t *aValue, uint8_t aValueLength) in Init() argument
1200 mValueLength = aValueLength; in Init()