CreateControllerFromFile¶
-
virtual void IController::CreateControllerFromFile(const std::string &filename, const std::string &sn, uint32_t id) = 0¶
Creates a simulated sub-controller from an XML controller description stored in file. The created sub-controller is connected to a bus according to the strategy specified in Bus selection strategy.
- Parameters
filename – Name of file containing XML controller description.
sn – Serial number of the simulated sub-controller.
id – ID of the simulated sub-controller, ignored if sub-controller does not support an ID.
- Throws
CInvalidArgumentException
– Empty serial number specified.CInvalidFormatException
– Invalid XML contents (see exception message for details).CUnsupportedException
– Controller is not a simulated top-controller.COutOfResourcesException
– Maximum number of controllers reached (limited by simulator service platform hardware resources).CAccessDeniedException
– Unable to open file for reading.CReadErrorException
– Error while reading from the specified file.CCommunicationErrorException
– Protocol error.CConnectionLostException
– Connection to controller lost.CRebootedException
– Controller has been rebooted since this object reference was retrieved, invalidating this reference.CIncompatibleException
– Incompatible firmware version loaded.CObjectDestroyedException
– Object is destroyed.