示例#1
0
 def __init__(self, client, lid, guid, epId):
     self.__client = client
     self.__lid = Validation.lid_check_convert(lid)
     self.__guid = Validation.guid_check_convert(guid)
     self.__epId = Validation.guid_check_convert(epId)
     #
     # Keep track of newly created points & subs (the requests for which originated from current agent)
     self.__new_feeds = ThreadSafeDict()
     self.__new_controls = ThreadSafeDict()
     self.__new_subs = ThreadSafeDict()
示例#2
0
 def __init__(self, client, foc, lid, pid, guid):
     self.__client = client
     Validation.foc_check(foc)
     self.__foc = foc
     self.__lid = Validation.lid_check_convert(lid)
     self.__pid = Validation.pid_check_convert(pid)
     self.__guid = Validation.guid_check_convert(guid)
示例#3
0
 def __init__(self, client, lid, guid, epId):
     super(Thing, self).__init__(client, guid)
     self.__lid = Validation.lid_check_convert(lid)
     self.__epId = Validation.guid_check_convert(epId, allow_none=True)
     # Keep track of newly created points & subs (the requests for which originated from current agent)
     self.__new_feeds = ThreadSafeDict()
     self.__new_controls = ThreadSafeDict()
     self.__new_subs = ThreadSafeDict()
    def __init__(self, point, client):
        """point - instance of Point, RemoteFeed or RemoteControl or a valid GUID
           client - instance of IOT.Client
        """
        # remote => use describe, non-remote => use point value listing
        if isinstance(point, Point):
            self.__remote = False
            self.__point = point
        elif isinstance(point, (RemoteFeed, RemoteControl)):
            self.__point = point.guid
            self.__remote = True
        else:
            self.__point = Validation.guid_check_convert(point)
            self.__remote = True

        self.__lock = Lock()
        self.__client = client
        # flag to prevent repeated fetching of value metadata
        self.__last_parse_ok = True
        self.__value_templates = None
        self.__filter = None
示例#5
0
    def __init__(self, point, client):
        """point - instance of Point, RemoteFeed or RemoteControl or a valid GUID
           client - instance of IOT.Client
        """
        # remote => use describe, non-remote => use point value listing
        if isinstance(point, Point):
            self.__remote = False
            self.__point = point
        elif isinstance(point, RemotePoint):
            self.__point = point.guid
            self.__remote = True
        else:
            self.__point = Validation.guid_check_convert(point)
            self.__remote = True

        self.__lock = Lock()
        self.__client = client
        # flag to prevent repeated fetching of value metadata
        self.__last_parse_ok = True
        self.__value_templates = None
        self.__filter = None
示例#6
0
 def __init__(self, client, subid, controlid):
     self.__client = client
     self.__subid = Validation.guid_check_convert(subid)
     self.__controlid = Validation.guid_check_convert(controlid)
示例#7
0
 def __init__(self, client, subid, feedid, lid):
     self.__client = client
     self.__subid = Validation.guid_check_convert(subid)
     self.__feedid = Validation.guid_check_convert(feedid)
     self.__lid = Validation.lid_check_convert(lid)
示例#8
0
 def __init__(self, client, guid):
     self.__client = client
     self.__guid = Validation.guid_check_convert(guid)
示例#9
0
 def __init__(self, client, subid, pointid, lid):
     self.__client = client
     self.__subid = Validation.guid_check_convert(subid)
     self.__pointid = Validation.guid_check_convert(pointid)
     self.__lid = Validation.lid_check_convert(lid)