/*
 * Copyright (C) 2017 Open Source Robotics Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
*/

syntax = "proto3";
package ignition.msgs;
option java_package = "com.ignition.msgs";
option java_outer_classname = "WorldStatsProtos";

/// \ingroup ignition.msgs
/// \interface WorldStatistics
/// \brief A message statiscs about a world

import "ignition/msgs/log_playback_stats.proto";
import "ignition/msgs/time.proto";
import "ignition/msgs/header.proto";

message WorldStatistics
{
  /// \brief Optional header data
  Header header = 1;

  /// \brief Current simulation time
  Time  sim_time = 2;

  /// \brief Total time spent paused
  Time  pause_time = 3;

  /// \brief Current real time
  Time  real_time = 4;

  /// \brief Whether currently paused
  bool  paused = 5;

  /// \brief Current iteration count
  uint64 iterations = 6;

  /// \brief Total number of models in the world
  int32 model_count = 7;

  /// \brief Statistics for log playback
  LogPlaybackStatistics log_playback_stats = 8;

  /// \brief This factor expresses how much real time elapses with each step
  /// of simulation time.
  /// E.g.: 0.5 means that 1 second in real time takes 2 seconds in simulation.
  double real_time_factor = 9;

  /// \brief Iteration step size. It's zero when paused.
  Time step_size = 10;
}
