-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample_discover_moxa.py
More file actions
27 lines (20 loc) · 719 Bytes
/
example_discover_moxa.py
File metadata and controls
27 lines (20 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Do not edit this file directly. It has been autogenerated from
# example_discover_moxa_async.py
import asyncio
import logging
import sys
from datetime import datetime
from pystuderxcom import AsyncXcomDiscover, XcomDiscover
from helper import RunHelper
# Setup logging to StdOut
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
logger = logging.getLogger(__name__)
def main():
# Discover IP address of Xcom-LAN / Moxa
# Can be usefull to open the Moxa NPort Web Config
url = XcomDiscover.discover_moxa_webconfig()
if url:
logger.info(f"Moxa NPort Web Config found at: {url}")
else:
logger.info(f"Moxa NPort Web Config not found")
RunHelper.run(main) # main loop