'Triggered if any of the readout operations timeout.
Sends a failure message back to the client, stops communicating
with the failing device.
Arguments:
session         -- The request session id
nodeId          -- The id of the device which timed out'

def _event_comm_timeout(self, session, nodeId):

    msg = self.xmpp.Message()
    msg['from'] = self.sessions[session]['to']
    msg['to'] = self.sessions[session]['from']
    msg['failure']['seqnr'] = self.sessions[session]['seqnr']
    msg['failure']['error']['text'] = 'Timeout'
    msg['failure']['error']['nodeId'] = nodeId
    msg['failure']['error']['timestamp'] = datetime.datetime.now().replace(microsecond=0).isoformat()
    self.sessions[session]['nodeDone'][nodeId] = True
    if self._all_nodes_done(session):
        msg['failure']['done'] = 'true'
    msg.send()
    del self.sessions[session]
