示例#1
0
        cStatus StatusFactory(Link _lnk)
        {
            cStatus nStatus = new cStatus();

            StaticTransmissionID++;
            nStatus.TransmissionID = StaticTransmissionID;
            nStatus.lnk            = _lnk;

            Status = nStatus;

            return(nStatus);
        }
示例#2
0
        /// <summary>
        /// Start an reqeust and wait for an response
        /// </summary>
        /// <param name="lnk">Link</param>
        /// <param name="CallEmptyBuffer">Raise an "call empty bufffer" event</param>
        /// <returns>Status object</returns>
        public cStatus StartRequest(Link lnk, bool CallEmptyBuffer = false)
        {
            cStatus nStatus = StatusFactory(lnk);

            lock (StatusDictionary)
            {
                StatusDictionary.Add(nStatus.TransmissionID, nStatus);
            }

            SendPacket(lnk, null, nStatus, CallEmptyBuffer);

            return(nStatus);
        }
示例#3
0
 void SendPacket(Link _lnk, Container _Con, cStatus _Status, bool CallEmptyBufferEvent)
 {
     //Console.WriteLine("SendPacket ContainerID: " + ContainerID + "  TransmissionID:" + _Status.TransmissionID);
     _Portal.SendContainer(_lnk, _Con, ContainerID, _Status.TransmissionID, CallEmptyBufferEvent);
 }