Exemplo n.º 1
0
        public IOTOrganization(int id, string name)
            : base(id, name)
        {
            global = (IOTGlobal)Global.getInstance();
            this.ownNodes = new Dictionary<int, List<int>>();
            this.trustNodes = new Dictionary<int, List<int>>();
            this.cachedNodeTrustResult = new List<IOTNodeTrustResult>();
            this.cacheHistoricaldNodeTrustResult = new Dictionary<int, IOTNodeTrustTypeResult>();
            this.cachedOrgTrustResult = new Dictionary<int, OrgDirectTrust>();

            this.cachedObjectDataRecordList = new Dictionary<int,ObjectDataRecordList>();
            CheckRoutine();
        }
Exemplo n.º 2
0
        public IOTReader(int id, int org)
            : base(id, org)
        {
            this.global = (IOTGlobal)Global.getInstance();
            this.orgMonitorMapping = new Dictionary<int, List<int>>();
            this.cachedMonitorNodes = new Dictionary<int, HashSet<int>>();
            this.readerType = ReaderType.NORMAL;
            this.observedPhenomemons = new HashSet<IOTPhenomemon>();
            this.neighborSpeedPhenomemons = new Dictionary<int, IOTPhenomemon>();

            IOTPhenomemon p = new IOTPhenomemon(IOTPhenomemonType.MOVE_FAST, id);
            this.neighborSpeedPhenomemons.Add(id, p);
            this.observedPhenomemons.Add(p);

            CheckRoutine();
        }
Exemplo n.º 3
0
        protected IOTTrustManager(int id)
            : base(id)
        {
            this.global = (IOTGlobal)Global.getInstance();
            this.type = NodeType.TRUST_MANAGER;
            this.cachedNodeTrustTypeResult = new List<IOTNodeTrustTypeResult>();
            this.orgReputations = new Dictionary<int,IOTOrganizationTrust>();
            this.sortedOrgReputations = new List<IOTOrganizationTrust>();

            double initTrust = global.InitTrust;
            foreach (Organization org in global.orgs)
            {
                this.orgReputations.Add(org.Id, new IOTOrganizationTrust(org.Id, initTrust));
            }
            this.sortedOrgReputations.AddRange(this.orgReputations.Values);
            CheckRoutine();
        }
Exemplo n.º 4
0
 protected IOTObjectNode(int id)
     : base(id)
 {
     this.global = (IOTGlobal)Global.getInstance();
 }