Added PPStatus + cleanup M155 & PP data
This commit is contained in:
@@ -318,16 +318,8 @@ public static class ThreadsFunctions
|
||||
ManageLibraryError(libraryError);
|
||||
else
|
||||
{
|
||||
libraryError = ncAdapter.GetM155Data(out List<DTOM155InputModel> m155Data);
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
else
|
||||
{
|
||||
// Send processes through signalR
|
||||
MessageServices.Current.Publish(SEND_PROCESSES_DATA, null, processesPPData);
|
||||
// Send m155 through signalR
|
||||
MessageServices.Current.Publish(SEND_M155_DATA, null, m155Data);
|
||||
}
|
||||
// Send processes through signalR
|
||||
MessageServices.Current.Publish(SEND_PROCESSES_DATA, null, processesPPData);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Thermo.Active.Core
|
||||
ThreadsFunctions.ReadAlarms,
|
||||
ThreadsFunctions.ReadPowerOnData,
|
||||
ThreadsFunctions.StatThread,
|
||||
//ThreadsFunctions.ReadProcessesPPStatus,
|
||||
ThreadsFunctions.ReadProcessesPPStatus,
|
||||
ThreadsFunctions.ReadEnabledFunctionality,
|
||||
ThreadsFunctions.ReadExpiredMaintenances,
|
||||
//ThreadsFunctions.ReadAxesPositionsData,
|
||||
|
||||
@@ -82,11 +82,11 @@ namespace Thermo.Active.Model.DTOModels
|
||||
if (WorkOverride != item.WorkOverride)
|
||||
return false;
|
||||
|
||||
if (offsetData.RealLength != item.offsetData.RealLength)
|
||||
return false;
|
||||
//if (offsetData.RealLength != item.offsetData.RealLength)
|
||||
// return false;
|
||||
|
||||
if (offsetData.RealRadius != item.offsetData.RealRadius)
|
||||
return false;
|
||||
//if (offsetData.RealRadius != item.offsetData.RealRadius)
|
||||
// return false;
|
||||
|
||||
if (FeedOverride != item.FeedOverride)
|
||||
return false;
|
||||
|
||||
@@ -636,6 +636,7 @@ namespace Thermo.Active.NC
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
// Read selected axes
|
||||
libraryError = numericalControl.AXES_RSelectedAxis(ref processesData.SelectedAxis);
|
||||
if (libraryError.IsError())
|
||||
@@ -677,7 +678,8 @@ namespace Thermo.Active.NC
|
||||
// Measure
|
||||
processesData.UnitMeasure = UMeas;
|
||||
|
||||
processesData.FeedOverride = selectedData.FeedOverride;
|
||||
processesData.FeedOverride = selectedData.FeedOverride;
|
||||
#endif
|
||||
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
@@ -172,6 +172,7 @@ namespace Thermo.Active.Controllers.SignalR
|
||||
throw new HubException(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
#if false
|
||||
[SignalRAuthorize(FunctionAccess = GENERAL, Action = ACTIONS.WRITE)]
|
||||
public void WriteM155Response(int process, double responseVal)
|
||||
{
|
||||
@@ -179,7 +180,8 @@ namespace Thermo.Active.Controllers.SignalR
|
||||
CmsError libraryError = ncAdapter.WriteM155Data(process, responseVal);
|
||||
if (libraryError.IsError())
|
||||
throw new HubException(libraryError.localizationKey);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[SignalRAuthorize(FunctionAccess = GENERAL, Action = ACTIONS.WRITE)]
|
||||
public void WriteScadaValue(string memIndex, SCADA_MEM_TYPE memType, object value)
|
||||
|
||||
@@ -78,10 +78,12 @@ namespace Thermo.Active.Listeners
|
||||
SignalRListener.SendPartProgramQueue(a);
|
||||
SignalRDatabaseHandler.UpdateQueue(a);
|
||||
}));
|
||||
#if false
|
||||
infos.Add(MessageServices.Current.Subscribe(SEND_M155_DATA, (a, b) =>
|
||||
{
|
||||
SignalRListener.SendM155Data(a);
|
||||
}));
|
||||
{
|
||||
SignalRListener.SendM155Data(a);
|
||||
}));
|
||||
#endif
|
||||
infos.Add(MessageServices.Current.Subscribe(SEND_SCADA_DATA, (a, b) =>
|
||||
{
|
||||
SignalRListener.SendScadaData(a);
|
||||
|
||||
@@ -226,6 +226,7 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
public static void SendM155Data(object data)
|
||||
{
|
||||
List<DTOM155InputModel> dtoM155Data = data as List<DTOM155InputModel>;
|
||||
@@ -236,7 +237,8 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
|
||||
context.Clients.Group("ncData").m155Data(dtoM155Data);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
public static void SendScadaData(object scada)
|
||||
{
|
||||
@@ -512,8 +514,10 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
group.magazineIsActive(LastNcMagazineIsActive);
|
||||
// Send PP Queue
|
||||
group.partProgramQueue(LastPartProgramQueue);
|
||||
#if false
|
||||
// Send m155 data
|
||||
group.m155Data(LastM155Data);
|
||||
group.m155Data(LastM155Data);
|
||||
#endif
|
||||
// Send Scada
|
||||
group.scadaData(LastScadaData);
|
||||
|
||||
|
||||
@@ -27,7 +27,9 @@ namespace Thermo.Active.Listeners
|
||||
public static DTOActiveProgramDataModel LastProgramData = new DTOActiveProgramDataModel();
|
||||
public static Dictionary<int, bool> LastNcMagazineIsActive = new Dictionary<int, bool>();
|
||||
public static List<DTOQueueModel> LastPartProgramQueue = new List<DTOQueueModel>();
|
||||
public static List<DTOM155InputModel> LastM155Data = new List<DTOM155InputModel>();
|
||||
#if false
|
||||
public static List<DTOM155InputModel> LastM155Data = new List<DTOM155InputModel>();
|
||||
#endif
|
||||
public static List<DTOScadaModel> LastScadaData = new List<DTOScadaModel>();
|
||||
|
||||
// FIXME TODO inserire oggetti corretti per THERMO
|
||||
|
||||
Reference in New Issue
Block a user