According to the diversity and difference of the role played by nodes in WSN
the role mapping framework model in WSN was proposed.A role-based middleware for wireless sensor networks(RobMSN) was designed based on that model.From the view of the formal semantics and specifications of the middleware
the role mapping specifications solve the problem of semantic conflicts in role mapping abstract
making the role mapping context fully reflected in the role specifications of middleware.Applications will be mapped as the specific roles of node which played in the wireless sensor networks using RobMSN
it can be cross-platform and implement dynamic application services.Finally
an appli-cation development example was used to illustrate the design and development process of RobMSN middleware.