注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

姑射道人的博客

博客新地址:nixuchen.com

 
 
 

日志

 
 

control4 驱动开发指南  

2013-12-14 09:57:12|  分类: control4 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Guidelines for Creating Device Drivers

The most important information you need to know before you begin to create your own Control4? device driver is to understand how your devices work. After that, you can use the Driver Wizard and/or the DriverWorksSDK or DriverEditor to create your own drivers.

 

IMPORTANT! Before you begin, check the manufacturer's documentation to learn about the codes or customized macros required to support your device, and understand the inputs and outputs that your device supports and other details about the device as needed.

 

For best results, understand the following concepts and guidelines:

  1. Supported Commands and Inputs/Outputs of the Device. Prior to starting the Driver Wizard, have a basic understanding of the device.
  2. Discrete versus Toggle. In the Driver Wizard, the term 'discrete' indicates a direct setting rather than a toggle option between settings. For example, a receiver might have 'discrete input select,' which lets you select the input directly (DVD) rather than using a toggle button that cycles through all the inputs (DVD, VCR, TV), such as Input Toggle.

  3. IR Codes versus Macros. In the Driver Wizard, some IR codes complete the needed command; however, to complete the commands, you may need a macro (a sequence of codes).

  4. Adding All Options for AV Connections. When adding AV connections, select all possible options for the device so all options are available for selection.

  5. Power Management Options. A variety of supported Power-Management options are available to choose from, but the optimal method depends on the device. When no other option works, use the Assume the Device is Always On option, and leave it up to the user to ensure manually that the device is on. See Guidelines for Defining Power Management.

  6. Adding Commands and Custom Commands. The Driver Wizard supports a set of default commands for each device type, such as Television, VCR, DVD, etc. If a command you need does not appear on the Default Command list, click Add and use the pull-down menu to look for the command. You can also add custom commands if necessary.

  7. Driver Wizard Screens Vary for Device Types. Because different devices, such as televisions, VCRs, and DVDs have different functionality, the Driver Wizard steps you through different questions as appropriate for that device type, and there are pre-defined generic Device Types that have a common set of commands with varying capabilities that you can use as a base. The Driver Wizard prompts you to select the appropriate commands from these basic commands, as well as identify any additional capabilities that the particular device is able to perform.

 

Example: All televisions have Up/Down channel and Up/Down volume commands, so these basic commands are already included in the generic TV device type. However, not all televisions have direct channel selection, where you can select a channel by pressing a sequence of numbered keys.

 

  1. Creating or Editing Multi-Featured Device Drivers. You can create only combination types that are listed in the Create New Driver wizard. Control4 recommends that you start with an existing driver in the Online Database, add it to your Local Database, and then edit it as needed to meet the new device-driver need. Be patient. You may need to change IR codes if a code doesn't work with your device.

  2. DriverWorks can be used to create 2-way drivers for AV and non-AV devices. It requires some programming skills, however, but leverages the Lua-embeddable scripting language, a powerful, fast, and light-weight (when compared to other scripting languages). See Creating 2-Way Serial or TCP/IP-Controller Drivers Using DriverWorks.

 

Tip: When a device driver is created, you may want to distribute it to multiple projects on different computers. To do this, copy the driver file from the default install directory: C:\Program Files\Control4\Composerxxx \Drivers\Virtual to the same directory on the other computers.

 

This action makes this driver file available to all the projects stored on that computer. Driver files are named by device type, protocol, manufacturer, and model with a.c4i extension.

 

Example: tv_ir_samsung_tx-p1430.c4i.

 

  1. DriverEditor. This tool is designed to assist the dealer or driver developer in creating and maintaining their drivers for use with the Control4 system.

 

  评论这张
 
阅读(1156)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017