230 likes | 358 Views
Programming mobile devices. Part II Programming Symbian devices with Symbian C++. Practical matters. Lectures Excercices (labs) Exam Second midterm Final exam The course project. Content. The Smart phone environment Basics of the Symbian OS Differences between C++ and Symbian C++
E N D
Programming mobile devices Part II Programming Symbian devices with Symbian C++
Practical matters • Lectures • Excercices (labs) • Exam • Second midterm • Final exam • The course project
Content • The Smart phone environment • Basics of the Symbian OS • Differences between C++ and Symbian C++ • What a Java programmer should know • What a C++ programmer should know • Memory management • Symbian User Interfaces
Content • Controls • Dialogs • Views • Files, the filesystem • Communication and • Messaging • Testing, debugging and deploying
The smart phone environmet • 1G, 2G, 2,5G, 3G, 4G • GSM Global System for Mobile Comm. • CDMA (USA) Code Division Mult. Acc. • CSD Circuit Switched Data (GSM Data) • GPRS General Packet Radio Service • HSCSD High Speed CSD • EDGE Enhanced Data Rates for GSM Evolution
The smart phone environmet • UMTS Universal Mobile Telecommunication Services -> 2 Mbps • SMS, MMS, Email, Fax, Web (HTML), WAP • IrDA, Bluetooth, USB • NFC, RFID, ZigBee
Symbian OS • Most common OS in devices like mobile phones • Strong influence from device manufacturers • Series (60,80,90) platforms • Programmable with a C++ like language • Also Java with a JRE • Others: Palm OS, Microsoft Windows Mobile, Linux
Symbian architecture • Kernel • Base Libraries • Application services, engines and protocols • Application framework • Communication architecture • Middleware feature libraries
Symbian architecture Kernel • system memory • program scheduling • resource allocation • privileged CPU access
Symbian architecture Base Libraries • APIs for basic computing, like • string manipulation • file IO • db management • ...
Symbian architecture Application services, engines and protocols • Application data, such as the phone book • Devices services, such as alarms etc. • Access to protocols, such as HTTP
Symbian architecture Application framework • GUI Communications architecture • TCP/IP, IrDA, BT, SMS, etc. Middleware feature libraries • The rest of the bunch, such as security
Multitasking • Threads • pre-emptive • single program can have several threads • Processes • .exe • a main thread • threads share the same memoryspace
DLLs • Dynamic Link Libraries • Static interface DLLs • "traditional" shared functions • Plymorphic DLLs • plug-ins, e.g. device drivers • No static data (until OS v.9.0) • Conserves memory which the static variables would consume
Client/Server model • basic concept in Symbian • Example: file access • C/S concept hidden by the API • Server: • No UI • Waits for requests and serves clients by processing those requests.
Memory • ROM • OS Software • cannot be written, but can be partly read • RAM • volatile, usually up to 30 MB • Internal Flash • disk drive type of memory (C:) • Memory Cards • extendable, up to 1 GB (D:)
Addressing Memory • Two types of memory addresses: virtual and physical -> mapping. • MMU (Memory Management Unit) • chunks (virtually addressed pieces of memory, not allways backed with physical memory) • stack and heap • static • code
Stack and heap • Stack • automatic variables • class members • Heap • new
Addressing Memory • Two areas for memory: Home area and Run area. • Process data of a running process is in the run area. • Applications cannot reference memory in the home area • Protects process memory • Exception: fixed processes (OS-level)
The Kernel • Creation and scheduling of processes and threads • Communication between threads and processes (mutexes, semaphores) • System memory • Access to device hardware
The Kernel • HAL (Hardware Abstraction Layer) • Most code hardware independent • Loading and communicating with device drivers • User library: A DLL that provides access to kernel functions (privileged mode)
The Kernel • Two main components: Executive and Server • Functions executed by server have access to all global data of the kernel • However, they are slow • Functions executed by the executive are faster • The reason: memory mapping