Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

ON THIS PAGE


This object supports sending arbitrary remote control Infrared remote control codes using the NEC, RC5, or PHC (Pronto Hex Controls) protocols. 

Object Creation: The roIRTransmitter is created with an associate array.

CreateObject("roIRTransmitter", config as roAssociativeArray)

The associative array can contain the following parameter:

  • destination: A string value indicating the connector that will be used to output the signal.
    • "IR-out": The 3.5mm IR output connector (available on XDx30 models) or 3.5mm IR input/output connector (available on 4Kx42 and XDx32 models)
    • "Iguana": The Iguanaworks IR transceiver

Note

System software will not prevent you from generating both an roIRTransmitter instance set to "IR-out" and an roIRReceiver instance set to "IR-in" (i.e. configuring the 3.5mm IR connector for input and output at the same time). However, input/output performance will not be reliable.

ifMessagePort

SetPort(message_port_object As Object) As Void

Posts event messages to the attached message port.

ifUserData

SetUserData(user_data As Object)

Sets the user data that will be returned when events are raised.

GetUserData() As Object

Returns the user data that has previously been set via SetUserData(). It will return Invalid if no data has been set.

ifIRTransmitter

GetFailureReason() As String
 
Send(protocol As String, code As Dynamic) As Boolean

Sends the specified code using the output destination set during object creation. The system currently supports two IR transmission protocols: "NEC" and "PHC" (Pronto Hex Code). This method returns True if the code was successfully transmitted, but there is no way to determine from BrightScript if the controlled device actually received it.

AsyncSend(protocol As String, code As Dynamic) As Boolean

Sends the specified code and generates an roIRTransmitCompleteEvent object upon completion. The system currently supports two IR transmission protocols: "NEC" and "PHC" (Pronto Hex Code). This method is only supported using the IR-out destination.

 

  • No labels