aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-28 18:10:54 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-28 18:10:54 +0200
commit539aecd793ee0ce55833eef98c3049dd0bf8127d (patch)
treef8ad9f837805db9ffcfc16d7b3b100563f0f67a4 /Software
parente6fbe359a674ab65c1fc728ac4a826b3c0716932 (diff)
downloadTango-539aecd793ee0ce55833eef98c3049dd0bf8127d.tar.gz
Tango-539aecd793ee0ce55833eef98c3049dd0bf8127d.zip
Started working on Embedded Storage and machine studio Storage module.
Diffstat (limited to 'Software')
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin20578304 -> 20578304 bytes
-rw-r--r--Software/Graphics/Machine Studio Modules/storage.pngbin0 -> 197032 bytes
-rw-r--r--Software/PMR/Messages/IO/FileChunkDownloadResponse.proto1
-rw-r--r--Software/PMR/Messages/IO/FileDownloadRequest.proto1
-rw-r--r--Software/PMR/Messages/IO/GetStorageInfoResponse.proto1
-rw-r--r--Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnkbin1471 -> 1445 bytes
-rw-r--r--Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnkbin1532 -> 1516 bytes
-rw-r--r--Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnkbin1464 -> 1444 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Images/storage.pngbin0 -> 197032 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/AssemblyInfo.cs19
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Resources.Designer.cs62
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Resources.resx117
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Settings.Designer.cs30
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Settings.settings7
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/StorageModule.cs62
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Tango.MachineStudio.Storage.csproj134
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModelLocator.cs29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModels/MainViewVM.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/packages.config6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj6
-rw-r--r--Software/Visual_Studio/Tango.Core/Tango.Core.csproj3
-rw-r--r--Software/Visual_Studio/Tango.Core/Threading/ThreadFactory.cs23
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/StorageManager.cs144
-rw-r--r--Software/Visual_Studio/Tango.Integration/Storage/StorageDrive.cs16
-rw-r--r--Software/Visual_Studio/Tango.Integration/Storage/StorageFile.cs18
-rw-r--r--Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs74
-rw-r--r--Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandlerProgressEventArgs.cs14
-rw-r--r--Software/Visual_Studio/Tango.Integration/Storage/StorageFolder.cs19
-rw-r--r--Software/Visual_Studio/Tango.Integration/Storage/StorageItem.cs33
-rw-r--r--Software/Visual_Studio/Tango.Integration/Storage/StorageManager.cs368
-rw-r--r--Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj10
-rw-r--r--Software/Visual_Studio/Tango.PMR/IO/FileChunkDownloadResponse.cs36
-rw-r--r--Software/Visual_Studio/Tango.PMR/IO/FileDownloadRequest.cs36
-rw-r--r--Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoResponse.cs36
-rw-r--r--Software/Visual_Studio/Tango.sln43
39 files changed, 1190 insertions, 219 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index de9e90030..d2a861786 100644
--- a/Software/DB/Tango.mdf
+++ b/Software/DB/Tango.mdf
Binary files differ
diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf
index 738fad330..6485e6b4b 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/Graphics/Machine Studio Modules/storage.png b/Software/Graphics/Machine Studio Modules/storage.png
new file mode 100644
index 000000000..1037998f1
--- /dev/null
+++ b/Software/Graphics/Machine Studio Modules/storage.png
Binary files differ
diff --git a/Software/PMR/Messages/IO/FileChunkDownloadResponse.proto b/Software/PMR/Messages/IO/FileChunkDownloadResponse.proto
index c0dce0d1d..08c342d44 100644
--- a/Software/PMR/Messages/IO/FileChunkDownloadResponse.proto
+++ b/Software/PMR/Messages/IO/FileChunkDownloadResponse.proto
@@ -5,7 +5,6 @@ option java_package = "com.twine.tango.pmr.io";
message FileChunkDownloadResponse
{
- string DownloadID = 1;
bytes Buffer = 2;
bool IsCanceled = 3;
} \ No newline at end of file
diff --git a/Software/PMR/Messages/IO/FileDownloadRequest.proto b/Software/PMR/Messages/IO/FileDownloadRequest.proto
index 9f930f3b6..d9884a8ba 100644
--- a/Software/PMR/Messages/IO/FileDownloadRequest.proto
+++ b/Software/PMR/Messages/IO/FileDownloadRequest.proto
@@ -6,5 +6,4 @@ option java_package = "com.twine.tango.pmr.io";
message FileDownloadRequest
{
string FileName = 1;
- int64 Length = 2;
} \ No newline at end of file
diff --git a/Software/PMR/Messages/IO/GetStorageInfoResponse.proto b/Software/PMR/Messages/IO/GetStorageInfoResponse.proto
index 44a901c8c..74b84d393 100644
--- a/Software/PMR/Messages/IO/GetStorageInfoResponse.proto
+++ b/Software/PMR/Messages/IO/GetStorageInfoResponse.proto
@@ -7,4 +7,5 @@ message GetStorageInfoResponse
{
int32 Capacity = 1;
int32 FreeSpace = 2;
+ string Root = 3;
} \ No newline at end of file
diff --git a/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk b/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk
index b279a3df0..ed85526f8 100644
--- a/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk
+++ b/Software/Visual_Studio/Build/Shortcuts/Machine Emulator.lnk
Binary files differ
diff --git a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk
index e25e24cd4..cd896bb0b 100644
--- a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk
+++ b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk
Binary files differ
diff --git a/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk b/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk
index 6c02ee346..09c18411a 100644
--- a/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk
+++ b/Software/Visual_Studio/Build/Shortcuts/Proto Compiler GUI.lnk
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Images/storage.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Images/storage.png
new file mode 100644
index 000000000..1037998f1
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Images/storage.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..e1da8d0cd
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/AssemblyInfo.cs
@@ -0,0 +1,19 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+[assembly: AssemblyTitle("Tango - Machine Studio Storage Module")]
+[assembly: AssemblyVersion("1.0.0.1737")]
+
+[assembly: ComVisible(false)]
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Resources.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Resources.Designer.cs
new file mode 100644
index 000000000..bd2484734
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Resources.Designer.cs
@@ -0,0 +1,62 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.MachineStudio.Storage.Properties {
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if ((resourceMan == null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.MachineStudio.Storage.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Resources.resx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Resources.resx
new file mode 100644
index 000000000..af7dbebba
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Resources.resx
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Settings.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Settings.Designer.cs
new file mode 100644
index 000000000..4076f7f8e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Tango.MachineStudio.Storage.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Settings.settings b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Settings.settings
new file mode 100644
index 000000000..033d7a5e9
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Properties/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/StorageModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/StorageModule.cs
new file mode 100644
index 000000000..882b6fe6c
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/StorageModule.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media.Imaging;
+using Tango.BL.Enumerations;
+using Tango.MachineStudio.Common;
+using Tango.MachineStudio.Storage.Views;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.MachineStudio.Storage
+{
+ [StudioModule(16)]
+ public class StorageModule : StudioModuleBase
+ {
+ public override string Name
+ {
+ get
+ {
+ return "Machine Storage";
+ }
+ }
+
+ public override string Description
+ {
+ get
+ {
+ return "Manage the machine flash file system storage using an interactive explorer.";
+ }
+ }
+
+ public override BitmapSource Image
+ {
+ get
+ {
+ return ResourceHelper.GetImageFromResources("Images/storage.png");
+ }
+ }
+
+ public override Type MainViewType
+ {
+ get
+ {
+ return typeof(MainView);
+ }
+ }
+
+ public override Permissions Permission
+ {
+ get
+ {
+ return Permissions.RunTechnicianModule;
+ }
+ }
+
+ public override void Dispose()
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Tango.MachineStudio.Storage.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Tango.MachineStudio.Storage.csproj
new file mode 100644
index 000000000..e2f41df43
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Tango.MachineStudio.Storage.csproj
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}</ProjectGuid>
+ <OutputType>library</OutputType>
+ <RootNamespace>Tango.MachineStudio.Storage</RootNamespace>
+ <AssemblyName>Tango.MachineStudio.Storage</AssemblyName>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ <Deterministic>true</Deterministic>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\Build\Machine Studio\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\..\Build\Machine Studio\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
+ </Reference>
+ <Reference Include="MaterialDesignColors, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll</HintPath>
+ </Reference>
+ <Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Xml" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xaml">
+ <RequiredTargetFramework>4.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs">
+ <Link>GlobalVersionInfo.cs</Link>
+ </Compile>
+ <Compile Include="StorageModule.cs" />
+ <Compile Include="ViewModelLocator.cs" />
+ <Compile Include="ViewModels\MainViewVM.cs" />
+ <Compile Include="Views\MainView.xaml.cs">
+ <DependentUpon>MainView.xaml</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="packages.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj">
+ <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project>
+ <Name>Tango.BL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj">
+ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
+ <Name>Tango.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj">
+ <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
+ <Name>Tango.Logging</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.SharedUI\Tango.SharedUI.csproj">
+ <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
+ <Name>Tango.SharedUI</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Transport\Tango.Transport.csproj">
+ <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project>
+ <Name>Tango.Transport</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Tango.MachineStudio.Common\Tango.MachineStudio.Common.csproj">
+ <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project>
+ <Name>Tango.MachineStudio.Common</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="Views\MainView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup />
+ <ItemGroup>
+ <Resource Include="Images\storage.png" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModelLocator.cs
new file mode 100644
index 000000000..858fa9209
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModelLocator.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.DI;
+using Tango.MachineStudio.Storage.ViewModels;
+
+namespace Tango.MachineStudio.Storage
+{
+ public static class ViewModelLocator
+ {
+ /// <summary>
+ /// Initializes a new instance of the ViewModelLocator class.
+ /// </summary>
+ static ViewModelLocator()
+ {
+ TangoIOC.Default.Register<MainViewVM>();
+ }
+
+ public static MainViewVM MainViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<MainViewVM>();
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModels/MainViewVM.cs
new file mode 100644
index 000000000..d7eec4d36
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/ViewModels/MainViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.MachineStudio.Common;
+
+namespace Tango.MachineStudio.Storage.ViewModels
+{
+ public class MainViewVM : StudioViewModel
+ {
+ public override void OnApplicationReady()
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml
new file mode 100644
index 000000000..0350dc789
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml
@@ -0,0 +1,14 @@
+<UserControl x:Class="Tango.MachineStudio.Storage.Views.MainView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.Storage.ViewModels"
+ xmlns:global="clr-namespace:Tango.MachineStudio.Storage"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Storage.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+ <Grid>
+
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml.cs
new file mode 100644
index 000000000..be7e82ca5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/Views/MainView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.Storage.Views
+{
+ /// <summary>
+ /// Interaction logic for MainView.xaml
+ /// </summary>
+ public partial class MainView : UserControl
+ {
+ public MainView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/packages.config
new file mode 100644
index 000000000..0580e26aa
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Storage/packages.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="MahApps.Metro" version="1.5.0" targetFramework="net461" />
+ <package id="MaterialDesignColors" version="1.1.2" targetFramework="net461" />
+ <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net461" />
+</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml
index 199c71489..4b7e2ea2c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml
@@ -50,7 +50,7 @@
<Grid Grid.Row="1">
<Border Background="#202020" Margin="0 3 0 0" CornerRadius="3" Padding="5">
<Grid>
- <TextBlock Text="{Binding HeaterState.CurrentValue,StringFormat=0.0,FallbackValue='0.0'}" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="80" FontFamily="{StaticResource digital-7}" Margin="0 0 12 0">
+ <TextBlock Text="{Binding HeaterState.CurrentValue,StringFormat=0.00,FallbackValue='0.00'}" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="80" FontFamily="{StaticResource digital-7}" Margin="0 0 12 0">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#FF6F78"></Setter>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
index 1be69bf1c..6e37a97a2 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
@@ -449,6 +449,10 @@
<Project>{8a65ad6a-a9b4-48c0-9301-4b7434b712f8}</Project>
<Name>Tango.MachineStudio.Statistics</Name>
</ProjectReference>
+ <ProjectReference Include="..\Modules\Tango.MachineStudio.Storage\Tango.MachineStudio.Storage.csproj">
+ <Project>{5991f6b5-ea4e-41e9-a4f6-7d3a50010fd6}</Project>
+ <Name>Tango.MachineStudio.Storage</Name>
+ </ProjectReference>
<ProjectReference Include="..\Modules\Tango.MachineStudio.Stubs\Tango.MachineStudio.Stubs.csproj">
<Project>{22c2aa72-9493-4d0d-b421-8ef9789fb192}</Project>
<Name>Tango.MachineStudio.Stubs</Name>
@@ -595,7 +599,7 @@ copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(Ta
</Target>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_BuildVersioningStyle="None.None.Increment.DeltaBaseYearDayOfYear" BuildVersion_UpdateFileVersion="True" BuildVersion_DetectChanges="True" BuildVersion_UseGlobalSettings="False" />
+ <UserProperties BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="True" BuildVersion_UpdateFileVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.DeltaBaseYearDayOfYear" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj
index 650a66a52..ca9a0a82f 100644
--- a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj
+++ b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj
@@ -85,6 +85,7 @@
<Compile Include="..\Versioning\GlobalVersionInfo.cs">
<Link>GlobalVersionInfo.cs</Link>
</Compile>
+ <Compile Include="Threading\ThreadFactory.cs" />
<Compile Include="Threading\TimeoutTask.cs" />
<None Include="ActiveDirectoryAuthenticationProvider.cs" />
<Compile Include="Commands\RelayCommand.cs" />
@@ -189,7 +190,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
<Import Project="..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
diff --git a/Software/Visual_Studio/Tango.Core/Threading/ThreadFactory.cs b/Software/Visual_Studio/Tango.Core/Threading/ThreadFactory.cs
new file mode 100644
index 000000000..80e4d2d6c
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Core/Threading/ThreadFactory.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Tango.Core.Threading
+{
+ public class ThreadFactory
+ {
+ public static Thread StartNew(Action action)
+ {
+ Thread t = new Thread(() =>
+ {
+ action();
+ });
+ t.IsBackground = true;
+ t.Start();
+ return t;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/StorageManager.cs b/Software/Visual_Studio/Tango.Integration/Operation/StorageManager.cs
deleted file mode 100644
index f6b7e8d28..000000000
--- a/Software/Visual_Studio/Tango.Integration/Operation/StorageManager.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-using Google.Protobuf;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.Core;
-using Tango.Logging;
-using Tango.PMR.IO;
-
-namespace Tango.Integration.Operation
-{
- public class StorageManager : ExtendedObject
- {
- private IMachineOperator _operator;
-
- public StorageManager(IMachineOperator machineOperator)
- {
- _operator = machineOperator;
- }
-
- private void EnsureOperator()
- {
- if (_operator.State != Transport.TransportComponentState.Connected)
- {
- throw new InvalidOperationException("Error executing storage command. Machine operator is not connected.");
- }
- }
-
- #region Private Methods
-
- /// <summary>
- /// Logs the request sent.
- /// </summary>
- /// <param name="message">The message.</param>
- protected void LogRequestSent(IMessage message)
- {
- LogManager.Log(String.Format("Sending request '{0}'...{1}{2}", message.GetType().Name, Environment.NewLine, message.ToJsonString()));
- }
-
- /// <summary>
- /// Logs the request failed.
- /// </summary>
- /// <param name="message">The message.</param>
- protected void LogRequestFailed(IMessage message, Exception ex)
- {
- LogManager.Log(String.Format("Request failed '{0}'...{1}{2}{1}{3}", message.GetType().Name, Environment.NewLine, message.ToJsonString(), ex.ToString()), LogCategory.Error);
- }
-
- /// <summary>
- /// Logs the response received.
- /// </summary>
- /// <param name="message">The message.</param>
- protected void LogResponseReceived(IMessage message)
- {
- LogManager.Log(String.Format("Response received '{0}'...{1}{2}", message.GetType().Name, Environment.NewLine, message.ToJsonString()));
- }
-
- #endregion
-
- public async Task Create(FileAttribute attr, String path, String name)
- {
- EnsureOperator();
-
- CreateResponse response = null;
- CreateRequest request = new CreateRequest()
- {
- Attribute = attr,
- Path = path + "/" + name,
- };
-
- try
- {
- response = await _operator.SendRequest<CreateRequest, CreateResponse>(request);
- }
- catch (Exception ex)
- {
- LogRequestFailed(request, ex);
- throw ex;
- }
- }
-
- public async Task Delete(String path)
- {
- EnsureOperator();
-
- DeleteResponse response = null;
- DeleteRequest request = new DeleteRequest()
- {
- Path = path,
- };
-
- try
- {
- response = await _operator.SendRequest<DeleteRequest, DeleteResponse>(request);
- }
- catch (Exception ex)
- {
- LogRequestFailed(request, ex);
- throw ex;
- }
- }
-
- public async Task<GetStorageInfoResponse> GetStorageInfo()
- {
- EnsureOperator();
-
- GetStorageInfoResponse response = null;
- GetStorageInfoRequest request = new GetStorageInfoRequest();
-
- try
- {
- response = await _operator.SendRequest<GetStorageInfoRequest, GetStorageInfoResponse>(request);
- }
- catch (Exception ex)
- {
- LogRequestFailed(request, ex);
- throw ex;
- }
-
- return response;
- }
-
- public async Task<List<FileInfo>> GetFiles(String path)
- {
- EnsureOperator();
-
- GetFilesResponse response = null;
- GetFilesRequest request = new GetFilesRequest();
-
- try
- {
- response = await _operator.SendRequest<GetFilesRequest, GetFilesResponse>(request);
- }
- catch (Exception ex)
- {
- LogRequestFailed(request, ex);
- throw ex;
- }
-
- return response.Items.ToList();
- }
- }
-}
diff --git a/Software/Visual_Studio/Tango.Integration/Storage/StorageDrive.cs b/Software/Visual_Studio/Tango.Integration/Storage/StorageDrive.cs
new file mode 100644
index 000000000..c313ac0cb
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Storage/StorageDrive.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core;
+
+namespace Tango.Integration.Storage
+{
+ public class StorageDrive : ExtendedObject
+ {
+ public int Capacity { get; set; }
+ public int FreeSpace { get; set; }
+ public String Root { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Storage/StorageFile.cs b/Software/Visual_Studio/Tango.Integration/Storage/StorageFile.cs
new file mode 100644
index 000000000..e2e5fb9df
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Storage/StorageFile.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.Integration.Storage
+{
+ public class StorageFile : StorageItem
+ {
+ private int _length;
+ public int Length
+ {
+ get { return _length; }
+ set { _length = value; RaisePropertyChangedAuto(); }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs b/Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs
new file mode 100644
index 000000000..72a4b2c87
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandler.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core;
+
+namespace Tango.Integration.Storage
+{
+ public class StorageFileHandler : ExtendedObject
+ {
+ private Action _cancelAction;
+
+ public event EventHandler<StorageFileHandlerProgressEventArgs> Progress;
+ public event EventHandler Completed;
+ public event EventHandler Canceled;
+ public event EventHandler<Exception> Failed;
+
+ internal StorageFileHandler()
+ {
+
+ }
+
+ internal StorageFileHandler(Action cancelAction)
+ {
+ _cancelAction = cancelAction;
+ }
+
+ private long _current;
+ public long Current
+ {
+ get { return _current; }
+ internal set
+ {
+ _current = value; RaisePropertyChangedAuto();
+ Progress?.Invoke(this, new StorageFileHandlerProgressEventArgs()
+ {
+ Current = _current,
+ Total = _total,
+ });
+ }
+ }
+
+ private long _total;
+ public long Total
+ {
+ get { return _total; }
+ internal set { _total = value; RaisePropertyChangedAuto(); }
+ }
+
+ public Task Cancel()
+ {
+ return Task.Factory.StartNew(() =>
+ {
+ _cancelAction.Invoke();
+ });
+ }
+
+ internal void RaiseCompleted()
+ {
+ Completed?.Invoke(this, new EventArgs());
+ }
+
+ internal void RaiseCanceled()
+ {
+ Canceled?.Invoke(this, new EventArgs());
+ }
+
+ internal void RaiseFailed(Exception ex)
+ {
+ Failed?.Invoke(this, ex);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandlerProgressEventArgs.cs b/Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandlerProgressEventArgs.cs
new file mode 100644
index 000000000..b873ff7b3
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Storage/StorageFileHandlerProgressEventArgs.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.Integration.Storage
+{
+ public class StorageFileHandlerProgressEventArgs : EventArgs
+ {
+ public long Current { get; set; }
+ public long Total { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Storage/StorageFolder.cs b/Software/Visual_Studio/Tango.Integration/Storage/StorageFolder.cs
new file mode 100644
index 000000000..ba595c711
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Storage/StorageFolder.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.Integration.Storage
+{
+ public class StorageFolder : StorageItem
+ {
+ public ReadOnlyCollection<StorageItem> Items { get; set; }
+
+ public StorageFolder()
+ {
+ Items = new ReadOnlyCollection<StorageItem>(new List<StorageItem>());
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Storage/StorageItem.cs b/Software/Visual_Studio/Tango.Integration/Storage/StorageItem.cs
new file mode 100644
index 000000000..a39c309e2
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Storage/StorageItem.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core;
+
+namespace Tango.Integration.Storage
+{
+ public abstract class StorageItem : ExtendedObject
+ {
+ private String _path;
+ public String Path
+ {
+ get { return _path; }
+ set { _path = value; RaisePropertyChangedAuto(); }
+ }
+
+ public String Name
+ {
+ get { return System.IO.Path.GetFileName(Path); }
+ }
+ public String Parent
+ {
+ get
+ {
+ var parent = Directory.GetParent(Path);
+ return parent.FullName.Replace(parent.Root.FullName, "/").Replace("\\", "/");
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Storage/StorageManager.cs b/Software/Visual_Studio/Tango.Integration/Storage/StorageManager.cs
new file mode 100644
index 000000000..1642bd1f1
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Integration/Storage/StorageManager.cs
@@ -0,0 +1,368 @@
+using Google.Protobuf;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core;
+using Tango.Core.Commands;
+using Tango.Core.Threading;
+using Tango.Logging;
+using Tango.PMR.IO;
+using Tango.Transport;
+
+namespace Tango.Integration.Storage
+{
+ public class StorageManager : ExtendedObject
+ {
+ private ITransporter _transporter;
+
+ #region Properties
+
+ private String _currentPath;
+ /// <summary>
+ /// Gets or sets the current path.
+ /// </summary>
+ public String CurrentPath
+ {
+ get { return _currentPath; }
+ set { _currentPath = value; RaisePropertyChangedAuto(); }
+ }
+
+ private StorageFolder _currentFolder;
+ public StorageFolder CurrentFolder
+ {
+ get { return _currentFolder; }
+ set { _currentFolder = value; RaisePropertyChangedAuto(); }
+ }
+
+ private StorageDrive _storageDrive;
+ public StorageDrive StorageDrive
+ {
+ get { return _storageDrive; }
+ set { _storageDrive = value; RaisePropertyChangedAuto(); }
+ }
+
+ #endregion
+
+ #region Commands
+
+ /// <summary>
+ /// Gets or sets the back command.
+ /// </summary>
+ public RelayCommand BackCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the refresh command.
+ /// </summary>
+ public RelayCommand RefreshCommand { get; set; }
+
+ #endregion
+
+ #region Constructor
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="StorageManager"/> class.
+ /// </summary>
+ /// <param name="transporter">The transporter.</param>
+ public StorageManager(ITransporter transporter)
+ {
+ _transporter = transporter;
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ /// <summary>
+ /// Ensures the transporter is connected.
+ /// </summary>
+ /// <exception cref="System.InvalidOperationException">Error executing storage command. Transporter is not connected.</exception>
+ private void EnsureTransporter()
+ {
+ if (_transporter.State != TransportComponentState.Connected)
+ {
+ throw new InvalidOperationException("Error executing storage command. Transporter is not connected.");
+ }
+ }
+
+ #endregion
+
+ #region Protected Methods
+
+ /// <summary>
+ /// Logs the request sent.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ protected void LogRequestSent(IMessage message)
+ {
+ LogManager.Log(String.Format("Sending request '{0}'...{1}{2}", message.GetType().Name, Environment.NewLine, message.ToJsonString()), LogCategory.Debug);
+ }
+
+ /// <summary>
+ /// Logs the request failed.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ protected void LogRequestFailed(IMessage message, Exception ex)
+ {
+ LogManager.Log(String.Format("Request failed '{0}'...{1}{2}{1}{3}", message.GetType().Name, Environment.NewLine, message.ToJsonString(), ex.ToString()), LogCategory.Error);
+ }
+
+ /// <summary>
+ /// Logs the response received.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ protected void LogResponseReceived(IMessage message)
+ {
+ LogManager.Log(String.Format("Response received '{0}'...{1}{2}", message.GetType().Name, Environment.NewLine, message.ToJsonString()), LogCategory.Debug);
+ }
+
+ #endregion
+
+ public async Task<StorageDrive> GetStorageDrive()
+ {
+ EnsureTransporter();
+
+ GetStorageInfoResponse response = null;
+ GetStorageInfoRequest request = new GetStorageInfoRequest();
+
+ try
+ {
+ response = await _transporter.SendRequest<GetStorageInfoRequest, GetStorageInfoResponse>(request);
+ }
+ catch (Exception ex)
+ {
+ LogRequestFailed(request, ex);
+ throw ex;
+ }
+
+ StorageDrive = new StorageDrive()
+ {
+ Capacity = response.Capacity,
+ FreeSpace = response.FreeSpace,
+ Root = response.Root,
+ };
+
+ return StorageDrive;
+ }
+
+ public Task<StorageFolder> GetRootFolder()
+ {
+ return GetFolder(new StorageFolder()
+ {
+ Path = StorageDrive.Root,
+ });
+ }
+
+ public Task<StorageFolder> GetFolder(StorageFolder folder)
+ {
+ return GetFolder(folder.Path);
+ }
+
+ public async Task<StorageFolder> GetFolder(String path)
+ {
+ EnsureTransporter();
+
+ GetFilesResponse response = null;
+ GetFilesRequest request = new GetFilesRequest();
+ request.Path = path;
+
+ try
+ {
+ response = await _transporter.SendRequest<GetFilesRequest, GetFilesResponse>(request);
+ }
+ catch (Exception ex)
+ {
+ LogRequestFailed(request, ex);
+ throw ex;
+ }
+
+ StorageFolder sf = new StorageFolder();
+ sf.Path = path;
+
+ List<StorageItem> items = new List<StorageItem>();
+
+ foreach (var item in response.Items)
+ {
+ if (!item.Attribute.HasFlag(FileAttribute.Directory))
+ {
+ items.Add(new StorageFile()
+ {
+ Length = item.Length,
+ Path = item.FullPath,
+ });
+ }
+ else
+ {
+ items.Add(new StorageFolder()
+ {
+ Path = item.FullPath,
+ });
+ }
+ }
+
+ sf.Items = new ReadOnlyCollection<StorageItem>(items);
+
+ _currentFolder = sf;
+ _currentPath = sf.Path;
+ RaisePropertyChanged(nameof(CurrentFolder));
+ RaisePropertyChanged(nameof(CurrentPath));
+
+ return sf;
+ }
+
+ public async Task<StorageFileHandler> UploadFile(String path, Stream stream)
+ {
+ FileUploadRequest request = new FileUploadRequest();
+ request.FileName = path;
+ request.Length = stream.Length;
+
+ var fileUploadResponse = await _transporter.SendRequest<FileUploadRequest, FileUploadResponse>(request);
+
+ String uploadId = fileUploadResponse.Message.UploadID;
+ long max_length = fileUploadResponse.Message.MaxChunkLength;
+ bool canceled = false;
+
+ StorageFileHandler handler = new StorageFileHandler(() =>
+ {
+ canceled = true;
+ });
+
+ handler.Total = stream.Length;
+
+ ThreadFactory.StartNew(() =>
+ {
+ try
+ {
+ while (stream.Position < stream.Length)
+ {
+ if (!canceled)
+ {
+ byte[] buffer = new byte[Math.Min(max_length, stream.Length - stream.Position)];
+ stream.Read(buffer, 0, buffer.Length);
+
+ FileChunkUploadRequest chunk = new FileChunkUploadRequest();
+ chunk.UploadID = uploadId;
+ chunk.Buffer = ByteString.CopyFrom(buffer);
+
+ var chunk_response = _transporter.SendRequest<FileChunkUploadRequest, FileChunkUploadResponse>(chunk).Result;
+
+ if (chunk_response.Message.IsCanceled)
+ {
+ canceled = true;
+ handler.RaiseFailed(new IOException("The storage device controller has canceled the current upload."));
+ return;
+ }
+
+ handler.Current = stream.Position;
+ }
+ else
+ {
+ var a = _transporter.SendRequest<FileChunkUploadRequest, FileChunkUploadResponse>(new FileChunkUploadRequest()
+ {
+ IsCanceled = true,
+ }).Result;
+
+ handler.RaiseCanceled();
+
+ return;
+ }
+ }
+
+ if (!canceled)
+ {
+ handler.RaiseCompleted();
+ }
+ }
+ catch (Exception ex)
+ {
+ handler.RaiseFailed(ex);
+ }
+ });
+
+ return handler;
+ }
+
+ public async Task<StorageFileHandler> DownloadFile(StorageFile file, Stream stream)
+ {
+ FileDownloadRequest request = new FileDownloadRequest();
+ request.FileName = file.Path;
+
+ var fileDownloadResponse = await _transporter.SendRequest<FileDownloadRequest, FileDownloadResponse>(request);
+
+ String download_id = fileDownloadResponse.Message.DownloadID;
+ long max_length = fileDownloadResponse.Message.MaxChunkLength;
+ bool canceled = false;
+
+ StorageFileHandler handler = new StorageFileHandler(() =>
+ {
+ canceled = true;
+ });
+
+ handler.Total = file.Length;
+
+ ThreadFactory.StartNew(() =>
+ {
+ try
+ {
+ while (stream.Length < file.Length)
+ {
+ if (!canceled)
+ {
+ FileChunkDownloadRequest chunk = new FileChunkDownloadRequest();
+ chunk.DownloadID = download_id;
+ chunk.FileName = file.Path;
+ chunk.Position = stream.Length;
+
+ var chunk_response = _transporter.SendRequest<FileChunkDownloadRequest, FileChunkDownloadResponse>(chunk).Result;
+
+ if (chunk_response.Message.IsCanceled)
+ {
+ canceled = true;
+ handler.RaiseFailed(new IOException("The storage device controller has canceled the current download."));
+ return;
+ }
+
+ byte[] buffer = chunk_response.Message.Buffer.ToByteArray();
+ stream.Write(buffer, 0, buffer.Length);
+
+ handler.Current = stream.Length;
+ }
+ else
+ {
+ var a = _transporter.SendRequest<FileChunkDownloadRequest, FileChunkDownloadResponse>(new FileChunkDownloadRequest()
+ {
+ IsCanceled = true,
+ }).Result;
+
+ handler.RaiseCanceled();
+ return;
+ }
+ }
+
+ if (!canceled)
+ {
+ handler.RaiseCompleted();
+ }
+
+ }
+ catch (Exception ex)
+ {
+ handler.RaiseFailed(ex);
+ }
+ });
+
+ return handler;
+ }
+
+ public async Task DeleteItem(StorageItem item)
+ {
+ await _transporter.SendRequest<DeleteRequest, DeleteResponse>(new DeleteRequest()
+ {
+ Path = item.Path,
+ });
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
index a5620aa3a..d96191191 100644
--- a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
+++ b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj
@@ -102,7 +102,13 @@
<Compile Include="ExternalBridge\ExternalBridgeTcpClient.cs" />
<Compile Include="ExternalBridge\ExternalBridgeUsbClient.cs" />
<Compile Include="ExternalBridge\IExternalBridgeClient.cs" />
- <Compile Include="Operation\StorageManager.cs" />
+ <Compile Include="Storage\StorageDrive.cs" />
+ <Compile Include="Storage\StorageFile.cs" />
+ <Compile Include="Storage\StorageFileHandler.cs" />
+ <Compile Include="Storage\StorageFileHandlerProgressEventArgs.cs" />
+ <Compile Include="Storage\StorageFolder.cs" />
+ <Compile Include="Storage\StorageItem.cs" />
+ <Compile Include="Storage\StorageManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ExternalBridge\IExternalBridgeSecureClient.cs" />
<Compile Include="ExternalBridge\IExternalBridgeService.cs" />
@@ -153,7 +159,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.PMR/IO/FileChunkDownloadResponse.cs b/Software/Visual_Studio/Tango.PMR/IO/FileChunkDownloadResponse.cs
index e3af12348..c215e51d1 100644
--- a/Software/Visual_Studio/Tango.PMR/IO/FileChunkDownloadResponse.cs
+++ b/Software/Visual_Studio/Tango.PMR/IO/FileChunkDownloadResponse.cs
@@ -23,13 +23,13 @@ namespace Tango.PMR.IO {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Ch9GaWxlQ2h1bmtEb3dubG9hZFJlc3BvbnNlLnByb3RvEgxUYW5nby5QTVIu",
- "SU8iUwoZRmlsZUNodW5rRG93bmxvYWRSZXNwb25zZRISCgpEb3dubG9hZElE",
- "GAEgASgJEg4KBkJ1ZmZlchgCIAEoDBISCgpJc0NhbmNlbGVkGAMgASgIQhgK",
- "FmNvbS50d2luZS50YW5nby5wbXIuaW9iBnByb3RvMw=="));
+ "SU8iPwoZRmlsZUNodW5rRG93bmxvYWRSZXNwb25zZRIOCgZCdWZmZXIYAiAB",
+ "KAwSEgoKSXNDYW5jZWxlZBgDIAEoCEIYChZjb20udHdpbmUudGFuZ28ucG1y",
+ "LmlvYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.FileChunkDownloadResponse), global::Tango.PMR.IO.FileChunkDownloadResponse.Parser, new[]{ "DownloadID", "Buffer", "IsCanceled" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.FileChunkDownloadResponse), global::Tango.PMR.IO.FileChunkDownloadResponse.Parser, new[]{ "Buffer", "IsCanceled" }, null, null, null)
}));
}
#endregion
@@ -60,7 +60,6 @@ namespace Tango.PMR.IO {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public FileChunkDownloadResponse(FileChunkDownloadResponse other) : this() {
- downloadID_ = other.downloadID_;
buffer_ = other.buffer_;
isCanceled_ = other.isCanceled_;
}
@@ -70,17 +69,6 @@ namespace Tango.PMR.IO {
return new FileChunkDownloadResponse(this);
}
- /// <summary>Field number for the "DownloadID" field.</summary>
- public const int DownloadIDFieldNumber = 1;
- private string downloadID_ = "";
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public string DownloadID {
- get { return downloadID_; }
- set {
- downloadID_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
- }
- }
-
/// <summary>Field number for the "Buffer" field.</summary>
public const int BufferFieldNumber = 2;
private pb::ByteString buffer_ = pb::ByteString.Empty;
@@ -116,7 +104,6 @@ namespace Tango.PMR.IO {
if (ReferenceEquals(other, this)) {
return true;
}
- if (DownloadID != other.DownloadID) return false;
if (Buffer != other.Buffer) return false;
if (IsCanceled != other.IsCanceled) return false;
return true;
@@ -125,7 +112,6 @@ namespace Tango.PMR.IO {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- if (DownloadID.Length != 0) hash ^= DownloadID.GetHashCode();
if (Buffer.Length != 0) hash ^= Buffer.GetHashCode();
if (IsCanceled != false) hash ^= IsCanceled.GetHashCode();
return hash;
@@ -138,10 +124,6 @@ namespace Tango.PMR.IO {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
- if (DownloadID.Length != 0) {
- output.WriteRawTag(10);
- output.WriteString(DownloadID);
- }
if (Buffer.Length != 0) {
output.WriteRawTag(18);
output.WriteBytes(Buffer);
@@ -155,9 +137,6 @@ namespace Tango.PMR.IO {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
- if (DownloadID.Length != 0) {
- size += 1 + pb::CodedOutputStream.ComputeStringSize(DownloadID);
- }
if (Buffer.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeBytesSize(Buffer);
}
@@ -172,9 +151,6 @@ namespace Tango.PMR.IO {
if (other == null) {
return;
}
- if (other.DownloadID.Length != 0) {
- DownloadID = other.DownloadID;
- }
if (other.Buffer.Length != 0) {
Buffer = other.Buffer;
}
@@ -191,10 +167,6 @@ namespace Tango.PMR.IO {
default:
input.SkipLastField();
break;
- case 10: {
- DownloadID = input.ReadString();
- break;
- }
case 18: {
Buffer = input.ReadBytes();
break;
diff --git a/Software/Visual_Studio/Tango.PMR/IO/FileDownloadRequest.cs b/Software/Visual_Studio/Tango.PMR/IO/FileDownloadRequest.cs
index aa92ba3eb..8a00ca699 100644
--- a/Software/Visual_Studio/Tango.PMR/IO/FileDownloadRequest.cs
+++ b/Software/Visual_Studio/Tango.PMR/IO/FileDownloadRequest.cs
@@ -22,13 +22,13 @@ namespace Tango.PMR.IO {
static FileDownloadRequestReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "ChlGaWxlRG93bmxvYWRSZXF1ZXN0LnByb3RvEgxUYW5nby5QTVIuSU8iNwoT",
- "RmlsZURvd25sb2FkUmVxdWVzdBIQCghGaWxlTmFtZRgBIAEoCRIOCgZMZW5n",
- "dGgYAiABKANCGAoWY29tLnR3aW5lLnRhbmdvLnBtci5pb2IGcHJvdG8z"));
+ "ChlGaWxlRG93bmxvYWRSZXF1ZXN0LnByb3RvEgxUYW5nby5QTVIuSU8iJwoT",
+ "RmlsZURvd25sb2FkUmVxdWVzdBIQCghGaWxlTmFtZRgBIAEoCUIYChZjb20u",
+ "dHdpbmUudGFuZ28ucG1yLmlvYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.FileDownloadRequest), global::Tango.PMR.IO.FileDownloadRequest.Parser, new[]{ "FileName", "Length" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.FileDownloadRequest), global::Tango.PMR.IO.FileDownloadRequest.Parser, new[]{ "FileName" }, null, null, null)
}));
}
#endregion
@@ -60,7 +60,6 @@ namespace Tango.PMR.IO {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public FileDownloadRequest(FileDownloadRequest other) : this() {
fileName_ = other.fileName_;
- length_ = other.length_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -79,17 +78,6 @@ namespace Tango.PMR.IO {
}
}
- /// <summary>Field number for the "Length" field.</summary>
- public const int LengthFieldNumber = 2;
- private long length_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public long Length {
- get { return length_; }
- set {
- length_ = value;
- }
- }
-
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as FileDownloadRequest);
@@ -104,7 +92,6 @@ namespace Tango.PMR.IO {
return true;
}
if (FileName != other.FileName) return false;
- if (Length != other.Length) return false;
return true;
}
@@ -112,7 +99,6 @@ namespace Tango.PMR.IO {
public override int GetHashCode() {
int hash = 1;
if (FileName.Length != 0) hash ^= FileName.GetHashCode();
- if (Length != 0L) hash ^= Length.GetHashCode();
return hash;
}
@@ -127,10 +113,6 @@ namespace Tango.PMR.IO {
output.WriteRawTag(10);
output.WriteString(FileName);
}
- if (Length != 0L) {
- output.WriteRawTag(16);
- output.WriteInt64(Length);
- }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -139,9 +121,6 @@ namespace Tango.PMR.IO {
if (FileName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName);
}
- if (Length != 0L) {
- size += 1 + pb::CodedOutputStream.ComputeInt64Size(Length);
- }
return size;
}
@@ -153,9 +132,6 @@ namespace Tango.PMR.IO {
if (other.FileName.Length != 0) {
FileName = other.FileName;
}
- if (other.Length != 0L) {
- Length = other.Length;
- }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -170,10 +146,6 @@ namespace Tango.PMR.IO {
FileName = input.ReadString();
break;
}
- case 16: {
- Length = input.ReadInt64();
- break;
- }
}
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoResponse.cs b/Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoResponse.cs
index 46dc2e308..86f6a900b 100644
--- a/Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoResponse.cs
+++ b/Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoResponse.cs
@@ -23,13 +23,13 @@ namespace Tango.PMR.IO {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChxHZXRTdG9yYWdlSW5mb1Jlc3BvbnNlLnByb3RvEgxUYW5nby5QTVIuSU8i",
- "PQoWR2V0U3RvcmFnZUluZm9SZXNwb25zZRIQCghDYXBhY2l0eRgBIAEoBRIR",
- "CglGcmVlU3BhY2UYAiABKAVCGAoWY29tLnR3aW5lLnRhbmdvLnBtci5pb2IG",
- "cHJvdG8z"));
+ "SwoWR2V0U3RvcmFnZUluZm9SZXNwb25zZRIQCghDYXBhY2l0eRgBIAEoBRIR",
+ "CglGcmVlU3BhY2UYAiABKAUSDAoEUm9vdBgDIAEoCUIYChZjb20udHdpbmUu",
+ "dGFuZ28ucG1yLmlvYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.GetStorageInfoResponse), global::Tango.PMR.IO.GetStorageInfoResponse.Parser, new[]{ "Capacity", "FreeSpace" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.GetStorageInfoResponse), global::Tango.PMR.IO.GetStorageInfoResponse.Parser, new[]{ "Capacity", "FreeSpace", "Root" }, null, null, null)
}));
}
#endregion
@@ -62,6 +62,7 @@ namespace Tango.PMR.IO {
public GetStorageInfoResponse(GetStorageInfoResponse other) : this() {
capacity_ = other.capacity_;
freeSpace_ = other.freeSpace_;
+ root_ = other.root_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -91,6 +92,17 @@ namespace Tango.PMR.IO {
}
}
+ /// <summary>Field number for the "Root" field.</summary>
+ public const int RootFieldNumber = 3;
+ private string root_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Root {
+ get { return root_; }
+ set {
+ root_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as GetStorageInfoResponse);
@@ -106,6 +118,7 @@ namespace Tango.PMR.IO {
}
if (Capacity != other.Capacity) return false;
if (FreeSpace != other.FreeSpace) return false;
+ if (Root != other.Root) return false;
return true;
}
@@ -114,6 +127,7 @@ namespace Tango.PMR.IO {
int hash = 1;
if (Capacity != 0) hash ^= Capacity.GetHashCode();
if (FreeSpace != 0) hash ^= FreeSpace.GetHashCode();
+ if (Root.Length != 0) hash ^= Root.GetHashCode();
return hash;
}
@@ -132,6 +146,10 @@ namespace Tango.PMR.IO {
output.WriteRawTag(16);
output.WriteInt32(FreeSpace);
}
+ if (Root.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Root);
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -143,6 +161,9 @@ namespace Tango.PMR.IO {
if (FreeSpace != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(FreeSpace);
}
+ if (Root.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Root);
+ }
return size;
}
@@ -157,6 +178,9 @@ namespace Tango.PMR.IO {
if (other.FreeSpace != 0) {
FreeSpace = other.FreeSpace;
}
+ if (other.Root.Length != 0) {
+ Root = other.Root;
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -175,6 +199,10 @@ namespace Tango.PMR.IO {
FreeSpace = input.ReadInt32();
break;
}
+ case 26: {
+ Root = input.ReadString();
+ break;
+ }
}
}
}
diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln
index e796281a7..910b4d1ea 100644
--- a/Software/Visual_Studio/Tango.sln
+++ b/Software/Visual_Studio/Tango.sln
@@ -238,6 +238,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.PPC.Storage", "PPC\Mo
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.PPC.Events", "PPC\Modules\Tango.PPC.Events\Tango.PPC.Events.csproj", "{A8077B3E-8DD6-4572-8EC4-A27BDC91B70A}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MachineStudio.Storage", "MachineStudio\Modules\Tango.MachineStudio.Storage\Tango.MachineStudio.Storage.csproj", "{5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
AppVeyor|Any CPU = AppVeyor|Any CPU
@@ -4241,6 +4243,46 @@ Global
{A8077B3E-8DD6-4572-8EC4-A27BDC91B70A}.Release|x64.Build.0 = Release|Any CPU
{A8077B3E-8DD6-4572-8EC4-A27BDC91B70A}.Release|x86.ActiveCfg = Release|Any CPU
{A8077B3E-8DD6-4572-8EC4-A27BDC91B70A}.Release|x86.Build.0 = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.AppVeyor|Any CPU.Build.0 = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.AppVeyor|ARM.ActiveCfg = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.AppVeyor|ARM.Build.0 = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.AppVeyor|ARM64.Build.0 = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.AppVeyor|x64.ActiveCfg = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.AppVeyor|x64.Build.0 = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.AppVeyor|x86.ActiveCfg = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.AppVeyor|x86.Build.0 = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Debug|ARM.Build.0 = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Debug|x64.Build.0 = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Debug|x86.Build.0 = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.DefaultBuild|ARM.Build.0 = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.DefaultBuild|x64.Build.0 = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.DefaultBuild|x86.Build.0 = Debug|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Release|ARM.ActiveCfg = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Release|ARM.Build.0 = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Release|ARM64.Build.0 = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Release|x64.ActiveCfg = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Release|x64.Build.0 = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Release|x86.ActiveCfg = Release|Any CPU
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -4314,6 +4356,7 @@ Global
{4EDCF067-E377-42CB-A18C-8368CF484577} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760}
{04FEBB02-F782-4B96-B47D-F6902AFA43BE} = {0048447D-1D94-4E60-9DAD-7349C777CB4E}
{A8077B3E-8DD6-4572-8EC4-A27BDC91B70A} = {0048447D-1D94-4E60-9DAD-7349C777CB4E}
+ {5991F6B5-EA4E-41E9-A4F6-7D3A50010FD6} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6}