Introduction to C++ Programming for Embedded and Application Developers

Course

Online

Price on request

Description

  • Type

    Course

  • Methodology

    Online

This intensive, fast paced course enables experienced C programmers to begin writing embedded C++ software. It covers all the commonly used features of the C++ language and provides insights into the strengths and limitations of these features in the context of implementing embedded applications. Additionally, the course discusses the implemention of C++ class wrappers around C-based operating system APIs and TCP/IP socket APIs.

Questions & Answers

Add your question

Our advisors and other users will be able to reply to you

Who would you like to address this question to?

Fill in your details to get a reply

We will only publish your name and question

Reviews

Subjects

  • C++
  • IT
  • Programming

Course programme

Brief History of C++

  • Early C++ (translation of C++ code to C code)
  • C++ as an extension of C
  • Non object-oriented C++ enhancements to basic C
  • C++ as an evolving language and the development of the ANSI C++ standard
  • Possible memory and performance costs of using C++ in embedded applications
  • EC++ as a subset of C++ for use in the implementation of resource constrained embedded systems

The C in C++

  • Base data types (numeric char, integer and floating point types)
  • Pointers and arrays
  • Function prototypes and function pointers
  • structs , pointers to structs and dynamic data structures
  • typedefs, enums and macros
  • I/O in C
  • Replacing C based I/O (printf, scanf etc) with C++ based I/O

Functions in C++

  • Function overloading
  • Name mangling / decorating
  • Mixing C and C++ code modules (use of extern C)
  • Operators and operator overloading in C++

Key Object Orientated Concept - Classes and Instances

  • Member variables and member functions (private, public, protected)
  • Constructors and destructors
  • Default constructors and default destructors
  • Initialiser lists
  • Derived classes
  • Arrays of classes
  • UML class diagram notation

More advanced aspects of working with classes and instances

  • Copy constructors
  • Deep vs. shallow copying
  • Virtual functions and virtual classes (compile time vs. run time binding)
  • Implementing dynamic data structures using classes (linked lists, binary trees, etc)
  • Friend classes and friend functions
  • Static member variables and static member functions
  • Templates and the Standard Template Library

A more detailed look at input and output in C++

  • The C++ iostream classes
  • Overloading the insertion and extraction operators for use with user defined classes
  • Reading and writing files
  • Basics of object and data persistence

Dynamic memory management

  • The new and delete operators
  • Overloading the new and delete operators
  • Application specific memory management

Exception Handling

  • The concept and structure of exceptions and exception handling
  • Throwing an exception
  • The try block
  • Catching an exception
  • Re-throwing exceptions
  • Catch-all handlers
  • Exception specifications
  • Exception handling implemention mechanisms
  • Appropriateness of exception handling in embedded applications
  • Alternatives to the C++ exception handling mechanism

Templates and their uses

  • Data parameterised collections of classes and functions
  • How C++ compilers handle templates
  • The C++ Standard Template Library - a brief overview
  • The Boost C++ libraries - a brief overview

Namespaces - an extra level of scoping

  • usefulness of namespaces in large projects and when re-using code

Mixed C and C++ applications and extern CMixed C++, C and assembler applications

  • Calling assembler from C
  • Calling assembler from C++

Overview of EC++

  • Benefits of C++
  • Limitations of C++

C++ and Embedded and Operating System C API issues

  • Patterns and idioms for accessing hardware from C++
  • Patterns and idioms for bit manipulation in C++
  • C++ embedded system programming idioms and patterns
  • Polling techniques for synchronous I/O
  • Interrupt driven techniques for I/O
  • Implementing a low level interrupt handler in C++ for an operating-system-less application
  • Implementing a simple timer-driven scheduler in C++
  • Idioms and patterns for wrapping C operating system APIs in C++ (Inter Process Communication and Task Management)
  • Thread, semaphore, pipe, task, timer, monitor and shared memory classes
  • Implementing a simple timer-driven scheduler in C++
  • Device driver class hierarchies

Compiler Specific Extensions to C++

  • Accessing Special Function Registers (SFRs)
  • #pragma s
  • Compiler-specific non-ANSI C++ extensions

Introduction to C++ Programming for Embedded and Application Developers

Price on request