The function of the two interface register sets is identical except for the Basic test mode.
They can be used the way one set of registers is used for data transfer to the Message RAM
while the other set of registers is used for the data transfer from the Message RAM, allowing
both processes to be interrupted by each other. Each set of Interface Registers consists of Message Buffer Registers controlled by their own
Command Registers. The Command Mask Register specifies the direction of the data
transfer and which parts of a Message Object will be transferred. The Command Request
Register is used to select a Message Object in the Message RAM as target or source for the
transfer and to start the action specified in the Command Mask Register.
IF1 message interface register set
Address IF1 Register Set
CAN Base + 0x38 IF1 Message Control
public class Gsm0338 {
// HashMap's used for encoding and decoding
protected static HashMap<Character, Byte> defaultEncodeMap = new HashMap();
protected static HashMap<Character, Byte> extEncodeMap = new HashMap();
private static final byte ESC_CHARACTER = 27;
// Data to populate the hashmaps with
private static final Object[][] gsmCharacters = {
{ '@', new Byte((byte) 0x00) },
{ '£', new Byte((byte) 0x01) },
{ '$', new Byte((byte) 0x02) },
{ '¥', new Byte((byte) 0x03) },
{ 'è', new Byte((byte) 0x04) },
{ 'é', new Byte((byte) 0x05) },
{ 'ù', new Byte((byte) 0x06) },
{ 'ì', new Byte((byte) 0x07) },
{ 'ò', new Byte((byte) 0x08) },
{ 'Ç', new Byte((byte) 0x09) },
{ '\n', new Byte((byte) 0x0a) },
{ 'Ø', new Byte((byte) 0x0b) },
{ 'ø', new Byte((byte) 0x0c) },
{ '\r', new Byte((byte) 0x0d) },
{ 'Å', new Byte((byte) 0x0e) },
{ 'å', new Byte((byte) 0x0f) },
{ '\u0394', new Byte((byte) 0x10) },
{ '_', new Byte((byte) 0x11) },
{ '\u03A6', new Byte((byte) 0x12) },
{ '\u0393', new Byte((byte) 0x13) },
{ '\u039B', new Byte((byte) 0x14) },
{ '\u03A9', new Byte((byte) 0x15) },
{ '\u03A0', new Byte((byte) 0x16) },
{ '\u03A8', new Byte((byte) 0x17) },
{ '\u03A3', new Byte((byte) 0x18) },
{ '\u0398', new Byte((byte) 0x19) },
{ '\u039E', new Byte((byte) 0x1a) },
{ '\u001B', new Byte((byte) 0x1b) }, // 27 is Escape character
{ 'Æ', new Byte((byte) 0x1c) },
{ 'æ', new Byte((byte) 0x1d) },
{ 'ß', new Byte((byte) 0x1e) },
{ 'É', new Byte((byte) 0x1f) },
{ '\u0020', new Byte((byte) 0x20) },
{ '!', new Byte((byte) 0x21) },
{ '\"', new Byte((byte) 0x22) },
{ '#', new Byte((byte) 0x23) },
{ '¤', new Byte((byte) 0x24) },
{ '%', new Byte((byte) 0x25) },
{ '&', new Byte((byte) 0x26) },
{ '\'', new Byte((byte) 0x27) },
{ '(', new Byte((byte) 0x28) },
{ ')', new Byte((byte) 0x29) },
{ '*', new Byte((byte) 0x2a) },
{ '+', new Byte((byte) 0x2b) },
{ ',', new Byte((byte) 0x2c) },
{ '-', new Byte((byte) 0x2d) },
{ '.', new Byte((byte) 0x2e) },
{ '/', new Byte((byte) 0x2f) },
{ '0', new Byte((byte) 0x30) },
{ '1', new Byte((byte) 0x31) },
{ '2', new Byte((byte) 0x32) },
{ '3', new Byte((byte) 0x33) },
{ '4', new Byte((byte) 0x34) },
{ '5', new Byte((byte) 0x35) },
{ '6', new Byte((byte) 0x36) },
{ '7', new Byte((byte) 0x37) },
{ '8', new Byte((byte) 0x38) },