A model-driven engineering framework for architecting and analysing Wireless Sensor Networks