17 #ifndef GZ_SIM_SERVERCONFIG_HH_
18 #define GZ_SIM_SERVERCONFIG_HH_
26 #include <sdf/Element.hh>
27 #include <sdf/Plugin.hh>
28 #include <sdf/Root.hh>
29 #include <gz/sim/config.hh>
30 #include <gz/sim/Export.hh>
37 inline namespace GZ_SIM_VERSION_NAMESPACE {
39 class ServerConfigPrivate;
64 class PluginInfoPrivate;
95 const sdf::ElementPtr &_sdf);
107 const sdf::Plugin &_plugin);
128 public:
void SetEntityName(
const std::string &_entityName);
140 public:
void SetEntityType(
const std::string &_entityType);
169 public:
const sdf::ElementPtr
GZ_DEPRECATED(7) & Sdf()
const;
174 public:
void GZ_DEPRECATED(7) SetSdf(
const sdf::ElementPtr &_sdf);
178 public:
const sdf::Plugin &Plugin()
const;
182 public: sdf::Plugin &Plugin();
186 public:
void SetPlugin(
const sdf::Plugin &_plugin)
const;
222 public:
bool SetSdfString(
const std::string &_sdfString);
233 public:
void SetSdfRoot(
const sdf::Root &_root)
const;
238 public: std::optional<sdf::Root> &SdfRoot()
const;
242 public:
void SetUpdateRate(
const double &_hz);
247 public: std::optional<double> UpdateRate()
const;
252 public:
void SetInitialSimTime(
const double &_initialSimTime)
const;
256 public:
double InitialSimTime()
const;
260 public:
bool UseLevels()
const;
264 public:
void SetUseLevels(
const bool _levels);
270 public:
bool UseDistributedSimulation()
const;
278 public:
void SetNetworkSecondaries(
unsigned int _secondaries);
284 public:
unsigned int NetworkSecondaries()
const;
293 public:
void SetNetworkRole(
const std::string &_role);
304 public:
bool UseLogRecord()
const;
308 public:
void SetUseLogRecord(
const bool _record);
316 public:
void SetLogRecordPath(
const std::string &_recordPath);
320 public: std::chrono::steady_clock::duration LogRecordPeriod()
const;
324 public:
void SetLogRecordPeriod(
325 const std::chrono::steady_clock::duration &_period);
329 public:
void AddLogRecordTopic(
const std::string &_topic);
333 public:
void ClearLogRecordTopics();
346 public:
void SetLogPlaybackPath(
const std::string &_playbackPath);
350 public:
bool LogRecordResources()
const;
354 public:
void SetLogRecordResources(
bool _recordResources);
362 public:
void SetLogRecordCompressPath(
const std::string &_path);
366 public:
unsigned int Seed()
const;
370 public:
void SetSeed(
unsigned int _seed);
375 public: std::optional<std::chrono::steady_clock::duration>
376 UpdatePeriod()
const;
390 public:
void SetResourceCache(
const std::string &_path);
398 public:
void SetPhysicsEngine(
const std::string &_physicsEngine);
402 public:
const std::string &RenderEngineServer()
const;
406 public:
const std::string &RenderEngineGui()
const;
410 public:
void SetHeadlessRendering(
const bool _headless);
414 public:
bool HeadlessRendering()
const;
418 public:
void SetRenderEngineServer(
423 public:
void SetRenderEngineGui(
const std::string &_renderEngineGui);
428 public:
void AddPlugin(
const PluginInfo &_info);