public static ReturnKnowType CreateStation(STATIONNAME StationName, String StationSessionID, Object ServerCallBackObject) { StationHandler ThisStation = KeeperData.FirstOrDefault(Item => Item.StationName == StationName); ReturnKnowType CreateSiteResult = ThisStation.CreateEngine(StationSessionID, ServerCallBackObject); if (ThisStation != null) { ThisStation.StationConnected(); } TTCSLog.NewLogInformation(StationName, DateTime.UtcNow, "Station name : " + StationName.ToString() + " has been created, Status ready and waiting for command.", LogType.COMMUNICATION, null); return(CreateSiteResult); }
private void StationChannel_Closed(object sender, EventArgs e) { IContextChannel ThisContext = (IContextChannel)sender; CallBackHandler.RemoveSiteConnection(ThisContext.SessionId); if (AstroData.IsStationConnected(ThisContext.SessionId)) { STATIONNAME ThisStation = AstroData.GetStationName(ThisContext.SessionId); TTCSLog.NewLogInformation(ThisStation, DateTime.UtcNow, "Station name : " + ThisStation.ToString() + " is now disconnceted.", LogType.COMMUNICATION, null); AstroData.SetStationDisconnected(ThisContext.SessionId); AstroData.StationDisconnected(ThisStation); } }
public static void UpdateInformation(STATIONNAME StationName, DEVICENAME DeviceName, String FieldName, Object Value, DateTime DataTimestamp) { INFORMATIONSTRUCT ThisField = GetInformationObject(StationName, DeviceName, FieldName); if (ThisField != null) { ThisField.Value = Value; ThisField.UpdateTime = DataTimestamp; UIHandler.DisplayToUI(StationName, DeviceName, ThisField); } else { TTCSLog.NewLogInformation(StationName, DateTime.UtcNow, "Station name : " + StationName.ToString() + " mapping error at: " + DeviceName + ".", LogType.FAILED, null); } }