<reponame>SintefManufacturing/IMM_API
#--------------------------------------------------------------------
#Module Description
#--------------------------------------------------------------------
"""
Script to communicate with IMM as a service with PYRO4.
This is an example how to get imm proxy.
"""
#--------------------------------------------------------------------
#Administration Details
#--------------------------------------------------------------------
__author__ = "<NAME>"
__copyright__ = "2020 [NTNU Gjøvik and SINTEF Manufacturing]"
__credits__ = ["<NAME>"]
__license__ = "MIT"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Development"
__date__ = "30032020"
__version__ = "1.0"
#--------------------------------------------------------------------
#Import
#--------------------------------------------------------------------
import sys
import imm
from xml.etree import ElementTree as et
#--------------------------------------------------------------------
#CONSTANTS
#--------------------------------------------------------------------
PYRONAME = 'IMM.EXAMPLE'
NS = ['172.16.0.98',9001]
#--------------------------------------------------------------------
#METHODS
#--------------------------------------------------------------------
if __name__ == "__main__":
    # Getting the emi proxy
    print('Trying to get link')
    p = imm.get_proxy(PYRONAME,NS)
    d = p.get_async_sample()
    print(d)
    d.disconnect()
