Esempio n. 1
0
 protected override void Trasmit(PMSMessage message)
 {
     byte[] ByteArray = message.ToByteArray();
     GetTransport().DiscardInBuffer();
     GetTransport().Write(ByteArray, 0, ByteArray.Length);
     logger.Debug(Encoding.ASCII.GetString(ByteArray));
 }
Esempio n. 2
0
        public PMSRoomStatusResponse Inquiry(PMSRoomStatus Status)
        {
            _data.Import(Status);
            PMSRoomStatusResponse Response = new PMSRoomStatusResponse();

            try
            {
                PMSMessage messageToTransmit = BuildInquiry();
                Trasmit(messageToTransmit);
                ReceiveInquiry();
                // Provide a Cach of this room number and foilos
                // for quick look up when rooms are charged.
                Response = _data.ExportPMSRoomStatusResponse(_cache);
            }
            catch (System.TimeoutException ex)
            {
                logger.Error("MicrosServer : No Reply :" + ex.Message);
                Response.ErrorResponse = ex.Message;
            }
            catch (System.Exception ex)
            {
                logger.Error("\rMicrosServer : " + ex.Message);
                Response.ErrorResponse = ex.Message;
            }
            return(Response);
        }
Esempio n. 3
0
 protected override void Trasmit(PMSMessage message)
 {
     byte[] ByteArray = message.ToByteArray();
     logger.Info(Encoding.ASCII.GetString(ByteArray));
 }
Esempio n. 4
0
 protected override void Trasmit(PMSMessage message)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Esempio n. 5
0
 abstract protected void Trasmit(PMSMessage message);