Class LoadModifier

java.lang.Object
jmri.jmrix.loconet.sdf.SdfMacro
jmri.jmrix.loconet.sdf.LoadModifier
All Implemented Interfaces:
SdfConstants

public class LoadModifier extends SdfMacro
Implement the LOAD_MODIFIER macro from the Digitrax sound definition language Arg1: Upper 4 bits - math modifiers FMATH_LODE et al Arg2: Arg3:
  • Field Details

  • Constructor Details

    • LoadModifier

      public LoadModifier(int byte0, int arg1, int arg2, int arg3)
  • Method Details

    • name

      public String name()
      Description copied from class: SdfMacro
      Name used by the macro in the SDF definition
      Specified by:
      name in class SdfMacro
      Returns:
      Fixed name associated with this type of instructio
    • length

      public int length()
      Description copied from class: SdfMacro
      Provide number of bytes defined by this macro
      Specified by:
      length in class SdfMacro
      Returns:
      Fixed numher of bytes defined (a constant for the instruction type)
    • match

      public static SdfMacro match(SdfBuffer buff)
    • modTypeVal

    • argVal

      Format the three bytes as simple numbers, for lack of anything better right now
      Returns:
      3 digit string
    • loadByteArray

      public void loadByteArray(SdfBuffer buffer)
      Store into a buffer.
      Overrides:
      loadByteArray in class SdfMacro
      Parameters:
      buffer - load with all children
    • toString

      public String toString()
      Description copied from class: SdfMacro
      Provide a single-line simplified representation, including the trailing newline. This is used e.g. in the tree format section of the EditorFrame.
      Specified by:
      toString in class SdfMacro
      Returns:
      newline-terminated string; never null
    • oneInstructionString

      Description copied from class: SdfMacro
      Provide single instruction in MPASM format, including the trailing newline.
      Specified by:
      oneInstructionString in class SdfMacro
      Returns:
      Newline terminated string, never null
    • allInstructionString

      Description copied from class: SdfMacro
      Provide instructions in MPASM format, including the trailing newline and all nested instructions.
      Specified by:
      allInstructionString in class SdfMacro
      Parameters:
      indent - String inserted at the start of each output line, typically some number of spaces.
      Returns:
      Newline terminated string, never null