private void AddThings() { //If you don't want dynamic load things, please comment out the line below var loader = new DynamicThingsLoader(this); //------------------------------Pipeline------------------------------// MyHub.Pipeline.AddMiddleware(new ResourceInfoMidware()); MyHub.Pipeline.AddMiddleware(new NavigationMidware()); //------------------------------Nancy HTTP通信模块------------------------------// var nancyCM = new NancyCommunicationModule(new Uri("http://*****:*****@"./ConfigFile/BasePath.json"); dataServer.dataFileFactoty = new HDF5DataFileFactory(); MyHub.TryAddThing(dataServer, "/", "dataServer"); var tagManager = new TagManagerThing(); MyHub.TryAddThing(tagManager, "/", "tag", @"./ConfigFile/Database.json"); var tagServer = new TagServerThing(); MyHub.TryAddThing(tagServer, "/", "tagServer"); var shotWatcher = new ShotNoWatcherThing(); MyHub.TryAddThing(shotWatcher, "/", "shotWatcher", @"./ConfigFile/ShotNoWatcher.json"); }
private void AddThings() { //If you don't want dynamic load things, please comment out the line below //var loader = new DynamicThingsLoader(this); //------------------------------Pipeline------------------------------// MyHub.Pipeline.AddMiddleware(new ResourceInfoMidware()); MyHub.Pipeline.AddMiddleware(new NavigationMidware()); //------------------------------Nancy HTTP通信模块------------------------------// var nancyCM = new NancyCommunicationModule(new Uri("http://*****:*****@".\ConfigFile\PVs.json"); //------------------------------模拟采集卡------------------------------// var fakeAI = new FakeAIThing(); MyHub.TryAddThing(fakeAI, "/", "fakeCard", 16); //------------------------------NI采集卡------------------------------// var niNonSync = new AIThing(); niNonSync.basicAI = new NIAI(); niNonSync.DataFileFactory = new HDF5DataFileFactory(); MyHub.TryAddThing(niNonSync, @"/", "Card0", new { ConfigFilePath = @".\ConfigFile\niNonSync.json", DataFileParentDirectory = @"D:\Data\ni\Card0" }); ////------------------------------自动 Arm 采集卡与发布上传事件------------------------------// //var aiManagement = new AIManagementThing(); //MyHub.TryAddThing(aiManagement, @"/", "aimanagement", @".\ConfigFile\AIManagement.json"); ////------------------------------上传文件的------------------------------// //var uploader = new DataUpLoadThing(); //MyHub.TryAddThing(uploader, @"/", "uploader", new string[] { // @".\ConfigFile\DataUploadConfig.json", // @".\ConfigFile\DataUpload.csv" // }); ////------------------------------上传炮号提供者------------------------------// //var dic = new DicServerThing(); //MyHub.TryAddThing(dic, "/", "dicServer", @".\ConfigFile\Dic.json"); //------------------------------文件数据服务------------------------------// var dataServer = new DataServerThing(@".\ConfigFile\BasePath.json"); dataServer.dataFileFactoty = new HDF5DataFileFactory(); MyHub.TryAddThing(dataServer, "/", "dataServer"); //------------------------------Mds数据服务------------------------------// var mdsServer = new MdsPlusReaderThing(); MyHub.TryAddThing(mdsServer, "/", "mdsServer", @".\ConfigFile\mdsServer.json"); }