© amx 2011 | all rights reserved automate | connect | control | manage © amx 2011 | all rights...

Post on 30-Dec-2015

239 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

© AMX 2011 | All Rights Reserved

AUTOMATE | CONNECT | CONTROL | MANAGE

© AMX 2011 | All Rights Reserved

AUTOMATE | CONNECT | CONTROL | MANAGE

© AMX 2012 | All Rights Reserved

AUTOMATE | CONNECT | CONTROL | MANAGE

RMS ENTERPRISEFor Programmers

© AMX 2012 | All Rights Reserved| All Rights Reserved

Introductions

o Students• Company• Location• Experience• Expectations

o Instructor• Background

2

© AMX 2012 | All Rights Reserved| All Rights Reserved

Site Informationo Breakso Restroomso Phoneso Smoking area o Luncho Building securityo Emergency exito System login/passwordo Course materials

3

© AMX 2012 | All Rights Reserved

What’s New, Terms & Concepts

RMS Enterprise Programming Intro

1

© AMX 2012 | All Rights Reserved| All Rights Reserved

RMS Enterprise Intro| What’s New

o What Does RMS Enterprise Offer:• RMS Engine is Duet Module• i!-ConnectLinx Replaced• RMS API Functions• Infrastructure Changed To REST Based• Leverages Standard Ports and Protocols• Option To Enable Legacy Support

5

© AMX 2012 | All Rights Reserved| All Rights Reserved6

o RMS Enterprise• Asset Monitoring and Control Methods

together in SDK code and tabs on webpage

• SDK Examples: No Codecrafter• Standard Ports and Protocols• Only one instance of

RmsNetLinxAdapterMod required to make NetLinx master a Client Gateway.

• Once Assets are in RMS they can be shown and belong to any Location.

• No Internal Scheduler: Plugins to External Scheduling Systems Only

o RMS 3.x• Control Methods in ConnectLinx. Not together

with the Device Monitoring on the webpages.

• Codecrafter• Bespoke connection across 3839.• Could run multiple instances of RMSEngineMod.

• One NetLinx was usually one room for asset monitoring.

• Internal Scheduler as well as Plugins to External Scheduling Systems. Could book Appointments from RMS webpages.

RMS Enterprise Intro| Enterprise vs 3.x

© AMX 2012 | All Rights Reserved| All Rights Reserved7

RMS Enterprise Intro| Terms & Concepts

o Location Groupso Locationso Client Gatewayso Assets

© AMX 2012 | All Rights Reserved

Review Our Project Scenario

Project Overview

2

© AMX 2012 | All Rights Reserved| All Rights Reserved9

o Small Boardroom• Working System, we need to add the RMS Hooks• PC Input• DVD (Tascam: RS232 port #1: Using the Duet Module)• Sat Receiver (IR port #1)• Doc Cam (IR port #2)• Switcher (Rs232 port #2: loop-backed port)• Projector (Rs232 port #3: loop-backed port)

Project| Working System with No RMS Hooks

© AMX 2012 | All Rights Reserved| All Rights Reserved10

o Let’s look at the existing system.• Uses modules for all device control.• Uses channels and send_commands in accordance with

SNAPI.• Lets look at the SNAPI.axi.• Let’s look at the SNAPI help file in NetLinx Studio: Standard

NetLinx API (SNAPI): Devices • Let’s make sure we all understand the working system.

Now we will work to add all the RMS4 Hooks.

Project| Working System with No RMS Hooks

© AMX 2012 | All Rights Reserved

Use RmsNetLinxAdapterMod to add your NetLinx master to RMS

Make your NetLinx Master a Client Gateway

3

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 1| Download and Run the SDK

o www.amx.como Productso Enterprise Toolso RMS-ENTo RMS Enterprise Software Development Kit (SDK)o Save SDK to Provided Project Foldero Unzip and Run Application File

12

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 1| Download and Run the SDK

o The workspace has no RMS4 SDK hooks.o We will add the hooks together one by one using the

examples from the RMS4 SDK.o Let’s download and run the RMS4 SDK.o Let’s look at what it gives us: o 1) A directory C:\Program Files\AMX\Resource Management

Suite\sdk\netlinx\4.1.xx.o 2) Examples in the Start->Programs Menu which point to the

Duet and NetLinx samples from that directory.

13

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 1| Download and Run the SDK14

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 1| Download and Run the SDK

o Help foldero Includes foldero Monitors foldero Monitors-Duet foldero Monitors-NetLinx

foldero Touch Panels foldero Other files in the root

15

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 1| Download and Run the SDK

o Add an instance of the NetLinx Adapter Module• Add RMS Virtual Device• Add RMS NetLinx Adapter Module in Define_Start

There should only ever be one instance of the RmsNetLinxAdapter module to one NetLinx master.

The inclusion of this module instance in a NetLinx master turns the NetLinx Master into a Client Gateway.

It also enables the RMS Configuration pages in the NetLinx Master’s webpages.

Other devices as well as NetLinx Masters can run similar versions to make them into Client Gateways also, such as Signage Players.

16

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 1| Download and Run the SDK

RmsNetLinxAdapterMod:o Duet Moduleo The RMS Virtual Device:

• Exposes NetLinx based RMS API • SEND_COMMANDS• CHANNELS / LEVELS

o NetLinx Programmers:• Must be used for non-Duet and Duet module devices• Must include this module with a DEFINE_MODULE

o Distributed with RMS Enterprise SDK

17

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 1| Download and Run the SDK

o Add an instance of the NetLinx Adapter Module• Add Data_Event which eliminates the need to point the NetLinx master

at the RMS Server IP/DNS manually in the master’s webpage:

18

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 1| Download and Run the SDK19

o The four send_commands in the data_event are from the RMS Enterprise NetLinx Programmers’ Guide and do the same job as setting this configuration in the webpage of the NetLinx master.

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 1| Copy Across the RMS4 SDK Files20

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 1| Assign Client Gateway inside RMS21

© AMX 2012 | All Rights Reserved

Start with the DVD Monitoring, this is a Duet Monitoring Module

Start to Add-in the Monitoring Modulesfor the Devices in the System

22

© AMX 2012 | All Rights Reserved

Add an instance of the Duet Disc Device Monitoring module.

Add RmsDuetDiscDeviceMonitor Instance

23

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 2| Add Instance of Duet Monitor

o Add in an instance of the RmsDuetDiscDeviceMonitor to monitor the Duet module controlling the Tascam DVD.

o Copy the monitoring module from Monitors-Duet in the SDK4 directory to your working directory.

o Change the Read-Only Status.o Change the name of the Monitoring

Module to RmsDuetDiscDeviceMonitor_Tascam.

o Change the name in the top of the module to match the name of the module.

24

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 2| Add Instance of Duet Monitor25

o Compile, download.

o Look at the Asset in your Location and see the Parameters and Control Methods that have been sent up to RMS from the information inside the Duet module.

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 2| Add Instance of Duet Monitor26

o If we look inside the FTP directory of the NetLinx master, we can see the XML templates which determine which data goes into the Parameters and Control Methods by Asset Type.

© AMX 2012 | All Rights Reserved

Add an instance of the Virtual Device Monitoring module.

Add RmsVirtualDeviceMonitor Instance

27

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 3| Add Instance of Virtual Device Monitor

o Add in an instance of the RmsVirtualDeviceMonitor to monitor the PC Input as an Asset in RMS.

o Copy the monitoring module from ‘monitors’ in the SDK4 directory to your working directory.

o Change the Read-Only Status.o Change the name of the Monitoring

Module to RmsVirtualDeviceMonitor _PC.

o Change the name in the top of the module to match the name of the module.

28

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 3| Add Instance of Virtual Device Monitor

o Add in an instance of the RmsVirtualDeviceMonitor_PC to your main code to allow the PC Input to be registered as an Asset in RMS.

o Lets change some of the asset properties inside the Virtual Monitor module instance:

29

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 3| Add Instance of Virtual Device Monitor30

Note that are no Monitored Parameters or Control Methods with this instance of the Virtual Device Monitor. It exists to get the PC into RMS as an Asset, and also so that the PC Asset can take part in the Source Usage Monitoring for this Location.

© AMX 2012 | All Rights Reserved

Add an instance of the Settop Box Monitoring module.

Add RmsNlSettopBoxMonitor Instance

31

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 4|Add Instance of RmsNlSettopBoxMonitor

o Add in an instance of the RmsNlSettopBoxMonitor to monitor the Sat Receiver as an Asset in RMS.

o Copy the monitoring module from ‘monitors-netlinx’ in the SDK4 directory to your working directory.

o Change the Read-Only Status.o Change the name of the Monitoring

Module to RmsNlSettopBoxMonitor _Sat.

o Change the name in the top of the module to match the name of the module.

32

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 4| Add Instance of RmsNlSettopBoxMonitor

o Add in an instance of the RmsNlSettopBoxMonitor_Sat module to allow the Sat Receiver device to be registered as an Asset in RMS.

o Lets change some of the asset properties inside the RmsNlSettopBoxMonitor module instance:

33

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 4| Add Instance of RmsNlSettopBoxMonitor34

Note that are Monitored Parameters and Control Methods with this instance of the RmsNlSettopBoxMonitor.

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 4| Add Instance of RmsNlSettopBoxMonitor

o Lets go back into the RmsNlSettopBoxMonitor _Sat and look at the #DEFINE statements which define whether the NetLinx module has functionality for the following elements: HAS_POWER, HAS_VOLUME and HAS_TUNER.

o If we keep the HAS_POWER but comment out the #DEFINE statements for HAS_VOLUME and HAS_TUNER then redownload the code, we will then see in the Monitored Parameters and Control Methods that the VOLUME and TUNER elements have gone. This is one method we can use to control the Monitored Parameters and Control Methods given by our monitoring module.

o We have to Delete the Asset in RMS before redownloading so that the Asset is registered again correctly after our changes.

35

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 4| Add Instance of RmsNlSettopBoxMonitor36

We still need to code manually in our NetLinx module the functionality required to meet the remaining Monitored Parameters and Control Methods required. Our Sat Receiver module does not include Power functionality either, so the HAS POWER should be commented out also.

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 4| Add Instance of RmsNlSettopBoxMonitor

o Our Sat Receiver module has functionality for Menu Select, Menu Up, Menu Down, Menu Left, Menu Right, and Menu Select. There are also Channel Up and Channel Down buttons.

o We will now add Control Methods for these functions to the RmsNlSettopBoxMonitor_Sat module.

o There is no monitoring of any information coming back on this IR device so there are no Monitored Parameters to code on this asset in the RmsNlSettopBoxMonitor_Sat module.

37

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 4| Add Instance of RmsNlSettopBoxMonitor38

Add in the Control Method Enqueue functions to RegisterAssetControlMethods().

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 4| Add Instance of RmsNlSettopBoxMonitor39

Add in the code to execute the Control Methods when they are fired.

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 4| Add Instance of RmsNlSettopBoxMonitor40

Delete the Asset from RMS, redownload the code and test the custom Control Methods.

© AMX 2012 | All Rights Reserved

Add an instance of the DocCam Monitoring module.

Add RmsNlDocCameraMonitor Instance

41

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 5|Add Instance of RmsNlDocCameraMonitor

o Add in an instance of the RmsNlDocCameraMonitor to monitor the Doc Cam as an Asset in RMS.

o Copy the monitoring module from ‘monitors-netlinx’ in the SDK4 directory to your working directory.

o Change the Read-Only Status.o Change the name of the Monitoring

Module to RmsNlCocCameraMonitor _MyDocCam.

o Change the name in the top of the module to match the name of the module.

42

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 5| Add Instance of RmsNlDocCameraMonitor

o Add in an instance of the RmsNlDocCameraMonitor module to allow the Doc Cam device to be registered as an Asset in RMS.

o Lets change some of the asset properties inside the RmsNlDocCameraMonitor module instance:

43

© AMX 2012 | All Rights Reserved| All Rights Reserved

o Our Doc Cam module has functionality for Zoom In and Out, and Focus In and Out.

o We will now add Control Methods for these functions to the RmsNlDocCameraMonitor_MyDocCam module.

o There is no monitoring of any information coming back on this IR device so there are no Monitored Parameters to code on this Asset in the RmsNlDocCameraMonitor_MyDocCam module.

44

Exercise 5|Add Instance of RmsNlDocCameraMonitor

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 5| Add Instance of RmsNlDocCameraMonitor45

Add in the Control Method Enqueue functions to RegisterAssetControlMethods().

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 5| Add Instance of RmsNlDocCameraMonitor46

Add in the code to execute the Control Methods when they are fired.

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 5| Add Instance of RmsNlDocCameraMonitor47

Download the code and test the Control Methods.

© AMX 2012 | All Rights Reserved

Add an instance of the Projector Monitoring module.

Add RmsVideoProjectorModule Instance

48

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 6|Add Instance of RmsNlVideoProjectorMonitor

o Add in an instance of the RmsNlDocCameraMonitor to monitor the Doc Cam as an Asset in RMS.

o Copy the monitoring module from ‘monitors-netlinx’ in the SDK4 directory to your working directory.

o Change the Read-Only Status.o Change the name of the Monitoring

Module to RmsNlCocCameraMonitor _MyProj.

o Change the name in the top of the module to match the name of the module.

49

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 6| Add Instance of RmsNlVideoProjectorMonitor

o Add in an instance of the RmsNlVideoProjectorMonitor_MyProj module to allow the Projector device to be registered as an Asset in RMS.

o Note that in the SDK, there are Monitor files for Duet modules, NetLinx modules and Generic modules (neither Duet nor NetLinx specific). The RmsNlVideoProjectorMonitor is in the ‘monitors-netlinx’ folder. The Projector module is a NetLinx module.

o Comment out the #DEFINE statements for HAS_DISPLAY_ASPECT_RATIO, HAS_SOURCE_SELECT and HAS_VOLUME in this module.

o The Asset will not show until SNAPI channels 251 and 252 go high.

o Lets change some of the asset properties inside the RmsNlDocCameraMonitor module instance:

50

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 6| Add Instance of RmsNlVideoProjectorMonitor51

These are the Monitored Parameters you will see from the RmsNlVideoProjectorMonitor module. The Lamp Power will show lamp ‘On’ and ‘Off’ status but not ‘Warming’ or ‘Cooling’. We will add those feedback elements in manually next by overriding the asset’s parameterKey (projector.lamp.power).

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 6| Add Instance of RmsNlVideoProjectorMonitor52

Also, test the Lamp Consumption parameter reporting value by sending a string in telnet: send_command vdvPROJECTOR, ‘LAMPTIME-30’. To set the parameter value, use ‘LAMPTIME-’. To query the Lamp Consumption parameter, use ‘?LAMPTIME’.

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 6| Add Instance of RmsNlVideoProjectorMonitor

o Add a poll in the Main Source to poll the Lamphours every 30 seconds.

o This will also stop the channel 251 timeout which times out every 70 seconds inside the Projector module and causes the Asset to report a Hotlist Alert.

o It will also ensure that the Lamphours reporting is always correct.

o Note: In our project’s Projector module, the Lamphours are mocked-up internally and we have a loopback on the RS232 port.

53

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 6| Add Instance of RmsNlVideoProjectorMonitor54

• Add further code in the monitoring module to track the Lamp Warming (LAMP_WARMING_FB) and Lamp Cooling (LAMP_COOLING_FB) channels. We should do this because the SNAPI components we are using give us feedback in the Lamp Power Parameter for ‘On’ and ‘Off’ but will not give us feedback for the ‘Warming’ or ‘Cooling’ states.

• We add the ‘Warming’ and ‘Cooling’ elements by overriding the existing asset parameterKey (projector.lamp.power).

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 6| Add Instance of RmsNlVideoProjectorMonitor55

o Illustration of the addition of the two extra elements to the Enumerated List of the asset parameterKey projector.lamp.power, after we override the RegisterAssetParameters() function for this parameterKey.

© AMX 2012 | All Rights Reserved

Add an instance of the Switcher Monitoring module.

Add RmsNlSwitcherMonitor Instance

56

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 7|Add Instance of RmsNlSwitcherMonitor

o Add in an instance of the RmsNlSwitcherMonitor to monitor the Switcher as an Asset in RMS.

o Copy the monitoring module from ‘monitors-netlinx’ in the SDK4 directory to your working directory.

o Change the Read-Only Status.o Change the name of the Monitoring

Module to RmsNlCocCameraMonitor _Autopatch.

o Change the name in the top of the module to match the name of the module.

57

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 7| Add Instance of RmsNlSwitcherMonitor

o Add in an instance of the RmsNlSwitcherMonitor_Autopatch module to allow the Switcher device to be registered as an Asset in RMS.

o Note that in the SDK, there are Monitor files for Duet modules, NetLinx modules and Generic modules (neither Duet nor NetLinx specific). The RmsNlSwitcherMonitor is in the ‘monitors-netlinx’ folder. The Switcher module is a NetLinx module.

o Comment out the #DEFINE statements for HAS_VOLUME, HAS_GAIN and HAS_FIXED_POWER in this module.

o The Asset will not show until SNAPI channels 251 and 252 go high.

o Lets change some of the asset properties inside the RmsNlSwitcherMonitor module instance:

58

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 7| Add Instance of RmsNlSwitcherMonitor

o This time, we will also add Metadata to the monitoring module.

o Metadata is new in RMS4 and is usually just informative data which is static.

o Use the different variations of the RmsAssetMetadataEnqueue functions to decide what kind of Metadata you want to add.

59

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 7| Add Instance of RmsNlSwitcherMonitor60

These are the Control Methods given to us by the RmsSwitcherMonitor instance. But in this Exercise, we are also going to add some further monitored parameters into our monitoring module manually.

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 7| Add Instance of RmsNlSwitcherMonitor61

Add the code to register the custom parameters and set the values of the custom parameters.

© AMX 2012 | All Rights Reserved

When to Delete Assets and Gateways

62

© AMX 2012 | All Rights Reserved| All Rights Reserved

Overview| When to Delete Assets and Gateways63

Delete an ASSET when you change the REGISTRATION details of the Asset in NetLinx code. It’s OK to delete the Asset: when the code is downloaded it will just re-register and reappear.

Delete the CLIENT GATEWAY from RMS when you change the code running inside it completely. If you do not do this, then the Client Gateway will remain in the Location that it was in previously and will still retain all previous registrations.

© AMX 2012 | All Rights Reserved| All Rights Reserved

Overview| When to Delete Assets and Gateways64

To Delete a CLIENT GATEWAY from RMS, you must first make sure the gateway is Offline (Red Globe in RMS). If the Client Gateway is not Offline then the Delete button is greyed out.

To make a Client Gateway go offline, the trainer will show you how to go into the master’s webpages and uncheck the Enabled checkbox to stop the Client Gateway connecting to RMS.

© AMX 2012 | All Rights Reserved

Adding SDK Pieces to Starter Code & Customizing Code

The RMS Code

65

© AMX 2012 | All Rights Reserved| All Rights Reserved

Overview| Code Agenda In Steps

1. NetLinx Adapter2. Client Gui – For help desk/hotlist reporting on the panel3. Touch Panel Monitor – For monitoring4. Control System Monitor – Devices show up on server5. Compile/Errors6. System Power7. System Mode8. Device Monitoring9. Source Usage10.Registering Assets11.Custom Files

66

© AMX 2012 | All Rights Reserved

Adding SDK Pieces to Starter Code & Customizing Code

Client GUI, Touch Panel Monitor and Control System Monitor Modules

67

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 8 |Client GUI

o Client GUI • We have already added these

pages from the SDK to the TP4 file we are using

68

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 8| Add the Modules for this Exercise

o Client GUI • RmsClientGui_dr4_0_0

o Touch Panel Monitor• RmsTouchPanelMonitor• Add RMS Touch Panel Module for EACH physical touch panel

o Control System Monitor• RmsControlSystemMonitor• Add Control System Module (only 1 per NetLinx System)

69

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 8| Demonstration of Functionality70

© AMX 2012 | All Rights Reserved

Adding SDK Pieces to Starter Code & Customizing Code

System Power Module

71

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 9| System Power

o Adding System Power

o RmsSystemPowerMonitoro Add sample code from the

SDK example.o Make sure all of the System

Power Up and System Power Down functionality is inside the two functions for On and Off.

72

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 9| System Power

o Adding System Power

o Test functionality: the system power status should now be tracked in the System Power parameter, and there should be Control Methods added.

73

© AMX 2012 | All Rights Reserved

Adding SDK Pieces to Starter Code & Customizing Code

System Mode Module

74

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 10| System Mode

o Adding System Modeo RmsSystemPowerMonitoro Take the functionality in the

btnSourceButtons button_event and paste that into the ChangeMySystemMode() function. Call the ChangeMySystemMode() function from inside the button_event and pass the modeName[].

o The other functions in the SDK example are both required also:

o RmsEventSystemModeChanged()o RmsEventSystemModeChangeRequest()

75

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 10| System Mode

o Adding System Mode

o Test functionality: the system mode status should now be tracked in the System Mode parameter, and there should be Control Methods added.

76

© AMX 2012 | All Rights Reserved

Adding SDK Pieces to Starter Code & Customizing Code

Source Usage Module

77

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 11| Source Usage

o Adding Source Usageo Inside the

RmsSourceUsageMonitor module, set the maximum number of source assets to participate in Source Usage Monitoring.

78

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 11| Source Usage

o Adding Source Usageo #INCLUDE 'RmsSourceUsage'o Assign the Assets to the

Source Usage functionality as per the examples in the SDK4. These can be assigned as either mutually exclusive or not exclusive to each other.

79

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 11| Source Usage

o Adding Source Usage

o Test functionality: using the Source Usage widget on the dashboard.

o You should also see a message in telnet with msg on all every time a participating source is switched.

80

© AMX 2012 | All Rights Reserved

Adding SDK Pieces to Starter Code & Customizing Code

Power Distribution Unit Monitor Module

81

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 12| Power Distribution Unit Monitor

o Adding Power Distribution Unit Monitoring

o RmsPowerDistributionUnitMonitoro For this example we will use some

test devices connected in to our PDU IEC sockets but we will pass in the devices in our test room code.

82

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 12| Power Distribution Unit Monitor

o Adding Power Distribution Unit Monitoring

o Inside the RmsPowerDistributionUnitMonitor module, comment out the HAS_TEMPERATURE_SENSOR and add in the names of the devices into the array shown here.

83

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 12| Power Distribution Unit Monitor

o Adding Power Distribution Unit Monitoring

o Test functionality: using the Asset Power Consumption widget.

o It is not possible to display the Asset Names. This monitoring and its associated reporting is done on Asset Type only.

84

© AMX 2012 | All Rights Reserved

Adding SDK Pieces to Starter Code & Customizing Code

Scheduling Functionality

85

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 13| Scheduling Functionality

o Adding Scheduling Functionality

o #INCLUDE 'RmsSchedulingApi'

o Bring across the sample code from the Scheduling Example in the SDK4.

o Bring across both EventStarted and EventEnded functions.

86

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 13| Scheduling Functionality

o Adding Scheduling Functionality

o All students have a Location where in which their Client Gateway is assigned. Edit the Location and add a Scheduling Resource to that Location.

87

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 13| Scheduling Functionality

o Adding Scheduling Functionality

o Test functionality: all students have a touch panel that should start to work showing and allowing bookings for their own Location.

o Drag the panel asset to other Locations on the server: see the bookings for the other Location appear.

88

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 13| Scheduling Functionality

o Adding Scheduling Functionalityo Test functionality: When scheduling bookings start and stop, we can catch these events in the o RmsEventSchedulingEventStarted() and o RmsEventSchedulingEventEnded() functions, and call a new System Mode based on the type

of meeting just begun, or set the normal System Mode back when the meeting ends.

89

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 13| Scheduling Functionality

o Callback Functionso Fire as part of the communication process with RMS.o Require the programmer to determine the callbacks of interest by including '#DEFINE'

statements in their code.o For each of the scheduling callback functions, the corresponding ‘#DEFINE’ statement is

listed in the RMS NetLinx Programmers’ Guide.

90

© AMX 2012 | All Rights Reserved| All Rights Reserved

Exercise 13| Scheduling Functionality

o Add Function to Create a Booking from Code

o Function is RmsBookingCreate().o Callback function is

RmsEventSchedulingCreateResponse().o Suscribe #DEFINE statement is for

INCLUDE_SCHEDULING_CREATE_RESPONSE_CALLBACK

91

© AMX 2012 | All Rights Reserved| All Rights Reserved92

Questions & Answers

© AMX 2012 | All Rights Reserved| All Rights Reserved93

Congratulations!

o You have completed the content portion of RMS For Programmers!

o You should now understand:• How to take the RMS SDK and customize RMS Code

to work with the Specs for your Specific Project

© AMX 2012 | All Rights Reserved| All Rights Reserved94

To Complete This Course

o In order to get credit for this course:• Please Pass the RMS Enterprise For Programmers Written

Exam in the AMX University Training LMS with 80% or higher

© AMX 2012 | All Rights Reserved| All Rights Reserved95

To Become An ACE

o To become an ACE RMS Enterprise Expert Complete:• RMS For Installers & IT Personnel + Exam• RMS For Administrators & Users + Exam• RMS For Programmers + Exam• You must pass each exam with 80% or higher

top related