本文整理汇总了C#中WireProtocol类的典型用法代码示例。如果您正苦于以下问题:C# WireProtocol类的具体用法?C# WireProtocol怎么用?C# WireProtocol使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WireProtocol类属于命名空间,在下文中一共展示了WireProtocol类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: RuntimeValue_Indirect
protected internal RuntimeValue_Indirect( Engine eng, WireProtocol.Commands.Debugging_Value[] array, int pos ) : base( eng, array[pos] )
{
if(++pos < array.Length)
{
m_value = Convert( eng, array, pos );
}
}
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:7,代码来源:RuntimeValue_Indirect.cs
示例2: RuntimeValue_Primitive
protected internal RuntimeValue_Primitive( Engine eng, WireProtocol.Commands.Debugging_Value handle ) : base( eng, handle )
{
Type t;
switch((RuntimeDataType)handle.m_dt)
{
case RuntimeDataType.DATATYPE_BOOLEAN: t = typeof( bool ); break;
case RuntimeDataType.DATATYPE_I1 : t = typeof(sbyte ); break;
case RuntimeDataType.DATATYPE_U1 : t = typeof( byte ); break;
case RuntimeDataType.DATATYPE_CHAR : t = typeof( char ); break;
case RuntimeDataType.DATATYPE_I2 : t = typeof( short ); break;
case RuntimeDataType.DATATYPE_U2 : t = typeof(ushort ); break;
case RuntimeDataType.DATATYPE_I4 : t = typeof( int ); break;
case RuntimeDataType.DATATYPE_U4 : t = typeof(uint ); break;
case RuntimeDataType.DATATYPE_R4 : t = typeof( float ); break;
case RuntimeDataType.DATATYPE_I8 : t = typeof( long ); break;
case RuntimeDataType.DATATYPE_U8 : t = typeof(ulong ); break;
case RuntimeDataType.DATATYPE_R8 : t = typeof( double); break;
default: throw new ArgumentException( String.Format( "Not a primitive: {0}", handle.m_dt ) );
}
m_value = System.Runtime.Serialization.FormatterServices.GetUninitializedObject( t );
m_eng.CreateConverter().Deserialize( m_value, handle.m_builtinValue );
}
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:29,代码来源:RuntimeValue_Primitive.cs
示例3: RuntimeValue_ByRef
protected internal RuntimeValue_ByRef( Engine eng, WireProtocol.Commands.Debugging_Value[] array, int pos ) : base( eng, array, pos )
{
if(m_value == null && m_handle.m_arrayref_referenceID != 0)
{
m_value = m_eng.GetArrayElement( m_handle.m_arrayref_referenceID, m_handle.m_arrayref_index );
}
if(m_value == null)
{
throw new ArgumentException();
}
}
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:12,代码来源:RuntimeValue_ByRef.cs
示例4: RuntimeValue_String
protected internal RuntimeValue_String( Engine eng, WireProtocol.Commands.Debugging_Value handle ) : base( eng, handle )
{
byte[] buf = handle.m_builtinValue;
if(handle.m_bytesInString >= buf.Length)
{
if(m_eng.ReadMemory( m_handle.m_charsInString, m_handle.m_bytesInString, out buf ) == false)
{
// Revert to the preview on failure
buf = handle.m_builtinValue;
}
}
m_value = WireProtocol.Commands.GetZeroTerminatedString( buf, true );
}
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:15,代码来源:RuntimeValue_String.cs
示例5: PcapParser
public PcapParser(string pcappath, string serverIp, string clientIp)
{
_serverIp = serverIp;
_clientIp = clientIp;
_capturedPackets = new List<PacketWrapper>();
_serverWireProtocol = new WireProtocol<ConanPacket>();
_clientWireProtocol = new WireProtocol<ConanPacket>();
_device = new CaptureFileReaderDevice(pcappath)
{
//Filter = "(ip and tcp) and (host " + serverIp + " or host " + clientIp + ")"
Filter = "(ip and tcp) and host " + serverIp
};
_device.OnPacketArrival += OnPacketArrival;
}
开发者ID:wwhitehead,项目名称:ProjectFaolan,代码行数:16,代码来源:PcapParser.cs
示例6: DecodeEventInfo
Event DecodeEventInfo (WireProtocol.EventInfo info) {
EventRequest req = FindRequest (info.requestId);
if (info.eventKind == WireProtocol.EVENT_VM_START) {
WireProtocol.VMStartEventInfo einfo = (WireProtocol.VMStartEventInfo)info;
return new VMStartEventImpl (vm, req, new ThreadReferenceImpl (vm, einfo.thread), new AppDomainMirrorImpl (vm, einfo.domain));
} else if (info.eventKind == WireProtocol.EVENT_VM_DEATH) {
return new VMDeathEventImpl (vm, req);
} else if (info.eventKind == WireProtocol.EVENT_THREAD_START) {
WireProtocol.ThreadStartEventInfo einfo = (WireProtocol.ThreadStartEventInfo)info;
return new ThreadStartEventImpl (vm, req, new ThreadReferenceImpl (vm, einfo.thread));
} else if (info.eventKind == WireProtocol.EVENT_THREAD_DEATH) {
WireProtocol.ThreadDeathEventInfo einfo = (WireProtocol.ThreadDeathEventInfo)info;
return new ThreadDeathEventImpl (vm, req, new ThreadReferenceImpl (vm, einfo.thread));
} else {
throw new NotImplementedException ();
}
}
开发者ID:shana,项目名称:Mono.Debugger.Soft,代码行数:17,代码来源:EventQueueImpl.cs
示例7: DebugDump
private static void DebugDump(WireProtocol.IncomingMessage m, string text)
{
}
开发者ID:Roddoric,项目名称:Monkey.Robotics,代码行数:3,代码来源:WinUsbStream.cs
示例8: MatchesReply
internal bool MatchesReply(WireProtocol.IncomingMessage res)
{
WireProtocol.Packet headerReq = m_req.Header;
WireProtocol.Packet headerRes = res.Header;
if (headerReq.m_cmd == headerRes.m_cmd &&
headerReq.m_seq == headerRes.m_seqReply)
{
return true;
}
return false;
}
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:13,代码来源:Engine+-+Original.cs
示例9: Message
internal Message(EndPoint source, WireProtocol.Commands.Debugging_Messaging_Address addr, byte[] payload)
{
m_source = source;
m_addr = addr;
m_payload = payload;
}
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:6,代码来源:Engine+-+Original.cs
示例10: SyncMessages
private WireProtocol.IncomingMessage[] SyncMessages(WireProtocol.OutgoingMessage[] messages)
{
return SyncMessages(messages, 2, 1000);
}
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:4,代码来源:Engine+-+Original.cs
示例11: SyncRequest
internal WireProtocol.IncomingMessage SyncRequest(WireProtocol.OutgoingMessage msg, int retries, int timeout)
{
/// Lock on m_ReqSyncLock object, so only one thread is active inside the block.
lock (m_ReqSyncLock)
{
Request req = AsyncRequest(msg, retries, timeout);
return req != null ? req.Wait() : null;
}
}
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:10,代码来源:Engine+-+Original.cs
示例12: RpcReceiveReply
private void RpcReceiveReply(WireProtocol.IncomingMessage msg, WireProtocol.Commands.Debugging_Messaging_Reply reply)
{
WireProtocol.Commands.Debugging_Messaging_Address addr = reply.m_addr;
EndPointRegistration eep;
eep = RpcFind(addr.m_from_Type, addr.m_from_Id, false);
WireProtocol.Commands.Debugging_Messaging_Reply.Reply res = new WireProtocol.Commands.Debugging_Messaging_Reply.Reply();
res.m_found = (eep != null) ? 1u : 0u;
res.m_addr = addr;
msg.Reply(CreateConverter(), WireProtocol.Flags.c_NonCritical, res);
if (eep != null)
{
lock (eep.m_req_Outbound.SyncRoot)
{
foreach (EndPointRegistration.OutboundRequest or in eep.m_req_Outbound)
{
if (or.Seq == addr.m_seq && or.Type == addr.m_to_Type && or.Id == addr.m_to_Id)
{
or.Reply = reply.m_data;
break;
}
}
}
}
}
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:30,代码来源:Engine+-+Original.cs
示例13: RuntimeValue_Reflection
protected internal RuntimeValue_Reflection( Engine eng, WireProtocol.Commands.Debugging_Value handle ) : base( eng, handle )
{
m_rd = (ReflectionDefinition)System.Runtime.Serialization.FormatterServices.GetUninitializedObject( typeof(ReflectionDefinition) );
m_eng.CreateConverter().Deserialize( m_rd, handle.m_builtinValue );
}
开发者ID:awakegod,项目名称:NETMF-LPC,代码行数:6,代码来源:Values.cs
示例14: RuntimeValue_Array
protected internal RuntimeValue_Array( Engine eng, WireProtocol.Commands.Debugging_Value handle ) : base( eng, handle )
{
}
开发者ID:awakegod,项目名称:NETMF-LPC,代码行数:3,代码来源:Values.cs
示例15: RuntimeValue_Object
protected internal RuntimeValue_Object( Engine eng, WireProtocol.Commands.Debugging_Value[] array, int pos ) : base( eng, array, pos )
{
}
开发者ID:awakegod,项目名称:NETMF-LPC,代码行数:3,代码来源:Values.cs
示例16: RpcReceiveSend
private void RpcReceiveSend(WireProtocol.IncomingMessage msg, WireProtocol.Commands.Debugging_Messaging_Send send)
{
WireProtocol.Commands.Debugging_Messaging_Address addr = send.m_addr;
EndPointRegistration eep;
eep = RpcFind(addr.m_to_Type, addr.m_to_Id, true);
WireProtocol.Commands.Debugging_Messaging_Send.Reply res = new WireProtocol.Commands.Debugging_Messaging_Send.Reply();
res.m_found = (eep != null) ? 1u : 0u;
res.m_addr = addr;
msg.Reply(CreateConverter(), WireProtocol.Flags.c_NonCritical, res);
if (eep != null)
{
Message msgNew = new Message(eep.m_ep, addr, send.m_data);
EndPointRegistration.InboundRequest ir = new EndPointRegistration.InboundRequest(eep, msgNew);
ThreadPool.QueueUserWorkItem(new WaitCallback(RpcReceiveSendDispatch), ir);
}
}
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:23,代码来源:Engine+-+Original.cs
示例17: RpcReply
internal bool RpcReply(WireProtocol.Commands.Debugging_Messaging_Address addr, byte[] data)
{
WireProtocol.Commands.Debugging_Messaging_Reply cmd = new WireProtocol.Commands.Debugging_Messaging_Reply();
cmd.m_addr = addr;
cmd.m_data = data;
WireProtocol.IncomingMessage reply = SyncMessage(WireProtocol.Commands.c_Debugging_Messaging_Reply, 0, cmd);
if (reply != null)
{
WireProtocol.Commands.Debugging_Messaging_Reply.Reply res = new WireProtocol.Commands.Debugging_Messaging_Reply.Reply();
if (res != null && res.m_found != 0)
{
return true;
}
}
return false;
}
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:20,代码来源:Engine+-+Original.cs
示例18: SetController
public void SetController(WireProtocol.IController ctrl)
{
if (m_ctrl != null)
{
throw new ArgumentException("Controller already initialized");
}
if (ctrl == null)
{
throw new ArgumentNullException("ctrl");
}
m_ctrl = ctrl;
}
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:14,代码来源:Engine+-+Original.cs
示例19: AsyncRequest
internal Request AsyncRequest(WireProtocol.OutgoingMessage msg, int retries, int timeout)
{
try
{
Request req = new Request(this, msg, retries, timeout, null);
lock (m_state.SyncObject)
{
//Checking whether IsRunning and adding the request to m_requests
//needs to be atomic to avoid adding a request after the Engine
//has been stopped.
if (!this.IsRunning)
{
throw new ApplicationException("Engine is not running or process has exited.");
}
m_requests.Add(req);
req.SendAsync();
}
return req;
}
catch
{
return null;
}
}
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:30,代码来源:Engine+-+Original.cs
示例20: lock
bool WireProtocol.IControllerHostLocal.ProcessMessage(WireProtocol.IncomingMessage msg, bool fReply)
{
msg.Payload = WireProtocol.Commands.ResolveCommandToPayload(msg.Header.m_cmd, fReply, m_capabilities);
if (fReply == true)
{
Request reply = null;
lock (m_requests.SyncRoot)
{
foreach (Request req in m_requests)
{
if (req.MatchesReply(msg))
{
m_requests.Remove(req);
reply = req;
break;
}
}
}
if (reply != null)
{
reply.Signal(msg);
return true;
}
}
else
{
WireProtocol.Packet bp = msg.Header;
switch (bp.m_cmd)
{
case WireProtocol.Commands.c_Monitor_Ping:
{
WireProtocol.Commands.Monitor_Ping.Reply cmdReply = new Microsoft.SPOT.Debugger.WireProtocol.Commands.Monitor_Ping.Reply();
cmdReply.m_source = WireProtocol.Commands.Monitor_Ping.c_Ping_Source_Host;
cmdReply.m_dbg_flags = (m_stopDebuggerOnConnect ? WireProtocol.Commands.Monitor_Ping.c_Ping_DbgFlag_Stop : 0);
msg.Reply(CreateConverter(), WireProtocol.Flags.c_NonCritical, cmdReply);
m_evtPing.Set();
return true;
}
case WireProtocol.Commands.c_Monitor_Message:
{
WireProtocol.Commands.Monitor_Message payload = msg.Payload as WireProtocol.Commands.Monitor_Message;
Debug.Assert(payload != null);
if (payload != null)
{
QueueNotify(m_eventMessage, msg, payload.ToString());
}
return true;
}
case WireProtocol.Commands.c_Debugging_Messaging_Query:
case WireProtocol.Commands.c_Debugging_Messaging_Reply:
case WireProtocol.Commands.c_Debugging_Messaging_Send:
{
Debug.Assert(msg.Payload != null);
if (msg.Payload != null)
{
QueueRpc(msg);
}
return true;
}
}
}
if (m_eventCommand != null)
{
QueueNotify(m_eventCommand, msg, fReply);
return true;
}
return false;
}
开发者ID:trfiladelfo,项目名称:MicroFrameworkSDK-Mono,代码行数:86,代码来源:Engine+-+Original.cs
注:本文中的WireProtocol类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论