Skip to content

Commit

Permalink
SDk version update to 3.2 & get route from server request sample
Browse files Browse the repository at this point in the history
  • Loading branch information
UGCS-sdk committed May 28, 2019
1 parent 23f8314 commit ade8133
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 28 deletions.
2 changes: 1 addition & 1 deletion UGCS.Example/Services/Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<Private>True</Private>
</Reference>
<Reference Include="Sdk, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ugcs-dotnet-sdk.3.1.886\lib\Sdk.dll</HintPath>
<HintPath>..\packages\ugcs-dotnet-sdk.3.2.193\lib\Sdk.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
8 changes: 4 additions & 4 deletions UGCS.Example/Services/app.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0"/>
<assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>
2 changes: 1 addition & 1 deletion UGCS.Example/Services/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<package id="log4net" version="2.0.8" targetFramework="net461" />
<package id="protobuf-net" version="2.2.0" targetFramework="net461" />
<package id="System.Runtime.Serialization.Json" version="4.3.0" targetFramework="net461" />
<package id="ugcs-dotnet-sdk" version="3.1.886" targetFramework="net461" />
<package id="ugcs-dotnet-sdk" version="3.2.193" targetFramework="net462" />
</packages>
8 changes: 4 additions & 4 deletions UGCS.Example/UGCS.Console/App.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0"/>
<assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
11 changes: 11 additions & 0 deletions UGCS.Example/UGCS.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,17 @@ static void Main(string[] args)
var mission = importMissionResponse.Value.Mission;
System.Console.WriteLine("Demo mission.xml imported to UCS with name '{0}'", mission.Name);

//get emucopter route
GetObjectRequest getObjectRequest = new GetObjectRequest()
{
ClientId = clientId,
ObjectType = "Route",
RefreshDependencies = true,
ObjectId = 1
};
var taskRoute = messageExecutor.Submit<GetObjectResponse>(getObjectRequest);
taskRoute.Wait();
var routeFromServer = taskRoute.Value;

//Get all vehicles
GetObjectListRequest getObjectListRequest = new GetObjectListRequest()
Expand Down
2 changes: 1 addition & 1 deletion UGCS.Example/UGCS.Console/UGCS.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<Private>True</Private>
</Reference>
<Reference Include="Sdk, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ugcs-dotnet-sdk.3.1.886\lib\Sdk.dll</HintPath>
<HintPath>..\packages\ugcs-dotnet-sdk.3.2.193\lib\Sdk.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion UGCS.Example/UGCS.Console/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="protobuf-net" version="2.2.0" targetFramework="net45" />
<package id="ugcs-dotnet-sdk" version="3.1.886" targetFramework="net45" />
<package id="ugcs-dotnet-sdk" version="3.2.193" targetFramework="net462" />
</packages>
28 changes: 14 additions & 14 deletions UGCS.Example/UGCS.Example/App.config
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="UGCS.Example.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<section name="UGCS.Example.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<log4net>
<appender name="Main" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="${LOCALAPPDATA}\\UGCS\logs\UCS.NET.SDK.Example\log-%date{yyyy-MM-dd_HH-mm-ss}.txt"/>
<rollingStyle value="Date"/>
<appendToFile value="true"/>
<maximumFileSize value="1GB"/>
<maxSizeRollBackups value="3"/>
<file type="log4net.Util.PatternString" value="${LOCALAPPDATA}\\UGCS\logs\UCS.NET.SDK.Example\log-%date{yyyy-MM-dd_HH-mm-ss}.txt" />
<rollingStyle value="Date" />
<appendToFile value="true" />
<maximumFileSize value="1GB" />
<maxSizeRollBackups value="3" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date{ABSOLUTE} %-5level %-18logger %message%newline"/>
<conversionPattern value="%date{ABSOLUTE} %-5level %-18logger %message%newline" />
</layout>
</appender>
<root>
<level value="ALL"/>
<appender-ref ref="Main"/>
<level value="ALL" />
<appender-ref ref="Main" />
</root>
</log4net>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<applicationSettings>
<UGCS.Example.Properties.Settings>
Expand Down Expand Up @@ -53,8 +53,8 @@
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0"/>
<assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
2 changes: 1 addition & 1 deletion UGCS.Example/UGCS.Example/UGCS.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<Private>True</Private>
</Reference>
<Reference Include="Sdk, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ugcs-dotnet-sdk.3.1.886\lib\Sdk.dll</HintPath>
<HintPath>..\packages\ugcs-dotnet-sdk.3.2.193\lib\Sdk.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand Down
2 changes: 1 addition & 1 deletion UGCS.Example/UGCS.Example/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
<package id="MahApps.Metro" version="1.5.0" targetFramework="net461" />
<package id="Ninject" version="3.2.2.0" targetFramework="net461" />
<package id="protobuf-net" version="2.2.0" targetFramework="net461" />
<package id="ugcs-dotnet-sdk" version="3.1.886" targetFramework="net461" />
<package id="ugcs-dotnet-sdk" version="3.2.193" targetFramework="net462" />
</packages>

0 comments on commit ade8133

Please sign in to comment.