Ken Roberts has proposed merging lp:~alisonken1/openlp/pjlink2_v04 into
lp:openlp.
Commit message:
PJLink2 update V04
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~alisonken1/openlp/pjlink2_v04/+merge/366946
NOTE: Part 4 of a multi-part merge.
v[1..n] merges are to fix tests
- Fixed/Added routing tests for PJLink.get_data() method
- Move process_command() routing tests to separate module
- Refactor/add process_command() tests
- Refactor process_pjlink() command and tests
- Fix PJLink socket state check causing loss of connection (regression)
- Added 3 new status codes for initial connection processing
lp:~alisonken1/openlp/pjlink2_v04 (revision 2865)
https://ci.openlp.io/job/Branch-01-Pull/2729/ [SUCCESS]
https://ci.openlp.io/job/Branch-02a-Linux-Tests/2623/ [SUCCESS]
https://ci.openlp.io/job/Branch-02b-macOS-Tests/398/ [SUCCESS]
https://ci.openlp.io/job/Branch-03a-Build-Source/220/ [SUCCESS]
https://ci.openlp.io/job/Branch-03b-Build-macOS/199/ [SUCCESS]
https://ci.openlp.io/job/Branch-04a-Code-Lint/1682/[SUCCESS]
https://ci.openlp.io/job/Branch-04b-Test-Coverage/1495/[SUCCESS]
https://ci.openlp.io/job/Branch-05-AppVeyor-Tests/375/ [SUCCESS]
All builds passed
--
Your team OpenLP Core is requested to review the proposed merge of
lp:~alisonken1/openlp/pjlink2_v04 into lp:openlp.
=== modified file 'openlp/core/projectors/constants.py'
--- openlp/core/projectors/constants.py 2019-04-13 13:00:22 +
+++ openlp/core/projectors/constants.py 2019-05-04 05:43:42 +
@@ -106,6 +106,9 @@
S_ON = 315
S_COOLDOWN = 316
S_INFO = 317
+S_CONNECT = 318 # Initial connection, connected
+S_AUTHENTICATE = 319 # Initial connection, send pin hash
+S_DATA_OK = 320 # Previous command returned OK
# Information that does not affect status
S_NETWORK_IDLE = 400
@@ -369,11 +372,14 @@
E_UNKNOWN_SOCKET_ERROR: 'E_UNKNOWN_SOCKET_ERROR',
E_UNSUPPORTED_SOCKET_OPERATION: 'E_UNSUPPORTED_SOCKET_OPERATION',
E_WARN: 'E_WARN',
+S_AUTHENTICATE: 'S_AUTHENTICATE',
S_BOUND: 'S_BOUND',
+S_CONNECT: 'S_CONNECT',
S_COOLDOWN: 'S_COOLDOWN',
S_CLOSING: 'S_CLOSING',
S_CONNECTED: 'S_CONNECTED',
S_CONNECTING: 'S_CONNECTING',
+S_DATA_OK: 'S_DATA_OK',
S_HOST_LOOKUP: 'S_HOST_LOOKUP',
S_INFO: 'S_INFO',
S_INITIALIZE: 'S_INITIALIZE',
@@ -387,7 +393,7 @@
S_ON: 'S_ON',
S_STANDBY: 'S_STANDBY',
S_STATUS: 'S_STATUS',
-S_WARMUP: 'S_WARMUP',
+S_WARMUP: 'S_WARMUP'
}
# Map status codes to message strings
@@ -459,11 +465,14 @@
'The requested socket operation is not supported by the local '
'operating system (e.g., lack of IPv6 support)'),
E_WARN: translate('OpenLP.ProjectorConstants', 'Warning condition detected'),
+S_AUTHENTICATE: translate('OpenLP.ProjectorConstants', 'Connection initializing with pin'),
S_BOUND: translate('OpenLP.ProjectorConstants', 'Socket is bount to an address or port'),
+S_CONNECT: translate('OpenLP.ProjectorConstants', 'Connection initializing'),
S_CLOSING: translate('OpenLP.ProjectorConstants', 'Socket is about to close'),
S_CONNECTED: translate('OpenLP.ProjectorConstants', 'Connected'),
S_CONNECTING: translate('OpenLP.ProjectorConstants', 'Connecting'),
S_COOLDOWN: translate('OpenLP.ProjectorConstants', 'Cooldown in progress'),
+S_DATA_OK: translate('OpenLP.ProjectorConstants', 'Command returned with OK'),
S_HOST_LOOKUP: translate('OpenLP.ProjectorConstants', 'Performing a host name lookup'),
S_INFO: translate('OpenLP.ProjectorConstants', 'Projector Information available'),
S_INITIALIZE: translate('OpenLP.ProjectorConstants', 'Initialize in progress'),
=== modified file 'openlp/core/projectors/pjlink.py'
--- openlp/core/projectors/pjlink.py 2019-04-28 19:21:23 +
+++ openlp/core/projectors/pjlink.py 2019-05-04 05:43:42 +
@@ -52,14 +52,15 @@
from PyQt5 import QtCore, QtNetwork
+from openlp.core.common import qmd5_hash
from openlp.core.common.i18n import translate
from openlp.core.common.settings import Settings
from openlp.core.projectors.pjlinkcommands import process_command
-from openlp.core.projectors.constants import CONNECTION_ERRORS, E_CONNECTION_REFUSED, E_GENERAL, \
+from openlp.core.projectors.constants import CONNECTION_ERRORS, E_AUTHENTICATION, E_CONNECTION_REFUSED, E_GENERAL, \
E_NETWORK, E_NOT_CONNECTED, E_SOCKET_TIMEOUT, PJLINK_CLASS, \
PJLINK_MAX_PACKET, PJLINK_PORT, PJLINK_PREFIX, PJLINK_SUFFIX, \
-PJLINK_VALID_CMD, PROJECTOR_STATE, QSOCKET_STATE, S_CONNECTED, S_CONNECTING, S_NOT_CONNECTED, S_OFF, S_OK, S_ON, \
-STATUS_CODE, STATUS_MSG
+PJLINK_VALID_CMD,