jmri.jmrix.can.cbus
Class CbusMessage

Show UML class diagram
java.lang.Object
  extended by jmri.jmrix.can.cbus.CbusMessage

public class CbusMessage
extends Object

Class to allow use of CBUS concepts to access the underlying can message


Field Summary
(package private) static org.slf4j.Logger log
           
 
Constructor Summary
CbusMessage()
           
 
Method Summary
static CanMessage getBootCheck(int c, int header)
          Microchip AN247 format message to send the checksum for comparison
static CanMessage getBootEntry(int nn, int header)
          CBUS bootloader commands
static CanMessage getBootInitialise(int a, int header)
          Microchip AN247 format message to initialise the bootloader and set the start address
static CanMessage getBootNop(int a, int header)
          Microchip AN247 format NOP message to set address The CBUS bootloader uses extended ID frames
static CanMessage getBootReset(int header)
          Microchip AN247 format message to reset and enter normal mode
static CanMessage getBootTest(int header)
          Microchip AN247 format message to check if a module is in boot mode
static CanMessage getBootWriteData(int[] d, int header)
          Microchip AN247 format message to write 8 bytes of data
static int getDataLength(CanMessage m)
           
static int getDataLength(CanReply r)
           
static int getEvent(CanMessage m)
           
static int getEvent(CanReply r)
           
static int getEventType(CanMessage m)
           
static int getEventType(CanReply r)
           
static int getId(CanMessage m)
           
static int getId(CanReply r)
           
static int getNodeNumber(CanMessage m)
           
static int getNodeNumber(CanReply r)
           
static int getOpcode(CanMessage m)
           
static int getOpcode(CanReply r)
           
static CanMessage getOpsModeWriteCV(int mAddress, boolean mLongAddr, int cv, int val, int header)
          CBUS Ops mode programmer commands
static int getPri(CanMessage m)
           
static int getPri(CanReply r)
           
static CanMessage getReadCV(int cv, int mode, int header)
          CBUS programmer commands
static CanMessage getRequestTrackOff(int header)
           
static CanMessage getRequestTrackOn(int header)
          CBUS Power commands
static CanMessage getWriteCV(int cv, int val, int mode, int header)
           
static boolean isArst(CanReply m)
           
static boolean isBootConfirm(CanReply r)
           
static boolean isBootError(CanReply r)
           
static boolean isBootOK(CanReply r)
           
static boolean isEvent(CanMessage m)
           
static boolean isEvent(CanReply r)
           
static boolean isRequestTrackOff(CanMessage m)
           
static boolean isRequestTrackOn(CanMessage m)
           
static boolean isTrackOff(CanReply m)
           
static boolean isTrackOn(CanReply m)
           
static void setId(CanMessage m, int id)
           
static void setId(CanReply r, int id)
           
static void setPri(CanMessage m, int pri)
           
static void setPri(CanReply r, int pri)
           
static String toAddress(CanMessage m)
           
static String toAddress(CanReply r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

static org.slf4j.Logger log
Constructor Detail

CbusMessage

public CbusMessage()
Method Detail

getId

public static int getId(CanMessage m)

getPri

public static int getPri(CanMessage m)

getOpcode

public static int getOpcode(CanMessage m)

getDataLength

public static int getDataLength(CanMessage m)

getNodeNumber

public static int getNodeNumber(CanMessage m)

getEvent

public static int getEvent(CanMessage m)

getEventType

public static int getEventType(CanMessage m)

isEvent

public static boolean isEvent(CanMessage m)

setId

public static void setId(CanMessage m,
                         int id)

setPri

public static void setPri(CanMessage m,
                          int pri)

toAddress

public static String toAddress(CanMessage m)

isRequestTrackOff

public static boolean isRequestTrackOff(CanMessage m)

isRequestTrackOn

public static boolean isRequestTrackOn(CanMessage m)

getId

public static int getId(CanReply r)

getPri

public static int getPri(CanReply r)

getOpcode

public static int getOpcode(CanReply r)

getDataLength

public static int getDataLength(CanReply r)

getNodeNumber

public static int getNodeNumber(CanReply r)

getEvent

public static int getEvent(CanReply r)

getEventType

public static int getEventType(CanReply r)

isEvent

public static boolean isEvent(CanReply r)

setId

public static void setId(CanReply r,
                         int id)

setPri

public static void setPri(CanReply r,
                          int pri)

toAddress

public static String toAddress(CanReply r)

isTrackOff

public static boolean isTrackOff(CanReply m)

isTrackOn

public static boolean isTrackOn(CanReply m)

isArst

public static boolean isArst(CanReply m)

getReadCV

public static CanMessage getReadCV(int cv,
                                   int mode,
                                   int header)
CBUS programmer commands


getWriteCV

public static CanMessage getWriteCV(int cv,
                                    int val,
                                    int mode,
                                    int header)

getOpsModeWriteCV

public static CanMessage getOpsModeWriteCV(int mAddress,
                                           boolean mLongAddr,
                                           int cv,
                                           int val,
                                           int header)
CBUS Ops mode programmer commands


getRequestTrackOn

public static CanMessage getRequestTrackOn(int header)
CBUS Power commands


getRequestTrackOff

public static CanMessage getRequestTrackOff(int header)

getBootEntry

public static CanMessage getBootEntry(int nn,
                                      int header)
CBUS bootloader commands


getBootNop

public static CanMessage getBootNop(int a,
                                    int header)
Microchip AN247 format NOP message to set address The CBUS bootloader uses extended ID frames


getBootReset

public static CanMessage getBootReset(int header)
Microchip AN247 format message to reset and enter normal mode


getBootInitialise

public static CanMessage getBootInitialise(int a,
                                           int header)
Microchip AN247 format message to initialise the bootloader and set the start address


getBootCheck

public static CanMessage getBootCheck(int c,
                                      int header)
Microchip AN247 format message to send the checksum for comparison


getBootTest

public static CanMessage getBootTest(int header)
Microchip AN247 format message to check if a module is in boot mode


getBootWriteData

public static CanMessage getBootWriteData(int[] d,
                                          int header)
Microchip AN247 format message to write 8 bytes of data


isBootError

public static boolean isBootError(CanReply r)

isBootOK

public static boolean isBootOK(CanReply r)

isBootConfirm

public static boolean isBootConfirm(CanReply r)


Copyright © 1997-2013 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads