A digital twin for runtime monitoring communications in IoT