It turns out that getting the physical size of a monitor (centimeter or inches instead of pixels) isn’t that simple. There are several ways to get the size but not all of them are reliable. Finding out which size belongs to which monitor is also not so easy. In this blog post I will provide a way to find the physical size of a monitor in millimeters and a way to match this to a given HMONITOR.
Read more
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.
Read more
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.
Features:
- 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.
Read more
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.
Read more
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.
Read more
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.
Read more
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.
Read more