Monitoring of the polyscope programming process via TCP/IP

I’m a beginner and I’m really having some problems producing my graduation design. I would like to send a message to the PC via TCP/IP i.e. port 30002 for monitoring the polyscope programming when the polyscope sets waypoints or enables freedrive. Also send a message to the PC when the program is running to a waypoint. I hope you can give me some ideas. Thank you very much.