পরিষেবা সতর্কতার উদাহরণ

নিম্নলিখিত উদাহরণটি একটি পরিষেবা সতর্কতা ফিডের একটি ASCII উপস্থাপনা। এই উদাহরণে, স্টপ 16230 এর মধ্য দিয়ে যাওয়া সমস্ত ট্রিপে এবং 219 রুট এবং স্টপ 16130 ভিজিট করা ট্রিপের ক্ষেত্রে একটি সতর্কতা প্রয়োগ করা হয়।

কীভাবে একটি পরিষেবা সতর্কতা ফিড তৈরি করবেন সে সম্পর্কে আরও বিশদ বিবরণের জন্য, সতর্কতা ওভারভিউ দেখুন।

# header information
header {
  # version of speed specification. Currently "2.0".
  gtfs_realtime_version: "2.0"

  # DIFFERENTIAL is unsupported. use FULL_DATASET only
  incrementality: FULL_DATASET

  # the moment where this dataset was generated on the server
  timestamp: 1658283241
}
# multiple entities can be included in the feed
entity {
  # unique identifier for the entity within the feed
  id: "0"

  # "type" of the entity
  alert {
    # multiple periods can be defined. active_period defines 
    # the time period that the alert is applied to the selectors
    active_period {
      # either start time or end time must be present
      # one of them can be omitted but not both
      # start time in seconds after epoch
      start: 1658283241
      # end time in seconds after epoch
      end: 1658293845
    }

    # multiple selectors can be given to select the affected entities
    # selectors are applied with a logical OR relationship across 
    # informed_entity messages along with a logical AND relationship 
    # for parameters in each informed_entity
    informed_entity {
      # valid parameters:
      # agency_id, route_id, route_type, direction_id, stop_id, trip
      route_id: "219"
      stop_id: "16130"
    }
    informed_entity {
      stop_id: "16230"
    }

    # system may use the cause and effect to judge the alert severity
    # see https://support.google.com/transitpartners/answer/10104458
    # cause of the alert - see gtfs-realtime.proto for valid values
    cause: CONSTRUCTION
    # effect of the alert - see gtfs-realtime.proto for valid values
    effect: DETOUR

    # the given url provides additional information
    url {
      # multiple languages/translations supported
      translation {
        # the link points to a webpage with more details of the alert
        text: "http://www.sometransitagency/alerts"
        # language code must be BCP-47, if defined
        language: "en"
      }
    }

    # header of the alert
    header_text {
      # multiple languages/translations supported
      translation {
        text: "Stop at Elm street is closed, temporary stop at Oak street"
        language: "en"
      }
    }

    # alert description. additional info to the header text
    description_text {
      # multiple languages/translations supported
      translation {
        text: "Due to construction at Elm street the stop is closed. The temporary stop can be found 300 meters north at Oak street"
        language: "en"
      }
    }
  }
}