User Guide

Programming i!-Weather
17
i!-Weather
Channels
i!-Weather Virtual Channel Map
//Request Channels (DO_PUSH)
VIRTUAL_CHANNEL_QUERY_BY_ZIPCODE = 1
VIRTUAL_CHANNEL_QUERY_BY_STATION = 2
//Status & Request Channels
VIRTUAL_CHANNEL_TEMP_FARENHEIT = 10
VIRTUAL_CHANNEL_TEMP_CELSIUS = 11
VIRTUAL_CHANNEL_SPEED_MPH = 13
VIRTUAL_CHANNEL_SPEED_KPH = 14
VIRTUAL_CHANNEL_SPEED_KNOTS = 15
VIRTUAL_CHANNEL_PRESSURE_INCHES = 17
VIRTUAL_CHANNEL_PRESSURE_TORR = 18
VIRTUAL_CHANNEL_PRESSURE_MILIBAR = 19
//Debug Channel
VIRTUAL_CHANNEL_DEBUG = 255
//Notification Channels
VIRTUAL_CHANNEL_ERROR_UNHANDLED_COMMAND = 248
VIRTUAL_CHANNEL_ERROR_IP_CONNECT = 249
VIRTUAL_CHANNEL_ERROR_NOT_FOUND = 250
VIRTUAL_CHANNEL_ERROR_SYSTEM_DOWN = 251
VIRTUAL_CHANNEL_ERROR = 252
VIRTUAL_CHANNEL_SUCESS = 253
//Status Only Channels:
VIRTUAL_CHANNEL_BUSY = 254
Request Channels
Sending a
DO_PUSH on a request channel notifies the i!-WeatherEngine to process the request.
//Notify i!-WeatherEngine to retrieve new weather data by ZIP Code
DO_PUSH_TIMED(vdvWEATHER,VIRTUAL_CHANNEL_QUERY_BY_ZIPCODE,5)
Status & Request Channels
The status of the channel can be read to determine the state of the i!-WeatherEngine option.
//Determine if the i!-WeatherEngine Speed Format is set to MPH
IF([vdvWEATHER,VIRTUAL_CHANNEL_QUERY_BY_ZIPCODE])
nSPEED_FORMAT = SPEED_MPH
Sending a DO_PUSH on a request channel notifies the i!-WeatherEngine to process the request.
//Set i!-WeatherEngine to MPH Speed Format
DO_PUSH_TIMED(vdvWEATHER,VIRTUAL_CHANNEL_SPEED_MPH,5)
Debug Channels
The status of the debug channel can be read or set to enable/disable i!-WeatherEngine debug
messaging.
//Turn i!-WeatherEngine Debug Messages ON
ON[vdvWEATHER,VIRTUAL_CHANNEL_DEBUG]