// Guarda una estación nueva public void AddStation(IPEndPoint NumEndPoint, CStationConnectionData StationData) { if (NumEndPoint != null) { CStationInfoTCP stnInfo = new CStationInfoTCP(StationData); stnInfo.HourAdded = DateTime.Now; stnInfo.bDiscovered = true; stnInfo.bConnectedTCP = false; //stnInfo.WinSock = Nothing stnInfo.iAttemptsTCP = 0; StationTableInt.Add(stnInfo); } }
public CStationConnectionData[] GetDiscoveredStations() { CStationConnectionData[] Stations = null; int Index = 0; Stations = new CStationConnectionData[m_StationHashTable.Number]; foreach (DictionaryEntry tableStation in m_StationHashTable.GetTable) { // No hace falta porque se guarda por duplicado //Stations(Index).IPEndPoint = CType(tableStation.Key, IPEndPoint) Stations[Index] = (CStationConnectionData)(((CStationInfoUDP)tableStation.Value).StationInfo.Clone()); Index++; } return(Stations); }
public dynamic Clone() { CStationConnectionData cls_StationInfo_Clonado = new CStationConnectionData(ConnectionsCount); cls_StationInfo_Clonado.IPEndPointValue.Address = this.IPEndPointValue.Address; cls_StationInfo_Clonado.IPEndPointValue.Port = this.IPEndPointValue.Port; cls_StationInfo_Clonado.ProtocolVersion = this.ProtocolVersion; cls_StationInfo_Clonado.StationModel = this.StationModel; cls_StationInfo_Clonado.SoftVersion = this.SoftVersion; cls_StationInfo_Clonado.HardVersion = this.HardVersion; cls_StationInfo_Clonado.Connection = new CConnectionInfo[this.Connection.Length - 1 + 1]; for (var index = 0; index <= this.Connection.Length - 1; index++) { cls_StationInfo_Clonado.Connection[(int)index] = (CConnectionInfo)(this.Connection[(int)index].Clone()); } return(cls_StationInfo_Clonado); }
public CStationtableTCP(IPEndPoint NumEndPoint, CStationConnectionData StationData) { StationTableInt.Clear(); AddStation(NumEndPoint, StationData); }
public CStationInfoUDP(CStationConnectionData StationIn) { StationInfo = StationIn; }
public CStationInfoUDP(int NumConnectIn) { StationInfo = new CStationConnectionData(NumConnectIn); }
public CStationInfoTCP(CStationConnectionData StationIn) { StationData = StationIn; }