Class LcdCharacterEncoding
Provides the character encoding for an LCD display. Instances of this class are generated by LcdCharacterEncodingFactory.
public class LcdCharacterEncoding : Encoding
- Inheritance
-
LcdCharacterEncoding
Constructors
LcdCharacterEncoding(string, string, DictionaryCharByte, char)
Creates an instance of LcdCharacterEncoding.
public LcdCharacterEncoding(string cultureName, string readOnlyMemoryName, DictionaryCharByte characterMap, char unknownLetter)
Parameters
cultureName
stringCulture name for this encoding (informational only)
readOnlyMemoryName
stringName of the ROM (hard coded read-only character memory) on the display
characterMap
DictionaryCharByteThe character map to use
unknownLetter
charThe character to print when a letter not in the map is found. This letter must be part of the map
LcdCharacterEncoding(string, string, DictionaryCharByte, char, ArrayList)
Creates an instance of LcdCharacterEncoding.
public LcdCharacterEncoding(string cultureName, string readOnlyMemoryName, DictionaryCharByte characterMap, char unknownLetter, ArrayList extraCharacters)
Parameters
cultureName
stringCulture name for this encoding (informational only)
readOnlyMemoryName
stringName of the ROM (hard coded read-only character memory) on the display
characterMap
DictionaryCharByteThe character map to use
unknownLetter
charThe character to print when a letter not in the map is found
extraCharacters
ArrayListThe pixel map of characters required for this culture but not found in the character ROM
Properties
AllCharactersSupported
This is internally set to false if we already know that we won't be able to display all required characters
public bool AllCharactersSupported { get; set; }
Property Value
EncodingName
public string EncodingName { get; }
Property Value
ExtraCharacters
The list of pixel maps for extra characters that are required for this culture.
public virtual ArrayList ExtraCharacters { get; }
Property Value
IsSingleByte
Always returns true for this class.
public bool IsSingleByte { get; }
Property Value
ReadOnlyMemoryName
Specified Name of the hardcoded character memory set for which this Encoding is intended. An encoding shall only be loaded to a matching display.
public string ReadOnlyMemoryName { get; }
Property Value
Methods
GetByteCount(char[], int, int)
public int GetByteCount(char[] chars, int index, int count)
Parameters
Returns
GetBytes(char[], int, int, ArrayList, int)
public int GetBytes(char[] chars, int charIndex, int charCount, ArrayList bytes, int byteIndex)
Parameters
Returns
GetCharCount(byte[], int, int)
public int GetCharCount(byte[] bytes, int index, int count)
Parameters
Returns
GetChars(byte[], int, int, char[], int)
Reverse mapping is not supported for this encoding.
public int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
Parameters
Returns
GetDecoder()
When overridden in a derived class, obtains a decoder that converts an encoded sequence of bytes into a sequence of characters.
public override Decoder GetDecoder()
Returns
- Decoder
A Decoder that converts an encoded sequence of bytes into a sequence of characters.
GetMaxByteCount(int)
public int GetMaxByteCount(int charCount)
Parameters
charCount
int
Returns
GetMaxCharCount(int)
public int GetMaxCharCount(int byteCount)
Parameters
byteCount
int