Alert cause and effect enums differences

Hello!

request to the NSW Sydney Trains (TrainLink) API endpoint /sydneytrains in a sample of Explore API - Public Transport - Realtime Alerts API | TfNSW Open Data Hub and Developer Portal shows me bunch of entities with alerts such as this.

  id: "134"
  alert {
    informed_entity {
      agency_id: "SydneyTrains"
      stop_id: "277010"
    }
    cause: OTHER_CAUSE
    effect: SIGNIFICANT_DELAYS
    url {
      translation {
        text: "https://transportnsw.info/alerts#/train"
        language: "en"
      }
    }
    header_text {
      translation {
        text: "Lift Availability - Mt Druitt"
        language: "en"
      }
    }
    description_text {
      translation {
        text: "The lift between the concourse and the bus interchange is temporarily out of service. If you require assistance, please ask staff or phone 9625 8156."
        language: "en"
      }
    }
  }  

there is also route_id and trip_id

the attributes that I find undocumented are :

    cause: OTHER_CAUSE
    effect: SIGNIFICANT_DELAYS

There is nothing about them in here https://opendata.transport.nsw.gov.au/sites/default/files/TfNSW_Realtime_Train_Technical_Doc.pdf

I found this enumeration on this forum here: Illegal value Error when decoding SydneyTrains GTFS data - #5 by yvonne.lee
but it’s couple of years old:


 // Cause of this alert.
  enum Cause {
    UNKNOWN_CAUSE = 1;
    OTHER_CAUSE = 2;        // Not machine-representable.
    TECHNICAL_PROBLEM = 3;
    STRIKE = 4;             // Public transit agency employees stopped working.
    DEMONSTRATION = 5;      // People are blocking the streets.
    ACCIDENT = 6;
    HOLIDAY = 7;
    WEATHER = 8;
    MAINTENANCE = 9;
    CONSTRUCTION = 10;
    POLICE_ACTIVITY = 11;
    MEDICAL_EMERGENCY = 12;
  }
  optional Cause cause = 6 [default = UNKNOWN_CAUSE];

  // What is the effect of this problem on the affected entity.
  enum Effect {
    NO_SERVICE = 1;
    REDUCED_SERVICE = 2;

    // We don't care about INsignificant delays: they are hard to detect, have
    // little impact on the user, and would clutter the results as they are too
    // frequent.
    SIGNIFICANT_DELAYS = 3;

    DETOUR = 4;
    ADDITIONAL_SERVICE = 5;
    MODIFIED_SERVICE = 6;
    OTHER_EFFECT = 7;
    UNKNOWN_EFFECT = 8;
    STOP_MOVED = 9;
  }
  optional Effect effect = 7 [default = UNKNOWN_EFFECT];

Questions:

  1. Where can I find some more information about how these are generated (under what sort of circumstances?
  2. Who determines these, how often, based on what info? Is this contact reachable in some way?
  3. More specifically; What is the difference between NO_SERVICE , SIGNIFICANT_DELAYS and UNKNOWN_EFFECT ?

We’re trying to figure out under what circumstances it is warranted to display a full-screen alert message on TrainLink station platform screens.

Many thanks

Hi @envent, hope this answers your questions.

1. Where can I find some more information about how these are generated (under what sort of circumstances? These are static values for facilities alerts. We are considering different ways of generating this at this stage but no changes for the short to medium term.

2. Who determines these, how often, based on what info? Is this contact reachable in some way? These are static values currently determined by the system.

3. More specifically; What is the difference between NO_SERVICE , SIGNIFICANT_DELAYS and UNKNOWN_EFFECT? For a line alert NO_SERVICE – Trains not operating on that line at all. SIGNIFICANT_DELAYS would show trains are running quite late and UNKNOWN_EFFECT would should that there is an incident on a line but impact for that can’t be ascertained right now.

Thanks,
Alex

Cool thanks @alejandro.felman !

We are trying to ascertain which alerts to display on full-screen over any running application.

Is there currently a way we can do this ? even are there consistent header / content text vales we can look out for to know what type of alert level is coming through ?