Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 97 → Rev 96

/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Properties/Resources.Designer.cs
1,7 → 1,7
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1434
// Runtime Version:2.0.50727.312
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/AssemblyInfo.cs
1,7 → 1,7
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1434
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/Resources/DssModel.dss
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/RoboBoardService.Y2007.M08.proxy.csproj
3,7 → 3,7
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50215</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{759A7BB1-94CB-4A80-9235-0591BCFA0801}</ProjectGuid>
<ProjectGuid>{E105863D-2959-49C5-9D84-E24CDD55444F}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/RoboBoardService.Y2007.M08.proxy.sln
1,6 → 1,6
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RoboBoardService.Y2007.M08.proxy", "RoboBoardService.Y2007.M08.proxy.csproj", "{759A7BB1-94CB-4A80-9235-0591BCFA0801}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RoboBoardService.Y2007.M08.proxy", "RoboBoardService.Y2007.M08.proxy.csproj", "{E105863D-2959-49C5-9D84-E24CDD55444F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8,10 → 8,10
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{759A7BB1-94CB-4A80-9235-0591BCFA0801}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{759A7BB1-94CB-4A80-9235-0591BCFA0801}.Debug|Any CPU.Build.0 = Debug|Any CPU
{759A7BB1-94CB-4A80-9235-0591BCFA0801}.Release|Any CPU.ActiveCfg = Release|Any CPU
{759A7BB1-94CB-4A80-9235-0591BCFA0801}.Release|Any CPU.Build.0 = Release|Any CPU
{E105863D-2959-49C5-9D84-E24CDD55444F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E105863D-2959-49C5-9D84-E24CDD55444F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E105863D-2959-49C5-9D84-E24CDD55444F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E105863D-2959-49C5-9D84-E24CDD55444F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/RoboBoardService.Y2007.M08.proxy.xml
60,36 → 60,6
Com Port
</summary>
</member>
<member name="T:Robotics.RoboBoard.Proxy.InitCompleteRequest">
<summary>
Init Complete Request
</summary>
</member>
<member name="M:Robotics.RoboBoard.Proxy.InitCompleteRequest.CopyTo(Microsoft.Dss.Core.IDssSerializable)">
<summary>
Copy To Init Complete Request
</summary>
</member>
<member name="M:Robotics.RoboBoard.Proxy.InitCompleteRequest.Clone">
<summary>
Clone Init Complete Request
</summary>
</member>
<member name="M:Robotics.RoboBoard.Proxy.InitCompleteRequest.Serialize(System.IO.BinaryWriter)">
<summary>
Serialize Serialize
</summary>
</member>
<member name="M:Robotics.RoboBoard.Proxy.InitCompleteRequest.Deserialize(System.IO.BinaryReader)">
<summary>
Deserialize Deserialize
</summary>
</member>
<member name="P:Robotics.RoboBoard.Proxy.InitCompleteRequest.Command">
<summary>
Command
</summary>
</member>
<member name="T:Robotics.RoboBoard.Proxy.SetComPortRequest">
<summary>
Set Com Port Request
425,16 → 395,6
Post Replace and return the response port.
</summary>
</member>
<member name="M:Robotics.RoboBoard.Proxy.RoboBoardOperations.InitComplete">
<summary>
Init Complete Request
</summary>
</member>
<member name="M:Robotics.RoboBoard.Proxy.RoboBoardOperations.InitComplete(Robotics.RoboBoard.Proxy.InitCompleteRequest)">
<summary>
Post Init Complete and return the response port.
</summary>
</member>
<member name="M:Robotics.RoboBoard.Proxy.RoboBoardOperations.SetComPort">
<summary>
Set Com Port Request
575,26 → 535,6
Replace
</summary>
</member>
<member name="T:Robotics.RoboBoard.Proxy.InitComplete">
<summary>
Init Complete
</summary>
</member>
<member name="M:Robotics.RoboBoard.Proxy.InitComplete.#ctor">
<summary>
Init Complete
</summary>
</member>
<member name="M:Robotics.RoboBoard.Proxy.InitComplete.#ctor(Robotics.RoboBoard.Proxy.InitCompleteRequest)">
<summary>
Init Complete
</summary>
</member>
<member name="M:Robotics.RoboBoard.Proxy.InitComplete.#ctor(Robotics.RoboBoard.Proxy.InitCompleteRequest,Microsoft.Ccr.Core.PortSet{Microsoft.Dss.ServiceModel.Dssp.DefaultUpdateResponseType,W3C.Soap.Fault})">
<summary>
Init Complete
</summary>
</member>
<member name="T:Robotics.RoboBoard.Proxy.SetComPort">
<summary>
Set Com Port
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/Robotics.RoboBoard.Proxy.RoboBoardTypes.cs
1,7 → 1,7
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1434
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
163,88 → 163,6
}
/// <summary>
/// Init Complete Request
/// </summary>
[DataContract()]
[XmlRootAttribute("InitCompleteRequest", Namespace="http://schemas.tempuri.org/2007/08/roboboardservice.html")]
public class InitCompleteRequest : ICloneable, IDssSerializable
{
private String _command;
/// <summary>
/// Command
/// </summary>
[DataMember()]
public String Command
{
get
{
return this._command;
}
set
{
this._command = value;
}
}
/// <summary>
/// Copy To Init Complete Request
/// </summary>
public virtual void CopyTo(IDssSerializable target)
{
InitCompleteRequest typedTarget = target as InitCompleteRequest;
 
if (typedTarget == null)
throw new ArgumentException("CopyTo({0}) requires type {0}", this.GetType().FullName);
typedTarget.Command = this.Command;
}
/// <summary>
/// Clone Init Complete Request
/// </summary>
public virtual object Clone()
{
InitCompleteRequest target = new InitCompleteRequest();
 
target.Command = this.Command;
return target;
 
}
/// <summary>
/// Serialize Serialize
/// </summary>
public virtual void Serialize(System.IO.BinaryWriter writer)
{
if (Command == null) writer.Write((byte)0);
else
{
// null flag
writer.Write((byte)1);
 
writer.Write(Command);
}
 
}
/// <summary>
/// Deserialize Deserialize
/// </summary>
public virtual object Deserialize(System.IO.BinaryReader reader)
{
if (reader.ReadByte() == 0) {}
else
{
Command = reader.ReadString();
} //nullable
 
return this;
 
}
}
/// <summary>
/// Set Com Port Request
/// </summary>
[DataContract()]
980,7 → 898,7
/// </summary>
[ServicePort()]
[XmlTypeAttribute(IncludeInSchema=false)]
public class RoboBoardOperations : PortSet<Microsoft.Dss.ServiceModel.Dssp.DsspDefaultLookup, Microsoft.Dss.ServiceModel.Dssp.DsspDefaultDrop, Get, dssphttp.HttpGet, Replace, InitComplete, SetComPort, ReceiveCommand, SendCommand, Level, Control, SetAltitute, SetGas, SetGier, IncrementTick, Subscribe>
public class RoboBoardOperations : PortSet<Microsoft.Dss.ServiceModel.Dssp.DsspDefaultLookup, Microsoft.Dss.ServiceModel.Dssp.DsspDefaultDrop, Get, dssphttp.HttpGet, Replace, SetComPort, ReceiveCommand, SendCommand, Level, Control, SetAltitute, SetGas, SetGier, IncrementTick, Subscribe>
{
/// <summary>
1104,30 → 1022,6
}
/// <summary>
/// Init Complete Request
/// </summary>
public virtual PortSet<Microsoft.Dss.ServiceModel.Dssp.DefaultUpdateResponseType,Fault> InitComplete()
{
InitCompleteRequest body = new InitCompleteRequest();
InitComplete op = new InitComplete(body);
this.Post(op);
return op.ResponsePort;
 
}
/// <summary>
/// Post Init Complete and return the response port.
/// </summary>
public virtual PortSet<Microsoft.Dss.ServiceModel.Dssp.DefaultUpdateResponseType,Fault> InitComplete(InitCompleteRequest body)
{
InitComplete op = new InitComplete();
op.Body = body ?? new InitCompleteRequest();
this.Post(op);
return op.ResponsePort;
 
}
/// <summary>
/// Set Com Port Request
/// </summary>
public virtual PortSet<Microsoft.Dss.ServiceModel.Dssp.DefaultUpdateResponseType,Fault> SetComPort()
1433,37 → 1327,6
}
/// <summary>
/// Init Complete
/// </summary>
[XmlTypeAttribute(IncludeInSchema=false)]
public class InitComplete : Microsoft.Dss.ServiceModel.Dssp.Update<InitCompleteRequest, PortSet<Microsoft.Dss.ServiceModel.Dssp.DefaultUpdateResponseType, Fault>>
{
/// <summary>
/// Init Complete
/// </summary>
public InitComplete()
{
}
/// <summary>
/// Init Complete
/// </summary>
public InitComplete(InitCompleteRequest body) :
base(body)
{
}
/// <summary>
/// Init Complete
/// </summary>
public InitComplete(InitCompleteRequest body, Microsoft.Ccr.Core.PortSet<Microsoft.Dss.ServiceModel.Dssp.DefaultUpdateResponseType,W3C.Soap.Fault> responsePort) :
base(body, responsePort)
{
}
}
/// <summary>
/// Set Com Port
/// </summary>
[XmlTypeAttribute(IncludeInSchema=false)]
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/obj/Debug/RoboBoardService.Y2007.M08.Proxy.dll
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/obj/Debug/RoboBoardService.Y2007.M08.Proxy.pdb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/obj/Debug/RoboBoardService.Y2007.M08.proxy.csproj.GenerateResource.Cache
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/obj/Debug/Robotics.RoboBoard.Properties.Resources.resources
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/obj/Debug/Robotics.RoboBoard.Resources.DssModel.dss
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/Proxy/roboboardservice.source.transform.cs
36,24 → 36,6
}
 
 
public static object Transform_Robotics_RoboBoard_Proxy_InitCompleteRequest_TO_Robotics_RoboBoard_InitCompleteRequest(object transformFrom)
{
Robotics.RoboBoard.InitCompleteRequest target = new Robotics.RoboBoard.InitCompleteRequest();
Robotics.RoboBoard.Proxy.InitCompleteRequest from = transformFrom as Robotics.RoboBoard.Proxy.InitCompleteRequest;
target.Command = from.Command;
return target;
}
 
 
public static object Transform_Robotics_RoboBoard_InitCompleteRequest_TO_Robotics_RoboBoard_Proxy_InitCompleteRequest(object transformFrom)
{
Robotics.RoboBoard.Proxy.InitCompleteRequest target = new Robotics.RoboBoard.Proxy.InitCompleteRequest();
Robotics.RoboBoard.InitCompleteRequest from = transformFrom as Robotics.RoboBoard.InitCompleteRequest;
target.Command = from.Command;
return target;
}
 
 
public static object Transform_Robotics_RoboBoard_Proxy_SetComPortRequest_TO_Robotics_RoboBoard_SetComPortRequest(object transformFrom)
{
Robotics.RoboBoard.SetComPortRequest target = new Robotics.RoboBoard.SetComPortRequest();
227,8 → 209,6
{
AddProxyTransform(typeof(Robotics.RoboBoard.Proxy.RoboBoardState), Transform_Robotics_RoboBoard_Proxy_RoboBoardState_TO_Robotics_RoboBoard_RoboBoardState);
AddSourceTransform(typeof(Robotics.RoboBoard.RoboBoardState), Transform_Robotics_RoboBoard_RoboBoardState_TO_Robotics_RoboBoard_Proxy_RoboBoardState);
AddProxyTransform(typeof(Robotics.RoboBoard.Proxy.InitCompleteRequest), Transform_Robotics_RoboBoard_Proxy_InitCompleteRequest_TO_Robotics_RoboBoard_InitCompleteRequest);
AddSourceTransform(typeof(Robotics.RoboBoard.InitCompleteRequest), Transform_Robotics_RoboBoard_InitCompleteRequest_TO_Robotics_RoboBoard_Proxy_InitCompleteRequest);
AddProxyTransform(typeof(Robotics.RoboBoard.Proxy.SetComPortRequest), Transform_Robotics_RoboBoard_Proxy_SetComPortRequest_TO_Robotics_RoboBoard_SetComPortRequest);
AddSourceTransform(typeof(Robotics.RoboBoard.SetComPortRequest), Transform_Robotics_RoboBoard_SetComPortRequest_TO_Robotics_RoboBoard_Proxy_SetComPortRequest);
AddProxyTransform(typeof(Robotics.RoboBoard.Proxy.ReceiveCommandRequest), Transform_Robotics_RoboBoard_Proxy_ReceiveCommandRequest_TO_Robotics_RoboBoard_ReceiveCommandRequest);
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/RoboBoard.cs
42,9 → 42,6
RoboBoardForm _rbForm;
RoboBoardEvents _eventsPort = new RoboBoardEvents();
 
bool subs = false;
bool isloaded = false;
 
private Roboboard.SerialCom sc = new Robotics.Serial.SerialCom();
/// <summary>
/// _state
145,15 → 142,6
 
//---------------------------------------------------------------------
[ServiceHandler(ServiceHandlerBehavior.Exclusive)]
public IEnumerator<ITask> InitComplete(InitComplete initComplete)
{
LogInfo("Init");
LogInfo("Command:" + initComplete.Body.Command);
yield break;
}
 
//---------------------------------------------------------------------
[ServiceHandler(ServiceHandlerBehavior.Exclusive)]
public IEnumerator<ITask> SetComPortHandler(SetComPort setComPort)
{
LogInfo("Set Port Name ("+setComPort.Body.PortName+")");
175,22 → 163,17
if (sc.InitPort() == 0)
{
LogInfo("Init Port succseeded");
WinFormsServicePort.FormInvoke(delegate()
{ _rbForm.UpdateStatus("Port Open (" + sc.ComPort + ")"); });
WinFormsServicePort.FormInvoke(delegate()
{_rbForm.UpdateStatus("Port Open (" + sc.ComPort + ")");});
}
else
{
LogInfo("Init Port failed");
WinFormsServicePort.FormInvoke(delegate()
{ _rbForm.UpdateStatus("Can't open communication port (" + sc.ComPort + ")"); });
{_rbForm.UpdateStatus("Can't open communication port (" + sc.ComPort + ")");});
}
}
else
{
LogInfo("Board communication not ready! Setport Ignored");
}
}
LogInfo("Exit Set Comport");
yield break;
}
 
273,11 → 256,9
_rbForm.Control_gier = igier;
}
 
if (MK_latest_gier != igier)
{
MK_latest_gier = igier;
MKRequestControl(MK_latest_nick, MK_latest_roll, MK_latest_gier, MK_latest_gas);
}
MK_latest_gier = igier;
MKRequestControl(MK_latest_nick, MK_latest_roll, MK_latest_gier, MK_latest_gas);
 
base.SendNotification(_submgrPort, setgier);
setgier.ResponsePort.Post(DefaultUpdateResponseType.Instance);
yield break;
295,11 → 276,8
_rbForm.Control_gas = igas;
}
 
if (MK_latest_gas != igas)
{
MK_latest_gas = igas;
MKRequestControl(MK_latest_nick, MK_latest_roll, MK_latest_gier, MK_latest_gas);
}
MK_latest_gas = igas;
MKRequestControl(MK_latest_nick, MK_latest_roll, MK_latest_gier, MK_latest_gas);
 
base.SendNotification(_submgrPort, setgas);
setgas.ResponsePort.Post(DefaultUpdateResponseType.Instance);
323,12 → 301,9
_rbForm.Control_roll = iroll;
}
 
if ((MK_latest_roll != iroll) || (MK_latest_nick != inick))
{
MK_latest_nick = inick;
MK_latest_roll = iroll;
MKRequestControl(MK_latest_nick, MK_latest_roll, MK_latest_gier, MK_latest_gas);
}
MK_latest_nick = inick;
MK_latest_roll = iroll;
MKRequestControl(MK_latest_nick, MK_latest_roll, MK_latest_gier, MK_latest_gas);
 
base.SendNotification(_submgrPort, control);
control.ResponsePort.Post(DefaultUpdateResponseType.Instance);
353,11 → 328,7
LogError(null, "Subscribe failed", e);
}
);
if (isloaded)
{
base.SendNotification(_submgrPort, new InitComplete("OK"));
}
subs = true;
 
yield break;
}
 
366,29 → 337,23
{
_rbForm = onLoad.RoboBoardForm;
LogInfo("Loaded Form");
sc.ComPort = "COM7";
sc.ComPort = "COM6";
if (_rbForm != null)
{
if (sc.InitPort() == 0)
{
LogInfo("Port Open");
WinFormsServicePort.FormInvoke(delegate()
{_rbForm.UpdateStatus("Port Open (" + sc.ComPort + ")");});
}
else
{
LogInfo("Port failed to Open");
WinFormsServicePort.FormInvoke(delegate()
{_rbForm.UpdateStatus("Can't open communication port (" + sc.ComPort + ")");});
}
}
//request version
MKRequestVersion();
if (subs)
{
base.SendNotification(_submgrPort, new InitComplete("OK"));
}
isloaded = true;
yield break;
}
 
452,14 → 417,9
//---------------------------------------------------------------------
void MKRequestVersion()
{
LogInfo("MK RequestVersion");
string message = "";
message=sc.CreateMessage((char)'v', (char)0, message);
if (sc.isOpen)
{
LogInfo("Version Send");
sc.SerialWrite(message);
}
sc.SerialWrite(message);
}
 
string MKDecodeVersion(string message)
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/RoboBoardService.suo
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/RoboBoardTypes.cs
59,7 → 59,6
Get,
HttpGet,
Replace,
InitComplete,
SetComPort,
ReceiveCommand,
SendCommand,
109,44 → 108,6
}
 
//-------------------------------------------------------------------------
// Init Complete Handler
// tbd
public class InitComplete : Update<InitCompleteRequest,
PortSet<DefaultUpdateResponseType, Fault>>
{
public InitComplete()
{
}
 
public InitComplete(string Command)
: base(new InitCompleteRequest(Command))
{
}
}
 
[DataContract]
public class InitCompleteRequest
{
public InitCompleteRequest()
{
}
 
public InitCompleteRequest(string command)
{
Command = command;
}
 
private string _Command;
 
[DataMember]
public string Command
{
get { return _Command; }
set { _Command = value; }
}
}
 
//-------------------------------------------------------------------------
// Set Com Port Handler
public class SetComPort : Update<SetComPortRequest,
PortSet<DefaultUpdateResponseType, Fault>>
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/obj/Debug/RoboBoardService.Y2007.M08.dll
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/obj/Debug/RoboBoardService.Y2007.M08.pdb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/Microsoft Robotics Studio/MSRS Service/RoboBoardService/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream