# PMS/System Transmissions

## System to PMS Transmissions

The system sends an ENQ character to the PMS and awaits a reply.

- If no response is received within the time-out period of 3 seconds, the ENQ is retried 20 times before abandoning the transmission of the message (a total of 21 times and an elapsed time of 1 minute and 3 seconds). The system generates a hotel log and an alarm indicating the PMS is down. The request is held until the PMS recovers. The system then attempts to re-establish communication by sending an ENQ every three seconds. When the PMS is able to respond with an ACK (acknowledgment), the system generates a Hotel PMS log for PMS is up.

- If a NAK (negative acknowledgment) character is received by the system, the PMS is deemed operational but busy with another task and cannot accept additional requests. The ENQ is retried every three seconds until the PMS responds with an ACK or there is a 3 second timeout.

- If an ACK is received within three seconds of an ENQ, the transmission continues with the request.

The system sends a start-of-text (STX) character, the message text, and an end-of-text (ETX) character to the PMS. It then awaits an ACK from the PMS.

- If no response is received within the time-out period (3 seconds) the entire sequence, beginning with the ENQ, is retried 5 times (for a total of 6 attempts and an elapsed time of 18 seconds) before abandoning transmission. The system generates a hotel log and an alarm to indicate that the PMS is down. The system then attempts to re-establish communication by sending an ENQ every three seconds. When the PMS is able to respond with an ACK (acknowledgment), the system generates a Hotel PMS log for PMS is up.

- If a NAK is received, the complete sequence beginning with ENQ is retried 5 times before abandoning transmission. The system then generates a hotel log to indicate that the PMS refuses to accept the transaction. The transaction is then given up and discarded as the system assumes that the message was invalid. The system proceeds to send the next transaction starting with the ENQ.

- If an ACK is received, transmission is completed successfully. The system proceeds to send the next transaction starting with the ENQ.

NOTE: If the system determines the PMS link is down, an alarm is raised and presented on the console, along with a hotel log. If no console exists, only a hotel log will be issued.

## PMS to System Transmission

The PMS sends an ENQ character to the system and awaits a reply. After receiving an ENQ character from the PMS, the system responds within 3 seconds with either an ACK or a NAK. The PMS must wait at least 3 seconds for a reply.

- If no response is received within the time-out period of 3 seconds, the ENQ should be retried up to 19 times (with a 3 second timeout each retry) before abandoning the transmission of the message (a total of 20 attempts and an elapsed time of 1 minute). No other message can be sent to the system while the PMS waits for a response from the system. If no response is received after 20 retries, a network or system error is likely the cause. Check for alarms and logs to ensure the system is operational.

- If a NAK is received, the system is indicating that the system is busy. The PMS must delay for 3 seconds and the ENQ must be retried 19 times before abandoning the transmission of the message (for a total of 20 attempts). The system does not generate a log for this condition.

- If an ACK is received, the ENQ was successful and the PMS can continue its transmission with the request.

- If an ENQ is received, a glare condition is being encountered. See below for glare handling.

After sending the ACK, the system is immediately ready to receive the STX, message text, and ETX. The system must receive this message within three seconds. If no message is received by the system within the three seconds timeout, the ENQ sequence must be restarted by the PMS.

Upon receiving the STX message, the system responds within three seconds with either:

- ACK indicating the transmission was successful, and all of the message fields are valid. The operation will be executed by the system. If the operation itself is unsuccessful, a Hotel Log will be generated.

- NAK indicating that there was an error in either the transmission itself, in one of the message fields, or in the syntax of the message, Within 3 seconds of the NAK, the PMS is able to retry sending the message transmission (STX, message text and ETX) without retransmitting the ENQ. The sequence can be repeated 5 times following the initial message for a total of 6 attempts. Hotel Logs and system logs should be checked for error reason. Any further requests require a new ENQ.

If the cause for the NAK is an error, the system generates a hotel log indicating this error on every NAK.

NOTE: It is possible that due to network and system delays the message was not received by the system within its three second window. In that case, retries will all be NAKed since the system will be expecting a new ENQ.

If no response is received by the PMS after 3 seconds, it must be assumed that a message was lost or that there is a system or network error. Logs and alarms should be checked. Further communication with the system must resume with an ENQ.

The following example illustrates a PMS transaction retry:

The PMS then discards the transaction. The PMS should log this failure.

Glare handling: If the PMS and system both want to send a transaction at the same time, the PMS always permits the system to go first. This condition is indicated when the PMS receives an ENQ message while waiting for a response to its own ENQ message. In this case, the PMS must back off from initiating further transmission (including retries) for a period of 6 seconds. The PMS should expect an ENQ. Any other message from the system can be ignored. If the 6 second timer expires, the PMS must restart its original transmission beginning with the ENQ.

For example:

After the system is finished, the PMS must restart its original transmission beginning with the ENQ.

When the communication link is not busy between the two machines, the PMS may periodically send an ENQ to ensure the system is still up and functioning correctly. The system will reply with an ACK or NAK within three seconds. If the system replies with a NAK, the same retry sequence described above may be attempted. If the system replies with an ACK, the PMS must send an AREYUTHERE message. The system is expected to reply with an ACK within three seconds. For example: