pjlink1¶
openlp.core.lib.projector.pjlink1
module
Provides the necessary functions for connecting to a PJLink-capable projector.
See PJLink Class 1 Specifications for details. http://pjlink.jbmia.or.jp/english/dl.html
Section 5-1 PJLink Specifications
Section 5-5 Guidelines for Input Terminals
- NOTE:
- Function names follow the following syntax:
- def process_CCCC(…):
- WHERE:
- CCCC = PJLink command being processed.
-
class
openlp.core.lib.projector.pjlink1.
PJLink
(name=None, ip=None, port=4352, pin=None, *args, **kwargs)[source]¶ Bases:
PyQt5.QtNetwork.QTcpSocket
Socket service for connecting to a PJLink-capable projector.
-
changeStatus
¶
-
change_status
(status, msg=None)[source]¶ Check connection/error status, set status for projector, then emit status change signal for gui to allow changing the icons.
Parameters: - status – Status code
- msg – Optional message
-
check_login
(data=None)[source]¶ Processes the initial connection and authentication (if needed). Starts poll timer if connection is established.
NOTE: Qt md5 hash function doesn’t work with projector authentication. Use the python md5 hash function.
Parameters: data – Optional data if called from another routine
-
get_error
(err)[source]¶ Process error from SocketError signal. Remaps system error codes to projector error codes.
Parameters: err – Error code
-
pjlink_future
= ['ACKN', 'FILT', 'FREZ', 'INNM', 'IRES', 'LKUP', 'MVOL', 'RFIL', 'RLMP', 'RRES', 'SNUM', 'SRCH', 'SVER', 'SVOL', 'TESTMEONLY']¶
-
pjlink_udp_commands
= ['ACKN', 'ERST', 'INPT', 'LKUP', 'POWR', 'SRCH']¶
-
process_avmt
(data)[source]¶ Process shutter and speaker status. See PJLink specification for format. Update self.mute (audio) and self.shutter (video shutter).
Parameters: data – Shutter and audio status
-
process_clss
(data)[source]¶ PJLink class that this projector supports. See PJLink specification for format. Updates self.class.
Parameters: data – Class that projector supports.
-
process_command
(cmd, data)[source]¶ Verifies any return error code. Calls the appropriate command handler.
Parameters: - cmd – Command to process
- data – Data being processed
-
process_erst
(data)[source]¶ Error status. See PJLink Specifications for format. Updates self.projector_errors
Parameters: data – Error status
-
process_inf1
(data)[source]¶ Manufacturer name set in projector. Updates self.manufacturer
Parameters: data – Projector manufacturer
-
process_inf2
(data)[source]¶ Projector Model set in projector. Updates self.model.
Parameters: data – Model name
-
process_info
(data)[source]¶ Any extra info set in projector. Updates self.other_info.
Parameters: data – Projector other info
-
process_inpt
(data)[source]¶ Current source input selected. See PJLink specification for format. Update self.source
Parameters: data – Currently selected source
-
process_inst
(data)[source]¶ Available source inputs. See PJLink specification for format. Updates self.source_available
Parameters: data – Sources list
-
process_lamp
(data)[source]¶ Lamp(s) status. See PJLink Specifications for format. Data may have more than 1 lamp to process. Update self.lamp dictionary with lamp status.
Parameters: data – Lamp(s) status.
-
process_name
(data)[source]¶ Projector name set in projector. Updates self.pjlink_name
Parameters: data – Projector name
-
process_powr
(data)[source]¶ Power status. See PJLink specification for format. Update self.power with status. Update icons if change from previous setting.
Parameters: data – Power status
-
projectorAuthentication
¶
-
projectorNetwork
¶
-
projectorNoAuthentication
¶
-
projectorReceivedData
¶
-
projectorStatus
¶
-
projectorUpdateIcons
¶
-
send_command
(cmd, opts='?', salt=None, queue=False)[source]¶ Add command to output queue if not already in queue.
Parameters: - cmd – Command to send
- opts – Command option (if any) - defaults to ‘?’ (get information)
- salt – Optional salt for md5 hash initial authentication
- queue – Option to force add to queue rather than sending directly
-
set_input_source
(src=None)[source]¶ Verify input source available as listed in ‘INST’ command, then send the command to select the input source.
Parameters: src – Video source to select in projector
-