public IVarTableInfo GetTable(string tableName, ICoreObject cpu) { IVarTableInfo ivti = VatServiceNavigator.GetTable(tableName, cpu); VarTableInfo vti = ivti as VarTableInfo; return(vti); }
public IVarTableInfo GetTableByCPUAndTableName(string cpuName, string tableName) { ICoreObject cpu = FindCPU(cpuName); IVarTableInfo vti = GetTable(tableName, cpu); return(vti); }
public static List <S7Any> GetS7AnyList(this IVarTableInfo vti) { List <S7Any> s7anyList = new List <S7Any>(); foreach (VarLineInfo vli in vti.Lines) { //byte[] cap = vli.ClassicAnyPointer; //if (cap != null) //{ // if (cap.Length == 10) // { // S7Any s7any = cap.ToS7Any(); // s7anyList.Add(s7any); // } //} S7Any?s7any = null; // s7any = vli.S7Any; if (s7any.HasValue) { s7anyList.Add(s7any.Value); } } return(s7anyList); }