MHEG5  15.3.0
source/core/inc/mh5nvm.h File Reference

Persistent storage module. The engine provides a persistent storage for 1024 bytes of data. Data is lost when receiver is is in stand-by or off. The file name used to access this storage is of the form "ram://<name>". It is the responsibility of the DVB to arrange a practice for the use of <name>, such that there are no accidental collisions of file names. When writing a file to persistent storage the receiver executes the following steps: 1. If the file is larger than the total size of the persistent store the action completes, returning False. 2. Regardless of the availability of free memory, if a file of the same name as the file to be written already exists in the persistent storage, it is deleted. 3. If there is insufficient free memory in the persistent storage for the file to be written, existing files are deleted in chronological order, ie. oldest first, as required. Also Note: 1. Only the data is stored (not type information) 2. The <name> part of the file name "ram://<name>" is 8 bytes long. The receiver provides storage for at least 32 such file names associated with the "ram://" persistent store. More...

#include "mh5base.h"

Go to the source code of this file.

Functions

MHEG5Bool MHEG5nvmWrite (MHEG5String fn, void *buf, MHEG5Int len)
 Write a file to the persistent store.
MHEG5Bool MHEG5nvmRead (MHEG5String fn, void **buf, MHEG5Int *len)
 Read a file from the persistent store.
void MHEG5nvmInitialise (U32BIT nvmSize)
 Initialise NVM Storage.
void MHEG5nvmReset (void)
 Clear all NVM data from the persistent store.
void MHEG5ExitStore (void)
 destroy Persistent Storage - only really useful on platform like WINDOWS

Detailed Description

Persistent storage module. The engine provides a persistent storage for 1024 bytes of data. Data is lost when receiver is is in stand-by or off. The file name used to access this storage is of the form "ram://<name>". It is the responsibility of the DVB to arrange a practice for the use of <name>, such that there are no accidental collisions of file names. When writing a file to persistent storage the receiver executes the following steps: 1. If the file is larger than the total size of the persistent store the action completes, returning False. 2. Regardless of the availability of free memory, if a file of the same name as the file to be written already exists in the persistent storage, it is deleted. 3. If there is insufficient free memory in the persistent storage for the file to be written, existing files are deleted in chronological order, ie. oldest first, as required. Also Note: 1. Only the data is stored (not type information) 2. The <name> part of the file name "ram://<name>" is 8 bytes long. The receiver provides storage for at least 32 such file names associated with the "ram://" persistent store.

Date:
01/02/2002
Author:
R.Freeman

Function Documentation

void MHEG5ExitStore ( void  )

destroy Persistent Storage - only really useful on platform like WINDOWS

Returns:
MHEG5TRUE - Success MHEG5FALSE - Failure
void MHEG5nvmInitialise ( U32BIT  nvmSize)

Initialise NVM Storage.

Parameters:
nvmSizeSize of nvm available
Returns:
void
MHEG5Bool MHEG5nvmRead ( MHEG5String  fn,
void **  buf,
MHEG5Int *  len 
)

Read a file from the persistent store.

Parameters:
fnFile name specifier.
bufData variable.
lenData length.
Returns:
MHEG5TRUE - Success. MHEG5FALSE - Failure.

Read a file from the persistent store.

Parameters:
fnFile name specifier.
bufData variable.
lenData length.
Returns:
MHEG5TRUE - Success. MHEG5FALSE - Failure.
void MHEG5nvmReset ( void  )

Clear all NVM data from the persistent store.

Returns:
void.
MHEG5Bool MHEG5nvmWrite ( MHEG5String  fn,
void *  buf,
MHEG5Int  len 
)

Write a file to the persistent store.

Parameters:
fnFile name specifier.
bufData variable.
lenData length.
Returns:
MHEG5TRUE - Success. MHEG5FALSE - Failure.

Write a file to the persistent store.

Parameters:
fnFile name specifier.
bufData variable.
lenData length.
Returns:
MHEG5TRUE - Success. MHEG5FALSE - Failure.
 All Data Structures Files Functions Variables Typedefs Defines