예제 #1
0
            private AdsSymbolFlags createElementSymbolFlags(TcAdsSymbolInfo arrayInstance, TcAdsDataType elementType)
            {
                AdsSymbolFlags none = AdsSymbolFlags.None;

                if (elementType != null)
                {
                    none = DataTypeFlagConverter.Convert(elementType.Flags);
                }
                none = (none & (AdsSymbolFlags.Attributes | AdsSymbolFlags.BitValue | AdsSymbolFlags.ExtendedFlags | AdsSymbolFlags.InitOnReset | AdsSymbolFlags.ItfMethodAccess | AdsSymbolFlags.MethodDeref | AdsSymbolFlags.Persistent | AdsSymbolFlags.ReadOnly | AdsSymbolFlags.ReferenceTo | AdsSymbolFlags.Static | AdsSymbolFlags.TComInterfacePtr | AdsSymbolFlags.TypeGuid)) | (AdsSymbolFlags.ContextMask & arrayInstance.flags);
                if (arrayInstance.IsBitType)
                {
                    none |= AdsSymbolFlags.BitValue;
                }
                if (arrayInstance.IsPersistent)
                {
                    none |= AdsSymbolFlags.None | AdsSymbolFlags.Persistent;
                }
                return(none);
            }
예제 #2
0
 private AdsSymbolFlags createSubSymbolFlags(TcAdsSymbolInfo parent, TcAdsSubItem typeSubEntry) =>
 (((DataTypeFlagConverter.Convert(typeSubEntry.Flags) & (AdsSymbolFlags.Attributes | AdsSymbolFlags.BitValue | AdsSymbolFlags.ExtendedFlags | AdsSymbolFlags.InitOnReset | AdsSymbolFlags.ItfMethodAccess | AdsSymbolFlags.MethodDeref | AdsSymbolFlags.Persistent | AdsSymbolFlags.ReadOnly | AdsSymbolFlags.ReferenceTo | AdsSymbolFlags.Static | AdsSymbolFlags.TComInterfacePtr | AdsSymbolFlags.TypeGuid)) | (AdsSymbolFlags.ContextMask & parent.flags)) | ((AdsSymbolFlags.None | AdsSymbolFlags.Persistent) & parent.flags));