Beispiel #1
0
    public void executeAgent()
    {
        TTransport transport = new TSocket(AJANServer, AJANPort);
        TProtocol protocol = new TBinaryProtocol(transport);
        MAJANService.Client client = new MAJANService.Client(protocol);
        transport.Open();

        Debug.Log(caIndex);
        AJANExecute = caList[caIndex];

        try
        {
            MRDFGraph knowledge = new MRDFGraph();
            knowledge.ContentType = "text/turtle";
            string graph = getTaskList();
            if (graph == "")
                graph = "_:test <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource> .";
            knowledge.Graph = graph;
            AgentURI = client.ExecuteAgent(name, AJANExecute, knowledge);
        }
        finally
        {
            transport.Close();
        }
    }
Beispiel #2
0
    public void sendEvent(string endpoint, MRDFGraph knowledge)
    {
        TTransport transport = new TSocket(AJANServer, AJANPort);
        TProtocol protocol = new TBinaryProtocol(transport);
        MAJANService.Client client = new MAJANService.Client(protocol);
        transport.Open();

        try
        {
            AgentURI = client.ExecuteAgent(name, endpoint, knowledge);
        }
        finally
        {
            transport.Close();
        }
    }