private void checkLocomotive(SRCPLocomotive locomotive)
throws SRCPLocomotiveException, SRCPModelException {
if (locomotive == null)
return;
if (!locomotive.checkAddress()) {
throw new InvalidAddressException();
}
if (locomotive.getSession() == null && session == null) {
throw new NoSessionException();
}