SerializedNarrative.Event.Builder eventBuilder = SerializedNarrative.Event.newBuilder();
eventBuilder.setTimestamp(timestamp);
eventBuilder.setSource(source);
SerializedNarrative.TrainMovementEvent.Builder trainMovementEvent = eventBuilder.getTrainMovementBuilder();
ETrainMovementMessageType msgType = ETrainMovementMessageType.getTypeForCode(Integer.parseInt(message.getHeader().getMsgType()));
trainMovementEvent.setType(SerializedNarrative.TrainMovementEvent.Type.valueOf(msgType.name()));
TrainMovementBody body = message.getBody();
if (body.getTrainId() != null) {
trainMovementEvent.setTrainId(body.getTrainId());
}