Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

Signal Module

The Signal Module is used to set positional and display parameters of the wireless signal indicator on the screen. Check the indicator layout overview page for more detail on positioning these indicators.

Syntax

signal (Module) <META> Syntax

<META HTTP-Equiv="Signal" content="[parameter]">

<META HTTP-Equiv="Signal" content="SignalEvent:url('[jsFunction | url]')">

Signal JavaScript Object Syntax:
By default the JavaScript Object 'signal' will exist on the current page and can be used to interact directly with the signal.
To Set signal parameters via JavaScript use the following syntax: signal.parameter = 'value'; remembering to enclose your value in quotes where appropriate.

e.g. signal.visibility = 'value';
To Set signal return events via JavaScript use the following syntax: signal.event = JavaScript Function;

e.g. signal.signalEvent = 'doFunction(%json)';

For more details on the event syntax and parameters see the Retrieval Events page.
To set multiple EMML parameters / events on a single line use the following syntax: signal.setEMML("[Your EMML Tags]");

e.g. signal.setEMML("visibility:value;signalEvent:url('JavaScript:doFunction(%json)')");
Signal Ruby Object Syntax:
By default the Ruby Object 'Signal' will exist on the current page and can be used to interact directly with the Signal. All Methods, Parameters and Events are the same as JavaScript, however, notice 'Signal' needs to start with an uppercase letter. Another difference in Ruby is that methods do not end in '()'
To Set Signal parameters via Ruby use the following syntax: Signal.parameter = 'value' remembering to enclose your value in quotes where appropriate.

e.g. Signal.visibility = 'value'
To Set Signal return events via Ruby use the following syntax: Signal.event = url_for(:action => :event_callback)

e.g. Signal.signalEvent = url_for(:action => :signal_event_callback)

For more details on the event syntax and parameters see the Retrieval Events page.

To access the event parameters in a Ruby callback function, you reference the @params object within the callback function. This object is simply a ruby hash {"parameter1 name" => "parameter1 value", "parameter2 name" => "parameter2 value", ...}

Parameters

Items listed in this section indicate parameters, or attributes which can be set.

Name Possible Values Description Default Value
visibility:[Value] Visible or Hidden Sets whether or not the battery indicator is shown Hidden
left:[Value] Pixel value Sets the horizontal position of the wireless signal indicator in pixels. If negative the indicator will be off the screen Top right of screen
top:[Value] Pixel value Sets the vertical position of the wireless signal indicator in pixels. If negative then it will be off the screen Top right of screen
layout:[Value] Left, Right, Up, Down Sets the orientation of the signal icon. Right
color:[Value] Hex Values (#000000 - #FFFFFF) RGB value that sets the color of the wireless signal indicator using HTML web colors RR-Red, GG-Green and BB-Blue #000000

Events

Values are returned to the caller in RhoElements via Events. Most modules contain events and those returned from this module are given below along with the event parameters. Events can cause a navigation to a new URL or a JavaScript function on the page to be invoked. Each event will in most cases have a number of parameters associated with it which will either be strings or JavaScript arrays. Event parameters can be accessed either directly or via JSON objects.


signalEvent

The SignalEvent gives an indication of the signal level and other associated information. Once registered for you will receive a SignalEvent at regular intervals, as specified by the SignalRefresh configuration setting.

ID Name Description
1 signalStrength Signal strength value as a percentage
2 essid Current ESSID
3 macAddress Device's MAC address
4 adapterName Device's adapter name
5 dhcpServer Current DHCP servers address
6 dhcpStatic Whether the unit has a static or DHCP address
7 gateway Current gateway IP address
8 ipAddress Current IP address
9 rssi Signal strength in RSSI terms
10 subnetMask Current subnet mask
11 wins Current WINs server IP address

Remarks

Overlapping

Do not display the Battery indicator overlapping with the Signal indicator.

Indicator Positions

For an illustrative guide to the meaning of the Layout parameter see the ‘Indicator Positions’ section.

Unavailable Data on ET1

The WINS server address and dhcpStatic data are not available on the ET1. Also the dhcpServer address is always populated, even on static IP configurations.

Parameter Deprecation

For users migrating their PocketBrowser apps to RhoElements please note that due to the difference in the signal indicator graphic, the GraphPosition and IconPosition parameters have been deprecated. Please use the Layout parameter instead.

Requirements

RhoElements Version 1.0.0 or above
Supported Devices All supported devices.
Minimum Requirements None.
Persistence Partially Persistent - Changes to this module will persist when navigating to a new page with the exception of the return events.

HTML/JavaScript Examples

The following example shows the wireless signal indicator, sets the position to (50, 50), the color of the indicator beneath the bars growing from right to left:

<META HTTP-Equiv="Signal" Content="Visibility:Visible">
<META HTTP-Equiv="Signal" Content="Left:50">
<META HTTP-Equiv="Signal" Content="Top:50">
<META HTTP-Equiv="Signal" Content="Layout:Left">
<META HTTP-Equiv="Signal" Content="Color:#FF0000">

Above example can also be written in EMML1.1 as given below

<META HTTP-Equiv="Signal" Content="Left:50; Top:50; Color:#FF0000; Layout:Left; Visibility:Visible">

In EMML1.1 it is also possible to concatenate the Parameter with the module name. The example above can also be written as:

<META HTTP-Equiv="Signal-Left" Content="50">
<META HTTP-Equiv="Signal-Top" Content="50">
<META HTTP-Equiv="Signal-Color" Content="#FF0000">

The following example navigates to a new page with parameters upon a wireless signal status change:

<META HTTP-Equiv="Signal" Content="signalevent:url('mypage.asp?Signal percentage=%s&ESSID=%s&MacAdd=%s&Adapter=%s&DHCPServ=%s&Mode=%s&Gateway=%s&IPAddress=%s&RSSI=%s&Subnet=%s&Wins=%s')">
Back to Top