public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(andKey); w.Write(notKey); w.Write(regExpFlag); w.Write(titleOnlyFlag); w.Write(contentList); w.Write(dateList); w.Write(serviceList); w.Write(videoList); w.Write(audioList); w.Write(aimaiFlag); w.Write(notContetFlag); w.Write(notDateFlag); w.Write(freeCAFlag); if (version >= 3) { w.Write(chkRecEnd); w.Write(chkRecDay); } w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(ID); w.Write(RecFilePath); w.Write(Title); w.Write(StartTime); w.Write(DurationSecond); w.Write(ServiceName); w.Write(OriginalNetworkID); w.Write(TransportStreamID); w.Write(ServiceID); w.Write(EventID); w.Write(Drops); w.Write(Scrambles); w.Write(RecStatus); w.Write(StartTimeEpg); w.Write(Comment); w.Write(ProgramInfo); w.Write(ErrInfo); if (version >= 4) { w.Write(ProtectFlag); } w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(RecMode); w.Write(Priority); w.Write(TuijyuuFlag); w.Write(ServiceMode); w.Write(PittariFlag); w.Write(BatFilePath); w.Write(RecFolderList); w.Write(SuspendMode); w.Write(RebootFlag); w.Write(UseMargineFlag); w.Write(StartMargine); w.Write(EndMargine); w.Write(ContinueRecFlag); w.Write(PartialRecFlag); w.Write(TunerID); if (version >= 2) { w.Write(PartialRecFolder); } w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(Title); w.Write(StartTime); w.Write(DurationSecond); w.Write(StationName); w.Write(OriginalNetworkID); w.Write(TransportStreamID); w.Write(ServiceID); w.Write(EventID); w.Write(Comment); w.Write(ReserveID); w.Write(UnusedRecWaitFlag); w.Write(OverlapMode); w.Write(UnusedRecFilePath); w.Write(StartTimeEpg); w.Write(RecSetting); w.Write(ReserveStatus); if (version >= 5) { w.Write(RecFileNameList); w.Write(UnusedParam1); } w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(text_char); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(componentList); w.End(); }
private void StartPolling(TcpClient client, IPAddress srvIP, uint srvPort, uint targetCount) { //巡回カウンタがtargetCountよりも大きくなる新しい通知を待ち受ける var w = new CtrlCmdWriter(new MemoryStream()); w.Write((ushort)0); w.Write(targetCount); byte[] bHead = new byte[8 + w.Stream.Length]; BitConverter.GetBytes((uint)CtrlCmd.CMD_EPG_SRV_GET_STATUS_NOTIFY2).CopyTo(bHead, 0); BitConverter.GetBytes((uint)w.Stream.Length).CopyTo(bHead, 4); w.Stream.Close(); w.Stream.ToArray().CopyTo(bHead, 8); try { client.Connect(srvIP, (int)srvPort); } catch (SocketException ex) { System.Diagnostics.Trace.WriteLine(ex); Interlocked.CompareExchange(ref pollingClient, null, client); return; } NetworkStream stream = client.GetStream(); stream.Write(bHead, 0, bHead.Length); stream.BeginRead(bHead, 0, 8, (IAsyncResult ar) => { using (client) { int readSize = 0; try { readSize = stream.EndRead(ar); } catch (IOException ex) { System.Diagnostics.Trace.WriteLine(ex); } if (readSize > 0 && ReadAll(stream, bHead, readSize, 8 - readSize) == 8 - readSize) { uint cmdParam = BitConverter.ToUInt32(bHead, 0); byte[] cmdData = new byte[BitConverter.ToUInt32(bHead, 4)]; if (ReadAll(stream, cmdData, 0, cmdData.Length) == cmdData.Length && cmdParam == (uint)ErrCode.CMD_SUCCESS) { //通常の通知コマンドに変換 targetCount = cmdProc.Invoke((uint)CtrlCmd.CMD_TIMER_GUI_SRV_STATUS_NOTIFY2, cmdData).Item3; } } } //pollingClientが置きかわっていなければ引き続き待ち受ける var nextClient = new TcpClient(srvIP.AddressFamily); if (Interlocked.CompareExchange(ref pollingClient, nextClient, client) == client) { StartPolling(nextClient, srvIP, srvPort, targetCount); } }, null); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(serviceInfo); w.Write(eventList); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(ctrlID); w.Write(filePath); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(bonDriver); w.Write(chInfo); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(group_type); w.Write(eventDataList); w.End(); }
private ErrCode SendCmdData(CtrlCmd param, object val) { var w = new CtrlCmdWriter(new MemoryStream()); w.Write(val); MemoryStream res = null; return(SendCmdStream(param, w.Stream, ref res)); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(tunerID); w.Write(tunerName); w.Write(reserveList); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(keyList); w.Write(enumStart); w.Write(enumEnd); w.End(); }
/// <summary>指定ファイルを転送する</summary> public ErrCode SendFileCopy(string val, out byte[] resVal) { var w = new CtrlCmdWriter(new MemoryStream()); w.Write(val); MemoryStream res = null; ErrCode ret = SendCmdStream(CtrlCmd.CMD_EPG_SRV_FILE_COPY, w.Stream, ref res); resVal = ret == ErrCode.CMD_SUCCESS ? res.ToArray() : null; return(ret); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(original_network_id); w.Write(transport_stream_id); w.Write(service_id); w.Write(event_id); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(RecFolder); w.Write(WritePlugIn); w.Write(RecNamePlugIn); w.Write(RecFileName); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(content_nibble_level_1); w.Write(content_nibble_level_2); w.Write(user_nibble_1); w.Write(user_nibble_2); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(stream_content); w.Write(component_type); w.Write(component_tag); w.Write(text_char); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(startDayOfWeek); w.Write(startHour); w.Write(startMin); w.Write(endDayOfWeek); w.Write(endHour); w.Write(endMin); w.End(); }
private ErrCode SendAndReceiveCmdData(CtrlCmd param, object val, ref object resVal) { var w = new CtrlCmdWriter(new MemoryStream()); w.Write(val); MemoryStream res = null; ErrCode ret = SendCmdStream(param, w.Stream, ref res); if (ret == ErrCode.CMD_SUCCESS) { (new CtrlCmdReader(res)).Read(ref resVal); } return(ret); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(useSID); w.Write(ONID); w.Write(TSID); w.Write(SID); w.Write(useBonCh); w.Write(space); w.Write(ch); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(dataID); w.Write(searchInfo); w.Write(recSetting); if (version >= 5) { w.Write(addCount); } w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(enableMode); w.Write(ctrlID); w.Write(serverIP); w.Write(serverPort); w.Write(filePath); w.Write(udpSend); w.Write(tcpSend); w.Write(timeShiftMode); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(notifyID); w.Write(time); w.Write(param1); w.Write(param2); w.Write(param3); w.Write(param4); w.Write(param5); w.Write(param6); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(dataID); w.Write(dayOfWeekFlag); w.Write(startTime); w.Write(durationSecond); w.Write(title); w.Write(stationName); w.Write(originalNetworkID); w.Write(transportStreamID); w.Write(serviceID); w.Write(recSetting); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(ONID); w.Write(TSID); w.Write(SID); w.Write(service_type); w.Write(partialReceptionFlag); w.Write(service_provider_name); w.Write(service_name); w.Write(network_name); w.Write(ts_name); w.Write(remote_control_key_id); w.End(); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(stream_content); w.Write(component_type); w.Write(component_tag); w.Write(stream_type); w.Write(simulcast_group_tag); w.Write(ES_multi_lingual_flag); w.Write(main_component_flag); w.Write(quality_indicator); w.Write(sampling_rate); w.Write(text_char); w.End(); }
private ErrCode ReceiveCmdData2(CtrlCmd param, ref object val) { var w = new CtrlCmdWriter(new MemoryStream(), CMD_VER); w.Write(CMD_VER); MemoryStream res = null; ErrCode ret = SendCmdStream(param, w.Stream, ref res); if (ret == ErrCode.CMD_SUCCESS) { var r = new CtrlCmdReader(res); ushort version = 0; r.Read(ref version); r.Version = version; r.Read(ref val); } return(ret); }
public void Write(MemoryStream s, ushort version) { var w = new CtrlCmdWriter(s, version); w.Begin(); w.Write(original_network_id); w.Write(transport_stream_id); w.Write(service_id); w.Write(event_id); w.Write((byte)0); w.Write(new DateTime()); w.Write((byte)0); w.Write((uint)0); for (int i = 0; i < 7; i++) { w.Write(4); } w.Write((byte)0); w.End(); }