String tables


Detailed Description

Here are defined some language string tables.

The application code can access strings for multiple languages. Once the language identifier is set, 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 eWicht string table defines and API.

Defines

#define LANGID_NOTSPECIFIED   (0xFFu)
 Language ID for factory resets and initial startups.
#define LANGID_GERMAN   (0x00u)
 Language ID for the German string table.
#define LANGID_ENGLISH   (0x01u)
 Language ID for the English string table.
#define LANGID_MAX   (0x01u)
 The latest Language ID. Increment this ID if you add further languages.

Enumerations

enum  STRTBLIDS
 String ID table for accessing the string table entries.

Functions

void StrTbl_SetLanguage (BYTE u8LangId)
 The function sets the actual string table for this session (not permanently).
void StrTbl_GetString (BYTE *pString, WORD u16StrId)
 The function copies the string with the given ID to the given RAM location.
void StrTbl_GetStringN (BYTE *pString, BYTE u8BufferSize, WORD u16StrId)
 The function copies the string with the given ID to the given RAM location.
ROM char * StrTbl_cau8GetStringPointer (WORD u16StrId)
 The function delivers a ROM pointer to the given string ID.
ROM char * StrTbl_cau8GetLanguageStringPointer (BYTE u8LangId, WORD u16StrId)
 The function delivers a ROM pointer to the given string ID on a given string table.


Function Documentation

ROM char* StrTbl_cau8GetLanguageStringPointer ( BYTE  u8LangId,
WORD  u16StrId 
)

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 by this function.

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

Definition at line 594 of file stringtable.c.

ROM char* StrTbl_cau8GetStringPointer ( WORD  u16StrId  ) 

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:
u16StrId String ID of the string to load.
Returns:
The pointer to the string in the flash memory.

Definition at line 584 of file stringtable.c.

void StrTbl_GetString ( BYTE *  pString,
WORD  u16StrId 
)

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.
u16StrId String ID of the string to load.

Definition at line 574 of file stringtable.c.

void StrTbl_GetStringN ( BYTE *  pString,
BYTE  u8BufferSize,
WORD  u16StrId 
)

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.
u8BufferSize Size of the given buffer.
u16StrId String ID of the string to load.

Definition at line 607 of file stringtable.c.

void StrTbl_SetLanguage ( BYTE  u8LangId  ) 

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

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

Definition at line 561 of file stringtable.c.


Generated on Sun Nov 27 20:02:40 2011 for eWicht by  doxygen 1.5.5