Skip to main content

cMoflon: Model-Driven Generation of Embedded C Code for Wireless Sensor Networks

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 10376))

Abstract

Wireless sensor networks (WSNs) are an indispensable part of the emerging Internet of Things. The topology of a WSN is a graph representing the sensor nodes and their interconnecting links. To reduce the energy consumption of a WSN, a topology control algorithm inactivates inessential links, and the sensor nodes reduce their transmission power while preserving crucial integrity properties (e.g., connectivity). In previous work, we have shown that model-driven engineering allows to prototype topology control algorithms that (i) preserve the specified integrity properties and (ii) can be rapidly evaluated in a network simulator. In this paper, we complement our approach by proposing cMoflon, an open-source tool that generates embedded C code for hardware sensor testbeds. The target platform is the Contiki WSN operating system. To show the applicability of cMoflon, we generate code for three representative topology control algorithms: kTC, l*-kTC, and LMST. A comparison of the generated topology control algorithms with their manually tuned counterparts for TelosB sensor nodes shows that cMoflon generates embedded code that is competitive w.r.t. code memory usage.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    cMoflon is open source and available at https://github.com/eMoflon/cmoflon/.

  2. 2.

    https://www.sparxsystems.eu/enterprisearchitect.

  3. 3.

    See https://github.com/eMoflon/emoflon-tests/.

  4. 4.

    The full source code for all TC algorithms of this paper can be found at https://github.com/eMoflon/cmoflon/releases/tag/cmoflon_1.0.0.

  5. 5.

    See https://linux.die.net/man/1/size.

  6. 6.

    See also https://en.wikipedia.org/wiki/List_of_wireless_sensor_nodes.

  7. 7.

    https://github.com/catedrasaes-umu/emf4cpp.

References

  1. Al Saad, M., Fehr, E., Kamenzky, N., Schiller, J.: ScatterClipse: a model-driven tool-chain for developing, testing, and prototyping wireless sensor networks. In: Proceedings of the International Symposium on Parallel and Distributed Processing with Applications (ISPA), pp. 871–885 (2008). https://dx.doi.org/10.1109/ISPA.2008.22

  2. Bak, C., Plump, D.: Compiling graph programs to C. In: Echahed, R., Minas, M. (eds.) ICGT 2016. LNCS, vol. 9761, pp. 102–117. Springer, Cham (2016). doi:10.1007/978-3-319-40530-8_7

    Chapter  Google Scholar 

  3. Berardinelli, L., Di Marco, A., Pace, S., Pomante, L., Tiberti, W.: Energy consumption analysis and design of energy-aware WSN agents in fUML. In: Taentzer, G., Bordeleau, F. (eds.) ECMFA 2015. LNCS, vol. 9153, pp. 1–17. Springer, Cham (2015). doi:10.1007/978-3-319-21151-0_1

    Chapter  Google Scholar 

  4. Dunkels, A., Gronvall, B., Voigt, T.: Contiki - a lightweight and flexible operating system for tiny networked sensors. In: Proceedings of the International Conference on Local Computer Networks (LCN), pp. 455–462 (2004). https://dx.doi.org/10.1109/LCN.2004.38

  5. Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of Algebraic Graph Transformation. Springer, Heidelberg (2006). https://dx.doi.org/10.1007/3-540-31188-2

  6. Essaadi, F., Ben Maissa, Y., Dahchour, M.: MDE-based languages for wireless sensor networks modeling: a systematic mapping study. In: El-Azouzi, R., Menasché, D.S., Sabir, E., Pellegrini, F.D., Benjillali, M. (eds.) Advances in Ubiquitous Networking 2. LNEE, vol. 397, pp. 331–346. Springer, Singapore (2017). doi:10.1007/978-981-10-1627-1_26

    Chapter  Google Scholar 

  7. Fischer, T., Niere, J., Torunski, L., Zündorf, A.: Story diagrams: a new graph rewrite language based on the unified modeling language and java. In: Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds.) TAGT 1998. LNCS, vol. 1764, pp. 296–309. Springer, Heidelberg (2000). doi:10.1007/978-3-540-46464-8_21

    Chapter  Google Scholar 

  8. Geiß, R., Batz, G.V., Grund, D., Hack, S., Szalkowski, A.: GrGen: a fast SPO-based graph rewriting tool. In: Corradini, A., Ehrig, H., Montanari, U., Ribeiro, L., Rozenberg, G. (eds.) ICGT 2006. LNCS, vol. 4178, pp. 383–397. Springer, Heidelberg (2006). doi:10.1007/11841883_27

    Chapter  Google Scholar 

  9. Heckel, R., Wagner, A.: Ensuring consistency of conditional graph rewriting - a constructive approach. In: Proceedings of the Joint COMPUGRAPH/SEMAGRAPH Workshop. ENTCS, vol. 2, pp. 118–126. Elsevier (1995). https://dx.doi.org/10.1016/S1571-0661(05)80188-4

  10. Kluge, R., Stein, M., Varró, G., Schürr, A., Hollick, M., Mühlhäuser, M.: A systematic approach to constructing incremental topology control algorithms using graph transformation. J. Vis. Lang. Comput. (JVLC) 38, 47–83 (2016). http://dx.doi.org/10.1016/j.jvlc.2016.10.003

    Article  Google Scholar 

  11. Kluge, R., Stein, M., Varró, G., Schürr, A., Hollick, M., Mühlhäuser, M.: A systematic approach to constructing families of incremental topology control algorithms using graph transformation. J. Softw. Syst. Model. (SoSyM), 1–41 (2017). https://dx.doi.org/10.1007/s10270-017-0587-8

  12. Kluge, R., Varró, G., Schürr, A.: A methodology for designing dynamic topology control algorithms via graph transformation. In: Kolovos, D., Wimmer, M. (eds.) ICMT 2015. LNCS, vol. 9152, pp. 199–213. Springer, Cham (2015). doi:10.1007/978-3-319-21155-8_15

    Chapter  Google Scholar 

  13. Leblebici, E., Anjorin, A., Schürr, A.: Developing eMoflon with eMoflon. In: Ruscio, D., Varró, D. (eds.) ICMT 2014. LNCS, vol. 8568, pp. 138–145. Springer, Cham (2014). doi:10.1007/978-3-319-08789-4_10

    Google Scholar 

  14. Li, N., Hou, J.C., Sha, L.: Design and analysis of an MST-based topology control algorithm. IEEE Trans. Wirel. Commun. 4(3), 1195–1206 (2005)

    Article  Google Scholar 

  15. Lim, R., Ferrari, F., Zimmerling, M., Walser, C., Sommer, P., Beutel, J.: FlockLab: a testbed for distributed, synchronized tracing and profiling of wireless embedded systems. In: Proceedings of the ACM/IEEE Conference on Information Processing in Sensor Networks (IPSN), pp. 153–165 (2013). https://doi.org/10.1145/2461381.2461402

  16. Polastre, J., Szewczyk, R., Culler, D.: Telos: enabling ultra-low power wireless research. In: International Symposium on Information Processing in Sensor Networks (IPSN), pp. 364–369 (2005). https://dx.doi.org/10.1109/IPSN.2005.1440950

  17. Portocarrero, J.M.T., Delicato, F.C., Pires, P.F., Rodrigues, T.C., Batista, T.V.: SAMSON: Self-adaptive Middleware for Wireless Sensor Networks. In: Proceedings of the ACM Symposium on Applied Computing (SAC), pp. 1315–1322. ACM, New York (2016). https://dx.doi.org/10.1145/2851613.2851766

  18. Richerzhagen, B., Stingl, D., Rückert, J., Steinmetz, R.: Simonstrator: simulation and prototyping platform for distributed mobile applications. In: Proceedings of the International Conference on Simulation Tools and Techniques (SIMUTools), pp. 99–108. ICST (2015). https://dx.doi.org/10.4108/eai.24-8-2015.2261064

  19. Rozenberg, G. (ed.): Handbook of Graph Grammars and Computing by Graph Transformation. Foundations, vol. 1. World Scientific (1997). https://dx.doi.org/10.1142/3303

  20. Santi, P.: Topology Control in Wireless Ad Hoc and Sensor Networks, 1st edn. Wiley, Chichester (2005)

    Book  Google Scholar 

  21. Santi, P.: Topology control in wireless ad hoc and sensor networks. ACM Comput. Surv. (CSUR) 37(2), 164–194 (2005). https://dx.doi.org/10.1145/1089733.1089736

    Article  MathSciNet  Google Scholar 

  22. Schweizer, I., Wagner, M., Bradler, D., Mühlhäuser, M., Strufe, T.: kTC - robust and adaptive wireless ad-hoc topology control. In: Proceedings of the International Conference on Computer Communications and Networks (ICCCN), pp. 1–9 (2012). https://dx.doi.org/10.1109/ICCCN.2012.6289318

  23. Stein, M., Petry, T., Schweizer, I., Bachmann, M., Mühlhäuser, M.: Topology control in wireless sensor networks: what blocks the breakthrough? In: Proceedings of the International Conference on Local Computer Networks (LCN), pp. 389–397 (2016). https://doi.org/10.1109/LCN.2016.67

  24. Steinberg, D., Budinsky, F., Merks, E., Paternostro, M.: EMF: Eclipse Modeling Framework. Addison Wesley Professional, Boston (2008). http://catalogue.pearsoned.co.uk/educator/product/EMF-Eclipse-Modeling-Framework/9780321331885

    Google Scholar 

  25. Varró, G., Anjorin, A., Schürr, A.: Unification of compiled and interpreter-based pattern matching techniques. In: Vallecillo, A., Tolvanen, J.P., Kindler, E., Störrle, H., Kolovos, D. (eds.) ECMFA 2012. LNCS, vol. 7349, pp. 368–383. Springer, Heidelberg (2012). doi:10.1007/978-3-642-31491-9_28

    Chapter  Google Scholar 

  26. Völter, M., Stahl, T., Bettin, J., Haase, A., Helsen, S.: Model-Driven Software Development: Technology, Engineering, Management. John Wiley & Sons (2013)

    Google Scholar 

  27. Wang, Y.: Topology control for wireless sensor networks. In: Li, Y., Thai, M.T., Wu, W. (eds.) Wireless Sensor Networks and Applications. Signals and Communication Technology, pp. 113–147. Springer, US (2008). doi:10.1007/978-0-387-49592-7_5

    Chapter  Google Scholar 

  28. Whitmore, A., Agarwal, A., Da Xu, L.: The internet of things-a survey of topics and trends. Inf. Syst. Front. 17(2), 261–274 (2015). https://dx.doi.org/10.1007/s10796-014-9489-2

    Article  Google Scholar 

Download references

Acknowledgment

This work has been funded by the German Research Foundation (DFG) as part of project A1 within the Collaborative Research Center (CRC) 1053 – MAKI.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Roland Kluge .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Kluge, R., Stein, M., Giessing, D., Schürr, A., Mühlhäuser, M. (2017). cMoflon: Model-Driven Generation of Embedded C Code for Wireless Sensor Networks. In: Anjorin, A., Espinoza, H. (eds) Modelling Foundations and Applications. ECMFA 2017. Lecture Notes in Computer Science(), vol 10376. Springer, Cham. https://doi.org/10.1007/978-3-319-61482-3_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-61482-3_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-61481-6

  • Online ISBN: 978-3-319-61482-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics