Package jmri.jmrix.can.cbus.node
Class CbusNodeConstants
- java.lang.Object
-
- jmri.jmrix.can.cbus.node.CbusNodeConstants
-
public class CbusNodeConstants extends java.lang.Object
Static Methods relating to nodes ( modules ).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CbusNodeConstants.BackupType
-
Field Summary
Fields Modifier and Type Field Description static int
BETA_REV_IDX
static int
BUS_TYPE_IDX
static int
CPU_CODE_IDX
static int
CPU_ID_IDX
static int
EV_PER_EN_IDX
static int
FLAGS_IDX
static int
LOAD_ADDR_IDX
static int
MAJOR_VER_IDX
static int
MANU_ID_IDX
static int
MINOR_VER_IDX
static int
MODULE_ID_IDX
static int
NAME_STRING_BASE_IDX
static int
NUM_EV_IDX
static int
NUM_NV_IDX
static int
NUM_PARAM_IDX
Node Parameters Para 0 Number of parameters Para 1 The manufacturer ID Para 2 Minor code version as an alphabetic character (ASCII) Para 3 Manufacturer module identifier as a HEX numeric Para 4 Number of supported events as a HEX numeric Para 5 Number of Event Variables per event as a HEX numeric Para 6 Number of supported Node Variables as a HEX numeric Para 7 Major version Para 8 Node flags Para 9 Processor type Para 10 Bus type Para 11 load address, 4 bytes Para 15 CPU manufacturer's id as read from the chip config space, 4 bytes Para 19 CPU manufacturer code Para 20 Beta revision (numeric), or 0 if release Para 21 - 24 Zero filled spare Not readable by index: Para 25 - 26 Number of paranmeters can be read as parameter 0 Para 27 - 30 Name string base address Para 31 - 32 Checksum.static int
PARAM_CHECK_IDX
static int
PARAM_COUNT_IDX
static int
PROC_TYPE_IDX
static int
SPARE_IDX
-
Constructor Summary
Constructors Constructor Description CbusNodeConstants()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
displayPhrase(CbusNodeConstants.BackupType type)
static java.lang.String
getBusType(int type)
Return a string representation of a decoded Bus Typestatic java.lang.String
getManu(int man)
Return a string representation of a decoded Module Manufacturerstatic java.lang.String
getModuleSupportLink(int man, int type)
Return a string representation of Module Support Linkstatic java.lang.String
getModuleType(int man, int type)
Return a string representation of a decoded Module Name for manufacturer MERG.static java.lang.String
getModuleTypeExtra(int man, int type)
Return a string representation of extra module infostatic java.lang.String
getReservedModule(int modnum)
Return a string representation of a reserved node numberstatic CbusNodeConstants.BackupType
lookupByName(java.lang.String name)
static void
setTraits(CbusNode node)
Set traits for a node where there is a minor deviance to MERG CBUS protocol or provide extra info. which is missing for a known module firmware.
-
-
-
Field Detail
-
NUM_PARAM_IDX
public static final int NUM_PARAM_IDX
Node Parameters Para 0 Number of parameters Para 1 The manufacturer ID Para 2 Minor code version as an alphabetic character (ASCII) Para 3 Manufacturer module identifier as a HEX numeric Para 4 Number of supported events as a HEX numeric Para 5 Number of Event Variables per event as a HEX numeric Para 6 Number of supported Node Variables as a HEX numeric Para 7 Major version Para 8 Node flags Para 9 Processor type Para 10 Bus type Para 11 load address, 4 bytes Para 15 CPU manufacturer's id as read from the chip config space, 4 bytes Para 19 CPU manufacturer code Para 20 Beta revision (numeric), or 0 if release Para 21 - 24 Zero filled spare Not readable by index: Para 25 - 26 Number of paranmeters can be read as parameter 0 Para 27 - 30 Name string base address Para 31 - 32 Checksum. Para 1 - 32 must sum to zero- See Also:
- Constant Field Values
-
MANU_ID_IDX
public static final int MANU_ID_IDX
- See Also:
- Constant Field Values
-
MINOR_VER_IDX
public static final int MINOR_VER_IDX
- See Also:
- Constant Field Values
-
MODULE_ID_IDX
public static final int MODULE_ID_IDX
- See Also:
- Constant Field Values
-
NUM_EV_IDX
public static final int NUM_EV_IDX
- See Also:
- Constant Field Values
-
EV_PER_EN_IDX
public static final int EV_PER_EN_IDX
- See Also:
- Constant Field Values
-
NUM_NV_IDX
public static final int NUM_NV_IDX
- See Also:
- Constant Field Values
-
MAJOR_VER_IDX
public static final int MAJOR_VER_IDX
- See Also:
- Constant Field Values
-
FLAGS_IDX
public static final int FLAGS_IDX
- See Also:
- Constant Field Values
-
PROC_TYPE_IDX
public static final int PROC_TYPE_IDX
- See Also:
- Constant Field Values
-
BUS_TYPE_IDX
public static final int BUS_TYPE_IDX
- See Also:
- Constant Field Values
-
LOAD_ADDR_IDX
public static final int LOAD_ADDR_IDX
- See Also:
- Constant Field Values
-
CPU_ID_IDX
public static final int CPU_ID_IDX
- See Also:
- Constant Field Values
-
CPU_CODE_IDX
public static final int CPU_CODE_IDX
- See Also:
- Constant Field Values
-
BETA_REV_IDX
public static final int BETA_REV_IDX
- See Also:
- Constant Field Values
-
SPARE_IDX
public static final int SPARE_IDX
- See Also:
- Constant Field Values
-
PARAM_COUNT_IDX
public static final int PARAM_COUNT_IDX
- See Also:
- Constant Field Values
-
NAME_STRING_BASE_IDX
public static final int NAME_STRING_BASE_IDX
- See Also:
- Constant Field Values
-
PARAM_CHECK_IDX
public static final int PARAM_CHECK_IDX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CbusNodeConstants
public CbusNodeConstants()
-
-
Method Detail
-
setTraits
public static void setTraits(@Nonnull CbusNode node)
Set traits for a node where there is a minor deviance to MERG CBUS protocol or provide extra info. which is missing for a known module firmware.- Parameters:
node
- The CbusNode object we are setting the traits for
-
getManu
public static java.lang.String getManu(int man)
Return a string representation of a decoded Module Manufacturer- Parameters:
man
- manufacturer int- Returns:
- decoded CBUS message
-
getBusType
public static java.lang.String getBusType(int type)
Return a string representation of a decoded Bus Type- Parameters:
type
- Bus type- Returns:
- decoded CBUS message
-
getModuleType
public static java.lang.String getModuleType(int man, int type)
Return a string representation of a decoded Module Name for manufacturer MERG.- Parameters:
man
- int manufacturertype
- module type int- Returns:
- decoded String module type name else empty string
-
getModuleTypeExtra
public static java.lang.String getModuleTypeExtra(int man, int type)
Return a string representation of extra module info- Parameters:
man
- int manufacturer codetype
- int module type- Returns:
- string value of extra module info
-
getModuleSupportLink
public static java.lang.String getModuleSupportLink(int man, int type)
Return a string representation of Module Support Link- Parameters:
man
- int manufacturer IDtype
- int module type ID- Returns:
- string module support link, else empty string
-
getReservedModule
public static java.lang.String getReservedModule(int modnum)
Return a string representation of a reserved node number- Parameters:
modnum
- node number- Returns:
- reserved node number reason
-
displayPhrase
public static java.lang.String displayPhrase(CbusNodeConstants.BackupType type)
-
lookupByName
public static CbusNodeConstants.BackupType lookupByName(java.lang.String name)
-
-