Class MovementAuthority

java.lang.Object
jmri.jmrit.etcs.MovementAuthority

@API(status=EXPERIMENTAL) public class MovementAuthority extends Object
Class to represent a Movement Authority which is passed to the DMI to authorise a route.
  • Constructor Details

    • MovementAuthority

      public MovementAuthority(List<TrackSection> sectionList)
      Create a new MovementAuthority from a List of TrackSections.
      Parameters:
      sectionList - the list of TrackSections.
  • Method Details

    • getTrackSections

      Get the list of TrackSections.
      Returns:
      Unmodifiable list of TrackSections.
    • getTrackSectionList

      @Nonnull public static List<TrackSection> getTrackSectionList(@Nonnull List<MovementAuthority> completeList, boolean isSpeed)
      Aggregates a list of DmiMovementAuthorities into a list of DmiTrackSections, based on either speed changes or gradient changes.
      Parameters:
      completeList - The list of MovementAuthority objects to process.
      isSpeed - True to aggregate based on speed changes, False to aggregate based on gradient changes.
      Returns:
      A list of aggregated DmiTrackSection77 objects.
    • advanceForward

      Advance forward a List of Movement Authorities. The length of the nearest TrackSection(s) are reduced by the distance. Unused Track Sections are removed from the List. Track Section announcements are also advanced.
      Parameters:
      list - the list to advance.
      distance - the distance to advance.
      Returns:
      the modified List of Movement Authorities.