/// <summary> /// Clone a station an assign it to a new transponder. /// </summary> /// <param name="transponder">The target transponder.</param> /// <param name="other">The prototype station.</param> public Station(Transponder transponder, Station other) : base(other.NetworkIdentifier, other.TransportStreamIdentifier, other.ServiceIdentifier) { // Must hava a transponder and a name if (null == transponder) throw new ArgumentNullException("transponder"); // Remember TransponderName = other.TransponderName; m_AudioMap = other.m_AudioMap; VideoType = other.VideoType; Encrypted = other.Encrypted; Transponder = transponder; VideoPID = other.VideoPID; AudioPID = other.AudioPID; PCRPID = other.PCRPID; TTXPID = other.TTXPID; AC3PID = other.AC3PID; Name = other.Name; // Link into transponder Transponder.AddStation(this); }
/// <summary> /// Initialize the instance. /// </summary> /// <param name="transponder">The transponder this station is bound to.</param> /// <param name="networkID">The original network identifier.</param> /// <param name="transportID">The transport strea, identifier.</param> /// <param name="serviceID">The service identifier.</param> /// <param name="name">Name of the station as shown to the user.</param> /// <param name="video">Video PID.</param> /// <param name="audio">Audio PID.</param> /// <param name="ac3">AC3 PID.</param> /// <param name="ttx">TeleText PID.</param> /// <param name="pcr">Program Clock Reference PID.</param> /// <param name="audioMap">Maps audio names to the related stream identifiers.</param> /// <param name="transponderName">Name of the transponder.</param> /// <param name="encrypted">Set to create an encrypted station.</param> public Station(Transponder transponder, ushort networkID, ushort transportID, ushort serviceID, string name, string transponderName, ushort video, ushort audio, ushort pcr, ushort ac3, ushort ttx, Hashtable audioMap, bool encrypted) : base(networkID, transportID, serviceID) { // Must hava a transponder and a name if ( null == transponder ) throw new ArgumentNullException("transponder"); if ( (null == name) || (name.Length < 1) ) throw new ArgumentNullException("name"); // Remember TransponderName = transponderName; Transponder = transponder; Encrypted = encrypted; m_AudioMap = audioMap; VideoPID = video; AudioPID = audio; AC3PID = ac3; PCRPID = pcr; TTXPID = ttx; Name = name; // Link into transponder Transponder.AddStation(this); }