refresh docs
This commit is contained in:
@@ -5,20 +5,21 @@ using System.ServiceModel;
|
||||
|
||||
namespace Icoel.Soap.Compac
|
||||
{
|
||||
public class CompacClient
|
||||
public class ComClient
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Oggetto client comunicazione con sizer ICOEL per invio/recupero informazioni di produzione (batch)
|
||||
/// Oggetto client comunicazione con sizer ICOEL per invio/recupero informazioni di
|
||||
/// produzione (batch)
|
||||
/// </summary>
|
||||
/// <param name="sizerIp">Indirizzo IP del server SIZER</param>
|
||||
/// <param name="port">Porta di connessione del sizer (def: 8001)</param>
|
||||
public CompacClient(string sizerIp, string port)
|
||||
public ComClient(string sizerIp, string port)
|
||||
{
|
||||
var url = "http://" + sizerIp + ":" + port + "/SizerService/";
|
||||
var epa = new EndpointAddress(new Uri(url));
|
||||
Client = new SizerServiceClient("WSHttpBinding_ISizerService", epa);
|
||||
SSClient = new SizerServiceClient("WSHttpBinding_ISizerService", epa);
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
@@ -33,9 +34,9 @@ namespace Icoel.Soap.Compac
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
if (Client != null)
|
||||
if (SSClient != null)
|
||||
{
|
||||
answ = Client.State == CommunicationState.Opened;
|
||||
answ = SSClient.State == CommunicationState.Opened;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
@@ -43,19 +44,23 @@ namespace Icoel.Soap.Compac
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Internal Methods
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Effettua chiusura del proxy di comunicazione
|
||||
/// </summary>
|
||||
internal void Close()
|
||||
public void Close()
|
||||
{
|
||||
if (Client.State != CommunicationState.Closed)
|
||||
if (SSClient.State != CommunicationState.Closed)
|
||||
{
|
||||
Client.Close();
|
||||
SSClient.Close();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Internal Methods
|
||||
|
||||
/// <summary>
|
||||
/// Elenco dei layout attivi della varietà
|
||||
/// </summary>
|
||||
@@ -63,7 +68,7 @@ namespace Icoel.Soap.Compac
|
||||
/// <returns></returns>
|
||||
internal Layout GetActiveLayout(Guid VarietyId)
|
||||
{
|
||||
return Client.GetActiveLayout(VarietyId);
|
||||
return SSClient.GetActiveLayout(VarietyId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -72,7 +77,7 @@ namespace Icoel.Soap.Compac
|
||||
/// <returns></returns>
|
||||
internal Variety[] GetActiveVarieties()
|
||||
{
|
||||
return Client.GetActiveVarieties();
|
||||
return SSClient.GetActiveVarieties();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -81,7 +86,7 @@ namespace Icoel.Soap.Compac
|
||||
/// <returns></returns>
|
||||
internal Batch GetCurrentBatch()
|
||||
{
|
||||
return Client.GetCurrentBatch();
|
||||
return SSClient.GetCurrentBatch();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -91,7 +96,7 @@ namespace Icoel.Soap.Compac
|
||||
/// <returns></returns>
|
||||
internal Batch GetCurrentBatchByLane(int lineNum)
|
||||
{
|
||||
return Client.GetCurrentBatchByLane(lineNum);
|
||||
return SSClient.GetCurrentBatchByLane(lineNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -101,7 +106,7 @@ namespace Icoel.Soap.Compac
|
||||
/// <returns></returns>
|
||||
internal Layout[] GetLayouts(Guid VarietyId)
|
||||
{
|
||||
return Client.GetLayouts(VarietyId);
|
||||
return SSClient.GetLayouts(VarietyId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -110,7 +115,7 @@ namespace Icoel.Soap.Compac
|
||||
/// <param name="batch">Oggetto Batch completamente popolato da accodare in richiesta</param>
|
||||
internal void MettiLottoInCoda(Batch batch)
|
||||
{
|
||||
Client.AddBatch(batch);
|
||||
SSClient.AddBatch(batch);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -120,13 +125,13 @@ namespace Icoel.Soap.Compac
|
||||
/// <param name="growerName">Denominazione del produttore</param>
|
||||
internal void VerificaEsistenzaGrower(string growerCode, string growerName)
|
||||
{
|
||||
var grower = Client.GetGrower(growerCode);
|
||||
var grower = SSClient.GetGrower(growerCode);
|
||||
|
||||
if (grower == null)
|
||||
{
|
||||
var nuovo = new Grower() { Code = growerCode, Name = growerName };
|
||||
|
||||
Client.AddGrower(nuovo);
|
||||
SSClient.AddGrower(nuovo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +142,7 @@ namespace Icoel.Soap.Compac
|
||||
/// <summary>
|
||||
/// Client che inoltra le richieste al Sizer
|
||||
/// </summary>
|
||||
private SizerServiceClient Client { get; set; }
|
||||
private SizerServiceClient SSClient { get; set; }
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
+16
-7
@@ -14,7 +14,7 @@ namespace Icoel.Soap
|
||||
{
|
||||
if (Client == null || !Client.connected)
|
||||
{
|
||||
Client = new CompacClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
Client = new ComClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
}
|
||||
foreach (var item in varietiesList)
|
||||
{
|
||||
@@ -72,7 +72,7 @@ namespace Icoel.Soap
|
||||
|
||||
public static void MettiLottoInCoda()
|
||||
{
|
||||
Client = new CompacClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
Client = new ComClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
|
||||
Client.VerificaEsistenzaGrower(Details.GrowerCode, Details.GrowerName);
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace Icoel.Soap
|
||||
}
|
||||
if (Client == null || !Client.connected)
|
||||
{
|
||||
Client = new CompacClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
Client = new ComClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
} // recupero layout della varietà
|
||||
var layoutList = Client.GetLayouts(varGuid);
|
||||
// recupero layout x varietà
|
||||
@@ -145,7 +145,7 @@ namespace Icoel.Soap
|
||||
|
||||
public static void MettiLottoInCodaDefault()
|
||||
{
|
||||
Client = new CompacClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
Client = new ComClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
|
||||
Client.VerificaEsistenzaGrower(Details.GrowerCode, Details.GrowerName);
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace Icoel.Soap
|
||||
//Client = new CompacClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
if (Client == null || !Client.connected)
|
||||
{
|
||||
Client = new CompacClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
Client = new ComClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
}
|
||||
Variety[] varietiesList;
|
||||
varietiesList = Client.GetActiveVarieties();
|
||||
@@ -211,7 +211,7 @@ namespace Icoel.Soap
|
||||
|
||||
public static void VerificaLottoCorrente()
|
||||
{
|
||||
Client = new CompacClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
Client = new ComClient(Settaggi.IndirizzoIpSizer, Settaggi.SizerTcpPort);
|
||||
|
||||
//Client.GetCurrentBatch();
|
||||
var batch = Client.GetCurrentBatchByLane(1);
|
||||
@@ -227,8 +227,17 @@ namespace Icoel.Soap
|
||||
|
||||
#region Internal Properties
|
||||
|
||||
internal static CompacClient Client { get; set; }
|
||||
/// <summary>
|
||||
/// Oggetto di connessione client
|
||||
/// </summary>
|
||||
internal static ComClient Client { get; set; }
|
||||
/// <summary>
|
||||
/// Dettaglio dei batch
|
||||
/// </summary>
|
||||
internal static BatchDetails Details { get; set; }
|
||||
/// <summary>
|
||||
/// Parametri di setup
|
||||
/// </summary>
|
||||
internal static Settaggi Settaggi { get; set; }
|
||||
|
||||
#endregion Internal Properties
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Compac\CompacClient.cs" />
|
||||
<Compile Include="Compac\ComClient.cs" />
|
||||
<Compile Include="Connected Services\SizerService\Reference.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
# PLACEHOLDER
|
||||
TODO: Add .NET projects to *src* folder and run `docfx` to generate a **REAL** *API Documentation*!
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
# Logica di funzionamento impianto ICOEL:
|
||||
|
||||
L'impianto Icoel prevede di comunicare in 3 modalità:
|
||||
1. OPC-UA per dati RealTime di processo/automazione
|
||||
2. SOAP API per informazioni scambiate riguardo al setup dei batch da produrre (messa in coda) ed in produzione
|
||||
3. DB per dati produttivita "nrear-realtime" e tracciatura
|
||||
|
||||
La presente libreria si occupa della modalità SOAP.
|
||||
|
||||
|
||||
## Modalità impiego libreria
|
||||
|
||||
La libreria va chiamata inizializzando un oggetto Connector, e poi invocando i suoi metodi messi a disposizione che si occupano di
|
||||
- aprire canale di comunicazione
|
||||
- effettuare chiamate
|
||||
- chiudere canale
|
||||
|
||||
|
||||
## Demo funzionamento
|
||||
|
||||
Per un esempio di funzionamento si rimanda all'applicativo console Icoel.Test
|
||||
@@ -0,0 +1 @@
|
||||
#[Introduction](intro.md)
|
||||
+6
-11
@@ -3,18 +3,13 @@
|
||||
|
||||
Documentazione relativa alla libreria di interfaccia con il Sizer di ICOEL per le operazioni di R/W dei dati di batch di produzione
|
||||
|
||||
## Logica di funzionamento impianto ICOEL:
|
||||
Vedere la sezione Articles per maggiori informazioni sulle definizioni, l'impiego ed esempi.
|
||||
|
||||
L'impianto Icoel prevede di comunicare in 3 modalita'':
|
||||
1. OPC-UA per dati RealTime di processo/automazione
|
||||
2. SOAP API per informazioni scambiate riguardo al setup dei batch da produrre (messa in coda) ed in produzione
|
||||
3. DB per dati produttivita "nrear-realtime" e tracciatura
|
||||
## Articles
|
||||
|
||||
La presente libreria si occupa della modalità SOAP.
|
||||
Per maggiori dettagli, definizioni e demo funzionamento si rimanda alla sezione Articles
|
||||
@intro
|
||||
|
||||
## Modalita'' impiego libreria
|
||||
## Api
|
||||
|
||||
La libreria va chiamata inizializzando un oggetto Connector, e poi invocando i suoi metodi messia disposizione che si occupano di
|
||||
- aprire canale di comunicazione
|
||||
- effettuare chaimate
|
||||
- chiudere canale
|
||||
Per ogni dettaglio e riferimento alla libreria si rimanda alla sezione @api @Icoel.Soap
|
||||
Reference in New Issue
Block a user