AMX CAFE DUET V1.8 Instruction Manual
AMX CAFE DUET V1.8 Instruction Manual

AMX CAFE DUET V1.8 Instruction Manual

Integrated development environment for netlinx duet (version 1.8)
Table of Contents

Advertisement

instruction manual
Café Duet™
Integrated Development
Environment for NetLinx Duet
(version 1.8)
User's Guide
S o f t w a r e

Advertisement

Table of Contents
loading

Summary of Contents for AMX CAFE DUET V1.8

  • Page 1 instruction manual Café Duet™ Integrated Development Environment for NetLinx Duet (version 1.8) User’s Guide S o f t w a r e...
  • Page 2 UPON WRITTEN NOTICE TO LICENSEE. In the event that AMX terminates this License, the Licensee shall return or destroy all originals and copies of the AMX Software to AMX and certify in writing that all originals and copies have been returned or destroyed.
  • Page 3: Table Of Contents

    Table of Contents Introduction................ 1 What’s New in this Release ............ 1 Café Duet version 1.8 features ........... 1 Duet SDK features supported in this release......2 Café Duet Minimum System Requirements ......2 Supported operating systems ............. 2 PC requirements................. 2 NetLinx Master Requirements..........
  • Page 4 Using NetLinx Studio to Transfer JAR Files......37 Downloading the Project Files to a Target Master ....38 Using AMX WebUpdate to update the Plug-in ...... 38 Using Duet Remote Debug ..........41 Default Settings and Initial Preferences ........ 41 Default Compiler Compliance ...........
  • Page 5 Step 1 - Run the Module Wizard ..........54 Step 2 - Adding Necessary Plumbing ........56 Step 3 - Adding the Device Specific Code........ 58 Step 4 - Compile and Pack Process ......... 60 Step 5 - Regenerating Project files (if a change is made) ..60 Using SNAPI and Duet Modules in NetLinx Studio....
  • Page 6 Café Duet v1.8 - User’s Guide...
  • Page 7: Introduction

    Introduction Introduction With Café Duet , AMX opens the door to a broad knowledge base and vast programming resources by integrating Java and NetLinx technologies. This NetLinx Duet architecture extends the power of your existing NetLinx systems long into the future and expands the ©...
  • Page 8: Duet Sdk Features Supported In This Release

    Introduction Duet SDK features supported in this release This release of Café Duet supports the following Device Module Application Programming Interfaces: Device Module Application Programming Interfaces Amplifier HVAC Slide Projector Audio Conferencer I/O (Input/Output) Switcher Audio Mixer Keypad Text Keypad Audio Processor Light Audio Tape...
  • Page 9: Netlinx Master Requirements

    2.4 (or higher). If you have not already installed the latest version of NetLinx Studio on your PC: Download the latest version of NetLinx Studio from www.amx.com > Tech Center > Downloadable Files > Application Files > NetLinx Studio 2.4.
  • Page 10 From the Select Cafe Duet Installation Location screen, click Next to accept the default Café Duet folder location (C:\Program Files\AMX Control Disc\Cafe Duet). Click the Browse button to select a different directory for the installation. If the hard drive selected has less than 125MB of free space, you will be prompted to select another installation directory or abort the current installation.
  • Page 11 Café Duet CD case. This serial number will work on only one PC. Once the Serial Number has been entered and a license key retrieved from AMX, you cannot install the software on a different PC using the same serial number.
  • Page 12 AMX. Keep this information available (for possible future support use). Click the Next button to complete the installation. If there is a failure during the registration process, contact AMX Technical Support for assistance. Café Duet v1.8 - User’s Guide...
  • Page 13 The JRE (Java™ 2 Runtime Environment) is installed as part of the installation executable. The Cafe Duet readme.txt file (located in C:\Program Files\ AMX Control Disc\Cafe Duet) is also installed as part of the installation executable and provides a description of the application and gives a version number.
  • Page 14: Launching Café Duet

    Introduction Launching Café Duet Double-click the Cafe Duet icon to launch the application. If selected during the installation process, the icon appears on your desktop. Once Café Duet begins to run, a Workspace Launcher appears on-screen (FIG. 7) and asks you to select a workspace location. Use the Browse button to choose a folder location where the projects will be stored.
  • Page 15: Overview Of The Duet Plug-In

    AMX Software, this option provides the ability to collect Device Class information such as: Device Class functions, function parameters, etc., so that future AMX applications can make smart decisions based on that previously obtained metadata. Café Duet v1.8 - User’s Guide...
  • Page 16: Setting Up The Manifest Editor Preferences

    Overview of the Duet Plug-in - If this option is not selected then the Device Class metadata information is not collected; which in turn speeds-up the Module packing process. - Another result of disabling this option is that the JAR Export - Select Methods dialog (FIG.
  • Page 17: Creating A Duet Module Project

    • An example is: 3000 Research Drive Richardson, TX 75082 or www.amx.com. • Module-Copyright Enter copyright information for this module. • An example is: Copyright (c) 2006 AMX Corporation. All Rights Reserved. • Module-DocURL This is a URL used to document this module.
  • Page 18 Overview of the Duet Plug-in New Project - Select dialog New Duet Module Project dialog FIG. 10 Creating a new Duet Module project The fields and options in this dialog include: • Project name: The Project name field must not be empty nor can it be a single period character (".").
  • Page 19 New Project Wizard creates both a source folder for the source files, and an output folder for the project’s class files. In order to have the Duet module function properly on a target AMX Master, you must select the Use default compiler compliance (currently 1.4) option.
  • Page 20: Defining The Module

    Overview of the Duet Plug-in FIG. 11 New Duet Module Project - Duet Module Settings dialog (Source and Libraries) Defining the Module Use the options in the Duet Module Content dialog (FIG. 12) to define device properties for the Module. FIG.
  • Page 21 (up to 55 alpha-numeric characters). Text is required within this field. • An example is: AMX Corporation. • The Device Make and Device Model field information determines the Class name in the Duet Module Devices dialog.
  • Page 22: Generating A New Device Class

    (up to 255 alpha-numeric characters) should be unique to this module.Text is required within this field. • An example is: com.amx.switcher.dr1_0_0 (where you are controlling an AMX switcher). • Class Name The class name for this field is pre-generated with a combination of the make and model entered on the previous Duet Module Content dialog.
  • Page 23: Overriding Or Implementing Methods

    Overview of the Duet Plug-in FIG. 13 New Duet Module Project - Duet Module Devices dialog Overriding or Implementing Methods Within the Override/Implement Methods dialog (FIG. 14), you can choose whether to either override or implement specific default device functions. Click to place a checkmark adjacent to a function to override its default state.
  • Page 24: Duet Perspective

    Overview of the Duet Plug-in From within the Module group, the handleAdvancedEvent() and passthru() entries are recommended selections for all devices, as is the selection of the dispose() entry ONLY for IP devices (used for thread cleanup and such). Another recommendation is to select nothing within the Object group.
  • Page 25 Overview of the Duet Plug-in Editors Package Explorer Outline Viewer FIG. 15 Default Duet Perspective The Component Editor is opened by double-clicking on the components.xml file from META-INF folder in the Package Explorer view or right-clicking on the file and selecting Open with > Component Editor.
  • Page 26: Debug Perspective

    Overview of the Duet Plug-in view. When you double-click the icon for a problem, error, or warning, the editor for the associated resource automatically opens to the relevant line of code. The Tasks view displays system-generated errors, warnings, or information associated with a resource. These are typically produced by builders.
  • Page 27 Overview of the Duet Plug-in FIG. 17 Editors Window Outline: this window displays an outline of the structure for the currently active Java file located within the editor area. FIG. 18 Outline Window Viewer: this window consists of the following elements. FIG.
  • Page 28: Accessing The Debug Perspective

    Overview of the Duet Plug-in The Tasks view displays system-generated errors, warnings, or information associated with a resource. These are typically produced by builders. For example, if you save a Java source file that contains syntax errors, the errors will be logged within this view. The Console view shows the output of a process and allows you to provide keyboard input to the process.
  • Page 29: Duet Manifest Editor

    Overview of the Duet Plug-in Click the OK button when you are done. Save your new perspective by selecting Window > Save Perspective As. From within the Save Perspective As dialog, enter a name for the new custom perspective and press the OK button. Duet Manifest Editor This editor outlines both the pre-populated Module and User-Defined Manifest Items for the current Duet project.
  • Page 30 • The device parent class. This field is pre-populated by the application. • An example of an SDKClass is: com.amx.duet.devicesdk.Switcher. • This field cannot be empty and must be a valid Java Type name. Café Duet v1.8 - User’s Guide...
  • Page 31 • The parent class of the device interface. This field is pre-populated by the application. • An example of an SDKInterface is: com.amx.duet.devicesdk.ISwitcher. • This field cannot be empty and must be a valid Java Type name. Device-Class: This is a fully qualified name of the device class. The class name is chosen within the Wizard.
  • Page 32 • A specification of native code contained within this module’s JAR file. Module-Copyright: • The copyright information for this module. • An example is: Copyright (c) 2006 AMX Corporation. All Rights Reserved. Module-Vendor: • A text description of the vendor.
  • Page 33 Overview of the Duet Plug-in Duet Manifest Editor (Cont.) File Dependencies: • This section specifies the files (to be imported) that contain the packages and services the module requires. • Add a JAR or ZIP file by pressing the Add button. •...
  • Page 34 Overview of the Duet Plug-in Duet Manifest Editor (Cont.) Choose Services dialog: • This dialog provides a listing of all available services. • The Open Type field allows you enter a letter and then have the service listing locate only those entries that match. If you enter an N, the list changes to show all entries beginning with the letter N.
  • Page 35: Component Editor

    Overview of the Duet Plug-in Component Editor This editor defines the pre-populated Component Interfaces and their Port Assignments. The interfaces are based on the parent device. Some example Switcher Component Interfaces are: ISwitcherComponent, IVolumeComponent, and IGainComponent. This editor allows you to specify the number of ports per component; starting at 1. Open this editor (FIG.
  • Page 36: Procedures For Using The Extract Interface Dialog

    Overview of the Duet Plug-in The following table provides a description of the fields and sections within this editor. Component Editor Component Interfaces: • This section of the editor provides a listing of all pre-populated interfaces (based on the parent device). •...
  • Page 37: Using The Extract Interface Dialog

    Overview of the Duet Plug-in Using the Extract Interface dialog Configure the parameters and members to declare in the interface: Interface name: Name of the device interface. Change references to the class..: Select this option to alter all instances of the word ‘AMXSwitcher’...
  • Page 38: Creating Netlinx-Compliant Java Files

    Overview of the Duet Plug-in Creating NetLinx-compliant Java Files Before the Café Duet created module files can be used by NetLinx Studio, they must first be properly created and then exported, which involves: Compiling the module stub Packing the module files to a JAR file Quick Packing the Module Using NetLinx Studio to Transfer JAR Files Compiling the Module Stub...
  • Page 39 Overview of the Duet Plug-in Expand each selection and check-off all desired methods FIG. 24 Selecting the methods for JAR export The collected metadata is then used by the Visual Architect application to build its device database and in turn automate the system program generation process.
  • Page 40 Overview of the Duet Plug-in Make sure to select the package, expand the selection, and check-off all desired files FIG. 25 Exporting a Module using the JAR Export dialog When packing a module using helper classes: - Expand the project from within the "Select the resources to export:"...
  • Page 41 Overview of the Duet Plug-in Encryption button: this button enables you to modify the encryption status of a particular file. If the selected file currently has no encryption, the button reads Enable Encryption. If the selected file is currently encrypted, the button reads Disable Encryption.
  • Page 42: Quick Packing The Module

    Overview of the Duet Plug-in Quick Packing the Module Quick Packing is a command procedure that mimics the Pack Module action. You must first Pack the Module before being able to use this feature. Packing properties are not saved when Duet is simply closed, but rather only packing the Module saves these packing properties.
  • Page 43: Using Netlinx Studio To Transfer Jar Files

    Overview of the Duet Plug-in Duet Manifest Editor field items affected/updated: - Module-Name - Module-Version - Device-Activator - Device-Class - Device-Interface (if available) - Export-Package Confirm that all of the above components have been properly updated. Using NetLinx Studio to Transfer JAR Files Launch NetLinx Studio version 2.4 (or higher).
  • Page 44: Downloading The Project Files To A Target Master

    The AMX WebUpdate program is a stand-alone application that communicates with the AMX website, allows a user to select from a list of available AMX Software programs to choose for updating, determines the latest version of the selected applications, returns a listing of available updates, allows a user to download the selected installation files, and upon request, launches the installation of those downloads.
  • Page 45 Follow these procedures to download and install any updates from within the Café Duet application: If you have not already done so, create an AMX.COM user account and login to confirm a successful activation. Refer to the AMX WebUpdate Help file for specific sign-up, login, and download procedures.
  • Page 46 Overview of the Duet Plug-in If there are new updates available for Duet, you will be notified of such within the AMX WebUpdate popup. Click OK from within this popup to begin the installation process. If there are no new updates available, this popup will display the following message: No updates are required at this time.
  • Page 47: Using Duet Remote Debug

    Using Duet Remote Debug Using Duet Remote Debug Default Settings and Initial Preferences Default Compiler Compliance Select Windows > Preferences… > [+] Java > [+] Compiler to access the Java Compiler options. FIG. 26 Java Compiler Options In the JDK Compliance preferences group box: The default ‘Compiler compliance level’...
  • Page 48: Default Duet Perspective Behavior

    (e.g.: watch point or a break point is encountered by the AMX Master). But for Café Duet, launching a debug session can take 30 to 90 seconds depending on your situation. The AMX Master is rebooted into debug mode which requires a connection handshake before the Master can continue loading the JVM.
  • Page 49: Default Progress View - When Launching A Remote Duet Debug Session

    Using Duet Remote Debug FIG. 27 Launching Options The Open the associated perspective when launching, and Launch in debug mode when workspace contains breakpoints groups have the following (radio- button) options: Always (immediately switch perspectives), Never (Eclipse default), Prompt (Café Duet default) Default Progress View - When Launching a Remote Duet Debug Session The default behavior for viewing the Duet Remote Debug ‘Launching progress’...
  • Page 50 Using Duet Remote Debug As such, Cafe Duet provides optional controls that allow you to double-click the bottom-right progress mini-bar animation (FIG. 28) to expand the Launching progress (FIG. 29) view shortly after launching a Duet Remote Debug session. FIG. 28 Progress Mini-bar Animation FIG.
  • Page 51: Default Launch Timeout

    The default ‘Launch timeout (ms)’ setting is 60000 ms (60 seconds) Within a Café Duet session, the user may change default preferences. Once the user is familiar with their AMX Master timings, the initial setting for ‘Launch Timeout (ms) value can be adjusted to suit.
  • Page 52: Reboot Sequence Problems

    PRE-DATED FIRMWARE VERSION A prior version of Production AMX Master Firmware image may still be in use that does not respond to the host PC debug requests. Although prior versions of AMX Firmware will ‘reboot’ during the launch sequence, it will not handshake or reboot into debug mode.
  • Page 53: Accessing The Debug Perspective

    See the Debug Perspective section on page 20 for a description of the elements in the Debug perspective. Using Duet Remote Debug The ‘Duet Remote Debug’ option allows you to enable AMX Master remote debug. Use this feature to debug Duet Modules. Debugging Duet Modules entails three main operations: 1.
  • Page 54: Debugging A Duet Module

    Using Duet Remote Debug Uncheck the Reboot option (indicated by checkboxes in the Reboot column of the Files To Send table). The reboot option is selected by default, but in this case, Duet Remote Debug will reboot the Master so it is not necessary.
  • Page 55: Setting Breakpoints And Watchpoints

    If a connection handshake between Café Duet and the Master JVM is not established in a timely manner, the Duet debug launch attempt will abort after 60 seconds. Likewise the AMX Master in debug mode will not continue JVM boot-up until a debug handshake occurs. The AMX Master will time out after about 100 seconds and reboots to its normal mode of operations as a debug mode failsafe.
  • Page 56: Changing Variable Values During A Duet Debug Session

    Using Duet Remote Debug F5 = Step Into F6 = Step Over F7 = Step Return F8 = Resume Note: These controls are also available as toolbar buttons: A green highlight depicts the next line of Java that debug will execute. The default Debug Perspective presents a Call Stack, a Control View for Watchpoint(variable)/Breakpoint(line)/Expression(conditional) settings, the Java Editor view, and current class Outline tree.
  • Page 57: Making Incremental Code Changes And Starting A New Debug Session

    (non-debug mode) by highlighting the uppermost stack-line (beg: Duet icon, "[Duet Remote Debug]"), then pressing the AMX Boot icon to reset the AMX Master from debug controls. This function has the equivalent effect as the NetLinx Studio’s Tools > Reboot the Master Controller…...
  • Page 58: Duet Remote Debug Launch Configuration Error Messages

    Port address' edit field is not in valid range. 'Port address' is not valid for debugging - Indicates that the 'IP Port address' edit field is an AMX reserved port (eg: 1319). 'Port address' value of nnnn is not valid - Indicates that the 'IP Port address' edit field “base implementation”...
  • Page 59: Creating A Sample Module

    Duet course provided by AMX University. This three-day course for programmers uses the AMX Café Duet software to develop communication modules for third party devices. J2ME and OSGI are discussed in detail along with AMX JAVA Classes, methods, and components.
  • Page 60: Creating A New Duet Module

    Package Name: Enter the device’s package name (up to 255 alpha-numeric characters). This package name should be unique to the module. Text is required within this field. For example: com.amx.switcher.dr1_0_0 (where you are controlling an AMX switcher). By choosing a switcher, this provides the expected functionality for your device.
  • Page 61 (up to 255 alpha-numeric characters). Text is required within this field. Example is: AmxSwitcher. Available Devices: a list of available Duet devices (com.amx.duet.devicesdk) that can be selected and then used to generate a new device class. This list of available devices is pulled from the DeviceSDK.
  • Page 62: Step 2 - Adding Necessary Plumbing

    Creating a Sample Module FIG. 33 Override/Implement Methods dialog Click Yes to confirm the use of the Duet Perspective (project default). You can also select not to receive this message in the future. It is within this perspective that a user can begin creating device specific code. At this point, you should have a Package to explore.
  • Page 63 Click on the warning icon to begin the resolution process. Doing so causes a list of options to appear. Double click on import 'com.amx.duet.core.master.netlinx.IDataListener'. This adds another import statement to make the code available. There is still an unresolved issue.
  • Page 64: Step 3 - Adding The Device Specific Code

    Creating a Sample Module Just under the declaration of the class, you can create your global variable (in this example: dvActual) like this: public class AmxSwitcher extends Switcher implements IDataListener { NetLinxDevice dvActual; …then in the constructor: public AmxSwitcher(BundleContext bctxt, NetLinxDevice nd, Properties props) { dvActual = nd;...
  • Page 65 Creating a Sample Module There are three versions of the switch method; each with a different method signature. The appropriate method is called based on the parameters sent. For the purpose of this discussion, we'll continue with the simplest form: one input to one output (as seen below). public void switchInputToOutput (SwitchLevel sl,int input,int output) { // device specific code goes here.
  • Page 66: Step 4 - Compile And Pack Process

    Creating a Sample Module Create the 'receive' portion of the code by going to handleDataEvent(Event and adding the following text: arg0) public void handleDataEvent(Event arg0) { switch(arg0.type){ case Event.E_STRING: { incoming.append(new String((byte[]) arg0.dataValue)); contains the messages received from the controlled device. incoming Use the methods contained in to parse the information...
  • Page 67: Using Snapi And Duet Modules In Netlinx Studio

    Creating a Sample Module Regenerate the project by either clicking the Regenerate icon from below the Main menu or right-click anywhere within the Package Explorer view and from the on-screen context-sensitive menu select Duet > Regenerate. Using SNAPI and Duet Modules in NetLinx Studio Step 1 - Using SNAPI and NetLinx Studio Begin by importing the JAR file into NetLinx Studio (refer to the Using NetLinx Studio to...
  • Page 68: Step 3 - Sending The File To The Netlinx Master

    Creating a Sample Module Prepare the project for download to a Master by confirming that all necessary JAR files have been added to the Module folder within the active Workspace. Refer to the Using NetLinx Studio to Transfer JAR Files section on page 37 for more information. If you use a 3-file format (UI.AXS, Main.AXS, or Comm.JAR), then ONLY the Build Active System and Build Workspace options are functional.
  • Page 69: Appendix - Metadata

    Device metadata should be associated with a Duet module in order to determine the context and usage cases for the module. The metadata can be used in conjunction with AMX's device database in order to help build control system programs automatically. Below is a table which provides a listing of the available device metadata types and their specific properties.
  • Page 70 Appendix - Metadata Device Metadata (Cont.) Devices: Property Name: Property Type: Default Value: Disc Device: Direct-Disc-Selection Boolean false Num-Discs Integer Support-Discrete-Power Boolean false Disc-Device-Type String Selections include: DVD, CD, Laser Disc, Mini Disc, and Other Discs. Document Camera: Support-Discrete-Power Boolean false HVAC: Num-Thermostats...
  • Page 71 Appendix - Metadata Device Metadata (Cont.) Devices: Property Name: Property Type: Default Value: Pre Amp Surround Support-Discrete-Power Boolean false Sound Processor: Receiver: Supported-Bands String FM, AM Support-Discrete-Power Boolean false Security System: Num-Partitions Integer Support-Points-Detail Boolean false Sensor Device: Settop Box: Supported-Bands String Support-Discrete-Power...
  • Page 72 Appendix - Metadata Device Metadata (Cont.) Devices: Property Name: Property Type: Default Value: Video Processor: Video Projector: Support-Discrete-Power Boolean false Video Wall: Support-Discrete-Power Boolean false Volume Controller: Weather: Num-Forecast-Days Integer blank Café Duet v1.8 - User’s Guide...
  • Page 73 Appendix - Metadata Café Duet v1.8 - User’s Guide...
  • Page 74 ATLANTA • BOSTON • CHICAGO • CLEVELAND • DALLAS • DENVER • INDIANAPOLIS • LOS ANGELES • MINNEAPOLIS • PHILADELPHIA • PHOENIX • PORTLAND • SPOKANE • TAMPA 3000 RESEARCH DRIVE, RICHARDSON, TX 75082 USA • 800.222.0193 • 469.624.8000 • 469-624-7153 fax • 800.932.6993 technical support • www.amx.com...

This manual is also suitable for:

Cafe duet

Table of Contents