uint8_t wuclass_bool_not_properties[] = {WKPF_PROPERTY_TYPE_BOOLEAN+WKPF_PROPERTY_ACCESS_READ // INPUT
WKPF_PROPERTY_TYPE_BOOLEAN+WKPF_PROPERTY_ACCESS_WRITE // OUTPUT
};
wkpf_wuclass_definition wuclass_bool_not = {WKPF_WUCLASS_BOOL_NOT, // WuClass id
wuclass_boolean_not_update, // Update function pointer
2, // Number of properties
wuclass_boolean_not_properties // Property datatypes
};
void wuclass_bool_not_update(wkpf_local_wuobject *wuobject) {
bool input;
wkpf_read_property_boolean(wuobject, WKPF_PROPERTY_BOOLEAN_NOT_INPUT_VALUE, &input);
wkpf_write_property_boolean(wuobject, WKPF_PROPERTY_BOOLEAN_NOT_OUTPUT_VALUE, !input);
}
Figure 3: Native implementation of an WuClass for a boolean “not” operator.
can move around autonomously in the network.
While this allows some behaviours to be expressed
in a natural way, the paradigm is very different from
conventional languages, and the assembly-like
instruction set makes it hard to use. Cornell’s
MagnetOS is interesting because it proposes a novel
programming model which allows the user to write
the application as a single Java application, which is
then automatically partitioned and deployed to
minimise energy consumption. However, it requires
significantly more computing power on nodes.
8 CONCLUSIONS
In this paper we have presented the design of an
intelligent middleware, WuKong, for M2M-based
systems. The WuKong middleware provides
platform-independent access to heterogeneous
resources at two different levels. First, the profile
framework allows the resources in the network to be
discovered by Master and to communicate with each
other through a well defined link protocol. In
addition, the middleware includes a small JVM,
which will allow developers to dynamically add
application specific behaviour to the functionality
already present in the sensor hardware.
A working prototype of the WuKong middleware
has been developed, including the profile
framework. The prototype is able to compile an
application, described as a high level flow based
programm, map the logical components to physical
nodes, and wirelessly deploy and run the application.
ACKNOWLEDGEMENTS
This research was partially supported by National
Science Council of Taiwan, National Taiwan
University and Intel Corporation under Grants NSC
100-2911-I-002-001, and 101R70501.
REFERENCES
Chang, M., Bonnet, P., 2010. Meeting Ecologists’
Requirements with Adaptive Data Acquisition. In
Proceedings of the 8th ACM Conference on Embedded
Networked Sensor Systems
Levis, P., Culler, D., 2002. Maté a tiny virtual machine for
sensor networks. In Proceedings of the 10th
international conference on Architectural support for
programming languages and operating systems
Müller, R., Alonso, G., Kossmann, D., 2007. A virtual
machine for sensor networks. In Proceedings of the
2nd ACM SIGOPS/EuroSys European Conference on
Computer Systems
Brouwers, N., Langendoen, K., Corke, P., 2009.
Darjeeling, a feature-rich VM for the resource poor. In
Proceedings of the 7th ACM Conference on Embedded
Networked Sensor Systems
Aslam, F., Schindelhauer, C., Ernst, G., Spyra, D., Meyer,
J., Zalloom, M., 2008. Introducing TakaTuka: a Java
virtual machine for motes. In Proc. of the 6th ACM
Conference on Embedded Networked Sensor Systems
Harbaum, T., 2005. NanoVM http://www.harbaum.org/
till/nanovm/index.shtml
Hughes, D. et al., "LooCI: The Loosely-coupled
Component Infrastructure," 11th IEEE Symposium on
Network Computing and Applications (NCA), pp.236-
243, Aug. 2012
Fok, C.-L.., Roman, G.-C., Chenyang, L., 2005. Rapid
Development and Flexible Deployment of Adaptive
Wireless Sensor Network Applications. In
Proceedings of the 25th IEEE International
Conference on Distributed Computing Systems
Liu, H., Roeder, T., Walsh, K., Barr, R., Sirer, E. G., 2005.
Design and implementation of a single system image
operating system for ad hoc networks. In Proceedings
of the 3rd international conference on Mobile systems,
applications, and services
Gluhak, A., Krco, S., Nati, M., Pfisterer, D., Mitton, N.,
Razafindralambo, T., 2011. A Survey on Facilities for
Experimental Internet of Things Research. In IEEE
Communications Magazine, Vol. 49, no. 11, Nov. 2011
Mottola, L., Picco, G. P., 2011. Programming Wireless
Sensor Networks: Fundamental Concepts and State of
the Art. In ACM Computing Surveys, volume 43, issue
3, April 2011
SENSORNETS2013-2ndInternationalConferenceonSensorNetworks
46