CreateControllerFromFile¶
-
virtual void ISystem::CreateControllerFromFile(const std::string &filename, const std::string &sn, uint32_t id, const SSimulatorSettings &settings) = 0¶
Creates a simulated top-controller from an XML controller description stored in file.
- Parameters
filename – Name of file containing XML controller description.
sn – Serial number of the simulated top-controller.
id – ID of the simulated top-controller, ignored if top-controller does not support an ID.
settings – SSimulatorSettings containing simulator configuration settings.
- Throws
CInvalidArgumentException
– Empty serial number specified.CInvalidArgumentException
– Invalid simulator service address specified, i.e. invalid IP address or hostname could not be resolved.CInvalidArgumentException
– Invalid client address specified, i.e. invalid IP address or hostname could not be resolved.CInvalidArgumentException
– Invalid CPU utilization specified in settings.CInvalidArgumentException
– Invalid number of real-time threads specified (zero).CInvalidArgumentException
– Out-of-range speed factor specified (<0.001 or> 1000).CInvalidFormatException
– Invalid XML contents (see exception message for details).CInvalidConfigException
– Simulator service cannot start/locate the simulator executable.COutOfResourcesException
– Maximum number of top-controllers or pipes reached (limited by simulator service platform hardware resources).CTimeoutException
– Simulator service communication timeout.CAccessDeniedException
– Unable to open file for reading.CReadErrorException
– Error while reading from the specified file.CCommunicationErrorException
– Protocol error.