This object is the JavaScript interface to a CommandFusion IR Blaster device.
Members

<static> Format

Constants for IR data formats
Name Value Description
DB DBA Send an IR command from the internal database
Memory MEM Send an IR command stored in IR Blaster memory
Raw RAW Send raw IR codes
CF STR Send CommandFusion-format IR Codes

<static> IR_CODE_RECEIVED

Event sent when the onboard IR receiver of the IRBlaster device receives an IR code. Your callback function should have the prototype: function(event, sender, irCodeString) event is the name of this event sender is the CFLink.IRBlaster object that received the IR Code port is either CFLink.IRBlaster.Port.INTERNAL or CFLink.IRBlaster.Port.EXTERNAL and indicates which input of the IR Blaster received the IR Code irCodeString is a String containing the received IR code

<static> Port

Constants for IRBlaster ports
Name Value Description
INTERNAL P01 This constant represents the onboard IR port of the IR Blaster
EXTERNAL P02 This constant represents the external IR port of the IR Blaster
BOTH PZZ This contants represents both internal and external ports of the IR Blaster and is only used when sending IR data to indicate that IR data should be sent via both ports at the same time
Methods
sendCFCode ( port , irCode )
Parameters:
Name Type Description
port @link CFLink.IRBlaster.Port the IR port(s) to send to. Can send to both output ports simultaneously
irCode string an IR code in CF IR format. See the CF IR Format documentation for details at http://www.commandfusion.com/docs/cflink/irformat.html.
Send a IR code (in CF IR format) to the specified port(s). Use one of the constant from CFLink.IRBlaster.Port enum to select the output port.
sendDatabaseCode ( port , deviceType , codeSet , key )
Parameters:
Name Type Description
port CFLink.IRBlaster.Port the port(s) to sed the IR code to
deviceType string the device tye
codeSet
key
Send an IR code from the onboard database of the IRBlaster. See http://www.commandfusion.com/docs/cflink/irdatabase.html for more details on the IR database.
sendRawCode ( port , irCode )
Parameters:
Name Type Description
port @link CFLink.IRBlaster.Port the IR port(s) to send to. Can send to both output ports simultaneously
irCode string the raw hex code (Often called CCF) to send. Only 'learned' IR codes (starting with 0000) are allowed.
Send a raw IR code to the specified port(s). Use one of the constant from CFLink.IRBlaster.Port enum to select the output port.
watchIncomingIR ( port , callback , me )
Parameters:
Name Type Description
port CFLink.IRBlaster.Port the IRBlaster port you want to monitor (see description)
callback Function your callback function, of the form callback(cfmini_object, portNumber, value)
me Object the object to set as `this' when calling your callback function
Returns
a watcher ID that you can use to stop watching with CFLink.IRBlaster.unwatch
Type
Number
Setup a callback function that will be called whenever IR data is received by IRBlaster on the specified port(s). You can specify that you want to received messages from CFLink.IRBlaster.Port.INTERNAL, CFLink.IRBlaster.Port.EXTERNAL or CFLink.IRBlaster.Port.BOTH. Your callback function should be of the form: function myCallback(irblasterDevice, port, data) where `irblasterDevice' is this CFLink.IRBlaster object, port is either CFLink.IRBlaster.Port.INTERNAL or CFLink.IRBlaster.Port.EXTERNAL and data is the actual IR data received.