Table of Contents

Class LcdCharacterEncoding

Namespace
Iot.Device.Graphics
Assembly
Iot.Device.CharacterLcd.dll

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 string

Culture name for this encoding (informational only)

readOnlyMemoryName string

Name of the ROM (hard coded read-only character memory) on the display

characterMap DictionaryCharByte

The character map to use

unknownLetter char

The 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 string

Culture name for this encoding (informational only)

readOnlyMemoryName string

Name of the ROM (hard coded read-only character memory) on the display

characterMap DictionaryCharByte

The character map to use

unknownLetter char

The character to print when a letter not in the map is found

extraCharacters ArrayList

The 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

bool

EncodingName

public string EncodingName { get; }

Property Value

string

ExtraCharacters

The list of pixel maps for extra characters that are required for this culture.

public virtual ArrayList ExtraCharacters { get; }

Property Value

ArrayList

IsSingleByte

Always returns true for this class.

public bool IsSingleByte { get; }

Property Value

bool

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

string

Methods

GetByteCount(char[], int, int)

public int GetByteCount(char[] chars, int index, int count)

Parameters

chars char[]
index int
count int

Returns

int

GetBytes(char[], int, int, ArrayList, int)

public int GetBytes(char[] chars, int charIndex, int charCount, ArrayList bytes, int byteIndex)

Parameters

chars char[]
charIndex int
charCount int
bytes ArrayList
byteIndex int

Returns

int

GetCharCount(byte[], int, int)

public int GetCharCount(byte[] bytes, int index, int count)

Parameters

bytes byte[]
index int
count int

Returns

int

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

bytes byte[]
byteIndex int
byteCount int
chars char[]
charIndex int

Returns

int

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

int

GetMaxCharCount(int)

public int GetMaxCharCount(int byteCount)

Parameters

byteCount int

Returns

int