User Guide
Programming i!-Weather
11
i!-Weather
Devices
You need to make sure the
DEVICE IDs are correct in the DEFINE_DEVICE section:
//i!-Weather Devices dvWEATHER_IP_CLIENT = 0:4:0
//INTERNET CONNECTION dvBROWSER_IP_CLIENT = 0:5:0
//INTERNET CONNECTION FOR CITY BROWSER dvMANAGEMENT = 8001:1:0
//PCLINK MANAGEMENT CONSOLE vdvWEATHER = 33001:1:0
//VIRTUAL DEVICE
Constants
The following channels of the virtual device are the primary interface to i!-Weather. To set a format
option or to request weather data, your NetLinx code will generate a push to the virtual weather
device (
vdvWEATHER). The i!-Weather system will generate pushes to notify weather data retrieval
success or error.
The following table lists the constants contained in i!-Weather Application.
//i!-Weather Constants
//ENUMERATE VIRTUAL CHANNELS ON VIRTUAL WEATHER DEVICE
vCH_QUERY_BY_ZIPCODE = 1
vCH_QUERY_BY_STATION = 2
vCH_TEMP_FARENHEIT = 10
vCH_TEMP_CELSIUS = 11
vCH_SPEED_MPH = 13
vCH_SPEED_KPH = 14
vCH_SPEED_KNOTS = 15
vCH_PRESSURE_INCHES = 17
vCH_PRESSURE_TORR = 18
vCH_PRESSURE_MILIBAR = 19
vCH_ERROR_UNHANDLED_COMMAND = 248
vCH_ERROR_IP_CONNECT = 249
vCH_NOT_FOUND = 250
vCH_SYSTEM_DOWN = 251
vCH_ERROR = 252
vCH_SUCESS = 253
vCH_BUSY = 254
vCH_DEBUG = 255
i!-WeatherApplicationMod.tko Module Parameters (Cont.)
UI_LIST_INFO An integer array for the i!-Weather browse info fields (Var Text Codes).
• 1 - List Displaying ## of ## Info Field
• 2 - Listbox Message Prompt Field
• 3 - Listbox Scrollbar Tooltip
UI_INDEX_FILE_UPDATE An integer array for the i!-Weather browse list update buttons (Channel Codes).
• 1 - Update List
• 2 - Cancel
• 3 - Start Download
UI_INDEX_FILE_UPDATE_
PROGRESS
An integer array for the i!-Weather browse list update fields (Variable Text).
•1 - Status Text
• 2 - Cancel/Close
• 3 - Percentage VT
•4 - (LEVEL CODE) Progress Bar
Level ID
cWEATHER_DATA_
ENCODED_BUFFER
A string for the module to place updated encoded weather data.
The channel mappings are also listed in Channels.