String tables


Detailed Description

Here are defined some language string tables.

The application code can access strings for multiple languages. Once set the language identifier, the module automatically returns the correct strings.


Files

file  stringtable.c
 This file implements the string tables for multi language support.
file  stringtable.h
 This file includes the Netzer string table defines and API.

Enumerations

enum  LanguageIDs_t {
  LANGID_NOTSPECIFIED = -1, LANGID_GERMAN = 0, LANGID_ENGLISH, LANGID_NETHERLANDS,
  LANGID_SPANISH, LANGID_COUNT
}
 The IDs of supported languages. More...
enum  StringTableIDs_t
 String ID table for accessing the string table entries.
enum  StateTableIDs_t
 Error ID table for accessing the error string table entries.

Functions

void StrTbl_SetLanguage (LanguageIDs_t LangId)
 The function sets the actual string table for this session (not permanently).
void StrTbl_GetString (uint8_t *pString, uint16_t StringId)
 The function copies the string with the given ID to the given RAM location.
ROM char * StringGetPointer (uint16_t StringId)
 The function delivers a ROM pointer to the given string ID.
ROM char * StringGetLanguageStringPointer (uint8_t LanguageId, uint16_t StringId)
 The function delivers a ROM pointer to the given string ID on a given string table.
ROM char * StringGetStatePointer (StateTableIDs_t StateId)
 The function delivers a ROM pointer to the given string ID from the state table.


Enumeration Type Documentation

The IDs of supported languages.

Enumerator:
LANGID_NOTSPECIFIED  Language ID for factory resets and initial startups.
LANGID_GERMAN  Language ID for the German string table.
LANGID_ENGLISH  Language ID for the English string table.
LANGID_NETHERLANDS  Language ID for the Netherlands string table.
LANGID_SPANISH  Language ID for the Spanish string table.
LANGID_COUNT  Placeholder to get supported languages.


Function Documentation

ROM char* StringGetLanguageStringPointer ( uint8_t  LanguageId,
uint16_t  StringId 
)

The function delivers a ROM pointer to the given string ID on a given string table.

The language ID which was set before with StrTbl_SetLanguage is not affected due this function.

Precondition:
None.
Parameters:
LanguageId One of the valid language IDs like LANGID_GERMAN or LANGID_ENGLISH for example.
StringId String ID of the string to load.
Returns:
The pointer to the string in the flash memory.

ROM char* StringGetPointer ( uint16_t  StringId  ) 

The function delivers a ROM pointer to the given string ID.

Precondition:
StrTbl_SetLanguage should be called. Else the result is always a string from the German string table.
Parameters:
StringId String ID of the string to load.
Returns:
The pointer to the string in the flash memory.

ROM char* StringGetStatePointer ( StateTableIDs_t  StateId  ) 

The function delivers a ROM pointer to the given string ID from the state table.

Precondition:
StrTbl_SetLanguage should be called. Else the result is always a string from the German string table.
Parameters:
StateId String ID of the string to load.
Returns:
The pointer to the string in the flash memory.

void StrTbl_GetString ( uint8_t *  pString,
uint16_t  StringId 
)

The function copies the string with the given ID to the given RAM location.

Precondition:
StrTbl_SetLanguage should be called. Else the result is always a string from the German string table.
Parameters:
pString Pointer to a buffer in RAM. Ensure that in the buffer is enough space.
StringId String ID of the string to load.

void StrTbl_SetLanguage ( LanguageIDs_t  LangId  ) 

The function sets the actual string table for this session (not permanently).

Precondition:
None.
Parameters:
LangId One of the valid language IDs like LANGID_GERMAN or LANGID_ENGLISH for example.


Generated on Fri Mar 29 10:34:28 2013 for Netzer by  doxygen 1.5.5