Programming i!-Weather
Request New Weather Data
To request new weather data, your program simply needs to specify the zip code or station code,
and then generate a
i!-WeatherEngine module receives the request notification, attempts to connect the weather
provider, and gets new weather data. An example is provided below:
//-----------------------------------------------------------------------
// i!-Weather Update Weather Data By Zip Code for: New York, New York.
//-----------------------------------------------------------------------
BUTTON_EVENT[dvTP,1]
{
}
//-----------------------------------------------------------------------
// i!-Weather Update Weather Data By Station Code for: Dallas, Texas
//-----------------------------------------------------------------------
BUTTON_EVENT[dvTP,2]
{
}
Weather data can also be requested via the virtual weather device command
interface.
14
notification on the virtual weather device (
PUSH
PUSH:
{
//Set ZIP Code
chZIPCODE = "'10101'"
//Get Weather Data By ZIP Code
DO_PUSH_TIMED(vdvWEATHER,VIRTUAL_CHANNEL_QUERY_BY_ZIPCODE,5)
}
PUSH:
{
//Set Station Code
chStation = "'KDFW'"
//Get Weather Data By Station Code
DO_PUSH_TIMED(vdvWEATHER,VIRTUAL_CHANNEL_QUERY_BY_STATION,5)
}
). The
vdvWEATHER
i!-Weather