XDK API  3.6.0
Documentation
Files | Data Structures | Typedefs | Enumerations | Functions
Storage

This module handles the Storage features. It supports : More...

+ Collaboration diagram for Storage:

Files

file  XDK_Storage.h
 

Data Structures

struct  Storage_Read_S
 Structure to represent the Storage read features. More...
 
struct  Storage_Rename_S
 Structure to represent the Storage rename features. More...
 
struct  Storage_Setup_S
 Structure to represent the Storage setup features. More...
 
struct  Storage_Transfer_S
 Structure to represent the Storage transfer features. More...
 
struct  Storage_Write_S
 Structure to represent the Storage write features. More...
 

Typedefs

typedef enum Storage_Medium_S Storage_Medium_T
 Typedef to represent the Storage medium. More...
 
typedef struct Storage_Read_S Storage_Read_T
 Typedef to represent the Storage read feature. More...
 
typedef struct Storage_Rename_S Storage_Rename_T
 Typedef to represent the Storage rename feature. More...
 
typedef struct Storage_Setup_S Storage_Setup_T
 Typedef to represent the Storage setup feature. More...
 
typedef struct Storage_Setup_S Storage_Status_T
 Typedef to represent the Storage status feature. More...
 
typedef struct Storage_Transfer_S Storage_Transfer_T
 Typedef to represent the Storage transfer feature. More...
 
typedef struct Storage_Write_S Storage_Write_T
 Typedef to represent the Storage write feature. More...
 

Enumerations

enum  Storage_Medium_S
 Enum to represent the Storage mediums. More...
 

Functions

Retcode_T Storage_Close (void)
 This will close the Storage. More...
 
Retcode_T Storage_Delete (Storage_Medium_T medium, const char *fileName)
 This will delete the given file in the storage. More...
 
Retcode_T Storage_Disable (Storage_Medium_T medium)
 This will disable the Storage medium. More...
 
Retcode_T Storage_Enable (void)
 This will enable the Storage. More...
 
Retcode_T Storage_IsAvailable (Storage_Medium_T medium, bool *status)
 This will validate if the Storage is available or not. More...
 
Retcode_T Storage_Read (Storage_Medium_T medium, Storage_Read_T *readCredentials)
 This will read the data from the storage. More...
 
Retcode_T Storage_Rename (Storage_Medium_T medium, Storage_Rename_T *renameCredentials)
 This will rename the file in the storage. More...
 
Retcode_T Storage_Setup (Storage_Setup_T *setup)
 This will setup the Storage. More...
 
Retcode_T Storage_Transfer (Storage_Medium_T sourceMedium, Storage_Medium_T destinationMedium, Storage_Transfer_T *transferCredentials)
 This will transfer the file from source to destination storage medium. More...
 
Retcode_T Storage_Write (Storage_Medium_T medium, Storage_Write_T *writeCredentials)
 This will write the data in the storage. More...
 

Detailed Description


Data Structure Documentation

struct Storage_Read_S

Data Fields

uint32_t ActualBytesRead
 
uint32_t BytesToRead
 
const char * FileName
 
uint32_t Offset
 
uint8_t * ReadBuffer
 

Field Documentation

uint32_t ActualBytesRead

Size of the user buffer actually utilized to store the read file content

uint32_t BytesToRead

Number of bytes to read

const char* FileName

Name of the file to be read

uint32_t Offset

Byte offset from top of the file to set write pointer

uint8_t* ReadBuffer

Pointer to user buffer to store the read file content

struct Storage_Rename_S

Data Fields

const char * NewFileName
 
const char * OriginalFileName
 

Field Documentation

const char* NewFileName

New name of the file upon rename

const char* OriginalFileName

Original name of the file to be renamed

struct Storage_Setup_S

Data Fields

bool SDCard
 
bool WiFiFileSystem
 

Field Documentation

bool SDCard

Boolean representing if SD card is to be enabled or not

bool WiFiFileSystem

Boolean representing if WiFi file system is to be enabled or not

struct Storage_Transfer_S

Data Fields

const char * DestinationFileName
 
const char * SourceFileName
 
uint32_t TransferBlockSizeSize
 
uint8_t * TransferBuffer
 

Field Documentation

const char* DestinationFileName

Destination file name upon transfer

const char* SourceFileName

Source file name to be transfered

uint32_t TransferBlockSizeSize

Block size for transfer (size of user provided TransferBuffer must be greater than or equal to this value )

uint8_t* TransferBuffer

Pointer to user buffer to transfer the file content blocks

struct Storage_Write_S

Data Fields

uint32_t ActualBytesWritten
 
uint32_t BytesToWrite
 
const char * FileName
 
uint32_t Offset
 
uint8_t * WriteBuffer
 

Field Documentation

uint32_t ActualBytesWritten

Number of bytes to written

uint32_t BytesToWrite

Number of bytes to write

const char* FileName

Name of the file to be write

uint32_t Offset

Byte offset from top of the file to set write pointer

uint8_t* WriteBuffer

Pointer to user buffer to write the file content from

Typedef Documentation

Enumeration Type Documentation

Enumerator
STORAGE_MEDIUM_SD_CARD 
STORAGE_MEDIUM_WIFI_FILE_SYSTEM 

Function Documentation

Retcode_T Storage_Close ( void  )
Returns
RETCODE_OK on success, or an error code otherwise.
Note
Retcode_T Storage_Delete ( Storage_Medium_T  medium,
const char *  fileName 
)
Parameters
[in]mediumStorage medium in which the file is to be deleted.
[in]fileNameName of the file which has to be deleted.
Returns
RETCODE_OK on success, or an error code otherwise.
Note

+ Here is the caller graph for this function:

Retcode_T Storage_Disable ( Storage_Medium_T  medium)
Parameters
[in]mediumStorage medium that has to be disabled.
Returns
RETCODE_OK on success, or an error code otherwise.
Note

+ Here is the caller graph for this function:

Retcode_T Storage_Enable ( void  )
Returns
RETCODE_OK on success, or an error code otherwise.
Note

+ Here is the caller graph for this function:

Retcode_T Storage_IsAvailable ( Storage_Medium_T  medium,
bool *  status 
)
Parameters
[in]mediumStorage medium to be validated for availability
[out]statusPointer to the availability of the requested storage medium status
Note
  • In case of failure the status will be false
  • Storage_Enable must have been successful prior.
Returns
RETCODE_OK on success, or an error code otherwise.

+ Here is the caller graph for this function:

Retcode_T Storage_Read ( Storage_Medium_T  medium,
Storage_Read_T readCredentials 
)
Parameters
[in]mediumStorage medium in while the file is to be renamed.
[in]readCredentialsPointer to the Storage read structure.
Returns
RETCODE_OK on success, or an error code otherwise.
Note

+ Here is the caller graph for this function:

Retcode_T Storage_Rename ( Storage_Medium_T  medium,
Storage_Rename_T renameCredentials 
)
Parameters
[in]mediumStorage medium in while the file is to be renamed.
[in]renameCredentialsPointer to the storage rename credentials.
Returns
RETCODE_OK on success, or an error code otherwise.
Note

+ Here is the caller graph for this function:

Retcode_T Storage_Setup ( Storage_Setup_T setup)
Parameters
[in]setupPointer to the Storage setup feature
Returns
RETCODE_OK on success, or an error code otherwise.
Note
  • This must be the first API to be called if this storage feature is to be used.
  • Do not call this API more than once.

+ Here is the caller graph for this function:

Retcode_T Storage_Transfer ( Storage_Medium_T  sourceMedium,
Storage_Medium_T  destinationMedium,
Storage_Transfer_T transferCredentials 
)
Parameters
[in]sourceMediumSource Storage medium from which the file is to be transfered.
[in]destinationMediumDestination Storage medium to which the file is to be transfered.
[in]transferCredentialsPointer to the transfer credentials.
Returns
RETCODE_OK on success, or an error code otherwise.
Note

+ Here is the caller graph for this function:

Retcode_T Storage_Write ( Storage_Medium_T  medium,
Storage_Write_T writeCredentials 
)
Parameters
[in]mediumStorage medium in while the file is to be renamed.
[in]writeCredentialsPointer to the storage write credentials.
Returns
RETCODE_OK on success, or an error code otherwise.
Note

+ Here is the caller graph for this function:


All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:51 by doxygen 1.8.8