/// <summary> /// Post HttpGet and return the response port. /// </summary> /// <param name="body"></param> /// <returns></returns> public virtual PortSet <Microsoft.Dss.Core.DsspHttp.HttpResponseType, Fault> HttpGet(Microsoft.Dss.Core.DsspHttp.HttpGetRequestType body) { Microsoft.Dss.Core.DsspHttp.HttpGet op = new Microsoft.Dss.Core.DsspHttp.HttpGet(); op.Body = body ?? new Microsoft.Dss.Core.DsspHttp.HttpGetRequestType(); this.Post(op); return(op.ResponsePort); }
public void DriveHttpGetHandler(Microsoft.Dss.Core.DsspHttp.HttpGet httpget) { this.state.DriveState.TimeStamp = DateTime.Now; HttpResponseType resp = new HttpResponseType(HttpStatusCode.OK, this.state.DriveState); httpget.ResponsePort.Post(resp); }
public virtual IEnumerator <ITask> HttpGetInfraredSensorHandler(dssphttp.HttpGet httpGet) { infraredarray.Get get = new infraredarray.Get(); this.altPort.Post(get); yield return(get.ResponsePort.Choice()); infraredarray.InfraredSensorArrayState infraredState = get.ResponsePort; httpGet.ResponsePort.Post(new dssphttp.HttpResponseType(infraredState)); yield break; }
public virtual IEnumerator <ITask> HttpGetSonarSensorHandler(dssphttp.HttpGet httpGet) { sonararray.Get get = new sonararray.Get(); this.altPort.Post(get); yield return(get.ResponsePort.Choice()); sonararray.SonarSensorArrayState sonararrayState = get.ResponsePort; httpGet.ResponsePort.Post(new dssphttp.HttpResponseType(sonararrayState)); yield break; }
public virtual IEnumerator <ITask> HttpGetAnalogSensorHandler(dssphttp.HttpGet httpGet) { analogarray.Get get = new analogarray.Get(); this.mainPort.Post(get); yield return(get.ResponsePort.Choice()); analogarray.AnalogSensorArrayState analogState = get.ResponsePort; httpGet.ResponsePort.Post(new dssphttp.HttpResponseType(analogState)); yield break; }
public IEnumerator <ITask> DriveHttpGetHandler(Microsoft.Dss.Core.DsspHttp.HttpGet httpget) { drive.Get get = new drive.Get(); this.controllerDrivePort.Post(get); yield return(get.ResponsePort.Choice()); drive.DriveDifferentialTwoWheelState newState = (drive.DriveDifferentialTwoWheelState)get.ResponsePort; if (newState != null) { HttpResponseType resp = new HttpResponseType(HttpStatusCode.OK, newState); httpget.ResponsePort.Post(resp); } else { HttpResponseType resp = new HttpResponseType(HttpStatusCode.InternalServerError, (soap.Fault)get.ResponsePort); httpget.ResponsePort.Post(resp); } yield break; }
public virtual IEnumerator <ITask> HttpGetTouchSensorHandler(dssphttp.HttpGet get) { get.ResponsePort.Post(new dssphttp.HttpResponseType(HttpStatusCode.OK, _state, _transform)); yield break; }
public virtual IEnumerator <ccr.ITask> HttpGetHandler(dssh.HttpGet httpGet) { httpGet.ResponsePort.Post(new dssh.HttpResponseType(_state)); yield break; }
public virtual IEnumerator <ITask> HttpGetHandler(Microsoft.Dss.Core.DsspHttp.HttpGet get) { get.ResponsePort.Post(new dssphttp.HttpResponseType(HttpStatusCode.OK, _state, _transform)); yield break; }
public void HttpGetHandler(Microsoft.Dss.Core.DsspHttp.HttpGet get) { var rsp = new HttpResponseType(HttpStatusCode.OK, this.state, this.xslttransform); get.ResponsePort.Post(rsp); }
public virtual IEnumerator <ITask> GenericHttpGetHandler(dssphttp.HttpGet get) { get.ResponsePort.Post(new dssphttp.HttpResponseType(_contactSensorArrayState)); yield break; }
/// <summary> /// Post(dssphttp.HttpGet) /// </summary> /// <param name="item"></param> /// <returns></returns> public void Post(dssphttp.HttpGet item) { base.PostUnknownType(item); }
public virtual IEnumerator <ITask> HttpGetContactSensorHandler(dssphttp.HttpGet get) { get.ResponsePort.Post(new dssphttp.HttpResponseType(SyncGenericContactState())); yield break; }
public virtual IEnumerator <ITask> GenericHttpGetHandler(Microsoft.Dss.Core.DsspHttp.HttpGet get) { _state.SyncGenericState(ref _genericState); get.ResponsePort.Post(new dssphttp.HttpResponseType(_genericState)); yield break; }
public void BatteryHttpGetHandler(Microsoft.Dss.Core.DsspHttp.HttpGet httpget) { HttpResponseType resp = new HttpResponseType(HttpStatusCode.OK, this.state.BatteryState); httpget.ResponsePort.Post(resp); }
public virtual IEnumerator <ITask> AnalogHttpGetHandler(dssphttp.HttpGet get) { get.ResponsePort.Post(new dssphttp.HttpResponseType(SyncGenericState())); yield break; }
public virtual IEnumerator <ITask> HttpGetHandler(Microsoft.Dss.Core.DsspHttp.HttpGet get) { get.ResponsePort.Post(new dssphttp.HttpResponseType(_state)); yield break; }
public void HttpGetHandler(Microsoft.Dss.Core.DsspHttp.HttpGet httpGet) { HttpListenerRequest request = httpGet.Body.Context.Request; HttpListenerResponse response = httpGet.Body.Context.Response; Stream image = null; bool isMyPath = false; string path = request.Url.AbsolutePath; //Tracer.Trace("GET: path='" + path + "'"); if (path.StartsWith(_root)) { path = path.Substring(_root.Length); isMyPath = true; } else if (path.StartsWith(_root1)) { path = path.Substring(_root1.Length); isMyPath = true; } else if (path.StartsWith(_root2)) { path = path.Substring(_root2.Length); isMyPath = true; } if (isMyPath && path.StartsWith("/")) { path = path.Substring(1); } if (path == _cylinder) { image = GenerateCylinder(); } else if (path == _top) { image = GenerateTop(540); } else if (path.StartsWith(_topw)) { int width; string remain = path.Substring(_topw.Length); if (int.TryParse(remain, out width)) { image = GenerateTop(width); } } else if (path == "" || path == _raw1) { HttpResponseType rsp = new HttpResponseType(HttpStatusCode.OK, _state, base.StateTransformPath); httpGet.ResponsePort.Post(rsp); return; } if (image != null) { SendJpeg(httpGet.Body.Context, image); } else { httpGet.ResponsePort.Post(Fault.FromCodeSubcodeReason( W3C.Soap.FaultCodes.Receiver, DsspFaultCodes.OperationFailed, "Unable to generate Image for path '" + path + "'")); } }
public virtual IEnumerator <ITask> HttpGetHandler(dssphttp.HttpGet get) { // Post back the state with a transform file so it will be formatted nicely get.ResponsePort.Post(new dssphttp.HttpResponseType(HttpStatusCode.OK, _state, _transform)); yield break; }