Skip to content

Commit efe5e83

Browse files
committed
Rosbridge client refactored. CodeGenerator added.
1 parent dcea01b commit efe5e83

File tree

78 files changed

+796
-102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+796
-102
lines changed

RosbridgeNet.sln

+21-14
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeGenerator", "CodeGenera
1313
EndProject
1414
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RosbridgeClient", "RosbridgeClient", "{0D9C3C91-BDB0-48E2-9313-F25CBD8278B3}"
1515
EndProject
16-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RosbridgeNet.RosbridgeClient.Common", "src\RosbridgeNet.RosbridgeClient.Common\RosbridgeNet.RosbridgeClient.Common.csproj", "{F51CB738-E801-4A3B-9381-A7AED9957130}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RosbridgeNet.Client.WPF", "samples\RosbridgeNet.Client.WPF\RosbridgeNet.Client.WPF.csproj", "{2A2756A7-1B0F-4257-8F16-E9CB6C74D624}"
1717
EndProject
18-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RosbridgeNet.RosbridgeClient.ProtocolV2", "src\RosbridgeNet.RosbridgeClient.ProtocolV2\RosbridgeNet.RosbridgeClient.ProtocolV2.csproj", "{2D745749-7FE0-44BF-ADDE-8D80A8515687}"
18+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RosbridgeNet.Client.Console", "samples\RosbridgeNet.Client.Console\RosbridgeNet.Client.Console.csproj", "{6F3CA7E5-3E29-4DD8-A5CA-E3FFF4A972C6}"
1919
EndProject
20-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RosbridgeNet.Client.WPF", "samples\RosbridgeNet.Client.WPF\RosbridgeNet.Client.WPF.csproj", "{2A2756A7-1B0F-4257-8F16-E9CB6C74D624}"
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RosbridgeNet.RosbridgeClient.Common", "src\RosbridgeClient\RosbridgeNet.RosbridgeClient.Common\RosbridgeNet.RosbridgeClient.Common.csproj", "{89778683-2F15-4F8F-B2A5-A548310EBB4F}"
21+
EndProject
22+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RosbridgeNet.RosbridgeClient.ProtocolV2", "src\RosbridgeClient\RosbridgeNet.RosbridgeClient.ProtocolV2\RosbridgeNet.RosbridgeClient.ProtocolV2.csproj", "{E685CE6F-EAFF-4217-89AE-C56B05A42ACD}"
2123
EndProject
22-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RosbridgeNet.Client.Console", "samples\RosbridgeNet.Client.Console\RosbridgeNet.Client.Console.csproj", "{6F3CA7E5-3E29-4DD8-A5CA-E3FFF4A972C6}"
24+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RosbridgeNet.CodeGenerator", "src\CodeGenerator\RosbridgeNet.CodeGenerator\RosbridgeNet.CodeGenerator.csproj", "{77BC486E-EA6C-4504-B407-664D9A55EECD}"
2325
EndProject
2426
Global
2527
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2628
Debug|Any CPU = Debug|Any CPU
2729
Release|Any CPU = Release|Any CPU
2830
EndGlobalSection
2931
GlobalSection(ProjectConfigurationPlatforms) = postSolution
30-
{F51CB738-E801-4A3B-9381-A7AED9957130}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31-
{F51CB738-E801-4A3B-9381-A7AED9957130}.Debug|Any CPU.Build.0 = Debug|Any CPU
32-
{F51CB738-E801-4A3B-9381-A7AED9957130}.Release|Any CPU.ActiveCfg = Release|Any CPU
33-
{F51CB738-E801-4A3B-9381-A7AED9957130}.Release|Any CPU.Build.0 = Release|Any CPU
34-
{2D745749-7FE0-44BF-ADDE-8D80A8515687}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35-
{2D745749-7FE0-44BF-ADDE-8D80A8515687}.Debug|Any CPU.Build.0 = Debug|Any CPU
36-
{2D745749-7FE0-44BF-ADDE-8D80A8515687}.Release|Any CPU.ActiveCfg = Release|Any CPU
37-
{2D745749-7FE0-44BF-ADDE-8D80A8515687}.Release|Any CPU.Build.0 = Release|Any CPU
3832
{2A2756A7-1B0F-4257-8F16-E9CB6C74D624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3933
{2A2756A7-1B0F-4257-8F16-E9CB6C74D624}.Debug|Any CPU.Build.0 = Debug|Any CPU
4034
{2A2756A7-1B0F-4257-8F16-E9CB6C74D624}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -43,17 +37,30 @@ Global
4337
{6F3CA7E5-3E29-4DD8-A5CA-E3FFF4A972C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
4438
{6F3CA7E5-3E29-4DD8-A5CA-E3FFF4A972C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
4539
{6F3CA7E5-3E29-4DD8-A5CA-E3FFF4A972C6}.Release|Any CPU.Build.0 = Release|Any CPU
40+
{89778683-2F15-4F8F-B2A5-A548310EBB4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41+
{89778683-2F15-4F8F-B2A5-A548310EBB4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
42+
{89778683-2F15-4F8F-B2A5-A548310EBB4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
43+
{89778683-2F15-4F8F-B2A5-A548310EBB4F}.Release|Any CPU.Build.0 = Release|Any CPU
44+
{E685CE6F-EAFF-4217-89AE-C56B05A42ACD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45+
{E685CE6F-EAFF-4217-89AE-C56B05A42ACD}.Debug|Any CPU.Build.0 = Debug|Any CPU
46+
{E685CE6F-EAFF-4217-89AE-C56B05A42ACD}.Release|Any CPU.ActiveCfg = Release|Any CPU
47+
{E685CE6F-EAFF-4217-89AE-C56B05A42ACD}.Release|Any CPU.Build.0 = Release|Any CPU
48+
{77BC486E-EA6C-4504-B407-664D9A55EECD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
49+
{77BC486E-EA6C-4504-B407-664D9A55EECD}.Debug|Any CPU.Build.0 = Debug|Any CPU
50+
{77BC486E-EA6C-4504-B407-664D9A55EECD}.Release|Any CPU.ActiveCfg = Release|Any CPU
51+
{77BC486E-EA6C-4504-B407-664D9A55EECD}.Release|Any CPU.Build.0 = Release|Any CPU
4652
EndGlobalSection
4753
GlobalSection(SolutionProperties) = preSolution
4854
HideSolutionNode = FALSE
4955
EndGlobalSection
5056
GlobalSection(NestedProjects) = preSolution
5157
{3CE96807-3554-415F-B196-AB410AC0C773} = {F4469ACB-CF4D-4265-8DE5-85ABA32BB272}
5258
{0D9C3C91-BDB0-48E2-9313-F25CBD8278B3} = {F4469ACB-CF4D-4265-8DE5-85ABA32BB272}
53-
{F51CB738-E801-4A3B-9381-A7AED9957130} = {0D9C3C91-BDB0-48E2-9313-F25CBD8278B3}
54-
{2D745749-7FE0-44BF-ADDE-8D80A8515687} = {0D9C3C91-BDB0-48E2-9313-F25CBD8278B3}
5559
{2A2756A7-1B0F-4257-8F16-E9CB6C74D624} = {1697E3A9-E85C-45DF-B611-C1B5199B38C7}
5660
{6F3CA7E5-3E29-4DD8-A5CA-E3FFF4A972C6} = {1697E3A9-E85C-45DF-B611-C1B5199B38C7}
61+
{89778683-2F15-4F8F-B2A5-A548310EBB4F} = {0D9C3C91-BDB0-48E2-9313-F25CBD8278B3}
62+
{E685CE6F-EAFF-4217-89AE-C56B05A42ACD} = {0D9C3C91-BDB0-48E2-9313-F25CBD8278B3}
63+
{77BC486E-EA6C-4504-B407-664D9A55EECD} = {3CE96807-3554-415F-B196-AB410AC0C773}
5764
EndGlobalSection
5865
GlobalSection(ExtensibilityGlobals) = postSolution
5966
SolutionGuid = {123AC092-BA2D-4C11-8C16-723D28A7D189}

samples/RosbridgeNet.Client.Console/Program.cs

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using RosbridgeNet.RosbridgeClient.Common;
77
using RosbridgeNet.RosbridgeClient.Common.Interfaces;
88
using RosbridgeNet.RosbridgeClient.ProtocolV2;
9+
using RosbridgeNet.RosbridgeClient.ProtocolV2.Generics;
910
using RosbridgeNet.RosbridgeClient.ProtocolV2.Interfaces;
1011
using RosbridgeNet.RosbridgeClient.ProtocolV2.Wrappers;
1112

@@ -26,6 +27,8 @@ static void Publish()
2627
IRosbridgeMessageDispatcher messageDispatcher = new RosbridgeMessageDispatcher(socket, messageSerializer);
2728
RosPublisher<Twist> publisher = new RosPublisher<Twist>(messageDispatcher, "/turtle1/cmd_vel");
2829

30+
RosPublisher publisher2 = new RosPublisher(messageDispatcher, "/turtle1/cmd_vel", "geometry_msgs/Twist");
31+
2932
messageDispatcher.StartAsync().ContinueWith((publish) =>
3033
{
3134
publisher.AdvertiseAsync();

samples/RosbridgeNet.Client.Console/RosbridgeNet.Client.Console.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<ProjectReference Include="..\..\src\RosbridgeNet.RosbridgeClient.Common\RosbridgeNet.RosbridgeClient.Common.csproj" />
10-
<ProjectReference Include="..\..\src\RosbridgeNet.RosbridgeClient.ProtocolV2\RosbridgeNet.RosbridgeClient.ProtocolV2.csproj" />
9+
<ProjectReference Include="..\..\src\RosbridgeClient\RosbridgeNet.RosbridgeClient.Common\RosbridgeNet.RosbridgeClient.Common.csproj" />
10+
<ProjectReference Include="..\..\src\RosbridgeClient\RosbridgeNet.RosbridgeClient.ProtocolV2\RosbridgeNet.RosbridgeClient.ProtocolV2.csproj" />
1111
</ItemGroup>
1212

1313
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("RosbridgeNet.CodeGenerator")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("RosbridgeNet.CodeGenerator")]
13+
[assembly: AssemblyCopyright("")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// Version information for an assembly consists of the following four values:
23+
//
24+
// Major Version
25+
// Minor Version
26+
// Build Number
27+
// Revision
28+
//
29+
// You can specify all the values or you can default the Build and Revision Numbers
30+
// by using the '*' as shown below:
31+
// [assembly: AssemblyVersion("1.0.*")]
32+
[assembly: AssemblyVersion("1.0.0.0")]
33+
[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
8+
<PropertyGroup>
9+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
10+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
11+
<SchemaVersion>2.0</SchemaVersion>
12+
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
13+
<ProjectGuid>{77BC486E-EA6C-4504-B407-664D9A55EECD}</ProjectGuid>
14+
<OutputType>Library</OutputType>
15+
<AppDesignerFolder>Properties</AppDesignerFolder>
16+
<RootNamespace>RosbridgeNet.CodeGenerator</RootNamespace>
17+
<AssemblyName>RosbridgeNet.CodeGenerator</AssemblyName>
18+
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
19+
<GeneratePkgDefFile>false</GeneratePkgDefFile>
20+
<IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
21+
<IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
22+
<IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
23+
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
24+
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
25+
<StartAction>Program</StartAction>
26+
<StartProgram Condition="'$(DevEnvDir)' != ''">$(DevEnvDir)devenv.exe</StartProgram>
27+
<StartArguments>/rootsuffix Exp</StartArguments>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
30+
<DebugSymbols>true</DebugSymbols>
31+
<DebugType>full</DebugType>
32+
<Optimize>false</Optimize>
33+
<OutputPath>bin\Debug\</OutputPath>
34+
<DefineConstants>DEBUG;TRACE</DefineConstants>
35+
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
37+
</PropertyGroup>
38+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
39+
<DebugType>pdbonly</DebugType>
40+
<Optimize>true</Optimize>
41+
<OutputPath>bin\Release\</OutputPath>
42+
<DefineConstants>TRACE</DefineConstants>
43+
<ErrorReport>prompt</ErrorReport>
44+
<WarningLevel>4</WarningLevel>
45+
</PropertyGroup>
46+
<ItemGroup>
47+
<Compile Include="Properties\AssemblyInfo.cs" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<None Include="source.extension.vsixmanifest">
51+
<SubType>Designer</SubType>
52+
</None>
53+
</ItemGroup>
54+
<ItemGroup>
55+
<Content Include="index.html" />
56+
<Content Include="stylesheet.css" />
57+
</ItemGroup>
58+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
59+
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
60+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
61+
Other similar extension points exist, see Microsoft.Common.targets.
62+
<Target Name="BeforeBuild">
63+
</Target>
64+
<Target Name="AfterBuild">
65+
</Target>
66+
-->
67+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset='utf-8'>
5+
6+
<link rel="stylesheet" type="text/css" href="stylesheet.css" media="screen">
7+
8+
<title>Getting Started</title>
9+
</head>
10+
11+
<body>
12+
<div class="container">
13+
<div id="header">
14+
<h1>Getting Started</h1>
15+
<h2>Visual Studio Extensions</h2>
16+
</div>
17+
18+
<div id="main_content">
19+
<div id="lpanel">
20+
<h1>Creating a Visual Studio Extension</h1>
21+
22+
<p>This project enables developers to create an extension for Visual Studio. The solution contains a VSIX project that packages the extension into a VSIX file. This file is used to install an extension for Visual Studio.</p>
23+
<h2>Add new features</h2>
24+
25+
<ol>
26+
<li>Right-click the project node in Solution Explorer and select Add&gt;New Item.</li>
27+
<li>In the Add New Item dialog box, expand the Extensibility node under Visual C# or Visual Basic.</li>
28+
<li>Choose from the available item templates: Visual Studio Package, Editor Items (Classifier, Margin, Text Adornment, Viewport Adornment), Command, Tool Window, Toolbox Control, and then click Add.</li>
29+
</ol>
30+
31+
<p>The files for the template that you selected are added to the project. You can start adding functionality to your item template, press F5 to run the project, or add additional item templates.</p>
32+
33+
<h2>Run and debug</h2>
34+
<p>To run the project, press F5. Visual Studio will:</p>
35+
36+
<ul>
37+
<li>Build the extension from the VSIX project.</li>
38+
<li>Create a VSIX package from the VSIX project.</li>
39+
<li>When debugging, start an experimental instance of Visual Studio with the VSIX package installed.</li>
40+
</ul>
41+
42+
<p>In the experimental instance of Visual Studio you can test out the functionality of your extension without affecting your Visual Studio installation.</p>
43+
44+
</div>
45+
<div id="rpanel">
46+
<div>
47+
<h1>Visual Studio Extensibility Resources</h1>
48+
49+
<ol>
50+
<li><a target="_blank" href="https://aka.ms/o5gv1m">Visual Studio documentation</a><br />Detailed documentation and API reference material for building extensions.</li>
51+
<li><a target="_blank" href="https://aka.ms/pauhge">Extension samples on GitHub</a><br />Use a sample project to kickstart your development.</li>
52+
<li><a target="_blank" href="https://aka.ms/l24u91">Extensibility chat room on Gitter</a><br />Meet other extension developers and exchange tips and tricks for extension development.</li>
53+
<li><a target="_blank" href="https://aka.ms/spn6s4">Channel 9 videos on extensibility</a><br />Watch videos from the product team on Visual Studio extensibility.</li>
54+
<li><a target="_blank" href="https://aka.ms/ui0qn6">Extensibility Tools</a><br />Install an optional helper tool that adds extra IDE support for extension authors.</li>
55+
</ol>
56+
<h1>Give us feedback</h1>
57+
<ul>
58+
<li><a target="_blank" href="https://aka.ms/uonulm">Submit a new feature idea or suggestion</a></li>
59+
</ul>
60+
</div>
61+
</div>
62+
</div>
63+
</div>
64+
</body>
65+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" ?>
2+
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
3+
<Metadata>
4+
<Identity Id="RosbridgeNet.CodeGenerator.02ee6fb6-d12b-49e1-9c6f-9e51b8ec9a17" Version="1.0" Language="en-US" Publisher="Tóth Csaba" />
5+
<DisplayName>RosbridgeNet.CodeGenerator</DisplayName>
6+
<Description>Empty VSIX Project.</Description>
7+
</Metadata>
8+
<Installation>
9+
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0, 16.0)" />
10+
</Installation>
11+
<Dependencies>
12+
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
13+
</Dependencies>
14+
<Prerequisites>
15+
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />
16+
</Prerequisites>
17+
</PackageManifest>

0 commit comments

Comments
 (0)