Esempio n. 1
0
        public static void SetAnalogEngineeringUnits(DemoDaAddressSpaceElement daElement,
                                                     Double lowLimit,
                                                     Double highLimit,
                                                     EnumAccessRights accessRights)
        {
            ValueQT            val    = new ValueQT(EnumEUType.ANALOG, EnumQuality.GOOD, DateTime.Now);
            DaConstantProperty euType = new DaConstantProperty(
                7,
                "EUType",
                "7",
                val);

            daElement.AddProperty(euType);

            DaProperty euHigh = new DaProperty();

            euHigh.Id           = 102;
            euHigh.Name         = "High EU";
            euHigh.Description  = "High EU Description";
            euHigh.ItemId       = "102";
            euHigh.Datatype     = typeof(System.Double);
            euHigh.AccessRights = accessRights;
            daElement.AddProperty(euHigh);

            DaProperty euLow = new DaProperty();

            euLow.Id           = 103;
            euLow.Name         = "Low EU";
            euLow.Description  = "Low EU Description";
            euLow.ItemId       = "103";
            euLow.Datatype     = typeof(System.Double);
            euLow.AccessRights = accessRights;
            daElement.AddProperty(euLow);
        }
Esempio n. 2
0
        public static void CreateAngle(DemoDaAddressSpaceElement daElement,
                                       String name,
                                       String description,
                                       String itemId,
                                       EnumAccessRights accessRights)
        {
            DaProperty angleProperty = new DaProperty();

            angleProperty.Id           = 6020;
            angleProperty.Name         = name;
            angleProperty.Description  = description;
            angleProperty.ItemId       = itemId;
            angleProperty.Datatype     = typeof(System.Int16);
            angleProperty.AccessRights = accessRights;
            daElement.AddProperty(angleProperty);
        }