Class NceMacroEditPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, AbstractMRListener, NceListener, NcePanelInterface

public class NceMacroEditPanel
extends NcePanel
implements NceListener
Frame for user edit of NCE macros NCE macros are stored in Command Station (CS) memory starting at address xC800. Each macro consists of 20 bytes. The last macro 255 is at address xDBEC. Macro addr 0 xC800 1 xC814 2 xC828 3 xC83C . . . . 255 xDBEC Each macro can close or throw up to ten accessories. Macros can also be linked together. Two bytes (16 bit word) define an accessory address and command, or the address of the next macro to be executed. If the upper byte of the macro data word is xFF, then the next byte contains the address of the next macro to be executed by the NCE CS. For example, xFF08 means link to macro 8. NCE uses the NMRA DCC accessory decoder packet format for the word definition of their macros. Macro data byte: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 _ _ _ _ 1 0 A A A A A A 1 A A A C D D D addr bit 7 6 5 4 3 2 10 9 8 1 0 turnout T By convention, MSB address bits 10 - 8 are one's complement. NCE macros always set the C bit to 1. The LSB "D" (0) determines if the accessory is to be thrown (0) or closed (1). The next two bits "D D" are the LSBs of the accessory address. Note that NCE display addresses are 1 greater than NMRA DCC. Note that address bit 2 isn't supposed to be inverted, but it is the way NCE implemented their macros. Examples: 81F8 = accessory 1 thrown 9FFC = accessory 123 thrown B5FD = accessory 211 close BF8F = accessory 2044 close FF10 = link macro 16 Updated for including the USB 7.* for 1.65 command station Variables found on cab context page 14 (Cab address 14) ;macro table MACRO_TBL ;table of macros, 16 entries of 16 bytes organized as: ; macro 0, high byte, low byte - 7 more times (8 accy commands total) ; macro 1, high byte, low byte - 7 more times (8 accy commands total) ; ; macro 16, high byte, low byte - 7 more times (8 accy commands total)
See Also:
Serialized Form