CreateControllerFromFile¶
-
void IController.CreateControllerFromFile(string filename, string sn, uint id)¶
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
NullArgumentException– Null reference was passed.InvalidArgumentException– Empty serial number specified.InvalidFormatException– Invalid XML contents (see exception message for details).UnsupportedException– Controller is not a simulated top-controller.OutOfResourcesException– Maximum number of controllers reached (limited by simulator service platform hardware resources).AccessDeniedException– Unable to open file for reading.ReadErrorException– Error while reading from the specified file.CommunicationErrorException– Protocol error.ConnectionLostException– Connection to controller lost.RebootedException– Controller has been rebooted since this object reference was retrieved, invalidating this reference.IncompatibleException– Incompatible firmware version loaded.System.ObjectDisposedException– Object is disposed.