cStatus StatusFactory(Link _lnk) { cStatus nStatus = new cStatus(); StaticTransmissionID++; nStatus.TransmissionID = StaticTransmissionID; nStatus.lnk = _lnk; Status = nStatus; return(nStatus); }
/// <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); }
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); }