C++ for non-C Programmers

This course introduces the C++ language for use on real-time and embedded applications. No previous experience of C programming is necessary, however it is suited to engineers with existing experience of other high-level languages (e.g. Ada).


Attendees will perform hands on embedded programming on target hardware during course practicals. Approximately 50% of the course is practical work.

C++-503
5 days
Contact Feabhas (available for on-site delivery only)
pdf download

Course Outline

 

Background to C++
Introduction to C++ Programming
Types and Operators:

  • C base types
  • Precedence & associativity

Control Flow:

  • Logical expressions and operations
  • Decision Making
  • Loops

Functions:

  • The Function as a logical program unit
  • How parameters are passed

Arrays and Pointers:

  • Arrays as circular buffers
  • Relationship between pointers & arrays

Introduction to Object Oriented (OO) Principles:

  • Key characteristics of OO development
  • OO techniques and the real-time software development process

Introduction to Classes:

  • Classes & class instances
  • Methods
  • Constructors & destructors

More on Classes:

  • Inlining member functions
  • Const member functions
  • Static class members and functions

Inheritance:

  • Building class hierarchies
  • Dynamic binding for class methods, virtual functions
  • Polymorphism

Multiple inheritance(MI):

  • MI and interfaces


Functions and Operators:

  • Class defined conversions
  • Overloading and function selection
  • Overloading operators

Exception Handling:

  • What are exceptions?
  • Throwing and catching an exception

Templates:

  • Introduce parameterised types and functions
  • Function and class templates

The Standard Library:

  • Introducing the Standard Template Library

Software Structuring:

  • Structuring large scale software systems
  • Namespaces

Real-Time Specifics:

  • Low level facilities of C++ including:
  • Accessing hardware
  • Manipulating information at the bit level
  • Polling
  • Interrupts

Portability Considerations:

  • Language features affecting portability;
  • Non-standard C++ language features;

Concurrency:

  • Concurrency
  • Sharing resources in multi-tasking system
  • Synchronizing tasks
  • Transferring data between tasks.

Course Overview

 

An intensive five day course covering C++ in the context of real-time embedded application development.

Course Objectives:

  • To provide an understanding of the essentials of the C++ programming language.
  • To give you practical experience of writing C++ for real-time systems.
  • To demonstrate the traps and pitfalls of the language when used in a real-time system.
  • To give you the confidence to apply these new concepts to your next real-time project.

Delegates Will Learn:

  • The core C++ syntax and semantics
  • How to access hardware in C++
  • About memory and performance issues associated with C++
  • How Real-time Operating Systems (RTOS) affect the use of the language

Pre-requisites:

  • Experience of high-level programming, e.g. Ada
  • Prior knowledge of C is not required

Who Should Attend:

  • The course is designed for engineers who are embarking on a project using C++ for the first time, but have little or no experience of C. It assumes they have previous high-level language experience (e.g. Ada).

Duration:

  • Five days

Course Materials:

  • Delegate Handbook

Related Courses:

Course Workshop:
This course makes use of target hardware during the real-time practical exercises. The board targeted is an IAR Kickstart development board (NXP LPC2129 ARM7-based microcontroller). An application board is controlled via the LPC2129 to give attendees a real sense of embedded application development.