Beispiel #1
0
        /*
         * internal ErlMsg(Tag tag, ErlMsg msg)
         *  : this(tag, msg.Sender, msg.Recipient, msg.Ref, msg.Reason, msg.Payload,
         *         msg.m_Paybuf, msg.TraceToken)
         * {}
         */

        internal ErlMsg(Tag tag, IErlObject /* Pid or Atom */ from,
                        IErlObject /* Pid or Atom */ to, ErlRef?eref = null, IErlObject reason = null,
                        IErlObject payload = null, ErlInputStream paybuf = null,
                        ErlAtom?cookie     = null, ErlTrace trace        = null)
        {
            if (!(from is ErlPid || from is ErlAtom))
            {
                throw new ErlException(StringConsts.ERL_INVALID_VALUE_TYPE_ERROR.Args("sender", from.GetType().Name));
            }
            if (!(to is ErlPid || to is ErlAtom))
            {
                throw new ErlException(StringConsts.ERL_INVALID_VALUE_TYPE_ERROR.Args("recipient", from.GetType().Name));
            }

            m_From     = from;
            m_To       = to;
            Type       = tag;
            Paybuf     = paybuf;
            m_Payload  = payload;
            Reason     = reason;
            Ref        = eref.HasValue ? eref.Value : ErlRef.Null;
            Cookie     = cookie.HasValue ? cookie.Value : ErlAtom.Null;
            TraceToken = trace;
        }
Beispiel #2
0
 /// <summary>
 /// Write Erlang tuple to stream
 /// </summary>
 public void WriteTrace(ErlTrace tup)
 {
   WriteTuple(tup);
 }
Beispiel #3
0
 /// <summary>
 /// Write Erlang tuple to stream
 /// </summary>
 public void WriteTrace(ErlTrace tup)
 {
     WriteTuple(tup);
 }
Beispiel #4
0
 /// <summary>
 /// Determine if two Erlang tuples are equal
 /// </summary>
 public bool Equals(ErlTrace o)
 {
     return(m_Items.SequenceEqual(o.m_Items));
 }
Beispiel #5
0
 /// <summary>
 /// Determine if two Erlang tuples are equal
 /// </summary>
 public bool Equals(ErlTrace o) { return m_Items.SequenceEqual(o.m_Items); }
Beispiel #6
0
 internal static ErlMsg Exit2TT(ErlPid from, ErlPid dest, IErlObject reason, ErlTrace traceToken)
 {
     return(new ErlMsg(Tag.Exit2TT, from, dest, reason: reason, trace: traceToken));
 }
Beispiel #7
0
 internal static ErlMsg RegSendTT(ErlPid from, ErlAtom dest, IErlObject msg,
                                  ErlTrace trace, ErlAtom?cookie = null)
 {
     return(new ErlMsg(Tag.RegSend, from, dest, payload: msg, cookie: cookie));
 }
Beispiel #8
0
 internal static ErlMsg SendTT(ErlPid dest, IErlObject msg, ErlTrace traceToken, ErlAtom?cookie = null)
 {
     return(new ErlMsg(Tag.SendTT, ErlPid.Null, dest, payload: msg, trace: traceToken, cookie: cookie));
 }