diff --git a/MP-IO/Interfaces/IIOBService.cs b/MP-IO/Interfaces/IIOBService.cs index 072b3e83..85387004 100644 --- a/MP-IO/Interfaces/IIOBService.cs +++ b/MP-IO/Interfaces/IIOBService.cs @@ -1,51 +1,388 @@ namespace MP_IO.Interfaces { + /// + /// SALVA x macchina KVP parametro/valore: + /// GET: IOB/addOptPar/SIMUL_03?pName=PZREQ&pValue=1000 + /// public interface IIOBService { + /// + /// + /// string addOptPar(string id, string pName, string pValue); + + /// + /// AGGIUNGE TASK richiesto x macchina: + /// GET: IOB/addTask2Exe/3010?taskName=startSetup&taskVal=T190406101512 + /// GET: IOB/addTask2Exe/3010?taskName=stopSetup&taskVal=T190406101512 + /// GET: IOB/addTask2Exe/SIMUL_03?taskName=setProg&taskVal=P00000001 + /// GET: IOB/addTask2Exe/SIMUL_03?taskName=setComm&taskVal=ODL_0000123 + /// GET: IOB/addTask2Exe/SIMUL_03?taskName=setArt&taskVal=ART_0000321 + /// + /// + /// + /// string addTask2Exe(string id, string taskName, string taskVal); + + /// + /// Richiesta chiusura manuale ODL x macchina (popup utente): + /// GET: IOB/askCloseODL/SIMUL_03?idxOdl=123 + /// + /// id macchina + /// idx dell'ODL da chiudere + /// bool esecuzione bool askCloseODL(string id, int idxOdl); + + /// + /// Chiude ODL x macchina: + /// GET: IOB/closeODL/SIMUL_03?idxOdl=123&dtEve=20230323151100000&dtCurr=20230323221100000 + /// + /// id macchina + /// idx dell'ODL da chiudere + /// DataOra evento + /// DataOra corrente x fix + /// bool esecuzione bool closeODL(string id, int idxOdl, string dtEve = "", string dtCurr = ""); + + /// + /// Chiude PODL --> ODL x macchina: + /// GET: IOB/closePODL/SIMUL_03?idxPOdl=123&dtEve=20230323151100000&dtCurr=20230323221100000 + /// + /// id macchina + /// idx del POdl da chiudere + /// DataOra evento + /// DataOra corrente x fix + /// bool esecuzione bool closePODL(string id, int idxPOdl, string dtEve = "", string dtCurr = ""); + + /// + /// GET: IOB/enabled/SIMUL_03 + /// + /// + /// string enabled(string id); + + /// + /// Processa una chiamata POST per l'invio di un array Json di oggetti input (EVENTI) + /// POST: IOB/evListJson/SIMUL_03 + /// + /// ID dell'IOB + /// string evListJson(string id); + + /// + /// Sistema Dossier/Snapshot giornalieri x impianto indicato, andando a generare 1 Dossier + /// giornaliero x ogni giornata dall'ultimo registrato alla data corrente + /// es: http://url_site/MP/IO/IOB/fixDailyDossier/SIMUL_03 + /// + /// + /// string fixDailyDossier(string id); + + /// + /// Sistema ODL giornalieri x impianto indicato, andando a generare 1 ODL giornaliero x ogni + /// giornata dall'ultimo ODL aperto alla data corrente + /// es: http://url_site/MP/IO/IOB/fixDailyOdl/SIMUL_03 + /// + /// + /// string fixDailyOdl(string id); + + /// + /// Sistema ODL giornalieri x impianto indicato, andando a generare 1 ODL giornaliero x ogni + /// giornata dall'ultimo ODL aperto alla data corrente + conferma pezzi (es TFT x ODL + /// giornalieri energia) + /// es: http://url_site/MP/IO/IOB/fixDailyOdlConfPzCount/SIMUL_03 + /// + /// + /// string fixDailyOdlConfPzCount(string id); + + /// + /// Invio record flog secco + /// GET: IOB/flog/SIMUL_03?flux=PROG&valore=P0001&dtEve=20161223180600000&dtCurr=20161223180600000&cnt=999&disabKA=false + /// + /// IdxMacchina + /// CodFlux + /// Valore da registrare + /// DataOra evento (IOB time) + /// DataOra corrente (IOB time) + /// Contatore eventi (IOB) + /// Disabilitazione scrittura record KeepAlive + /// string flog(string id, string flux, string valore, string dtEve, string dtCurr, string cnt, string disabKA = "false"); + + /// + /// Invio record flog secco (deprecated) + /// GET: IOB/flog/SIMUL_03?flux=PROG&valore=P0001&dtEve=20161223180600000&dtCurr=20161223180600000&cnt=999 + /// + string flog(string id, string flux, string valore, string dtEve, string dtCurr, string cnt); + + /// + /// Processa una chiamata POST per l'invio di un array Json di oggetti fluxLog + /// PUT: IOB/flogJson/SIMUL_03 + /// + /// ID dell'IOB + /// Disabilitazione della scrittura del record KeepAlive + /// string flogJson(string id, string disabKA = "false"); + + /// + /// Creazione nuovo ODL dato CodXdl + numPz + /// GET: IOB/forceCreatePOdl/SIMUL_03?CodXdl=ABCD_1234&numPz=5 + /// + /// + /// + /// + /// + /// IdxODL creato int forceCreatePOdl(string id, string CodArt, string CodGruppo, int numPz); + + /// + /// Chiude ODL precedente ed avvia uno nuovo (duplicandolo e sitemando quantità RIMANENTE), + /// e CONFERMA produzione... + /// GET: IOB/forceSplitOdl/SIMUL_03 + /// + /// + /// Esito chiamata (OK/vuoto) string forceSplitOdl(string id); + + /// + /// Chiude ODL precedente ed avvia uno nuovo (duplicandolo e sitemando quantità + /// RIMANENTE), e CONFERMA produzione... + /// GET: IOB/forceSplitOdl/SIMUL_03?doConfirm=true&qtyFromLast=true&roundStep=150&extOrderCode=ABCDE1234 + /// + /// id impianto + /// + /// + /// + /// Cod esterno da legare all'ODL x tracciare lotti prod + /// matricola operatore che effettua la fuzione (default = 0) + /// Esito chiamata (OK/vuoto) string forceSplitOdlFull(string id, bool doConfirm, bool qtyFromLast, int? roundStep, string keyRichiesta = "", int matrOpr = 0); + + /// + /// Avvia PODL indicato + /// - se esistesse un ODL da altro PODL --> chiude + /// - se fosse già in essere ODL collegato --> lascia aperto + /// - se fosse chiuso ODL collegato --> duplica PODL e poi avvia nuovo ODL. + /// GET: IOB/forceStartPOdl/SIMUL_03?idxPODL=123&dtEve=20230323151100000&dtCurr=20230323221100000 + /// + /// + /// idx del PDL da avviare + /// data-ora di avvio (opzionale) + /// data-ora attuale (opzionale) + /// matricola operatore (default 0) + /// Esito chiamata (OK/vuoto) string forceStartPOdl(string id, int idxPODL, string dtEve = "", string dtCurr = "", int matrOpr = 0); + + /// + /// Recupera elenco articoli dei PODL correnti: + /// GET: IOB/getArtCurrPODL + /// + /// Json contenente lista oggetti ARTICOLI serializzati string getArtCurrPODL(); + + /// + /// Recupera ArtNum dato CodXdl (per impianti che accettano solo INT in scrittura): + /// GET: IOB/getArtNum/SIMUL_03?CodXdl=ABC123 + /// + /// IdxMacchina (NON considerato) + /// CodXdl richiesto, se vuoto restituisce TUTTI i valori in tabella di decodifica + /// Json contenente le righe delle codifiche attive Articolo/Numero string getArtNum(string id, string CodArt = ""); + + /// + /// Recupera elenco articoli USATI: + /// GET: IOB/getArtUsed + /// + /// Json contenente lista oggetti ARTICOLI serializzati string getArtUsed(); + + /// + /// Recupera COUNTER x macchina: + /// GET: IOB/getCounter/5 + /// + /// + /// string getCounter(string id); + + /// + /// Recupera COUNTER x macchina dal CONTEGGIO dei TCRecorded: + /// GET: IOB/getCounterTCRec/5 + /// + /// + /// string getCounterTCRec(string id); + + /// + /// Recupera DATI correnti x macchina: + /// GET: IOB/getCurrData/SIMUL_03 + /// + /// + /// Json contenente la riga di stato macchina string getCurrData(string id); + + /// + /// Recupera ODL corrente x macchina: + /// GET: IOB/getCurrODL/SIMUL_03 + /// + /// + /// string getCurrODL(string id); + + /// + /// Restituisce la quantità pezzi dell'odl correntemente in lavorazione sulla macchina... + /// GET: IOB/getCurrOdlQtaReq/SIMUL_01 + /// + /// + /// int getCurrOdlQtaReq(string id); + + /// + /// Restituisce intera riga dell'odl correntemente in lavorazione sulla macchina... + /// GET: IOB/getCurrOdlRow/SIMUL_01 + /// + /// + /// string getCurrOdlRow(string id); + + /// + /// Restituisce data-ora inizio dell'odl correntemente in lavorazione sulla macchina... + /// es: http://url_site/MP/IO/IOB/getCurrOdlStart/SIMUL_03 + /// + /// + /// string getCurrOdlStart(string id); + + /// + /// Recupera DATI PODL correnti (=NON AVVIATI) x macchina: + /// GET: IOB/getCurrPODL/SIMUL_03 + /// + /// id macchina, se "" mostra tutto + /// Json contenente lista oggetti PODL serializzati string getCurrPODL(string id); + + /// + /// Restituisce intera riga dello stato di macchina... + /// GET: IOB/getCurrStatoRow/SIMUL_01 + /// + /// + /// string getCurrStatoRow(string id); + + /// + /// Restituisce un array JSon di files di una IOB + /// PUT: IOB/getFiles/SIMUL_03 + /// + /// ID dell'IOB + /// Oggetto Json in formato MapoSDK.fileEmbed string getFiles(string id); + + /// + /// Restituisce il valore dello stato di IDLE della macchina, quindi SOLO SE NON é in lavoro + /// e già convertito in minuti... + /// GET: IOB/getIdlePeriod/SIMUL_01 + /// + /// + /// int getIdlePeriod(string id); + + /// + /// Restituisce il (primo) codice IOB da dover gestire (se un IOBMAN chiede di gestirne uno + /// in +...) + /// + /// IP del Gateway + /// string getIob2call(string GWIP); + + /// + /// Recupera elenco articoli USATI per ultimi: + /// - quelli dei PODL correnti + /// - quelli degli ultimi n (DOSS_LastArt in config) ODL lavorati + /// GET: IOB/getArtByMacc + /// + /// Json contenente lista oggetti ARTICOLI serializzati string getLastArtByMacc(string id); + + /// + /// Recupera DATI dell'ultimo dossier dato articolo: + /// GET: IOB/getLastDossArt/cod_articolo + /// + /// codice articolo, se vuoto --> non fa nulla + /// Json contenente lista oggetti DOSSIER serializzati string getLastDossArt(string id); + + /// + /// Recupera DATI dell'ultimo dossier dato macchina: + /// GET: IOB/getLastDossByMacc/cod_articolo + /// + /// codice articolo, se vuoto --> non fa nulla + /// Json contenente lista oggetti DOSSIER serializzati string getLastDossByMacc(string id); + + /// + /// Recupera DATI dell'ultimo dossier dato PODL correnti: + /// GET: IOB/getLastDossPODL + /// + /// Json contenente lista oggetti DOSSIER serializzati string getLastDossPODL(); + + /// + /// Recupera elenco ListValues data tabella: + /// GET: IOB/getListValByTable + /// + /// nome tabella x cui filtrare risultati, se "" mostra tutto + /// Json contenente lista oggetti ListValue serializzati string getListValByTable(string id); + + /// + /// Restituisce dati di associazione tra macchina, device IOB chiamante e sue info + /// + /// Id della macchina + /// string getM2IOB(string id); + + /// + /// restituisce elenco parametri correnti come una List Json di oggetti objItem + /// GET: IOB/getObjItems/SIMUL_03 + /// + /// ID dell'IOB + /// string getObjItems(string id); + + /// + /// restituisce elenco parametri CHE RICHIEDONO scrittura su PLC come una List Json di + /// oggetti objItem + /// GET: IOB/getObjItems2Write/SIMUL_03 + /// + /// ID dell'IOB + /// string getObjItems2Write(string id); + + /// + /// GET: IOB/getOptPar/SIMUL_03 + /// + /// + /// string getOdlAtDate(string id, string dateRif); string getOptPar(string id); + + /// + /// Recupera PODL prossimo da avviare x macchina: + /// GET: IOB/getPOdlNext/SIMUL_03 + /// + /// + /// string getPODL(string id, int idxPODL); string getPOdlAct(string id); string getPOdlNext(string id); + + /// + /// GET: IOB/getTask2Exe/SIMUL_03 + /// + /// + /// string getTask2Exe(string id); string getXdlNum(string id, string CodXdl = ""); string Index();