File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/S7CommPlusDriver/Core Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,25 @@ public class PVartypeListElement
101101 const int S7COMMP_TAGDESCR_OFFSETINFOTYPE2_PROGRAMALARM = 15 ;
102102
103103 const int S7COMMP_TAGDESCR_BITOFFSETINFO_RETAIN = 0x80 ;
104+ const int S7COMMP_TAGDESCR_BITOFFSETINFO_NONOPTBITOFFSET = 0x70 ;
104105 const int S7COMMP_TAGDESCR_BITOFFSETINFO_CLASSIC = 0x08 ;
106+ const int S7COMMP_TAGDESCR_BITOFFSETINFO_OPTBITOFFSET = 0x07 ;
105107
106108 public UInt32 LID ;
107109 public UInt32 SymbolCrc ;
108110 public UInt32 Softdatatype ;
109111 public UInt16 AttributeFlags ;
112+
113+ public int GetAttributeSection ( )
114+ {
115+ return ( ( AttributeFlags & S7COMMP_TAGDESCR_ATTRIBUTE2_SECTION ) >> 4 ) ;
116+ }
117+
118+ public int GetAttributeBitoffset ( )
119+ {
120+ return ( AttributeFlags & S7COMMP_TAGDESCR_ATTRIBUTE2_BITOFFSET ) ;
121+ }
122+
110123 public bool GetAttributeFlagHmiVisible ( )
111124 {
112125 return ( ( AttributeFlags & S7COMMP_TAGDESCR_ATTRIBUTE2_HMIVISIBLE ) != 0 ) ;
@@ -139,6 +152,16 @@ public bool GetBitoffsetinfoFlagClassic()
139152 return ( ( BitoffsetinfoFlags & S7COMMP_TAGDESCR_BITOFFSETINFO_CLASSIC ) != 0 ) ;
140153 }
141154
155+ public int GetBitoffsetinfoNonoptimizedBitoffset ( )
156+ {
157+ return ( ( BitoffsetinfoFlags & S7COMMP_TAGDESCR_BITOFFSETINFO_NONOPTBITOFFSET ) >> 4 ) ;
158+ }
159+
160+ public int GetBitoffsetinfoOptimizedBitoffset ( )
161+ {
162+ return ( BitoffsetinfoFlags & S7COMMP_TAGDESCR_BITOFFSETINFO_OPTBITOFFSET ) ;
163+ }
164+
142165 public POffsetInfoType OffsetInfoType ;
143166
144167 public int Deserialize ( Stream buffer )
You can’t perform that action at this time.
0 commit comments