Exemple #1
0
        public void ExecNextCmd(EAnpChannel c)
        {
            if (CmdQueue.Count == 0)
            {
                Tell("All commands executed");
                return;
            }

            AnpMsg cmd = CmdQueue.Dequeue();
            Tell("Running command " + (EAnpCmd)cmd.Type);
            EAnpOutgoingQuery q = c.SendCmd(cmd);
            if (q == null) return;
            q.OnCompletion += HandleOutcomingCompletion;
        }
Exemple #2
0
 public WmEAnpChannel(EAnpChannel c)
 {
     Channel = c;
     c.OnIncomingQuery += HandleIncomingQuery;
 }
Exemple #3
0
 public EAnpIncomingQuery(EAnpChannel channel, AnpMsg cmd)
     : base(channel, cmd)
 {
 }
Exemple #4
0
 public EAnpOutgoingQuery(EAnpChannel channel, AnpMsg cmd)
     : base(channel, cmd)
 {
 }
Exemple #5
0
 public EAnpChannelOpenEventArgs(EAnpChannel channel)
 {
     Channel = channel;
 }
Exemple #6
0
 public EAnpIncomingEventEventArgs(EAnpChannel channel, AnpMsg msg)
 {
     Channel = channel;
     Msg = msg;
 }
Exemple #7
0
 public EAnpBaseQuery(EAnpChannel channel, AnpMsg cmd)
 {
     Channel = channel;
     Cmd = cmd;
 }
Exemple #8
0
 /// <summary>
 /// Called by broker channel to unlink the channel.
 /// </summary>
 public void InternalUnlinkChannel(EAnpChannel channel)
 {
     m_channelTree.Remove(channel.InternalChannelID);
 }
Exemple #9
0
 /// <summary>
 /// Called by broker channel to send a message to a thread channel.
 /// </summary>
 public void InternalSendMsg(EAnpChannel channel, AnpMsg msg)
 {
     if (m_thread == null) return;
     m_thread.InvokeWorker(new Action<UInt64, AnpMsg>(m_thread.RequestSendMsg),
                           new object[] { channel.InternalChannelID, msg });
 }
Exemple #10
0
 /// <summary>
 /// Called by broker channel to close the thread channel.
 /// </summary>
 public void InternalCloseThreadChannel(EAnpChannel channel)
 {
     if (m_thread == null) return;
     m_thread.InvokeWorker(new Action<UInt64>(m_thread.RequestCloseChannel),
                           new object[] { channel.InternalChannelID });
 }
Exemple #11
0
 /// <summary>
 /// Called by the worker thread when a channel has been opened.
 /// </summary>
 public void InternalChannelOpened(UInt64 channelID)
 {
     if (m_thread == null || m_thread.CancelFlag) return;
     EAnpChannel c = new EAnpChannel(this, channelID);
     m_channelTree[c.InternalChannelID] = c;
     if (OnChannelOpen != null) OnChannelOpen(this, new EAnpChannelOpenEventArgs(c));
 }