Download
programming mobile devices n.
Skip this Video
Loading SlideShow in 5 Seconds..
Programming mobile devices PowerPoint Presentation
Download Presentation
Programming mobile devices

Programming mobile devices

99 Vues Download Presentation
Télécharger la présentation

Programming mobile devices

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Programming mobile devices Part II Programming Symbian devices with Symbian C++

  2. Practical matters • Lectures • Excercices (labs) • Exam • Second midterm • Final exam • The course project

  3. 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

  4. Content • Controls • Dialogs • Views • Files, the filesystem • Communication and • Messaging • Testing, debugging and deploying

  5. 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

  6. The smart phone environmet • UMTS Universal Mobile Telecommunication Services -> 2 Mbps • SMS, MMS, Email, Fax, Web (HTML), WAP • IrDA, Bluetooth, USB • NFC, RFID, ZigBee

  7. 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

  8. Symbian architecture • Kernel • Base Libraries • Application services, engines and protocols • Application framework • Communication architecture • Middleware feature libraries

  9. Symbian architecture Kernel • system memory • program scheduling • resource allocation • privileged CPU access

  10. Symbian architecture Base Libraries • APIs for basic computing, like • string manipulation • file IO • db management • ...

  11. 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

  12. Symbian architecture Application framework • GUI Communications architecture • TCP/IP, IrDA, BT, SMS, etc. Middleware feature libraries • The rest of the bunch, such as security

  13. Multitasking • Threads • pre-emptive • single program can have several threads • Processes • .exe • a main thread • threads share the same memoryspace

  14. 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

  15. 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.

  16. 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:)

  17. 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

  18. Stack and heap • Stack • automatic variables • class members • Heap • new

  19. 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)

  20. The Kernel • Creation and scheduling of processes and threads • Communication between threads and processes (mutexes, semaphores) • System memory • Access to device hardware

  21. 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)

  22. 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