2022-09-20 07:42:20 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Xylem.Common.Logic.ProductionOrderCore
|
2021-10-01 09:09:20 +00:00
|
|
|
|
{
|
2022-09-20 07:42:20 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Source for final properties of Cordonel
|
|
|
|
|
|
/// </summary>
|
2021-10-01 09:09:20 +00:00
|
|
|
|
public enum ProgrammingSource
|
|
|
|
|
|
{
|
|
|
|
|
|
Vako,
|
2023-08-23 12:45:24 +00:00
|
|
|
|
Csd,
|
2025-04-01 11:31:32 +00:00
|
|
|
|
Order,
|
|
|
|
|
|
ProgramInternal
|
2021-10-01 09:09:20 +00:00
|
|
|
|
}
|
2023-08-23 12:45:24 +00:00
|
|
|
|
|
2022-09-20 07:42:20 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Values for single registers
|
|
|
|
|
|
/// </summary>
|
2021-10-01 09:09:20 +00:00
|
|
|
|
public class ProgrammingParameters
|
|
|
|
|
|
{
|
2022-09-20 07:42:20 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Single register setup value assignment
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="registerName"></param>
|
|
|
|
|
|
/// <param name="registerValue"></param>
|
|
|
|
|
|
/// <param name="programmingSource"></param>
|
2024-04-04 08:25:44 +00:00
|
|
|
|
public ProgrammingParameters(String registerName, Byte[] registerValue,
|
|
|
|
|
|
ProgrammingSource programmingSource = ProgrammingSource.Vako)
|
2021-10-01 09:09:20 +00:00
|
|
|
|
{
|
|
|
|
|
|
RegisterName = registerName;
|
|
|
|
|
|
RegisterValue = registerValue;
|
|
|
|
|
|
Source = programmingSource;
|
|
|
|
|
|
}
|
2023-08-23 12:45:24 +00:00
|
|
|
|
|
2022-09-20 07:42:20 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The register name
|
|
|
|
|
|
/// </summary>
|
2024-04-04 08:25:44 +00:00
|
|
|
|
public String RegisterName { get; }
|
2023-08-23 12:45:24 +00:00
|
|
|
|
|
2022-09-20 07:42:20 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The register value converted to raw bytes by register converter
|
|
|
|
|
|
/// </summary>
|
2024-04-04 08:25:44 +00:00
|
|
|
|
public Byte[] RegisterValue { get; }
|
2023-08-23 12:45:24 +00:00
|
|
|
|
|
2024-07-05 09:28:43 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The data source either VAKO, CSD or order based with priorities:
|
|
|
|
|
|
/// - lowest: VAKO
|
|
|
|
|
|
/// - middle: CSD
|
|
|
|
|
|
/// - highest: Order
|
|
|
|
|
|
///
|
|
|
|
|
|
/// ATTENTION: DO NOT REMOVE setter as the Json.Serialize will NOT operate and always set the
|
|
|
|
|
|
/// default (ProgrammingSource.Vako) causing malfunction!!!!!
|
|
|
|
|
|
///
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global
|
|
|
|
|
|
// ATTENTION: DO NOT REMOVE (see comment in description)
|
|
|
|
|
|
public ProgrammingSource Source { get; set; }
|
2021-10-01 09:09:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|