Design and Compilation of an Object-Oriented Macroprogramming Language for Wireless Sensor Networks