Public Function getRecievedMessage(ByVal strIPAddress As String, ByVal strCbusMsgID As String) As StringDim strKey As String = strIPAddress & ":" & strCbusMsgID 'Concatenate IP and ID to form keyDim strCbusMsg As StringIf Me.qCbusMessageList.Contains(strKey) Then'The requested message has been received; return its value and delete from the collectionstrCbusMsg = Me.qCbusMessageList.Item(strKey)Me.qCbusMessageList.Remove(strKey)Return strCbusMsgElse'The requested message has not been recievedReturn NothingEnd IfEnd Function Private Sub listenCbusIn()Dim strcCbusMsg As CbusMsgContainerWhile True 'Loop continuouslystrcCbusMsg = Me.uIn.recCbus()If Not strcCbusMsg Is Nothing Then'CBus Message received, add to listDim strIP As String = strcCbusMsg.getIpDim strID As String = strcCbusMsg.getIdDim strKey As String = strIP & ":" & strIDMe.qCbusMessageList.Add(strcCbusMsg.getIp & ":" & strcCbusMsg.getId, strcCbusMsg.getMsg)End IfEnd WhileEnd Sub