public InternetServiceInfo Internet_Service_Information(int ProfileID) { GeneralResponse re = SendATCommand("AT^SISI=" + ProfileID); if (re.IsSuccess) { string[] values = re.PayLoad[0].Split(','); if (values[0].IndexOf("^SISI") >= 0) { InternetServiceInfo info = new InternetServiceInfo(); info.ProfileID = ProfileID; info.Status = (InternetServiceStatus)int.Parse(values[1]); info.RX_Count = int.Parse(values[2]); info.TX_Count = int.Parse(values[3]); info.Acknowledged_Data = int.Parse(values[4]); return info; } } return null; }
public InternetServiceInfo[] Internet_Service_Information() { GeneralResponse re = SendATCommand("AT^SISI?"); if (re.IsSuccess) { InternetServiceInfo[] info = new InternetServiceInfo[re.PayLoad.Length]; for (int i = 0; i < re.PayLoad.Length; i++) { string[] values = re.PayLoad[i].Split(','); info[i] = new InternetServiceInfo(); if (values[0].IndexOf("^SISI") >= 0) { info[i].ProfileID = int.Parse(values[0].Split(' ')[1]); info[i].Status = (InternetServiceStatus)int.Parse(values[1]); info[i].RX_Count = int.Parse(values[2]); info[i].TX_Count = int.Parse(values[3]); info[i].Acknowledged_Data = int.Parse(values[4]); info[i].Not_Acknowledged_Data = int.Parse(values[5]); } } return info; } return null; }