diff --git a/.gitignore b/.gitignore index 61fdd38..aebafaa 100644 --- a/.gitignore +++ b/.gitignore @@ -249,4 +249,5 @@ paket-files/ # JetBrains Rider .idea/ -*.sln.iml \ No newline at end of file +*.sln.iml +AnotherStorageImplementation/packages.config diff --git a/AnotherStorageImplementation/AnotherStorageImplementation.csproj b/AnotherStorageImplementation/AnotherStorageImplementation.csproj index 73a8b01..8a304d7 100644 --- a/AnotherStorageImplementation/AnotherStorageImplementation.csproj +++ b/AnotherStorageImplementation/AnotherStorageImplementation.csproj @@ -1,95 +1,100 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {EE8E3C58-371E-4164-93DA-13D055D5BDDE} - Exe - Properties - BaCSharp - AnotherStorageImplementation - v4.0 - Client - 512 - - - true - bin\Debug\ - DEBUG;TRACE - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - bin\Release\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - ..\packages\BACnet.1.0.8.5-alpha\lib\net40\BACnet.dll - True - - - ..\packages\Newtonsoft.Json.8.0.3\lib\net40\Newtonsoft.Json.dll - True - - - ..\packages\PacketDotNet.0.13.0\lib\net\PacketDotNet.dll - True - - - ..\packages\SharpPcap.4.2.0\lib\net\SharpPcap.dll - True - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - - - - + + + + Debug + x86 + 8.0.30703 + 2.0 + {EE8E3C58-371E-4164-93DA-13D055D5BDDE} + Exe + Properties + BaCSharp + AnotherStorageImplementation + v4.0 + Client + 512 + + + true + bin\Debug\ + DEBUG;TRACE + full + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + bin\Release\ + TRACE + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + + C:\Users\sschulze.PLUETH\source\repos\BACnetCommand\packages\Common.Logging.3.4.1\lib\net40\Common.Logging.dll + + + C:\Users\sschulze.PLUETH\source\repos\BACnetCommand\packages\Common.Logging.Core.3.4.1\lib\net40\Common.Logging.Core.dll + + + C:\Users\sschulze.PLUETH\source\repos\BACnetCommand\packages\Newtonsoft.Json.11.0.1\lib\net40\Newtonsoft.Json.dll + + + C:\Users\sschulze.PLUETH\source\repos\BACnetCommand\packages\PacketDotNet.0.16.0\lib\PacketDotNet.dll + + + C:\Users\sschulze.PLUETH\source\repos\BACnetCommand\packages\SharpPcap.4.4.0\lib\SharpPcap.dll + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + {66832876-01fc-4b7c-8d92-54195773fabf} + BACnet + + + + --> \ No newline at end of file diff --git a/AnotherStorageImplementation/BacnetObjects/AnalogObjectEvent.cs b/AnotherStorageImplementation/BacnetObjects/AnalogObjectEvent.cs index 5eb7711..54f11b5 100644 --- a/AnotherStorageImplementation/BacnetObjects/AnalogObjectEvent.cs +++ b/AnotherStorageImplementation/BacnetObjects/AnalogObjectEvent.cs @@ -172,11 +172,11 @@ private void IntrinsicReportingManagement() double ll = Convert.ToDouble(m_PROP_LOW_LIMIT); double db = Convert.ToDouble(m_PROP_DEADBAND); - bool LimitEnabledHigh = (m_PROP_LIMIT_ENABLE.value[0] & (uint)BacnetEventNotificationData.BacnetLimitEnable.EVENT_HIGH_LIMIT_ENABLE) != 0; - bool LimitEnabledLow = (m_PROP_LIMIT_ENABLE.value[0] & (uint)BacnetEventNotificationData.BacnetLimitEnable.EVENT_LOW_LIMIT_ENABLE) != 0; + bool LimitEnabledHigh = (m_PROP_LIMIT_ENABLE.value[0] & (uint)BacnetLimitEnable.EVENT_HIGH_LIMIT_ENABLE) != 0; + bool LimitEnabledLow = (m_PROP_LIMIT_ENABLE.value[0] & (uint)BacnetLimitEnable.EVENT_LOW_LIMIT_ENABLE) != 0; - bool EventToOffNormal = (m_PROP_EVENT_ENABLE.value[0] & (uint)BacnetEventNotificationData.BacnetEventEnable.EVENT_ENABLE_TO_OFFNORMAL) != 0; - bool EventToNormal = (m_PROP_EVENT_ENABLE.value[0] & (uint)BacnetEventNotificationData.BacnetEventEnable.EVENT_ENABLE_TO_NORMAL) != 0; + bool EventToOffNormal = (m_PROP_EVENT_ENABLE.value[0] & (uint)BacnetEventEnable.EVENT_ENABLE_TO_OFFNORMAL) != 0; + bool EventToNormal = (m_PROP_EVENT_ENABLE.value[0] & (uint)BacnetEventEnable.EVENT_ENABLE_TO_NORMAL) != 0; bool NotifyState = false; @@ -185,48 +185,48 @@ private void IntrinsicReportingManagement() switch (fromState) { - case (uint)BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_NORMAL : + case (uint)BacnetEventStates.EVENT_STATE_NORMAL : /* If LimitHigh flag is enabled and Present_Value exceed the High_Limit and Event to Offnormal is enabled then the notification must be done */ if ((pv > hl)&&LimitEnabledHigh) { - toState = (int)BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_HIGH_LIMIT; + toState = (int)BacnetEventStates.EVENT_STATE_HIGH_LIMIT; NotifyState = EventToOffNormal; } /* If LowLimit flag is enabled and Present_Value exceed the Low_Limit and Event to Offnormal is enabled then the notification must be done */ if ((pv < ll)&LimitEnabledLow) { - toState = (int)BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_LOW_LIMIT; + toState = (int)BacnetEventStates.EVENT_STATE_LOW_LIMIT; NotifyState = EventToOffNormal; } break; - case (uint)BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_HIGH_LIMIT: + case (uint)BacnetEventStates.EVENT_STATE_HIGH_LIMIT: /* Present_Value fall below the High_Limit - Deadband ? */ if (pv < (hl - db)) { - toState = (int)BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_NORMAL; + toState = (int)BacnetEventStates.EVENT_STATE_NORMAL; NotifyState = EventToNormal; } /* Present_Value fall below the Low_Limit ? */ if ((pv < ll) && LimitEnabledLow) { - toState = (int)BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_LOW_LIMIT; + toState = (int)BacnetEventStates.EVENT_STATE_LOW_LIMIT; if (!NotifyState) NotifyState = EventToOffNormal; } break; - case (uint)BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_LOW_LIMIT: + case (uint)BacnetEventStates.EVENT_STATE_LOW_LIMIT: /* Present_Value exceed the Low_Limit + Deadband ? */ if (pv > (ll + db)) { - toState = (int)BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_NORMAL; + toState = (int)BacnetEventStates.EVENT_STATE_NORMAL; NotifyState = EventToNormal; } /* Present_Value exceed the High_Limit ? */ if ((pv > hl) && LimitEnabledHigh) { - toState = (int)BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_HIGH_LIMIT; + toState = (int)BacnetEventStates.EVENT_STATE_HIGH_LIMIT; if (!NotifyState) NotifyState = EventToOffNormal; } @@ -256,10 +256,10 @@ the notification must be done */ if (nc!=null) nc.SendIntrinsectEvent( m_PROP_OBJECT_IDENTIFIER, - (BacnetEventNotificationData.BacnetNotifyTypes)m_PROP_NOTIFY_TYPE, - BacnetEventNotificationData.BacnetEventTypes.EVENT_CHANGE_OF_VALUE, - (BacnetEventNotificationData.BacnetEventStates)fromState, - (BacnetEventNotificationData.BacnetEventStates)toState); + (BacnetNotifyTypes)m_PROP_NOTIFY_TYPE, + BacnetEventTypes.EVENT_CHANGE_OF_STATE, + (BacnetEventStates)fromState, + (BacnetEventStates)toState); } } } \ No newline at end of file diff --git a/AnotherStorageImplementation/BacnetObjects/NotificationClass.cs b/AnotherStorageImplementation/BacnetObjects/NotificationClass.cs index 5cf497b..e35c4c2 100644 --- a/AnotherStorageImplementation/BacnetObjects/NotificationClass.cs +++ b/AnotherStorageImplementation/BacnetObjects/NotificationClass.cs @@ -117,10 +117,10 @@ public void AddReportingRecipient(DeviceReportingRecipient recipient) } public void SendIntrinsectEvent(BacnetObjectId SenderObject, - BacnetEventNotificationData.BacnetNotifyTypes notifyType, - BacnetEventNotificationData.BacnetEventTypes evenType, - BacnetEventNotificationData.BacnetEventStates fromstate, - BacnetEventNotificationData.BacnetEventStates tostate) + BacnetNotifyTypes notifyType, + BacnetEventTypes evenType, + BacnetEventStates fromstate, + BacnetEventStates tostate) { if ((m_PROP_RECIPIENT_LIST == null) || (m_PROP_RECIPIENT_LIST.Count == 0)) @@ -166,11 +166,11 @@ public void SendIntrinsectEvent(BacnetObjectId SenderObject, DoASend = false; // new State is OK ? - if ((tostate == BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_OFFNORMAL) && ((devReportEntry.evenType.value[0] & 1) != 1)) + if ((tostate == BacnetEventStates.EVENT_STATE_OFFNORMAL) && ((devReportEntry.evenType.value[0] & 1) != 1)) DoASend = false; - if ((tostate == BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_NORMAL) && ((devReportEntry.evenType.value[0] & 2) != 2)) + if ((tostate == BacnetEventStates.EVENT_STATE_NORMAL) && ((devReportEntry.evenType.value[0] & 2) != 2)) DoASend = false; - if ((tostate == BacnetEventNotificationData.BacnetEventStates.EVENT_STATE_FAULT) && ((devReportEntry.evenType.value[0] & 4) != 4)) + if ((tostate == BacnetEventStates.EVENT_STATE_FAULT) && ((devReportEntry.evenType.value[0] & 4) != 4)) DoASend = false; // Find the receiver endPoint diff --git a/AnotherStorageImplementation/packages.config b/AnotherStorageImplementation/packages.config index 228619f..214c5ba 100644 --- a/AnotherStorageImplementation/packages.config +++ b/AnotherStorageImplementation/packages.config @@ -1,7 +1,9 @@ - - - - - - + + + + + + + + \ No newline at end of file