Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
pal_sst.h File Reference
PAL SST. This file contains Secure Storage APIs and is part of the PAL Service API. It provides read/write functionalities to SST and iterator capabilities. More...
Go to the source code of this file.
Functions | |
palStatus_t | pal_SSTSet (const char *itemName, const void *itemBuffer, size_t itemBufferSize, uint32_t SSTFlagsBitmap) |
palStatus_t | pal_SSTGet (const char *itemName, void *itemBuffer, size_t itemBufferSize, size_t *actualItemSize) |
palStatus_t | pal_SSTGetInfo (const char *itemName, palSSTItemInfo_t *palItemInfo) |
palStatus_t | pal_SSTRemove (const char *itemName) |
palStatus_t | pal_SSTIteratorOpen (palSSTIterator_t *palSSTIterator, const char *itemPrefix) |
palStatus_t | pal_SSTIteratorNext (palSSTIterator_t palSSTIterator, char *itemNameBuffer, size_t itemNameBufferSize) |
palStatus_t | pal_SSTIteratorClose (palSSTIterator_t palSSTIterator) |
palStatus_t | pal_SSTReset (void) |
Detailed Description
PAL SST. This file contains Secure Storage APIs and is part of the PAL Service API. It provides read/write functionalities to SST and iterator capabilities.
Definition in file pal_sst.h.
Function Documentation
palStatus_t pal_SSTGet | ( | const char * | itemName, |
void * | itemBuffer, | ||
size_t | itemBufferSize, | ||
size_t * | actualItemSize | ||
) |
Reads an item's data from storage.
The API supports reading empty items.
- Parameters:
-
[in] itemName,: The item name. Pelion client expects that the API support: - Name length of at least 120 characters.
- Alphanumeric and '.', '-', '_' characters in the name.
in/out] itemBuffer: A pointer to a memory buffer where the item will be read from storage. Can be NULL if itemBufferSize is 0. [in] itemBufferSize,: The memory buffer in bytes. Can be 0 if itemBuffer is NULL. [out] actualItemSize,: The actual size of the item.
- Returns:
- PAL_SUCCESS on success. PAL_ERR_SST_ITEM_NOT_FOUND if the item does not exist. Other negative value indicating a specific error code in the event of failure.
Definition at line 151 of file pal_plat_sst_impl.c.
palStatus_t pal_SSTGetInfo | ( | const char * | itemName, |
palSSTItemInfo_t * | palItemInfo | ||
) |
Gets item information.
- Parameters:
-
[in] itemName,: The item name. Pelion client expects that the API support: - Name length of at least 120 characters.
- Alphanumeric and '.', '-', '_' characters in the name.
[out] palItemInfo,: The item info.
- Returns:
- PAL_SUCCESS on success. PAL_ERR_SST_ITEM_NOT_FOUND if the item does not exist. Other negative value indicating a specific error code in the event of failure.
Definition at line 174 of file pal_plat_sst_impl.c.
palStatus_t pal_SSTIteratorClose | ( | palSSTIterator_t | palSSTIterator ) |
Closes item iterator.
- Parameters:
-
in/out] palSSTIterator: A pointer to item iterator. [in] itemPrefix,: The prefix of the item name.
- Returns:
- PAL_SUCCESS on success. A negative value indicating a specific error code in the event of failure.
Definition at line 284 of file pal_plat_sst_impl.c.
palStatus_t pal_SSTIteratorNext | ( | palSSTIterator_t | palSSTIterator, |
char * | itemNameBuffer, | ||
size_t | itemNameBufferSize | ||
) |
Iterates to next item.
- Parameters:
-
in/out] palSSTIterator: A pointer to item iterator. in/out] itemName: A pointer to the item name buffer populated by the iterator. Must be supplied by the user. [in] itemNameSize,: The size of the supplied item name buffer. Must be at least the length of itemName.
- Returns:
- PAL_SUCCESS on success. PAL_ERR_SST_ITEM_NOT_FOUND if the item does not exist. Other negative value indicating a specific error code in the event of failure.
Definition at line 263 of file pal_plat_sst_impl.c.
palStatus_t pal_SSTIteratorOpen | ( | palSSTIterator_t * | palSSTIterator, |
const char * | itemPrefix | ||
) |
Opens item iterator.
- Parameters:
-
[out] palSSTIterator,: A pointer to the item iterator. [in] itemPrefix,: The prefix of the item name.
- Returns:
- PAL_SUCCESS on success. A negative value indicating a specific error code in the event of failure.
Definition at line 240 of file pal_plat_sst_impl.c.
palStatus_t pal_SSTRemove | ( | const char * | itemName ) |
Removes an item from storage, unless the write-once flag is turned on for the item.
- Parameters:
-
[in] itemName,: The item name. Pelion client expects that the API support: - Name length of at least 120 characters.
- Alphanumeric and '.', '-', '_' characters in the name.
- Returns:
- PAL_SUCCESS on success. PAL_ERR_SST_WRITE_PROTECTED when trying to remove a write-once value. Other negative value indicating a specific error code in the event of failure.
Definition at line 216 of file pal_plat_sst_impl.c.
palStatus_t pal_SSTReset | ( | void | ) |
Remove all items and related data.
- Returns:
- PAL_SUCCESS on success. A negative value indicating a specific error code in the event of failure.
Definition at line 298 of file pal_plat_sst_impl.c.
palStatus_t pal_SSTSet | ( | const char * | itemName, |
const void * | itemBuffer, | ||
size_t | itemBufferSize, | ||
uint32_t | SSTFlagsBitmap | ||
) |
Writes a new item to storage.
The API supports writing empty items. When you write an item that has already been set, the API overwrites the set value, unless the write-once flag is turned on for the item.
- Parameters:
-
[in] itemName,: The item name. Pelion client expects that the API support: - Name length of at least 120 characters.
- Alphanumeric and '.', '-', '_' characters in the name.
[in] itemBuffer,: A pointer to the location in memory with the item to write. Can be NULL if itemBufferSize is 0. [in] itemBufferSize,: The data length of the item in bytes. Can be 0 if itemBuffer is NULL. [in] SSTFlagsBitmap,: PAL SST flag bitmap.
- Returns:
- PAL_SUCCESS on success. PAL_ERR_SST_WRITE_PROTECTED when trying to set write-once value. Other negative value indicating a specific error code in the event of failure.
Definition at line 112 of file pal_plat_sst_impl.c.
Generated on Mon Aug 29 2022 19:53:43 by
