1. 데이터 수신전에는 알람이 울리지 않도록 함

This commit is contained in:
2025-07-01 23:02:33 +09:00
parent f480b508b7
commit 7e3f87542c
7 changed files with 102 additions and 52 deletions

View File

@@ -48,10 +48,14 @@ namespace vmsnet
public static DigitalIndicator indicator;
public static int sleepoffset = 0; ////쓰레드슬립시간
/// <summary>
/// 데이터를 수신받았는지 체크
/// </summary>
public static bool[,,] Received;
/// <summary>
/// 측정값(전압)이 들어있다(mcidx/unitno/chidx)
/// </summary>
public static int[,,] Values;
public static int[,,] _Values;
/// <summary>
/// 측정값(시간)이 들어있다(mcidx/unitno/chidx)
/// yyyy-MM-dd HH:mm:ss
@@ -221,16 +225,17 @@ namespace vmsnet
/// <returns></returns>
public static bool AddMeasureValue(int mcidx, int unit, int ch, int value, string time)
{
var l0 = PUB.Values.GetUpperBound(0) + 1; //mc array size
var l1 = PUB.Values.GetUpperBound(1) + 1; //unit array size
var l2 = PUB.Values.GetUpperBound(2) + 1; //ch array size
var l0 = PUB._Values.GetUpperBound(0) + 1; //mc array size
var l1 = PUB._Values.GetUpperBound(1) + 1; //unit array size
var l2 = PUB._Values.GetUpperBound(2) + 1; //ch array size
if (mcidx < l0 && unit < l1 && ch > 0 && ch <= l2)
{
try
{
PUB.Values[mcidx, unit, ch - 1] = value;
PUB._Values[mcidx, unit, ch - 1] = value;
PUB.Times[mcidx, unit, ch - 1] = time;
PUB.Received[mcidx, unit, ch - 1] = true;
return true;
}
catch (Exception)