CommandList.cs 4.7 KB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DeviceLibrary
{
    class VCmd
    {
        public static Dictionary<string, string> wslist = new Dictionary<string, string>();
        public static Dictionary<string, string> fslist = new Dictionary<string, string>();

        public const string GetTowerInformation =@"<XmlCommand>
 <Command>GetTowerInformation</Command>
 <Parameter>{0}</Parameter>
</XmlCommand>";
        public const string SimulateStartButton = @"<XmlCommand>
 <Command>SimulateStartButton</Command>
 <Parameter>
 <LoadMaterialInformation>
 <TowerId>{0}</TowerId>
 <Barcode>{1}</Barcode>
 </LoadMaterialInformation>
 </Parameter>
</XmlCommand>";

        public const string ProvideItem = @"<XmlCommand>
 <Command>ProvideItem</Command>
 <Parameter>
 <ProvideItem>
 <Object>Carrier</Object>
 <Name>{0}</Name>
 </ProvideItem>
 </Parameter>
</XmlCommand>";

        public const string UnloadCarrier = @"<XmlCommand>
 <Command>UnloadCarrier</Command>
 <Parameter>
 <CarrierProvideInformation>
 <Name>{0}</Name>
 </CarrierProvideInformation>
 </Parameter>
</XmlCommand>";

        public const string GetCarrierInformation = @"<XmlCommand>
 <Command>GetCarrierInformation</Command>
 <Parameter>{0}</Parameter>
</XmlCommand>";
        static VCmd()
        {
            wslist.Add("GetTowers", @"<XmlCommand>
 <Command>GetTowers</Command>
 <Parameter/>
</XmlCommand>");
            wslist.Add("GetTowerInformation", @"<XmlCommand>
 <Command>GetTowerInformation</Command>
 <Parameter>000800</Parameter>
</XmlCommand>");
            wslist.Add("GetCarrierList", @"<XmlCommand>
 <Command>GetProdSites</Command>
 <Parameter/>
</XmlCommand>");
            wslist.Add("GetProdSites", @"<XmlCommand>
 <Command>GetProdSites</Command>
 <Parameter></Parameter>
</XmlCommand>");
            wslist.Add("GetArticleList", @"<XmlCommand>
 <Command>GetArticleList</Command>
 <Parameter/>
</XmlCommand>");
            wslist.Add("GetArticleInformation", @"<XmlCommand>
 <Command>GetArticleInformation</Command>
 <Parameter>0402c</Parameter>
</XmlCommand>");
            wslist.Add("NewArticle", @"<XmlCommand>
 <Command>NewArticle</Command>
 <Parameter>
 <ArticleInformation>
 <ID>0</ID>
 <CreateDate>0001-01-01T00:00:00</CreateDate>
 <Article>0502c</Article>
 <ANote/>
 <Cycles>0</Cycles>
 <Stock>0</Stock>
 <StockMin>0</StockMin>
 <StockMax>0</StockMax>
 <StockUsed>0</StockUsed>
 <Guessed>false</Guessed>
 <StockValue>0</StockValue>
 <StockVMax>0</StockVMax>
 <ReelCount>0</ReelCount>
 <ReelMin>0</ReelMin>
 <ReelMax>0</ReelMax>
 <ReelsUsed>0</ReelsUsed>
 <MSL/>
 <MSLWatch>false</MSLWatch>
 <ACase/>
 <AGroup/>
 <Poled>false</Poled>
 </ArticleInformation>
 </Parameter>
</XmlCommand>");
            wslist.Add("GetCarrierInformation", @"<XmlCommand>
 <Command>GetCarrierInformation</Command>
 <Parameter>0014379599</Parameter>
</XmlCommand>");
            wslist.Add("NewCarrier", @"<XmlCommand>
 <Command>NewCarrier</Command>
 <Parameter>
 <CarrierInformation>
 <ID>0</ID>
 <Carrier>672529346529</Carrier>
 <CreateDate>0001-01-01T00:00:00</CreateDate>
 <Article>0</Article>
 <ArticleName>0402c</ArticleName>
 <Depot/>
 <DepotDate>0001-01-01T00:00:00</DepotDate>
 <Stock>0</Stock>
 <StockMin>0</StockMin>
 <StockNew>0</StockNew>
 <StockUsed>0</StockUsed>
 <StockTPSys>0</StockTPSys>
 <Guessed>false</Guessed>
 <Cycles>0</Cycles>
 <Outtime>0</Outtime>
 </CarrierInformation>
 </Parameter>
</XmlCommand>");
            wslist.Add("UnloadCarrier", @"<XmlCommand>
 <Command>UnloadCarrier</Command>
 <Parameter>
 <CarrierProvideInformation>
 <Name>A003R0004</Name>
 <Demand>1</Demand>
 <TaskId></TaskId>
 </CarrierProvideInformation>
 </Parameter>
</XmlCommand>");
            wslist.Add("ProvideItem", @"<XmlCommand>
 <Command>ProvideItem</Command>
 <Parameter>
 <ProvideItem>
 <Object>Smartbox</Object>
 <Name />
 <Parts>0</Parts>
 <Units>0</Units>
 <Size>9</Size>
 </ProvideItem>
 </Parameter>
</XmlCommand>");
            wslist.Add("SimulateStartButton", @"<XmlCommand>
 <Command>SimulateStartButton</Command>
 <Parameter>
 <LoadMaterialInformation>
 <TowerId>000800</TowerId>
 <Article></Article>
 <Barcode></Barcode>
 <TaskId></TaskId>
 </LoadMaterialInformation>
 </Parameter>
</XmlCommand>");
            ///=====================================================
            fslist.Add("Create a New Component", @"[Order]
Action=NEW
Object=ARTICLE
Name=componentname
[Data]
ARTICLE=Component name
");
            fslist.Add("Unload a Carrier", @"[Order]
Action=PROVIDE
Object=CARRIER
Name=carriername
Demand=
Target=");
            fslist.Add("Create a New Carrier", @"[Order]
Action=NEW
Object=CARRIER
Name=carriername
[Data]
CARRIER=carriername
ARTICLE=Component
");

        }
    }
}