To be convinced of absence of a coming nearer train, then to pass the railway crossing.
To stop in 5 m from a barrier, expecting the permission to move.