Today TGUI celebrates its 5th birthday. When it was originally released, I never thought it would get this far. I’m really happy to see that several people are using the library, which gets downloaded 3 times per day on average now. A lot has changed during these 5 years and I wanted to take the opportunity to look back at the evolution of the library.
For my first research intership that is part of my Masters in Computer Science study I wrote a sniffer for IEEE 802.15.4 networks which is written to run on the OpenMote-CC2538 hardware.
- The sniffer is lossless, all packets are captured
- The captured packets can be monitored real-time in Wireshark (or can be written to a pcap file)
- The sniffer is cross-platform, it will work on Windows, Linux and Mac OS X
- You can either show the FCS or replace it with the RSSI, LQI and an FCS Valid bit
- CRC checks and retransmissions are used on the serial connection to avoid possible corruption between the peripheral and host
For more information, check the README in the github repository.
After trying for several days to get debugging working in Eclipse, I was told that it would be easier to use nemiver. I tried it and worked on the first try without any problems. This post will show the easy steps necessary to debug the code running on the OpenMote hardware.
My setup is the following: a linux pc (running Arch Linux), the SEGGER J-Link EDU, the OpenMote-CC2538 and the OpenBase to connect the mote to the pc. Also an ARM-JTAG-20-10 adaptor was used to connect the J-Link to the JTAG on the OpenBase.
This post will show an example of the parallel_for function from the Intel TBB library. Every part of the code is well commented to explain what it does. Below the example you will find other explanations on how to improve the code and how to avoid the bad programming practices that were used in the example to keep it simple.
While trying to use Gcov for my project I noticed that it doesn’t work well together with CMake. The problem is that CMake generates files named file.cpp.gcno while gcov searches for file.gcno. Luckily, there is an easy solution.
Update: The code has been completely rewritten and this post is no longer a relevant explanation. The latest code can be found in this Gist with explanations in the comments.
With the addition of the constexpr keyword in c++11 it is possible to calculate the result of function calls on compile time. I knew that it was possible to e.g. count the brackets in a string, but I wanted to take things a little bit further, I wanted to change the string.
I failed at doing this about a year ago, but now that I just updated to gcc 5.2, I decided to give it another shot.
I find the std::bind function a very cool thing, it allows storing functions with different parameters in the same list. But you can even do bind calls within bind calls so that at the moment you call the function it will first execute another function and then passing the result as parameter to the function that you call.
But what if you need to bind a parameter to the function but you don’t know yet what variable should be bound? You could use a pointer as parameter and then later set the pointer to the variable of course. But although I will use a pointer I will have it dereference automatically before the function is actually called.
In the previous post I talked about custom shaped windows, in this post I will explain how to create semi-transparent windows in c++ on Windows, Linux and Mac OS X. The full code can be found in the same github repository. Each operating system will again be discussed separately as they require different code.
This post will explain how to create transparent (non-rectangular) windows in c++ on Windows, Linux and Mac OS X. The shape of the window will be determined by an image with a transparent background. If the pixel is transparent then it will not be part of the window. It is assumed that the size of the image and the size of the window are the same.
Each operating system requires different code and will be discussed separately. Below you will find code snippets, but for a full example check this github project which creates a window with a custom shape with SFML.