Example #1
0
        public void Connect(string host, int port)
        {
            rlGlueConnection = new RlGlueConnection();
            rlGlueConnection.Connect(host, port);

            rlGlueConnection
            .Send()
            .State(RlGlueConnection.ConnectionState.ExperimentConnection)
            .And()
            .SizeOfState()
            .Flush();
        }
Example #2
0
        protected internal virtual void onAgentInit()
        {
            string taskSpec;

            rlGlueConnection
            .Receive()
            .String(out taskSpec);

            agent.AgentInit(taskSpec);

            rlGlueConnection
            .Send()
            .State(RlGlueConnection.ConnectionState.AgentInitialize)
            .And()
            .SizeOfState()
            .Flush();
        }
        protected internal virtual void onEnvInit()
        {
            string taskSpec = environment.EnvironmentInit();

            rlGlueConnection
            .Send()
            .State(RlGlueConnection.ConnectionState.EnvironmentInitialize)
            .And()
            .SizeOfState()
            .AndSizeOfString(taskSpec)
            .And()
            .String(taskSpec)
            .Flush();
        }
Example #4
0
        public virtual string RLInit()
        {
            rlGlueConnection
            .Send()
            .State(RlGlueConnection.ConnectionState.RLInit)
            .And()
            .SizeOfState()
            .Flush();
            ReceiveAndVerifyState(RlGlueConnection.ConnectionState.RLInit);

            return(rlGlueConnection.Receive().String());
        }