Follow Us
Categories
Archives
- February 2024
- January 2024
- August 2023
- December 2022
- November 2022
- October 2022
- February 2022
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- January 2021
- November 2020
- October 2020
- August 2020
- April 2020
- February 2020
- January 2020
- October 2019
- September 2019
- July 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- October 2018
- September 2018
- August 2018
- July 2018
- April 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- April 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- November 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- February 2013
- January 2013
- November 2012
- October 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- December 2011
- November 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
Category Archives: Design Issues
Making things do stuff – Part 3
Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
Latest posts by Glennan Carnie (see all)
- Practice makes perfect, part 3 – Idiomatic kata - February 27, 2020
- Practice makes perfect, part 2– foundation kata - February 13, 2020
- Practice makes perfect, part 1 – Code kata - January 30, 2020
Previously, we’ve looked at the basics of hardware manipulation in C++ and applied that to a simple GPIO implementation.
In this article we’re going to have a look at encapsulating our code in a class and look at some of the design choices we have to make.
If you’re not familiar with hardware manipulation in C++ I’d highly recommend reading the previous articles in this series before continuing.
Even if you’re familiar with the concepts of hardware manipulation, if you haven’t read the […]
Posted in C/C++ Programming, Cortex, Design Issues
Tagged Class, GPIO, hardware manipulation, IO, Modern C++. C++11. C++14, Object-Oriented Design, OOD, STM32, STM32F4 Discovery
1 Comment
2016 – The Year of the Hack
Technical Consultant at Feabhas Ltd
I provide expertise and training for Embedded Linux courses.
I have over 20 years of experience in the embedded sector, gained at companies such as Pace, Open TV and Sony Semiconductor Europe.
I've led work on numerous projects at all stages in the design cycle with comprehensive expertise in software engineering design, support and integration.
I have over 20 years of experience in the embedded sector, gained at companies such as Pace, Open TV and Sony Semiconductor Europe.
I've led work on numerous projects at all stages in the design cycle with comprehensive expertise in software engineering design, support and integration.
Latest posts by Andy McCormick (see all)
- 2016 – The Year of the Hack - January 27, 2017
- An Introduction to Hypervisors - October 19, 2016
- Off to the Embedded Linux Conference Europe and Open IoT Summit, Berlin 11th-13th October 2016 - October 5, 2016
IoT security has been headline news for at least the past 12 months, and we’ve also had an unprecedented number of incidents affecting consumers in more traditional areas: online banking account thefts, online fraud, OS vulnerabilities, you name it, it’s probably happened. In researching this blog, I found over 400 hack-related stories in The Register alone.
With increasing numbers of embedded devices becoming connected, we are going to hear more and more about security breaches, and guaranteeing security in increasingly sophisticated […]
Death and (virtual) destruction*
Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
Latest posts by Glennan Carnie (see all)
- Practice makes perfect, part 3 – Idiomatic kata - February 27, 2020
- Practice makes perfect, part 2– foundation kata - February 13, 2020
- Practice makes perfect, part 1 – Code kata - January 30, 2020
This time, we’ll have a more detailed look at one of those everybody-knows-that elements of C++ – virtual destructors.
More specifically, I want to reinforce under what circumstances you should make your destructor virtual; and when you don’t need to (despite what your compiler might say)
(*there’s no
Great Expectations
Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
Latest posts by Glennan Carnie (see all)
- Practice makes perfect, part 3 – Idiomatic kata - February 27, 2020
- Practice makes perfect, part 2– foundation kata - February 13, 2020
- Practice makes perfect, part 1 – Code kata - January 30, 2020
Previously, we’ve looked at the basic concepts of function parameter passing, and we’ve looked at the mechanics of how parameters are passed at the Application Binary Interface (ABI) level.
Far too often we focus on the mechanisms and efficiency of parameter passing, with the goal: if it’s efficient then it’s good; that’s all there is to it. In this article I want to move past simple mechanics and start to explore function parameter design intent – that is, what can I […]
Posted in C/C++ Programming, Design Issues
Tagged C++0x, C++11, C++1y, copy policy, design, functions, Modern C++, move policy, move semantics
2 Comments
Memory consistency made simple(ish)
Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
Latest posts by Glennan Carnie (see all)
- Practice makes perfect, part 3 – Idiomatic kata - February 27, 2020
- Practice makes perfect, part 2– foundation kata - February 13, 2020
- Practice makes perfect, part 1 – Code kata - January 30, 2020
The C++11 memory consistency model is probably one of the most significant aspects of Modern C++; and yet probably one of the least well-understood. I think the reason is simple: it’s really difficult to understand what the problem actually is.
The memory consistency problem is a concurrency problem. That is, it’s a problem that occurs when we start writing multi-threaded code. More specifically, it’s a parallelism problem – the real subtleties occur when you have two or more processors executing code.
In the first […]
Posted in C/C++ Programming, Design Issues, General
Tagged C++, memory consistency, sequential execution
2 Comments
The Rule of Zero
Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
Latest posts by Glennan Carnie (see all)
- Practice makes perfect, part 3 – Idiomatic kata - February 27, 2020
- Practice makes perfect, part 2– foundation kata - February 13, 2020
- Practice makes perfect, part 1 – Code kata - January 30, 2020
In a previous article – ”The Rule of the Big Four (and a half)” we looked at resource management policies in C++.
Resource management is the general term for using the mechanisms in C++ to ensure that resources – files, dynamic memory, sockets, mutexes, etc – have their lifetimes automatically controlled so as to prevent resource leaks, deadlocks, etc. C++ refers to these mechanisms as RAII/RDID ( “Resource Acquisition Is Initialisation / Resource Destruction is Deletion”)
In this article we’ll have a […]
Software Duct Tape – Binding the C++ Universe Together
Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
Latest posts by Glennan Carnie (see all)
- Practice makes perfect, part 3 – Idiomatic kata - February 27, 2020
- Practice makes perfect, part 2– foundation kata - February 13, 2020
- Practice makes perfect, part 1 – Code kata - January 30, 2020
One of the cornerstones of object-oriented design is the concept of objects interacting by sending messages to form mechanisms – units of higher-order (or ‘emergent’) behaviour.
In order to send a message (in this case, invoke a member function) an object must have a ‘link’ to the target object. That link is formed by building in an association between the two classes as part of the type’s definition.
In this article we look at building associations between classes and forming run-time links […]
The hokey-cokey* of function calls
Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
Latest posts by Glennan Carnie (see all)
- Practice makes perfect, part 3 – Idiomatic kata - February 27, 2020
- Practice makes perfect, part 2– foundation kata - February 13, 2020
- Practice makes perfect, part 1 – Code kata - January 30, 2020
Functions are the lifeblood of a C program. The program flow is altered by passing parameters to functions, which are then manipulated. Conceptually function parameters are defined as being either:
Inputs (Read-only) – client-supplied objects manipulated within the function only
Outputs (Write-only) – objects generated by the function for use by the client.
Input-Outputs (Read-Write) – client objects that can be manipulated by the function.
Defining the use of a parameter gives vital information not only to the implementer, but (perhaps more importantly) to […]
Posted in C/C++ Programming, Design Issues
Tagged C Declarations, functions, interface, parameters, quality, safety, security
Leave a comment
Casting – what could possibly go wrong?
Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
He specialises in C++, UML, software modelling, Systems Engineering and process development.
Latest posts by Glennan Carnie (see all)
- Practice makes perfect, part 3 – Idiomatic kata - February 27, 2020
- Practice makes perfect, part 2– foundation kata - February 13, 2020
- Practice makes perfect, part 1 – Code kata - January 30, 2020
Type casting in C++ is a form of what is known in computer science as type punning – that is, circumventing the type system of a programming language.
C++ inherits its conversion and casting mechanism from C, but supplements it (although sensibly we should say, replaces it) with four, more explicit cast operations:
static_cast
reinterpret_cast
const_cast
dynamic_cast
In C and C++ – and particularly in embedded systems – casting is a necessary evil; so much so that many programmers just accept it […]
Posted in C/C++ Programming, Design Issues
Tagged casting, const_cast, dynamic_cast, reinterpret_cast, RTTI, static_cast
1 Comment