Merge branch 'Feature/Giacovelli' into develop
This commit is contained in:
+14
-3
@@ -20,7 +20,7 @@ variables:
|
||||
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`""
|
||||
}
|
||||
echo $hasSource
|
||||
|
||||
|
||||
# helper x fix version number
|
||||
.version-fix: &version-fix
|
||||
- |
|
||||
@@ -100,15 +100,15 @@ variables:
|
||||
$FileName = Split-Path $File -leaf
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/utility/MAPO/$env:APP_NAME/$version/$FileName
|
||||
}
|
||||
|
||||
# mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "Resources\manifest.xml" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/manifest.xml
|
||||
# mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "Resources\ChangeLog.html" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html
|
||||
|
||||
# mCurl -v -u $env:NEXUS_USER:$env:NEXUS_PASSWD --upload-file bin/release/$env:APP_NAME.zip $env:NEXUS_SERVER/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip
|
||||
|
||||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
- pages
|
||||
|
||||
IOB-MAN:build:
|
||||
stage: build
|
||||
@@ -206,3 +206,14 @@ IOB-WIN-NEXT:deploy:
|
||||
- *nexusUpload
|
||||
needs: ["IOB-WIN-NEXT:build"]
|
||||
|
||||
pages:
|
||||
script:
|
||||
- docfx Icoel.Soap/docfx.json
|
||||
- mv Icoel.Soap/_site public
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
needs: ["IOB-WIN-NEXT:build"]
|
||||
@@ -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
|
||||
/// Oggetto client comunicazione con sizer ICOEL per invio/recupero informazioni di
|
||||
/// produzione (batch)
|
||||
/// </summary>
|
||||
/// <param name="Sizerip"></param>
|
||||
/// <param name="port"></param>
|
||||
public CompacClient(string Sizerip, string port)
|
||||
/// <param name="sizerIp">Indirizzo IP del server SIZER</param>
|
||||
/// <param name="port">Porta di connessione del sizer (def: 8001)</param>
|
||||
public ComClient(string sizerIp, string port)
|
||||
{
|
||||
var url = "http://" + Sizerip + ":" + port + "/SizerService/";
|
||||
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,27 +44,31 @@ 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>
|
||||
/// <param name="VarietyId"></param>
|
||||
/// <param name="VarietyId">Guid della varietà</param>
|
||||
/// <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,42 +96,42 @@ namespace Icoel.Soap.Compac
|
||||
/// <returns></returns>
|
||||
internal Batch GetCurrentBatchByLane(int lineNum)
|
||||
{
|
||||
return Client.GetCurrentBatchByLane(lineNum);
|
||||
return SSClient.GetCurrentBatchByLane(lineNum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco dei layout della varietà
|
||||
/// </summary>
|
||||
/// <param name="VarietyId"></param>
|
||||
/// <param name="VarietyId">Guid della varietà</param>
|
||||
/// <returns></returns>
|
||||
internal Layout[] GetLayouts(Guid VarietyId)
|
||||
{
|
||||
return Client.GetLayouts(VarietyId);
|
||||
return SSClient.GetLayouts(VarietyId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua chiamata per mettere in coda il lotto richiesto
|
||||
/// </summary>
|
||||
/// <param name="batch"></param>
|
||||
/// <param name="batch">Oggetto Batch completamente popolato da accodare in richiesta</param>
|
||||
internal void MettiLottoInCoda(Batch batch)
|
||||
{
|
||||
Client.AddBatch(batch);
|
||||
SSClient.AddBatch(batch);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica del grower da codice/nome
|
||||
/// </summary>
|
||||
/// <param name="growerCode"></param>
|
||||
/// <param name="growerName"></param>
|
||||
/// <param name="growerCode">Codice del produttore</param>
|
||||
/// <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
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -49,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>
|
||||
@@ -62,7 +64,10 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="api\index.md" />
|
||||
<None Include="App.config" />
|
||||
<None Include="articles\intro.md" />
|
||||
<None Include="articles\toc.md" />
|
||||
<None Include="batch.ini">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
@@ -134,6 +139,10 @@
|
||||
<None Include="Connected Services\SizerService\System.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="docfx.json" />
|
||||
<None Include="index.md" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="toc.yml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
# Icoel.Soap
|
||||
|
||||
Impiegare il menù laterale per navigare nel codice del progetto.
|
||||
@@ -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)
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"metadata": [
|
||||
{
|
||||
"src": [
|
||||
{
|
||||
"files": [
|
||||
"*.csproj"
|
||||
],
|
||||
"cwd": ".",
|
||||
"exclude": [
|
||||
"**/obj/**",
|
||||
"**/bin/**",
|
||||
"_site/**"
|
||||
]
|
||||
}
|
||||
],
|
||||
"dest": "obj/api"
|
||||
}
|
||||
],
|
||||
"build": {
|
||||
"content": [
|
||||
{
|
||||
"files": [
|
||||
"api/**.yml"
|
||||
],
|
||||
"cwd": "obj"
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"api/*.md",
|
||||
"articles/**.md",
|
||||
"toc.yml",
|
||||
"*.md"
|
||||
],
|
||||
"exclude": [
|
||||
"obj/**",
|
||||
"_site/**"
|
||||
]
|
||||
}
|
||||
],
|
||||
"resource": [
|
||||
{
|
||||
"files": [
|
||||
"images/**"
|
||||
],
|
||||
"exclude": [
|
||||
"obj/**",
|
||||
"_site/**"
|
||||
]
|
||||
}
|
||||
],
|
||||
"overwrite": [
|
||||
{
|
||||
"files": [
|
||||
"apidoc/**.md"
|
||||
],
|
||||
"exclude": [
|
||||
"obj/**",
|
||||
"_site/**"
|
||||
]
|
||||
}
|
||||
],
|
||||
"dest": "_site",
|
||||
"template": [
|
||||
"default"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
# Icoel.Soap Library
|
||||
|
||||
Documentazione relativa alla libreria di interfaccia con il Sizer di ICOEL per le operazioni di R/W dei dati di batch di produzione.
|
||||
|
||||
Vedere la sezione Articles per maggiori informazioni sulle definizioni, l'impiego ed esempi.
|
||||
|
||||
## Articles
|
||||
|
||||
Per maggiori dettagli, definizioni e demo funzionamento si rimanda alla sezione Articles
|
||||
@intro
|
||||
|
||||
## Api
|
||||
|
||||
Per ogni dettaglio e riferimento alla libreria si rimanda alla sezione Api Documentation
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
- name: Articles
|
||||
href: articles/
|
||||
- name: API Documentation
|
||||
href: obj/api/
|
||||
homepage: api/index.md
|
||||
Reference in New Issue
Block a user