When testing using the console, all drivers need to be loaded directly. This tutorial describes how to load the drivers required for the Serial Communications Server.
Testing of communications software can be done using the Symbian platform console shell interface rather than a GUI interface. The console shell interface has advantages when testing since the console allows software to be tested in isolation. When testing with a GUI interface the testing can be difficult if other software in the GUI is attempting to access resources. If the device or the emulator is started with just the console, then only the kernel and file system are running. The tester can then load the software required for the test and ensure that no other software is using any resources. This avoids problems of other software interrupting the CPU or using and releasing memory or other hardware while a test is running.
Any test applications that have not been launched by the GUI should explicitly load the correct physical and logical device drivers. In most cases the bootloader will load the physical device driver. It is safe to load a device driver which has already been loaded, since the API will return KErrAlreadyExists
#if defined (__WINS__) #define PDD_NAME _L("ECDRV") #else #define PDD_NAME _L("EUART1") #endif #define LDD_NAME _L("ECOMM") TInt r = User::LoadPhysicalDevice (PDD_NAME); if (r != KErrNone && r != KErrAlreadyExists) { User::Leave(r); } r = User::LoadLogicalDevice (LDD_NAME); if (r != KErrNone && r != KErrAlreadyExists) { User::Leave(r); } r = StartC32(); User::LeaveIfError(r);