6 CONCLUSION
In this paper we proposed a development model for
WSNs based on state machines. The goal was to sup-
port the implementation of new applications based on
two principles: (i) specification of the flow of exe-
cution as a state machine, and (ii) implementation of
components that provide reusable services. We intro-
duced a language, called SLEDS-SD, and developed
a translator from SLEDS-SD to nesC in order to gen-
erate code to be installed on devices of real WSNs.
We presented an experimental study that shows that
SLEDS-SD programs are about 40% smaller than the
generated nesC code, which suggests that our ap-
proach reduces the development effort. Moreover,
the evaluation of code reuse showed that applications
with a similar execution flow have more than 95% of
identical lines of SLEDS-SD code. The rate of code
reuse of components implemented in nesC ranged
from 32% to 78% following our approach.
As future work, we intend to extend our develop-
ment model to generate code for both network simu-
lators, such as NS-3, as well as other WSN and IoT
platforms, such as Contiki (Dunkels et al., 2004) and
RIOT (Baccelli et al., 2013). With such extensions it
will be possible to use the same high-level specifica-
tion to first evaluate a clustering model using simula-
tors and then deploy the application in different real
platforms with much less effort. We also intend to
extend the experimental study by analyzing the gen-
erated code quality, both in terms of legibility as well
as of resources utilization by the sensor devices. An-
other lines of investigation include support for search-
ing reusable components, and support for two-level
orchestration: on device-application level and on ap-
plication internal behavior level.
ACKNOWLEDGEMENTS
This work was partially funded by CNPq and CAPES-
PrInt-UFPR.
REFERENCES
Adel Serhani, M., El-Kassabi, H. T., Shuaib, K., Navaz,
A. N., Benatallah, B., and Beheshti, A. (2020). Self-
adapting cloud services orchestration for fulfilling in-
tensive sensory data-driven iot workflows. Future
Generation Computer Systems, 108:583 – 597.
Amis, A. D., Prakash, R., Vuong, T. H., and Huynh, D. T.
(2000). Max-Min D-Cluster formation in wireless ad
hoc networks. In Proc. of the IEEE Conf. on Computer
Communications, volume 1, pages 32–41.
Baccelli, E., Hahm, O., G
¨
unes, M., W
¨
ahlisch, M., and
Schmidt, T. C. (2013). Riot os: Towards an os for
the internet of things. In IEEE Conf. on Computer
Communications Workshops, pages 79–80.
Baker, D. J. and Ephremides, A. (1981). A distributed algo-
rithm for organizing mobile radio telecommunication
networks. In ICDCS, pages 476–483.
Baumgartner, T., Chatzigiannakis, I., Fekete, S., Koninis,
C., Kroller, A., and Pyrgelis, A. (2010). Wiselib:
A generic algorithm library for heterogeneous sensor
networks. In European Conf. on Wireless Sensor Net-
works, pages 162–177.
Braga, M. d. L. (2012). Gerac¸
˜
ao autom
´
atica de c
´
odigo para
redes de sensores sem fio usando communicating x-
machine. Master’s thesis, Programa de P
´
os-graduac¸
˜
ao
em Engenharia El
´
etrica - UFAM, Manaus.
Carrero, M. A., Musicante, M. A., dos Santos, A. L., and
Hara, C. S. (2021). A DSL for WSN software compo-
nents coordination. Information Systems, 98:101461.
Dastjerdi, A. V. and Buyya, R. (2016). Fog computing:
Helping the internet of things realize its potential.
Computer, 49(8):112–116.
Dunkels, A., Gronvall, B., and Voigt, T. (2004). Contiki-
a lightweight and flexible operating system for tiny
networked sensors. In 29th Annual IEEE Int. Conf. on
Local Computer Networks, pages 455–462.
Gay, D., Levis, P., Von Behren, R., Welsh, M., Brewer, E.,
and Culler, D. (2003). The nesc language: A holis-
tic approach to networked embedded systems. Acm
Sigplan Notices, 38(5):1–11.
Heinzelman, W. R., Chandrakasan, A., and Balakrishnan,
H. (2000). Energy-efficient communication protocol
for wireless microsensor networks. In Proc. of the
33rd Annual Hawaii Int. Conf. on System Sciences. 10
pages vol.2. IEEE.
Hussein, M., Li, S., and Radermacher, A. (2017). Model-
driven development of adaptive iot systems. In MOD-
ELS (Satellite Events), pages 17–23.
Lekidis, A., Stachtiari, E., Katsaros, P., Bozga, M., and
Georgiadis, C. K. (2018). Model-based design of iot
systems with the bip component framework. Soft-
ware: Practice and Experience, 48(6):1167–1194.
Ouadjaout, A., Lasla, N., Bagaa, M., and Badache, N.
(2014). Static analysis of device drivers in tinyos. In
Proc. of the 13th Int. Symposium on Information Pro-
cessing in Sensor Networks, pages 297–298.
Patel, P. and Cassou, D. (2015). Enabling high-level appli-
cation development for the internet of things. Journal
of Systems and Software, 103:62–84.
Salman, A. J. and Al-Yasiri, A. (2016). Sennet: a program-
ming toolkit to develop wireless sensor network ap-
plications. In Proc. of the 8th IFIP Int. Conf. on New
Technologies, Mobility and Security, pages 1–7.
Satyanarayanan, M. (2017). The emergence of edge com-
puting. Computer, 50(1):30–39.
Taherkordi, A., Johansen, C., Eliassen, F., and R
¨
omer, K.
(2015). Tokenit: Designing state-driven embedded
systems through tokenized transitions. In Int. Conf.
on Distributed Computing in Sensor Systems, pages
52–61.
Development of Wireless Sensor Networks Applications with State-based Orchestration
319