AMX IS-SPX-1000/1300 manual Enabling the Network API, Sample Code

Page 96

Shared Variables

Sample Code

Updating a variable

function send_update( $host, $port, $name, $value ) {

using PHP

$s=fsockopen( $host, $port );

 

fwrite( $s, “UPDATE \”$name\" \"$value\"\r\n" );

 

fclose( $s );

 

}

 

Note: this simplified example does not handle the escaping of control characters.

Sending an event

Sending a keydown event for the key 'V' with control modifier pressed.

using PHP

function send_copy_key( $host, $port ) {

 

$s=fsockopen( $host, $port );

 

fwrite( $s, “EVENT \”keydown\” \”Ctrl+V\”\r\n” );

 

fclose( $s );

 

}

Updating a variable

telnet 192.168.1.10 1234

using telnet

Trying 192.168.1.10...

 

Connected to 192.168.1.10

 

Escape character is '^]'.

 

UPDATE “menu” “P1”

 

^]

 

telnet> quit

 

Connection closed.

Updating a variable

http://192.168.1.10:1234/update?menu=P1

using HTTP

 

Enabling the Network API

The network API must be enabled on the IS-SPX Player before it can be utilized. This setting is controlled from the IS- SPX Player Browser-Based Configuration Pages (FIG. 113):

Click the box and then click “Apply”

FIG. 113 Enabling the Network API

For more information on the Browser-Based Configuration Pages, please refer to the

IS-SPX-1000 & IS-SPX-1300 Operation Reference Guide, available at

www.amx.com.

88

Inspired XPress - Programming Guide

Image 96
Contents Inspired Signage XPress WARRANTY, Disclaimer and License Table of Contents Remote Control Synchronized Content Interactivity Serial Protocol File Editor Table of Contents Inspired XPress Programming Guide Installation When to use XPress Authoring Features?Installing Inspired Signage XPress for the First Time IntroductionMinimum Recommended PC Requirements XPress must be restarted to complete the activationInstallation Location Inspired Signage XPress UIXPress Removal Learning XPress Authoring Features XPress ProjectsXPress Main Interface Creating a New Project My Projects folderBrowsing Panel New Project dialog TargetImporting Multi-Media Files Importing ImagesImporting Video Importing PowerPoint Presentations Creating and Editing SVG FilesImporting Flash SWF Files Editing an Existing SVG Document Template Document ParametersEdit a Media Property Media description dialog lets you changeInteractive Editing Interactively Editing SVG FilesEditing Media Elements Layout Demonstration of Media ElementsEditing Media Links Editing TextMulti-Layered SVG Templates Composing a SceneCustomizing a Multi-Layer SVG Document Example Editing Playlist TemplateHow to Customize a Playlist SVG Document Composing a playlist SVG documentPlaylist Tab Special News Templates Composing a Live News DocumentLayout Templates Format HelpersCustomizing a News SVG Document News.svgNewsticker.svg Newscrawler.svgUsing Format Helpers Switch.svgBouncingtext.svg Fittext.svgScalable Content and Aspect Ratio of Your Display Example of 169 content169 templates as shows on a 43 screen Configuring Effects Multimedia EffectsAdding Effects Preview XPress Content PreviewingUsing Quick Publish PublishingMonitoring Manually Add Devices to XPressScheduling the Content Displayed by an IS-SPX Player SchedulingCheck the Status of the Devices Open a DeviceCreate a New Schedule Open a ScheduleAdd Events To a Schedule Calendar viewDefine Default Events and Recurrences Define a Default AnimationModify the Scheduling Properties of an Event Define Recurring Events Edit recurrence rulePreview Scheduled Content Data Polling RatesRemote Control of Content When To Use Remote ControlHow To Use Remote Control OverviewID table Triggering a Content Switch Over IP PlaylistExample Testing Settings menu Enable Network APISwitching Content With the Serial Port Switching Content With a USB HID DeviceSwitching Content From Another Device Key Identifiers tabRemote Control of Playback When To Use Remote Control of PlaybackHow To Use Remote Control of Playback Interactive Pause/Resume Using Http GET Interactive Pause/Resume Over TCPGET Embedded In an Html Interactive Pause/Resume From a DeviceTimed pause/seek/resume Getting Feedback On the Playback Progress Knowing the Current Position With Extra AccuracyTriggering an Alternative Content Remote TriggersTriggering a Text or Image Overlay Triggering of SVG Animations Application Examples Multiscreen DisplaysDesigning Basic Projects for Multiscreen Layouts Creating a Configurable Multiscreen Project New Project menuMultiscreen Properties Creating a Multiscreen Project from Templates Finding the multiscreen templatesNew multiscreen project can now be Saved and Edited Editing Multiscreen Content Multiscreen layout drop down optionsConfiguring XPress and the IS-SPX Player Configure the Multiscreen IDCreate a Virtual Device Synchronization Publish Your Project To Your DeviceSynchronizing Devices Configure NTP Through the Http Interface Administration Date/TimeAdvanced Configuration Using an IS-SPX Player as an NTP ServerConfiguration Configuration of the IS-SPX Player Acting as Master Master/Server Architecture ExamplesSyntax for Multiscreen Synchronized Content Synchronization ElementsCanvas and Viewbox Concepts Multiscreen ElementsAdditional Syntax for Multiscreen Content Extension of the SVG switch ElementSpxbegin Element Extension of JavaScript Example Screen Layout With Six ScreensExample switch SVG Element Example Screen Layout With Spread DisplaysTroubleshooting Example JavaScriptNTP Synchronization Project CreationSynchronized Content Synchronized Content Inspired XPress Programming Guide Creating Interactive Content Interactivity Template FilesCreating a Touch Screen Menu Creating ButtonsControlling Media Adding an Action IDTesting the Project Enter Interactive ModeCreating a Keyboard Menu Creating the MenuConfiguring the menu Button Action IDsRGB values Hexadecimal value Eyedropper tool Controlling the Menu Color Selection greenKeystrokes Interactive controlsControlling Media Layers tab keystroke.svgTesting the Project Playback ProjectsSuggestions for Further Projects Playback Template New ProjectControlling the Media Playback PositionExample Media player Playback.svg details Slider.svg placement IS-SPX Player Configuration Interactivity SettingsCalibration For Touch Screens Calibration of a Touchscreen Through the IS-SPX PlayerManual Calibration Procedure TroubleshootingSerial Protocol File Editor Adding a List VariableAdding a Range Variable Edit Variable Page List variableExporting the Finished File Edit Variable page Range variablePage Concepts Behind Shared Variables Javascript APIInterface Setting the Variable Sample CodeNetwork API Reading the VariableList of Commands Network API CommandsEnabling the Network API Sample CodeRestarting XPress will reset all the shared variables API EmulationShared Variables Inspired XPress Programming Guide Gathering Display Serial Protocol Commands Serial Protocol Commands TextSerial Control Serial Protocol Commands Hex Creating a Serial Protocol FileManual Command Text Entries HexVolume Control Variable Variable ListScreen Mute Picture On Screen Mute Picture OffMute On Sound Mute Off SoundUnder the Administration section, select RS232 / USB IO Uploading the Serial Protocol FileCreating New Templates XPress My Templates FolderCreating and updating a new calendar file XML Tree with new attribute param1New.ics file Power command Adding Additional Templates to Inspired Signage XPressSerial Control From NetLinx Commonly Used Terms FSMIncrease Your Revenue through education + knowledge