Class MovementAuthority


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

      • MovementAuthority

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

      • getTrackSections

        public java.util.List<TrackSectiongetTrackSections()
        Get the list of TrackSections.
        Returns:
        Unmodifiable list of TrackSections.
      • getTrackSectionList

        @Nonnull
        public static java.util.List<TrackSectiongetTrackSectionList​(@Nonnull
                                                                       java.util.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

        @Nonnull
        public static java.util.List<MovementAuthorityadvanceForward​(@Nonnull
                                                                       java.util.List<MovementAuthority> list,
                                                                       int distance)
        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.