A Self-Reconfigurable Framework for Context Awareness