示例#1
0
 //=======================================================================
 /// <summary>
 /// A copy constructor for the TMEvent.
 /// </summary>
 /// <param name="anEvent">Event to copy</param>
 //=======================================================================
 public TMEvent(TMEvent anEvent)
     : base(anEvent)
 {
     requestList = new List <uint>();
     //copy all the attributes of 'event'
     eventName      = anEvent.eventName;
     parentComp     = anEvent.parentComp;
     parentMgr      = anEvent.parentMgr;
     eventID        = anEvent.eventID;
     FParams        = anEvent.FParams; //should I be making a copy? (probably not. It is owned by the comp)
     waiting        = false;           //not waiting for msg returns
     nextEventState = anEvent.nextEventState;
 }
示例#2
0
        //=======================================================================
        /// <summary>
        /// Construct a TMEvent.
        /// </summary>
        /// <param name="parentC">owning TBaseComp</param>
        /// <param name="parentM">owning TEventsManager</param>
        /// <param name="sName">Event name</param>
        /// <param name="iEventID">Event ID as stored in the local component.</param>
        //=======================================================================
        public TMEvent(Object parentC, Object parentM, string sName, int iEventID)
            : base()
        {
            eventName  = sName;
            eventID    = iEventID;
            parentComp = (TAbstractComponent)parentC;
            parentMgr  = (TEventsManager)parentM;

            requestList = new List <uint>();

            //add a DONE state so that when this 'end of loop' is executed, a Complete msg is sent
            base.defineState(DONE, 0, "Done", LOGIC);
            defineTransition(DONE, 0, IDLE);
            createDefaultTransitions();

            waiting = false;             //not waiting for msg returns
        }