Example #1
0
 public PackConfigAPI()
 {
     Apis.Add(_GetPackConfigBySKUNO.FunctionName, _GetPackConfigBySKUNO);
     Apis.Add(_AlertPackConfig.FunctionName, _AlertPackConfig);
     Apis.Add(_GetPackType.FunctionName, _GetPackType);
     Apis.Add(_GetTransportType.FunctionName, _GetTransportType);
 }
Example #2
0
 static SampleRestServer()
 {
     Apis.Add(Http.Method.Get, "/plaintext", Api.HelloWorld, WriteResponseForHelloWorld);
     Apis.Add(Http.Method.Get, "/time", Api.GetTime, WriteResponseForGetTime);
     Apis.Add(Http.Method.Get, "/json", Api.GetJson, WriteResponseForGetJson);
     Apis.Add(Http.Method.Post, "/jsonpost", Api.PostJson, WriteResponseForPostJson); // post body along the lines of: "{ "Count" = 3 }"
 }
Example #3
0
 public SkuSeries()
 {
     this.Apis.Add(_FetchCurrentSeries.FunctionName, _FetchCurrentSeries);
     this.Apis.Add(_DeleteSeriesById.FunctionName, _DeleteSeriesById);
     this.Apis.Add(_AddNewSeries.FunctionName, _AddNewSeries);
     Apis.Add(_UpdateSeries.FunctionName, _UpdateSeries);
 }
Example #4
0
 public LabelConfig()
 {
     Apis.Add(_GetLabelConfigBySkuno.FunctionName, _GetLabelConfigBySkuno);
     Apis.Add(_AlertLabelConfig.FunctionName, _AlertLabelConfig);
     Apis.Add(_RemoveLabelConfig.FunctionName, _RemoveLabelConfig);
     Apis.Add(_GetLabelTypes.FunctionName, _GetLabelTypes);
 }
 public MESMessageConfig()
 {
     this.Apis.Add(FGetAllMESMessage.FunctionName, FGetAllMESMessage);
     this.Apis.Add(FUpdateMESMessage.FunctionName, FUpdateMESMessage);
     this.Apis.Add(FAddMESMessage.FunctionName, FAddMESMessage);
     this.Apis.Add(FDeleteMESMessageByID.FunctionName, FDeleteMESMessageByID);
     Apis.Add(_GetDetail.FunctionName, _GetDetail);
 }
Example #6
0
 public ConvertWorkorder()
 {
     Apis.Add(_GetWoConvertList.FunctionName, _GetWoConvertList);
     Apis.Add(_GetWoInfoByWo.FunctionName, _GetWoInfoByWo);
     Apis.Add(_GetWoInfoById.FunctionName, _GetWoInfoById);
     Apis.Add(_GetWoType.FunctionName, _GetWoType);
     Apis.Add(_GetStationBySkuno.FunctionName, _GetStationBySkuno);
     Apis.Add(_GetRouteBySkuno.FunctionName, _GetRouteBySkuno);
     Apis.Add(_GetKeyPartBySkuno.FunctionName, _GetKeyPartBySkuno);
     Apis.Add(_SubmitWoInfo.FunctionName, _SubmitWoInfo);
 }
Example #7
0
 public Fileuplaod()
 {
     Apis.Add(_UpLoadFile.FunctionName, _UpLoadFile);
     Apis.Add(_GetFileUseType.FunctionName, _GetFileUseType);
     Apis.Add(_GetFileByName.FunctionName, _GetFileByName);
     Apis.Add(_GetFileList.FunctionName, _GetFileList);
     Apis.Add(_FileDownLoad.FunctionName, _FileDownLoad);
     Apis.Add(_GetFileHisListByName.FunctionName, _GetFileHisListByName);
     Apis.Add(_UpLoadLabelFile.FunctionName, _UpLoadLabelFile);
     Apis.Add(_GetLabelList.FunctionName, _GetLabelList);
 }
Example #8
0
        public override bool CustomActivate()
        {
            int commNumber = 1;

            foreach (var commConfig in Properties.CommConnections)
            {
                var commPort = new EssentialCommsPort(commConfig.control, string.Format("{0}-{1}", Key, commConfig.joinNumber));
                CommDictionary.Add(commConfig.joinNumber, commPort);
                commNumber++;
            }

            foreach (var Ipid in Properties.EiscApiIpids)
            {
                var ApiEisc = new BridgeApiEisc(Ipid);
                Apis.Add(ApiEisc);
                foreach (var commConnection in CommDictionary)
                {
                    Debug.Console(0, "Joining Api{0} to comm {1}", Ipid, commConnection.Key);
                    var tempComm = commConnection.Value;
                    var tempJoin = (uint)commConnection.Key;
                    EssentialComApiMap ApiMap = new EssentialComApiMap(ApiEisc, (uint)tempJoin);

                    tempComm.Outputs.Add(ApiMap);
                    // Check for ApiMap Overide Values here

                    ApiEisc.Eisc.SetBoolSigAction(tempJoin, b => {
                        if (b)
                        {
                            tempComm.Comm.Connect();
                        }
                        else
                        {
                            tempComm.Comm.Disconnect();
                        }
                    });
                    ApiEisc.Eisc.SetStringSigAction(tempJoin, s => tempComm.Comm.SendText(s));

                    tempComm.StatusFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[tempJoin]);
                    tempComm.ConnectedFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[tempJoin]);
                }
            }

            return(true);
        }
Example #9
0
        /// <summary>
        /// Adds one of the properties to the relevant area.
        /// </summary>
        /// <param name="property"></param>
        /// <param name="operation"></param>
        public bool Add(object property, EImportAction operation)
        {
            try
            {
                switch (property)
                {
                case DexihHubVariable a:
                    HubVariables.Add(a, operation);
                    break;

                case DexihDatajob a:
                    Datajobs.Add(a, operation);
                    break;

                case DexihDatalink a:
                    Datalinks.Add(a, operation);
                    break;

                case DexihConnection a:
                    Connections.Add(a, operation);
                    break;

                case DexihTable a:
                    Tables.Add(a, operation);
                    break;

                case DexihColumnValidation a:
                    ColumnValidations.Add(a, operation);
                    break;

                case DexihCustomFunction a:
                    CustomFunctions.Add(a, operation);
                    break;

                case DexihFileFormat a:
                    FileFormats.Add(a, operation);
                    break;

                case DexihRemoteAgentHub a:
                    RemoteAgentHubs.Add(a, operation);
                    break;

                case DexihDatalinkTest a:
                    DatalinkTests.Add(a, operation);
                    break;

                case DexihView a:
                    Views.Add(a, operation);
                    break;

                case DexihApi a:
                    Apis.Add(a, operation);
                    break;

                case DexihDashboard a:
                    Dashboards.Add(a, operation);
                    break;

                case DexihListOfValues a:
                    ListOfValues.Add(a, operation);
                    break;

                case DexihTag a:
                    Tags.Add(a, operation);
                    break;

                case DexihTagObject a:
                    TagObjects.Add(a, operation);
                    break;

                default:
                    return(false);
                }

                return(true);
            } catch (Exception ex)
            {
                throw new AggregateException($"Failed to add item.  {ex.Message}", ex);
            }
        }
Example #10
0
 public InputValueTest()
 {
     Apis.Add(GetSkusAPI.FunctionName, GetSkusAPI);
     Apis.Add(GetPoBuySKUAPI.FunctionName, GetPoBuySKUAPI);
 }
Example #11
0
 public CallReport()
 {
     Apis.Add(_GetReport.FunctionName, _GetReport);
     Apis.Add(_RunReport.FunctionName, _RunReport);
 }
Example #12
0
 public MrbBackFlush()
 {
     //Apis.Add(_MrbBackFlushGT.FunctionName, _MrbBackFlushGT);
     Apis.Add(FDoWOToMRBBackFlush.FunctionName, FDoWOToMRBBackFlush);
     Apis.Add(FDoAssyToMrbBackFlush.FunctionName, FDoAssyToMrbBackFlush);
 }
Example #13
0
 public SNRulerConfig()
 {
     Apis.Add(_GetSNRulers.FunctionName, _GetSNRulers);
     Apis.Add(_GetSNRulerDetail.FunctionName, _GetSNRulerDetail);
 }
Example #14
0
 public LabelConfig()
 {
     Apis.Add(_GetLabelConfigBySkuno.FunctionName, _GetLabelConfigBySkuno);
     Apis.Add(_GetLabelConfigBySkuno.FunctionName, _GetLabelConfigBySkuno);
 }
Example #15
0
 public void AddApi(IApi api)
 {
     Apis.Add(api);
 }