Ejemplo n.º 1
0
 public void DebugDataSets(XZPosInt pos, AgentProperties properties)
 {
     foreach (var dataSet in data)
     {
         dataSet.DebugIt(pos, properties);
     }
 }
Ejemplo n.º 2
0
        private bool ActivateServer(Agent agent, AgentProperties agentProps, bool isPushModeZone)
        {
            HttpProperties props         = (HttpProperties)fProps;
            bool           webAppEnabled = props.ServletEnabled;

            // Create the http server if it doesn't exist. All HttpTransport
            // objects share once instance of the server.
            if ((sServer == null || !sServer.IsStarted) &&
                (webAppEnabled || isPushModeZone))
            {
                if ((Adk.Debug & AdkDebugFlags.Transport) != 0 && log.IsInfoEnabled)
                {
                    log.Info("Activating " + fProps.Protocol.ToUpperInvariant() + " transport...");
                }

                if (sServer == null)
                {
                    // TODO: This should be using some type of a factory metaphor, based on a config setting
                    // We may be going to support, at the minimum, three different HttpPushProtocol configurations
                    // 1) Using the embedded AdkHttpSifServer()
                    // 2) a Wrapper arround HTTP.SYS on Windows 2003
                    // 3) an implementation that runs inside IIS
                    sServer = new AdkHttpApplicationServer(this);
                }
                sServer.Start();
            }


            return(sServer != null);
        }
Ejemplo n.º 3
0
        protected override IZone CreateZone(String zoneId, String zoneUrl, AgentProperties props)
        {
            TestZoneImpl zone = new TestZoneImpl(zoneId, zoneUrl, fAgent, props);

            zone.Proto = new InMemoryProtocolHandler();
            return(zone);
        }
Ejemplo n.º 4
0
        public void testRegisterSIF20()
        {
            Adk.SifVersion = (SifVersion.SIF20);
            String          iconURL = "http://acme.foo.bar/ico";
            AgentProperties props   = Agent.Properties;

            props.AgentIconUrl = iconURL;

            Agent.Name         = "acmeAgent";
            props.AgentVendor  = "acmeVendor";
            props.AgentVersion = "2.6.5.8";

            props.ApplicationName    = "acmeApp";
            props.ApplicationVendor  = "acme<>AppVendor";
            props.ApplicationVersion = "10.2";

            Zone.Connect(ProvisioningFlags.Register);
            InMemoryProtocolHandler handler = (InMemoryProtocolHandler)Zone.ProtocolHandler;

            SIF_Register sr = (SIF_Register)handler.readMsg();

            Assert.AreEqual(Agent.Id, sr.SourceId, "SourceID");
            Assert.AreEqual("acmeAgent", sr.SIF_Name, "Name");
            Assert.AreEqual("acmeVendor", sr.SIF_NodeVendor, "Agent Vendor");
            Assert.AreEqual("2.6.5.8", sr.SIF_NodeVersion, "Agent Version");
            SIF_Application appInfo = sr.SIF_Application;

            Assert.IsNotNull(appInfo);
            Assert.AreEqual("acmeApp", appInfo.SIF_Product, "App Name");
            Assert.AreEqual("acme<>AppVendor", appInfo.SIF_Vendor, "App Vendor");
            Assert.AreEqual("10.2", appInfo.SIF_Version, "App Version");
            Assert.AreEqual(iconURL, sr.SIF_Icon, "Icon");
        }
Ejemplo n.º 5
0
		static partial void load_cs()
		{
			// ---------------------------------------------------------------------
			// properties
			// ---------------------------------------------------------------------

			AgentProperties bb;

			// Hero
			bb = new AgentProperties("Hero");
			agent_type_blackboards["Hero"] = bb;
			bb.AddProperty("bool", false, "m_isAI", "false", "Hero");

			// NPC
			bb = new AgentProperties("NPC");
			agent_type_blackboards["NPC"] = bb;
			bb.AddProperty("int", false, "Level1Up_Score", "0", "NPC");
			bb.AddProperty("int", false, "Level2Up_Score", "0", "NPC");
			bb.AddProperty("int", false, "Level3Up_Score", "0", "NPC");
			bb.AddProperty("int", false, "Level4Up_Score", "0", "NPC");
			bb.AddProperty("bool", false, "m_canBossRefresh", "false", "NPC");

			// ---------------------------------------------------------------------
			// tasks
			// ---------------------------------------------------------------------

		}
Ejemplo n.º 6
0
        public override float Cost(AgentProperties properties)
        {
            float result = 0;

            switch (from.passability)
            {
            case Passability.Crouchable:
                result += properties.crouchMod * _costFrom;
                break;

            case Passability.Walkable:
                result += properties.walkMod * _costFrom;
                break;

            default:
                Debug.LogWarning("wrong passability in cost mod");
                break;
            }

            switch (connection.passability)
            {
            case Passability.Crouchable:
                result += properties.crouchMod * _costTo;
                break;

            case Passability.Walkable:
                result += properties.walkMod * _costTo;
                break;

            default:
                UnityEngine.Debug.LogWarning("wrong passability in cost mod");
                break;
            }
            return(result);
        }
Ejemplo n.º 7
0
    /// <summary>
    ///   Spawns an agent projectile
    /// </summary>
    public static AgentProjectile SpawnAgent(AgentProperties properties, float amount,
                                             float lifetime, Vector3 location, Vector3 direction,
                                             Node worldRoot, PackedScene agentScene, Node emitter)
    {
        var normalizedDirection = direction.Normalized();

        var agent = (AgentProjectile)agentScene.Instance();

        agent.Properties          = properties;
        agent.Amount              = amount;
        agent.TimeToLiveRemaining = lifetime;
        agent.Emitter             = emitter;

        worldRoot.AddChild(agent);
        agent.Translation = location + (direction * 1.5f);

        // TODO: pass in this random from somewhere
        agent.Rotate(new Vector3(0, 1, 0), 2 * Mathf.Pi * (float)new Random().NextDouble());

        agent.ApplyCentralImpulse(normalizedDirection *
                                  Constants.AGENT_EMISSION_IMPULSE_STRENGTH);

        agent.AddToGroup(Constants.TIMED_GROUP);
        return(agent);
    }
Ejemplo n.º 8
0
        /// <summary>  Applies <c>&lt;zone&gt;</c> elements to create new Zone instances.
        /// The caller is responsible for setting up topics, connecting to zones,
        /// and joining zones to topics.
        /// </summary>
        public virtual IZone [] ApplyZones(Agent agent)
        {
            IZoneFactory zf = agent.ZoneFactory;

            XmlElement [] zones = ZoneNodes;

            for (int i = 0; i < zones.Length; i++)
            {
                //  Get any properties defined for this zone. Zone properties
                //  should inherit from the agent's AgentProperties object, so
                //  pass that object as the parent
                AgentProperties props = new AgentProperties(agent.Properties);
                GetZoneProperties(props, zones[i]);

                string zoneId = zones[i].GetAttribute(XmlConstants.ID);
                if (zoneId.Trim().Length == 0)
                {
                    throw new AdkConfigException("<zone> cannot have an empty id attribute");
                }
                string zoneUrl = zones[i].GetAttribute(XmlConstants.URL);
                if (zoneUrl.Trim().Length == 0)
                {
                    throw new AdkConfigException("<zone> cannot have an empty url attribute");
                }

                //  Ask ZoneFactory to create a Zone instance
                zf.GetInstance(zoneId, zoneUrl, props);
            }

            return(agent.ZoneFactory.GetAllZones());
        }
Ejemplo n.º 9
0
        static partial void load_cs()
        {
            // ---------------------------------------------------------------------
            // properties
            // ---------------------------------------------------------------------

            AgentProperties bb;

            // Hero
            bb = new AgentProperties("Hero");
            agent_type_blackboards["Hero"] = bb;
            bb.AddProperty("bool", false, "m_isAI", "false", "Hero");

            // NPC
            bb = new AgentProperties("NPC");
            agent_type_blackboards["NPC"] = bb;
            bb.AddProperty("int", false, "Level1Up_Score", "0", "NPC");
            bb.AddProperty("int", false, "Level2Up_Score", "0", "NPC");
            bb.AddProperty("int", false, "Level3Up_Score", "0", "NPC");
            bb.AddProperty("int", false, "Level4Up_Score", "0", "NPC");
            bb.AddProperty("bool", false, "m_canBossRefresh", "false", "NPC");

            // ---------------------------------------------------------------------
            // tasks
            // ---------------------------------------------------------------------
        }
Ejemplo n.º 10
0
        public override float Cost(Vector3 fromPos, AgentProperties properties)
        {
            float result = 0;

            //switch (from.passability) {
            //    case Passability.Crouchable:
            //        result += properties.crouchMod * Vector3.Distance(fromPos, edge.intersection);
            //        break;
            //    case Passability.Walkable:
            //        result += properties.walkMod * Vector3.Distance(fromPos, edge.intersection);
            //        break;
            //    default:
            //        Debug.LogWarning("wrong passability in cost mod");
            //        break;
            //}


            switch (connection.passability)
            {
            case Passability.Crouchable:
                result += properties.crouchMod * _costTo;
                break;

            case Passability.Walkable:
                result += properties.walkMod * _costTo;
                break;

            default:
                UnityEngine.Debug.LogWarning("wrong passability in cost mod");
                break;
            }
            return(result);
        }
Ejemplo n.º 11
0
 public void DebugIt(XZPosInt pos, AgentProperties properties)
 {
     foreach (var edge in _edges)
     {
         Debuger_K.AddTriangulatorDebugLine(pos.x, pos.z, properties, _nodes[edge.a].positionV3, _nodes[edge.b].positionV3, Color.blue);
     }
 }
Ejemplo n.º 12
0
 public TestZoneImpl(String zoneId, String zoneUrl, Agent agent, AgentProperties props,
                     MessageDispatcher dispatcher, IProtocolHandler proto)
     : base(zoneId, zoneUrl, agent, props)
 {
     this.Dispatcher  = dispatcher;
     fProtocolHandler = proto;
 }
Ejemplo n.º 13
0
        public override float Cost(Vector3 fromPos, AgentProperties properties, bool ignoreCrouchCost)
        {
            float result = 0;

            switch (connection.passability)
            {
            case Passability.Crouchable:
                if (ignoreCrouchCost)
                {
                    result += properties.walkMod * _costTo;
                }
                else
                {
                    result += properties.crouchMod * _costTo;
                }
                break;

            case Passability.Walkable:
                result += properties.walkMod * _costTo;
                break;

            default:
                UnityEngine.Debug.LogWarning("wrong passability in cost mod");
                break;
            }
            return(result);
        }
Ejemplo n.º 14
0
    /// <summary>
    ///   Spawns an agent projectile
    /// </summary>
    public static AgentProjectile SpawnAgent(AgentProperties properties, float amount,
                                             float lifetime, Vector3 location, Vector3 direction,
                                             Node worldRoot, PackedScene agentScene, IEntity emitter)
    {
        var normalizedDirection = direction.Normalized();

        var agent = (AgentProjectile)agentScene.Instance();

        agent.Properties          = properties;
        agent.Amount              = amount;
        agent.TimeToLiveRemaining = lifetime;
        agent.Emitter             = new EntityReference <IEntity>(emitter);

        worldRoot.AddChild(agent);
        agent.Translation = location + (direction * 1.5f);
        var scaleValue = amount / Constants.MAXIMUM_AGENT_EMISSION_AMOUNT;

        agent.Scale = new Vector3(scaleValue, scaleValue, scaleValue);

        agent.ApplyCentralImpulse(normalizedDirection *
                                  Constants.AGENT_EMISSION_IMPULSE_STRENGTH);

        agent.AddToGroup(Constants.TIMED_GROUP);
        return(agent);
    }
Ejemplo n.º 15
0
 protected MetaAgent()
 {
     properties = new AgentProperties();
     properties.AddProperty("X", new Integer());
     properties.AddProperty("Y", new Integer());
     properties.protectedType.Add("X", typeof(Integer));
     properties.protectedType.Add("Y", typeof(Integer));
     value = "MetaAgent";
 }
Ejemplo n.º 16
0
 public NavmeshLayerDeserializer(SerializedNavmesh serializedData, AgentProperties properties)
 {
     _properties     = properties;
     _serializedData = serializedData;
     cellPool        = new Cell[serializedData.cellCount];
     if (properties.battleGrid && serializedData.bgPointsCount != 0)
     {
         bgPool = new BattleGridPoint[serializedData.bgPointsCount];
     }
 }
Ejemplo n.º 17
0
        public NavmeshLayerDeserializer(SerializedNavmesh serializedData, AgentProperties properties, GameObject[] gameObjectLibrary)
        {
            _properties     = properties;
            _serializedData = serializedData;
            cellPool        = new Cell[serializedData.cellCount];
            if (properties.battleGrid && serializedData.bgPointsCount != 0)
            {
                bgPool = new BattleGridPoint[serializedData.bgPointsCount];
            }

            this.gameObjectLibrary = gameObjectLibrary;
        }
Ejemplo n.º 18
0
 protected void ClearBase()
 {
     agent      = null;
     properties = null;
     startCell  = null;
     startGraph = null;
     //Debug.Log("linkedPaths.Clear()");
     linkedPaths.Clear();
     //Debug.Log(linkedPaths.Count);
     //Debug.Log("linkedGraph.Clear()");
     linkedGraph.Clear();
     //Debug.Log(linkedGraph.Count);
 }
Ejemplo n.º 19
0
        public void testSIFRegisterZISVersion15r1()
        {
            Adk.SifVersion = (SifVersion.LATEST);
            String          iconURL = "http://acme.foo.bar/ico";
            AgentProperties props   = Agent.Properties;

            // Set the ZIS Version to 1.5r1
            props.ZisVersion = SifVersion.SIF15r1.ToString();

            props.AgentIconUrl = iconURL;

            Agent.Name               = "acmeAgent";
            props.AgentVendor        = "acmeVendor";
            props.AgentVersion       = "2.6.5.8";
            props.ApplicationName    = "acmeApp";
            props.ApplicationVendor  = "acme<>AppVendor";
            props.ApplicationVersion = "10.2";


            Zone.Connect(ProvisioningFlags.Register);
            InMemoryProtocolHandler handler = (InMemoryProtocolHandler)Zone.ProtocolHandler;

            SIF_Register sr = (SIF_Register)handler.readMsg();

            Assert.AreEqual(SifVersion.SIF15r1, sr.SifVersion, "SifVersion");
            Assert.AreEqual(SifVersion.SIF15r1.Xmlns, sr.GetXmlns(), "SifVersion->Xmlns");

            Assert.AreEqual(Agent.Id, sr.SourceId, "SourceID");
            Assert.AreEqual("acmeAgent", sr.SIF_Name, "Name");
            Assert.IsNull(sr.SIF_NodeVendor, "Agent Vendor");
            Assert.IsNull(sr.SIF_NodeVersion, "Agent Version");
            SIF_Application appInfo = sr.SIF_Application;

            Assert.IsNull(appInfo);
            Assert.IsNull(sr.SIF_Icon, "Icon");


            // Assert the versions in the message. If the ADK is initialized to
            // SIF 1.5r1, it should not be sending any versions that start with a
            // "2"
            SifVersion messageVersion = sr.SifVersion;

            Assert.AreEqual(SifVersion.SIF15r1, messageVersion, "Should be version 1.5r1");
            foreach (SIF_Version version in sr.GetSIF_Versions())
            {
                String versionString = version.TextValue;
                Assert.IsTrue(versionString.StartsWith("1"), "Should start with 1 but was " + versionString);
            }
        }
Ejemplo n.º 20
0
        public override void Clear()
        {
            agent      = null;
            target     = null;
            properties = null;
            callBack   = null;
            path       = null;

            closed.Clear();
            all.Clear();
            cellPath.Clear();
            gateSiquence.Clear();
            cellListForRaycasting.Clear();
            gateTempList.Clear();

            base.Clear();
        }
Ejemplo n.º 21
0
        public void testRegisterOverrideZISVersion()
        {
            Adk.SifVersion = (SifVersion.SIF20);
            AgentProperties props = Agent.Properties;

            props.OverrideSifVersions = "1.1, 2.5";

            Zone.Connect(ProvisioningFlags.Register);
            InMemoryProtocolHandler handler = (InMemoryProtocolHandler)Zone.ProtocolHandler;

            SIF_Register sr = (SIF_Register)handler.readMsg();

            SIF_Version[] versions = sr.GetSIF_Versions();
            Assert.IsNotNull(versions);
            Assert.AreEqual(2, versions.Length);
            Assert.AreEqual("1.1", versions[0].Value);
            Assert.AreEqual("2.5", versions[1].Value);
        }
Ejemplo n.º 22
0
		static partial void load_cs()
		{
			// ---------------------------------------------------------------------
			// properties
			// ---------------------------------------------------------------------

			AgentProperties bb;

			// GameActor
			bb = new AgentProperties("GameActor");
			agent_type_blackboards["GameActor"] = bb;
			bb.AddProperty("float", false, "currentOrientation", "0", "GameActor");
			bb.AddProperty("eGameForce", false, "force", "RED_FORCE", "GameActor");
			bb.AddProperty("int", false, "gameScore", "0", "GameActor");

			// GameLevelCommon
			bb = new AgentProperties("GameLevelCommon");
			agent_type_blackboards["GameLevelCommon"] = bb;
			bb.AddProperty("int", true, "actorWalkLevel", "0", "GameLevelCommon");
			bb.AddProperty("int", true, "allWalkLevel", "0", "GameLevelCommon");
			bb.AddProperty("int", true, "bulletWalkLevel", "0", "GameLevelCommon");
			bb.AddProperty("int", true, "defaultWalkLevel", "0", "GameLevelCommon");
			bb.AddProperty("bool", false, "isPlayerAlive", "false", "GameLevelCommon");
			bb.AddProperty("int", true, "soilSteelOceanWalkLevel", "0", "GameLevelCommon");
			bb.AddProperty("int", true, "soilSteelWalkLevel", "0", "GameLevelCommon");
			bb.AddProperty("int", true, "soilWalkLevel", "0", "GameLevelCommon");

			// Player
			bb = new AgentProperties("Player");
			agent_type_blackboards["Player"] = bb;
			bb.AddProperty("int", false, "damageLevel", "0", "Player");
			bb.AddProperty("int", false, "hp", "0", "Player");
			bb.AddProperty("int", false, "Index", "0", "Player");
			bb.AddProperty("float", false, "currentOrientation", "0", "Player");
			bb.AddProperty("eGameForce", false, "force", "RED_FORCE", "Player");
			bb.AddProperty("int", false, "gameScore", "0", "Player");
			bb.AddProperty("behaviac::EBTStatus", false, "Status", "BT_INVALID", "Player");

			// ---------------------------------------------------------------------
			// tasks
			// ---------------------------------------------------------------------

		}
Ejemplo n.º 23
0
        static partial void load_cs()
        {
            // ---------------------------------------------------------------------
            // properties
            // ---------------------------------------------------------------------

            AgentProperties bb;

            // GameActor
            bb = new AgentProperties("GameActor");
            agent_type_blackboards["GameActor"] = bb;
            bb.AddProperty("float", false, "currentOrientation", "0", "GameActor");
            bb.AddProperty("eGameForce", false, "force", "RED_FORCE", "GameActor");
            bb.AddProperty("int", false, "gameScore", "0", "GameActor");

            // GameLevelCommon
            bb = new AgentProperties("GameLevelCommon");
            agent_type_blackboards["GameLevelCommon"] = bb;
            bb.AddProperty("int", true, "actorWalkLevel", "0", "GameLevelCommon");
            bb.AddProperty("int", true, "allWalkLevel", "0", "GameLevelCommon");
            bb.AddProperty("int", true, "bulletWalkLevel", "0", "GameLevelCommon");
            bb.AddProperty("int", true, "defaultWalkLevel", "0", "GameLevelCommon");
            bb.AddProperty("bool", false, "isPlayerAlive", "false", "GameLevelCommon");
            bb.AddProperty("int", true, "soilSteelOceanWalkLevel", "0", "GameLevelCommon");
            bb.AddProperty("int", true, "soilSteelWalkLevel", "0", "GameLevelCommon");
            bb.AddProperty("int", true, "soilWalkLevel", "0", "GameLevelCommon");

            // Player
            bb = new AgentProperties("Player");
            agent_type_blackboards["Player"] = bb;
            bb.AddProperty("int", false, "damageLevel", "0", "Player");
            bb.AddProperty("int", false, "hp", "0", "Player");
            bb.AddProperty("int", false, "Index", "0", "Player");
            bb.AddProperty("float", false, "currentOrientation", "0", "Player");
            bb.AddProperty("eGameForce", false, "force", "RED_FORCE", "Player");
            bb.AddProperty("int", false, "gameScore", "0", "Player");
            bb.AddProperty("behaviac::EBTStatus", false, "Status", "BT_INVALID", "Player");

            // ---------------------------------------------------------------------
            // tasks
            // ---------------------------------------------------------------------
        }
        public string GetResponseFieldContents(AgentProperties agentProperties, ContactProperties contactProperties, ContactInteractionProperties interactionProperties,
                                               string renderText)
        {
            string       renderedText = string.Empty;
            OutputValues output       = OutputValues.GetInstance();

            output = RequestGetFieldCodes.GetRenderFieldCodes(agentProperties, contactProperties, interactionProperties, renderText);
            if (output.IContactMessage != null)
            {
                if (output.IContactMessage.Name == EventRenderFieldCodes.MessageName)
                {
                    renderedText = ((EventRenderFieldCodes)output.IContactMessage).Text;
                }
                else if (output.IContactMessage.Name == EventError.MessageName)
                {
                    renderedText = ((EventError)output.IContactMessage).ErrorDescription;
                }
            }
            return(renderedText);
        }
        public void Triangulate(XZPosInt pos, AgentProperties properties, ref GraphCombiner combiner, NavMeshTemplateRecast template)
        {
            this.pos        = pos;
            this.properties = properties;
            this.combiner   = combiner;

            //Debug.Log(chunk == null);
            //Debug.Log(properties == null);


            MakeConnections(template);

#if UNITY_EDITOR
            if (Debuger_K.doDebug && Debuger_K.debugOnlyNavMesh == false)
            {
                DebugDataSets(pos, properties);
            }
#endif

            GenerateCells();
        }
Ejemplo n.º 26
0
    public static AgentProjectile SpawnAgent(AgentProperties properties, float amount,
                                             float lifetime, Vector3 location, Vector3 direction,
                                             Node worldRoot, PackedScene agentScene, Node emitter)
    {
        var normalizedDirection = direction.Normalized();

        var agent = (AgentProjectile)agentScene.Instance();

        agent.Properties          = properties;
        agent.Amount              = amount;
        agent.TimeToLiveRemaining = lifetime;
        agent.Emitter             = emitter;

        worldRoot.AddChild(agent);
        agent.Translation = location + (direction * 1.5f);

        agent.ApplyCentralImpulse(normalizedDirection *
                                  Constants.AGENT_EMISSION_IMPULSE_STRENGTH);

        agent.AddToGroup(Constants.TIMED_GROUP);
        return(agent);
    }
Ejemplo n.º 27
0
        public virtual IZone GetInstance(string zoneId,
                                         string zoneUrl,
                                         AgentProperties props)
        {
            lock (this)
            {
                if (zoneId == null)
                {
                    throw new ArgumentException("Zone ID cannot be null");
                }
                if (zoneId == null)
                {
                    throw new ArgumentException("Zone URL cannot be null");
                }

                IZone zone = null;

                lock (fZones.SyncRoot)
                {
                    //  Lookup zone by zoneId
                    zone = (ZoneImpl)fZones[zoneId];

                    if (zone == null)
                    {
                        //  Not found so create new instance
                        zone           = CreateZone(zoneId, zoneUrl, props);
                        fZones[zoneId] = zone;
                        fZoneList.Add(zone);
                    }
                    else
                    {
                        //  Reassign properties in case they're different
                        zone.Properties = props;
                    }
                }

                return(zone);
            }
        }
Ejemplo n.º 28
0
        public void Triangulate(XZPosInt pos, AgentProperties properties, ref GraphCombiner combiner, NavMeshTemplateCreation template)
        {
#if UNITY_EDITOR
            //for debug
            this.pos        = pos;
            this.properties = properties;
#endif

            this.combiner = combiner;

            //Debug.Log(chunk == null);
            //Debug.Log(properties == null);
            if (profiler != null)
            {
                profiler.AddLog("Start make connections");
            }
            MakeConnections(template);
            if (profiler != null)
            {
                profiler.AddLog("End make connections");
            }

#if UNITY_EDITOR
            if (Debuger_K.doDebug && Debuger_K.debugOnlyNavMesh == false)
            {
                DebugDataSets(pos, properties);
            }
#endif
            if (profiler != null)
            {
                profiler.AddLog("Start Generate Cells");
            }
            GenerateCells();
            if (profiler != null)
            {
                profiler.AddLog("End Generate Cells");
            }
        }
Ejemplo n.º 29
0
 public void SetChunkAndProperties(ChunkData chunk, AgentProperties properties)
 {
     this.chunk      = chunk;
     this.properties = properties;
 }
Ejemplo n.º 30
0
 public Graph(ChunkData chunk, AgentProperties properties) : this()
 {
     this.chunk      = chunk;
     this.properties = properties;
 }
Ejemplo n.º 31
0
        private bool ActivateServer( Agent agent, AgentProperties agentProps, bool isPushModeZone )
        {
            HttpProperties props = (HttpProperties) fProps;
            bool webAppEnabled = props.ServletEnabled;

            // Create the http server if it doesn't exist. All HttpTransport
            // objects share once instance of the server.
            if ( (sServer == null || !sServer.IsStarted)
                 && (webAppEnabled || isPushModeZone) )
            {
                if ( (Adk.Debug & AdkDebugFlags.Transport) != 0 && log.IsInfoEnabled )
                {
                    log.Info( "Activating " + fProps.Protocol.ToUpperInvariant() + " transport..." );
                }

                if ( sServer == null )
                {
                    // TODO: This should be using some type of a factory metaphor, based on a config setting
                    // We may be going to support, at the minimum, three different HttpPushProtocol configurations
                    // 1) Using the embedded AdkHttpSifServer()
                    // 2) a Wrapper arround HTTP.SYS on Windows 2003
                    // 3) an implementation that runs inside IIS
                    sServer = new AdkHttpApplicationServer( this );
                }
                sServer.Start();
            }

            return sServer != null;
        }
Ejemplo n.º 32
0
 protected void SetBase(PathFinderAgent agent)
 {
     this.agent = agent;
     properties = agent.properties;
 }
Ejemplo n.º 33
0
 /// <summary>  Populates an AgentProperties object with all <c>&lt;property&gt;</c>
 /// values defined for the root <c>&lt;agent&gt;</c> element.
 /// 
 /// Properties defined at the root level are applied to the AgentProperties
 /// object of the Agent class. These serve as global defaults to all zones.
 /// Use the getTemplateProperties method to obtain properties for a zone
 /// template, which apply to all zones that reference that template, or the
 /// GetZoneProperties method to obtain properties specific to a zone.
 /// 
 /// 
 /// </summary>
 /// <returns> An AgentProperties object populated with all <c>&lt;property&gt;</c>
 /// values defined for the root <c>&lt;agent&gt;</c> element
 /// </returns>
 public virtual void GetAgentProperties( AgentProperties props )
 {
     PopulateProperties( props, RootNode );
 }
Ejemplo n.º 34
0
        /// <summary>  Applies <c>&lt;zone&gt;</c> elements to create new Zone instances.
        /// The caller is responsible for setting up topics, connecting to zones,
        /// and joining zones to topics.
        /// </summary>
        public virtual IZone[] ApplyZones( Agent agent )
        {
            IZoneFactory zf = agent.ZoneFactory;

            XmlElement [] zones = ZoneNodes;

            for ( int i = 0; i < zones.Length; i++ ) {
                //  Get any properties defined for this zone. Zone properties
                //  should inherit from the agent's AgentProperties object, so
                //  pass that object as the parent
                AgentProperties props = new AgentProperties( agent.Properties );
                GetZoneProperties( props, zones[i] );

                string zoneId = zones[i].GetAttribute( XmlConstants.ID );
                if ( zoneId.Trim().Length == 0 ) {
                    throw new AdkConfigException( "<zone> cannot have an empty id attribute" );
                }
                string zoneUrl = zones[i].GetAttribute( XmlConstants.URL );
                if ( zoneUrl.Trim().Length == 0 ) {
                    throw new AdkConfigException( "<zone> cannot have an empty url attribute" );
                }

                //  Ask ZoneFactory to create a Zone instance
                zf.GetInstance( zoneId, zoneUrl, props );
            }

            return agent.ZoneFactory.GetAllZones();
        }
Ejemplo n.º 35
0
		static partial void load_cs()
		{
			// ---------------------------------------------------------------------
			// properties
			// ---------------------------------------------------------------------

			AgentProperties bb;

			// AgentNodeTest
			bb = new AgentProperties("AgentNodeTest");
			agent_type_blackboards["AgentNodeTest"] = bb;
			bb.AddProperty("EnumTest", false, "testColor", "EnumTest_One", "AgentNodeTest");
			bb.AddProperty("int", false, "testVar_0", "0", "AgentNodeTest");
			bb.AddProperty("int", false, "testVar_1", "0", "AgentNodeTest");
			bb.AddProperty("float", false, "testVar_2", "0", "AgentNodeTest");
			bb.AddProperty("float", false, "testVar_3", "0", "AgentNodeTest");
			bb.AddProperty("string", false, "testVar_str_0", "", "AgentNodeTest");
			bb.AddProperty("string", false, "testVar_str_1", "", "AgentNodeTest");
			bb.AddProperty("int", false, "waiting_timeout_interval", "0", "AgentNodeTest");
			bb.AddProperty("TestNS::Float2", false, "testFloat2", "{x=0;y=0;}", "AgentNodeTest");
			bb.AddProperty("int", false, "testInt", "10", "AgentNodeTest");
			bb.AddProperty("vector<int>", false, "test_int_array", "3:1|2|3", "AgentNodeTest");
			bb.AddProperty("ChildNodeTest", false, "par_child_agent_1", "null", "AgentNodeTest");
			bb.AddProperty("TestNS::Float2", false, "c_ReturnFloat2", "{x=0;y=0;}", "AgentNodeTest");
			bb.AddProperty("TestNS::Float2", false, "c_ReturnFloat2Const", "{x=0;y=0;}", "AgentNodeTest");

			// ChildNodeTest
			bb = new AgentProperties("ChildNodeTest");
			agent_type_blackboards["ChildNodeTest"] = bb;
			bb.AddProperty("TestNS::Float2", false, "testFloat2", "{x=0;y=0;}", "ChildNodeTest");
			bb.AddProperty("int", false, "testInt", "10", "ChildNodeTest");
			bb.AddProperty("vector<int>", false, "test_int_array", "3:1|2|3", "ChildNodeTest");
			bb.AddProperty("ChildNodeTest", false, "par_child_agent_1", "null", "ChildNodeTest");
			bb.AddProperty("TestNS::Float2", false, "c_ReturnFloat2", "{x=0;y=0;}", "ChildNodeTest");
			bb.AddProperty("TestNS::Float2", false, "c_ReturnFloat2Const", "{x=0;y=0;}", "ChildNodeTest");
			bb.AddProperty("EnumTest", false, "testColor", "EnumTest_One", "ChildNodeTest");
			bb.AddProperty("int", false, "testVar_0", "0", "ChildNodeTest");
			bb.AddProperty("int", false, "testVar_1", "0", "ChildNodeTest");
			bb.AddProperty("float", false, "testVar_2", "0", "ChildNodeTest");
			bb.AddProperty("float", false, "testVar_3", "0", "ChildNodeTest");
			bb.AddProperty("string", false, "testVar_str_0", "", "ChildNodeTest");
			bb.AddProperty("string", false, "testVar_str_1", "", "ChildNodeTest");
			bb.AddProperty("int", false, "waiting_timeout_interval", "0", "ChildNodeTest");

			// CustomPropertyAgent
			bb = new AgentProperties("CustomPropertyAgent");
			agent_type_blackboards["CustomPropertyAgent"] = bb;
			bb.AddProperty("bool", false, "BoolMemberReadonly", "false", "CustomPropertyAgent");
			bb.AddProperty("float", false, "FloatPropertyReadonly", "0", "CustomPropertyAgent");
			bb.AddProperty("int", true, "IntMemberConst", "0", "CustomPropertyAgent");
			bb.AddProperty("int", false, "IntProperty", "0", "CustomPropertyAgent");
			bb.AddProperty("UnityEngine::Vector3", false, "Location", "{x=0;y=0;z=0;}", "CustomPropertyAgent");
			bb.AddProperty("string", false, "StringMemberReadonly", "", "CustomPropertyAgent");
			bb.AddProperty("bool", false, "c_Bool", "false", "CustomPropertyAgent");
			bb.AddProperty("vector<int>", false, "c_IntArray", "0:", "CustomPropertyAgent");
			bb.AddProperty("string", true, "c_StaticString", "", "CustomPropertyAgent");
			bb.AddProperty("TNS::NE::NAT::eColor", false, "c_Enum", "RED", "CustomPropertyAgent");
			bb.AddProperty("UnityEngine::Vector3", false, "c_Location", "{x=0;y=0;z=0;}", "CustomPropertyAgent");

			// ParTestAgentBase
			bb = new AgentProperties("ParTestAgentBase");
			agent_type_blackboards["ParTestAgentBase"] = bb;
			bb.AddProperty("bool", true, "STV_BOOL_0", "false", "ParTestAgentBase");
			bb.AddProperty("char", true, "STV_CHAR_0", "", "ParTestAgentBase");
			bb.AddProperty("TNS::NE::NAT::eColor", true, "STV_ECOLOR_0", "RED", "ParTestAgentBase");
			bb.AddProperty("vector<bool>", true, "STV_LIST_BOOL_0", "0:", "ParTestAgentBase");
			bb.AddProperty("vector<char>", true, "STV_LIST_CHAR_0", "0:", "ParTestAgentBase");
			bb.AddProperty("vector<TNS::NE::NAT::eColor>", true, "STV_LIST_ECOLOR_0", "0:", "ParTestAgentBase");
			bb.AddProperty("vector<sbyte>", true, "STV_LIST_SBYTE_0", "0:", "ParTestAgentBase");
			bb.AddProperty("bool", false, "TV_BOOL_0", "false", "ParTestAgentBase");
			bb.AddProperty("byte", false, "TV_BYTE_0", "0", "ParTestAgentBase");
			bb.AddProperty("char", false, "TV_CHAR_0", "", "ParTestAgentBase");
			bb.AddProperty("TNS::NE::NAT::eColor", false, "TV_ECOLOR_0", "RED", "ParTestAgentBase");
			bb.AddProperty("vector<bool>", false, "TV_LIST_BOOL_0", "0:", "ParTestAgentBase");
			bb.AddProperty("vector<byte>", false, "TV_LIST_BYTE_0", "0:", "ParTestAgentBase");
			bb.AddProperty("vector<char>", false, "TV_LIST_CHAR_0", "0:", "ParTestAgentBase");
			bb.AddProperty("vector<TNS::NE::NAT::eColor>", false, "TV_LIST_ECOLOR_0", "0:", "ParTestAgentBase");
			bb.AddProperty("vector<sbyte>", false, "TV_LIST_SBYTE_0", "0:", "ParTestAgentBase");
			bb.AddProperty("sbyte", false, "TV_SBYTE_0", "0", "ParTestAgentBase");

			// ParTestAgent
			bb = new AgentProperties("ParTestAgent");
			agent_type_blackboards["ParTestAgent"] = bb;
			bb.AddProperty("int", true, "STV_INT_0", "0", "ParTestAgent");
			bb.AddProperty("TNS::ST::PER::WRK::kEmployee", true, "STV_KEMPLOYEE_0", "{boss=null;car={brand=\"\";color=RED;price=0;};code=A;id=0;isMale=false;name=\"\";skinColor=RED;weight=0;}", "ParTestAgent");
			bb.AddProperty("vector<int>", true, "STV_LIST_INT_0", "0:", "ParTestAgent");
			bb.AddProperty("vector<TNS::ST::PER::WRK::kEmployee>", true, "STV_LIST_KEMPLOYEE_0", "0:", "ParTestAgent");
			bb.AddProperty("int", false, "TV_INT_0", "0", "ParTestAgent");
			bb.AddProperty("TNS::ST::PER::WRK::kEmployee", false, "TV_KEMPLOYEE_0", "{boss=null;car={brand=\"\";color=RED;price=0;};code=A;id=0;isMale=false;name=\"\";skinColor=RED;weight=0;}", "ParTestAgent");
			bb.AddProperty("vector<int>", false, "TV_LIST_INT_0", "0:", "ParTestAgent");
			bb.AddProperty("vector<TNS::ST::PER::WRK::kEmployee>", false, "TV_LIST_KEMPLOYEE_0", "0:", "ParTestAgent");
			bb.AddProperty("long", false, "TV_LONG_0", "0", "ParTestAgent");
			bb.AddProperty("short", false, "TV_SHORT_0", "0", "ParTestAgent");
			bb.AddProperty("ushort", false, "TV_USHORT_0", "0", "ParTestAgent");
			bb.AddProperty("bool", true, "STV_BOOL_0", "false", "ParTestAgent");
			bb.AddProperty("char", true, "STV_CHAR_0", "", "ParTestAgent");
			bb.AddProperty("TNS::NE::NAT::eColor", true, "STV_ECOLOR_0", "RED", "ParTestAgent");
			bb.AddProperty("vector<bool>", true, "STV_LIST_BOOL_0", "0:", "ParTestAgent");
			bb.AddProperty("vector<char>", true, "STV_LIST_CHAR_0", "0:", "ParTestAgent");
			bb.AddProperty("vector<TNS::NE::NAT::eColor>", true, "STV_LIST_ECOLOR_0", "0:", "ParTestAgent");
			bb.AddProperty("vector<sbyte>", true, "STV_LIST_SBYTE_0", "0:", "ParTestAgent");
			bb.AddProperty("bool", false, "TV_BOOL_0", "false", "ParTestAgent");
			bb.AddProperty("byte", false, "TV_BYTE_0", "0", "ParTestAgent");
			bb.AddProperty("char", false, "TV_CHAR_0", "", "ParTestAgent");
			bb.AddProperty("TNS::NE::NAT::eColor", false, "TV_ECOLOR_0", "RED", "ParTestAgent");
			bb.AddProperty("vector<bool>", false, "TV_LIST_BOOL_0", "0:", "ParTestAgent");
			bb.AddProperty("vector<byte>", false, "TV_LIST_BYTE_0", "0:", "ParTestAgent");
			bb.AddProperty("vector<char>", false, "TV_LIST_CHAR_0", "0:", "ParTestAgent");
			bb.AddProperty("vector<TNS::NE::NAT::eColor>", false, "TV_LIST_ECOLOR_0", "0:", "ParTestAgent");
			bb.AddProperty("vector<sbyte>", false, "TV_LIST_SBYTE_0", "0:", "ParTestAgent");
			bb.AddProperty("sbyte", false, "TV_SBYTE_0", "0", "ParTestAgent");

			// EmployeeParTestAgent
			bb = new AgentProperties("EmployeeParTestAgent");
			agent_type_blackboards["EmployeeParTestAgent"] = bb;
			bb.AddProperty("behaviac::Agent*", true, "STV_AGENT_0", "null", "EmployeeParTestAgent");
			bb.AddProperty("float", true, "STV_F_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("vector<behaviac::Agent*>", true, "STV_LIST_AGENT_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<float>", true, "STV_LIST_F_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<string>", true, "STV_LIST_STR_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("string", true, "STV_STR_0", "", "EmployeeParTestAgent");
			bb.AddProperty("behaviac::Agent*", false, "TV_AGENT_0", "null", "EmployeeParTestAgent");
			bb.AddProperty("string", false, "TV_CSZSTR_0", "", "EmployeeParTestAgent");
			bb.AddProperty("double", false, "TV_D_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("float", false, "TV_F_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("vector<behaviac::Agent*>", false, "TV_LIST_AGENT_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<float>", false, "TV_LIST_F_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<string>", false, "TV_LIST_STR_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("long", false, "TV_LL_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("string", false, "TV_STR_0", "", "EmployeeParTestAgent");
			bb.AddProperty("uint", false, "TV_UINT_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("ulong", false, "TV_ULL_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("ulong", false, "TV_ULONG_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("int", true, "STV_INT_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("TNS::ST::PER::WRK::kEmployee", true, "STV_KEMPLOYEE_0", "{boss=null;car={brand=\"\";color=RED;price=0;};code=A;id=0;isMale=false;name=\"\";skinColor=RED;weight=0;}", "EmployeeParTestAgent");
			bb.AddProperty("vector<int>", true, "STV_LIST_INT_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<TNS::ST::PER::WRK::kEmployee>", true, "STV_LIST_KEMPLOYEE_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("int", false, "TV_INT_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("TNS::ST::PER::WRK::kEmployee", false, "TV_KEMPLOYEE_0", "{boss=null;car={brand=\"\";color=RED;price=0;};code=A;id=0;isMale=false;name=\"\";skinColor=RED;weight=0;}", "EmployeeParTestAgent");
			bb.AddProperty("vector<int>", false, "TV_LIST_INT_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<TNS::ST::PER::WRK::kEmployee>", false, "TV_LIST_KEMPLOYEE_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("long", false, "TV_LONG_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("short", false, "TV_SHORT_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("ushort", false, "TV_USHORT_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("bool", true, "STV_BOOL_0", "false", "EmployeeParTestAgent");
			bb.AddProperty("char", true, "STV_CHAR_0", "", "EmployeeParTestAgent");
			bb.AddProperty("TNS::NE::NAT::eColor", true, "STV_ECOLOR_0", "RED", "EmployeeParTestAgent");
			bb.AddProperty("vector<bool>", true, "STV_LIST_BOOL_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<char>", true, "STV_LIST_CHAR_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<TNS::NE::NAT::eColor>", true, "STV_LIST_ECOLOR_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<sbyte>", true, "STV_LIST_SBYTE_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("bool", false, "TV_BOOL_0", "false", "EmployeeParTestAgent");
			bb.AddProperty("byte", false, "TV_BYTE_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("char", false, "TV_CHAR_0", "", "EmployeeParTestAgent");
			bb.AddProperty("TNS::NE::NAT::eColor", false, "TV_ECOLOR_0", "RED", "EmployeeParTestAgent");
			bb.AddProperty("vector<bool>", false, "TV_LIST_BOOL_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<byte>", false, "TV_LIST_BYTE_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<char>", false, "TV_LIST_CHAR_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<TNS::NE::NAT::eColor>", false, "TV_LIST_ECOLOR_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("vector<sbyte>", false, "TV_LIST_SBYTE_0", "0:", "EmployeeParTestAgent");
			bb.AddProperty("sbyte", false, "TV_SBYTE_0", "0", "EmployeeParTestAgent");
			bb.AddProperty("ParTestAgent", false, "target", "null", "EmployeeParTestAgent");

			// FSMAgentTest
			bb = new AgentProperties("FSMAgentTest");
			agent_type_blackboards["FSMAgentTest"] = bb;
			bb.AddProperty("FSMAgentTest::EMessage", false, "Message", "Invalid", "FSMAgentTest");
			bb.AddProperty("int", false, "InactiveCount", "0", "FSMAgentTest");
			bb.AddProperty("uint", false, "ActiveCount", "0", "FSMAgentTest");
			bb.AddProperty("short", false, "PauseCount", "0", "FSMAgentTest");
			bb.AddProperty("long", false, "ExitCount", "0", "FSMAgentTest");
			bb.AddProperty("int", false, "FoodCount", "0", "FSMAgentTest");
			bb.AddProperty("int", false, "EnergyCount", "0", "FSMAgentTest");

			// HTNAgentHouseBase
			bb = new AgentProperties("HTNAgentHouseBase");
			agent_type_blackboards["HTNAgentHouseBase"] = bb;
			bb.AddProperty("int", false, "Money", "0", "HTNAgentHouseBase");

			// HTNAgentHouse
			bb = new AgentProperties("HTNAgentHouse");
			agent_type_blackboards["HTNAgentHouse"] = bb;
			bb.AddProperty("int", false, "Money", "0", "HTNAgentHouse");
			bb.AddProperty("bool", false, "Land", "false", "HTNAgentHouse");
			bb.AddProperty("bool", false, "GoodCredit", "true", "HTNAgentHouse");
			bb.AddProperty("bool", false, "Contract", "false", "HTNAgentHouse");
			bb.AddProperty("bool", false, "Permit", "false", "HTNAgentHouse");
			bb.AddProperty("bool", false, "HouseBuilt", "false", "HTNAgentHouse");
			bb.AddProperty("bool", false, "Mortgage", "false", "HTNAgentHouse");
			bb.AddProperty("bool", false, "House", "false", "HTNAgentHouse");

			// ParTestRegNameAgent
			bb = new AgentProperties("ParTestRegNameAgent");
			agent_type_blackboards["ParTestRegNameAgent"] = bb;
			bb.AddProperty("TNS::ST::PER::WRK::kEmployee", true, "STV_KEMPLOYEE_0", "{boss=null;car={brand=\"\";color=RED;price=0;};code=A;id=0;isMale=false;name=\"\";skinColor=RED;weight=0;}", "ParTestRegNameAgent");
			bb.AddProperty("vector<TNS::ST::PER::WRK::kEmployee>", true, "STV_LIST_KEMPLOYEE_0", "0:", "ParTestRegNameAgent");
			bb.AddProperty("vector<sbyte>", true, "STV_LIST_SBYTE_0", "0:", "ParTestRegNameAgent");
			bb.AddProperty("behaviac::Agent*", false, "TV_AGENT_0", "null", "ParTestRegNameAgent");
			bb.AddProperty("byte", false, "TV_BYTE_0", "0", "ParTestRegNameAgent");
			bb.AddProperty("char", false, "TV_CHAR_0", "", "ParTestRegNameAgent");
			bb.AddProperty("TNS::ST::PER::WRK::kEmployee", false, "TV_KEMPLOYEE_0", "{boss=null;car={brand=\"\";color=RED;price=0;};code=A;id=0;isMale=false;name=\"\";skinColor=RED;weight=0;}", "ParTestRegNameAgent");
			bb.AddProperty("vector<TNS::ST::PER::WRK::kEmployee>", false, "TV_LIST_KEMPLOYEE_0", "0:", "ParTestRegNameAgent");
			bb.AddProperty("sbyte", false, "TV_SBYTE_0", "0", "ParTestRegNameAgent");
			bb.AddProperty("string", false, "TV_STR_0", "", "ParTestRegNameAgent");

			// PreconEffectorAgent
			bb = new AgentProperties("PreconEffectorAgent");
			agent_type_blackboards["PreconEffectorAgent"] = bb;
			bb.AddProperty("int", false, "count_both", "0", "PreconEffectorAgent");
			bb.AddProperty("int", false, "count_failure", "0", "PreconEffectorAgent");
			bb.AddProperty("int", false, "count_success", "0", "PreconEffectorAgent");
			bb.AddProperty("int", false, "ret", "0", "PreconEffectorAgent");

			// PropertyReadonlyAgent
			bb = new AgentProperties("PropertyReadonlyAgent");
			agent_type_blackboards["PropertyReadonlyAgent"] = bb;
			bb.AddProperty("int", false, "MemberReadonly", "0", "PropertyReadonlyAgent");
			bb.AddProperty("int", false, "MemberReadonlyAs", "0", "PropertyReadonlyAgent");
			bb.AddProperty("int", false, "PropertyGetterOnly", "0", "PropertyReadonlyAgent");
			bb.AddProperty("int", false, "PropertyGetterSetter", "0", "PropertyReadonlyAgent");
			bb.AddProperty("int", false, "c_IntReadonly", "10", "PropertyReadonlyAgent");
			bb.AddProperty("int", false, "c_Int", "1", "PropertyReadonlyAgent");
			bb.AddProperty("int", true, "c_ResultStatic", "0", "PropertyReadonlyAgent");

			// StaticAgent
			bb = new AgentProperties("StaticAgent");
			agent_type_blackboards["StaticAgent"] = bb;
			bb.AddProperty("int", true, "sInt", "0", "StaticAgent");

			// TestNS.AgentArrayAccessTest
			bb = new AgentProperties("TestNS.AgentArrayAccessTest");
			agent_type_blackboards["TestNS.AgentArrayAccessTest"] = bb;
			bb.AddProperty("int", false, "Int", "0", "TestNS.AgentArrayAccessTest");
			bb.AddProperty("vector<int>", false, "ListInts", "0:", "TestNS.AgentArrayAccessTest");
			bb.AddProperty("int", false, "c_Int", "0", "TestNS.AgentArrayAccessTest");
			bb.AddProperty("vector<int>", false, "c_ListInts", "5:10|20|30|40|50", "TestNS.AgentArrayAccessTest");
			bb.AddProperty("int", false, "c_Count", "0", "TestNS.AgentArrayAccessTest");

			// ---------------------------------------------------------------------
			// tasks
			// ---------------------------------------------------------------------

			Agent.CTagObjectDescriptor objectDesc;
			CCustomMethod customeMethod;

			// AgentNodeTest
			objectDesc = Agent.GetDescriptorByName("AgentNodeTest");
			customeMethod = new CTaskMethod("AgentNodeTest", "root");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("AgentNodeTest", "event_test_int");
			customeMethod.AddParamType("int");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("AgentNodeTest", "event_test_int_bool");
			customeMethod.AddParamType("int");
			customeMethod.AddParamType("bool");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("AgentNodeTest", "event_test_int_bool_float");
			customeMethod.AddParamType("int");
			customeMethod.AddParamType("bool");
			customeMethod.AddParamType("float");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("AgentNodeTest", "event_test_void");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("AgentNodeTest", "task_test");
			customeMethod.AddParamType("int");
			customeMethod.AddParamType("float");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("AgentNodeTest", "event_test_agent");
			customeMethod.AddParamType("AgentNodeTest");
			objectDesc.ms_methods.Add(customeMethod);

			// ChildNodeTest
			objectDesc = Agent.GetDescriptorByName("ChildNodeTest");
			customeMethod = new CTaskMethod("ChildNodeTest", "root");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("ChildNodeTest", "event_test_int");
			customeMethod.AddParamType("int");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("ChildNodeTest", "event_test_int_bool");
			customeMethod.AddParamType("int");
			customeMethod.AddParamType("bool");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("ChildNodeTest", "event_test_int_bool_float");
			customeMethod.AddParamType("int");
			customeMethod.AddParamType("bool");
			customeMethod.AddParamType("float");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("ChildNodeTest", "event_test_void");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("ChildNodeTest", "task_test");
			customeMethod.AddParamType("int");
			customeMethod.AddParamType("float");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("ChildNodeTest", "event_test_agent");
			customeMethod.AddParamType("AgentNodeTest");
			objectDesc.ms_methods.Add(customeMethod);

			// HTNAgentHouse
			objectDesc = Agent.GetDescriptorByName("HTNAgentHouse");
			customeMethod = new CTaskMethod("HTNAgentHouse", "root");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("HTNAgentHouse", "root");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("HTNAgentHouse", "build_house");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("HTNAgentHouse", "construct");
			objectDesc.ms_methods.Add(customeMethod);

			// HTNAgentTravel
			objectDesc = Agent.GetDescriptorByName("HTNAgentTravel");
			customeMethod = new CTaskMethod("HTNAgentTravel", "root");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("HTNAgentTravel", "root");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("HTNAgentTravel", "travel");
			customeMethod.AddParamType("int");
			customeMethod.AddParamType("int");
			objectDesc.ms_methods.Add(customeMethod);

			customeMethod = new CTaskMethod("HTNAgentTravel", "travel_by_air");
			customeMethod.AddParamType("int");
			customeMethod.AddParamType("int");
			objectDesc.ms_methods.Add(customeMethod);
		}
        public static OutputValues GetRenderFieldCodes(AgentProperties agentProperties, ContactProperties contactProperties, ContactInteractionProperties interactionProperties,
                                                       string renderText)
        {
            Pointel.Logger.Core.ILog logger = Pointel.Logger.Core.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "AID");
            logger.Debug("RequestGetFieldCodes class GetRenderFieldCodes() : Entry");
            OutputValues output = OutputValues.GetInstance();

            try
            {
                RequestRenderFieldCodes renderFieldCodes = RequestRenderFieldCodes.Create();
                if (interactionProperties != null)
                {
                    renderFieldCodes.Interaction = interactionProperties;
                    logger.Info("Interaction Id : " + interactionProperties.Id);
                    logger.Info("From Address : " + interactionProperties.FromAddress);
                    logger.Info("To Address : " + interactionProperties.ToAddress);
                    logger.Info("Subject : " + interactionProperties.Subject);
                }
                else
                {
                    logger.Warn("Interaction properties is null");
                }
                if (agentProperties != null)
                {
                    renderFieldCodes.Agent = agentProperties;
                    logger.Info("Agent First Name : " + agentProperties.FirstName);
                    logger.Info("Agent Last Name : " + agentProperties.LastName);
                    logger.Info("Agent Full Name : " + agentProperties.FullName);
                }
                logger.Warn("Agent properties is null");
                if (contactProperties != null)
                {
                    renderFieldCodes.Contact = contactProperties;
                    logger.Info("Contact Id : " + contactProperties.Id);
                    logger.Info("Contact Title : " + contactProperties.Title);
                    logger.Info("Contact First Name : " + contactProperties.FirstName);
                    logger.Info("Contact Last Name : " + contactProperties.LastName);
                    logger.Info("Contact Full Name : " + contactProperties.FullName);
                    logger.Info("Contact Primary Phone Number : " + contactProperties.PrimaryPhoneNumber);
                    logger.Info("Contact Primary Email Address : " + contactProperties.PrimaryEmailAddress);
                }
                logger.Warn("Contact properties is null.");
                if (!string.IsNullOrEmpty(renderText))
                {
                    renderFieldCodes.Text = renderText;
                    logger.Info("Rendering Text : " + renderText);
                }
                logger.Warn("Rendering text is null or empty.");
                if (Settings.UCSProtocol != null && Settings.UCSProtocol.State == ChannelState.Opened)
                {
                    IMessage response = Settings.UCSProtocol.Request(renderFieldCodes);
                    if (response != null)
                    {
                        output.MessageCode     = "200";
                        output.Message         = "Rendering text Successful";
                        output.IContactMessage = response;
                    }
                    else
                    {
                        output.MessageCode     = "2001";
                        output.Message         = "Rendering text UnSuccessful";
                        output.IContactMessage = null;
                    }
                }
                else
                {
                    output.IContactMessage = null;
                    output.MessageCode     = "2001";
                    output.Message         = "Universal Contact Server protocol is Null or Closed";
                    logger.Warn("GetRenderFieldCodes() : Universal Contact Server protocol is Null or channel is closed");
                }
            }
            catch (Exception ex)
            {
                logger.Error("Error while getting data from standard response filed codes : " + (ex.InnerException == null ? ex.Message : ex.InnerException.ToString()));
            }
            logger.Debug("RequestGetFieldCodes class GetRenderFieldCodes() : Exit");
            return(output);
        }