Interface ICWFGM WeatherStream. More...
import "WeatherCom.idl";
Public Member Functions | |
HRESULT | put_WeatherStation ([in]long key, [in]ICWFGM_WeatherStation *newVal) |
HRESULT | MT_Lock ([in] unsigned short exclusive, [in] unsigned short obtain) |
HRESULT | Clone ([out]ICWFGM_WeatherStream **newWeatherStream) |
HRESULT | GetAttribute ([in]unsigned short option, [out, retval] VARIANT *value) |
HRESULT | SetAttribute ([in]unsigned short option, [in] VARIANT value) |
HRESULT | Import ([in]const BSTR file_name, [in]unsigned short options) |
HRESULT | GetValidTimeRange ([out]unsigned __int64 *start, [out]__int64 *duration) |
HRESULT | GetEventTime ([in] unsigned long flags, [in] unsigned __int64 from_time, [out, retval] unsigned __int64 *next_event) |
HRESULT | MakeHourlyObservations ([in]unsigned __int64 time) |
HRESULT | MakeDailyObservations ([in]unsigned __int64 time) |
HRESULT | IsDailyObservations ([in]unsigned __int64 time) |
HRESULT | GetDailyValues ([in]unsigned __int64 time, [out]double *min_temp, [out]double *max_temp, [out]double *min_ws, [out]double *max_ws, [out]double *rh, [out]double *precip, [out]double *wd) |
HRESULT | SetDailyValues ([in]unsigned __int64 time, [in]double min_temp, [in]double max_temp, [in]double min_ws, [in]double max_ws, [in]double rh, [in]double precip, [in]double wd) |
HRESULT | GetInstantaneousValues ([in]unsigned __int64 time, [in]unsigned long interpolation_method, [out]IWXData *wx, [out]IFWIData *ifwi, [out]DFWIData *dfwi) |
HRESULT | SetInstantaneousValues ([in]unsigned __int64 time, [in]IWXData *wx) |
HRESULT | IsImportedFromFile ([in] unsigned __int64 time) |
HRESULT | DailyStandardFFMC ([in]unsigned __int64 time, [out, retval]double *ffmc) |
HRESULT | ClearWeatherData () |
Properties | |
ICWFGM_WeatherStation | WeatherStation [get] |
VARIANT | UserData [get, set] |
Interface ICWFGM WeatherStream.
[id(20), helpstring("method GetFFMCStatus")] HRESULT GetFFMCStatus([in]unsigned __int64 time, [out]unsigned short *value); [id(21), helpstring("method GetDMCStatus")] HRESULT GetDMCStatus([in]unsigned __int64 time, [out]unsigned short *value); [id(22), helpstring("method GetDCStatus")] HRESULT GetDCStatus([in]unsigned __int64 time, [out]unsigned short *status);
This object contains weather data for a series of consecutive days, so is such called a weather stream. It has a start time and duration, and the user can inspect and modify various daily or hourly values. Each day of weather data is complete unto itself. The user may also specify alpha, beta, and gamma for Judi Beck's diurnal weather calculations. It also supports the standard COM IPersistStream, IPersistStreamInit, and IPersistStorage interfaces. Any weather stream is automatically saved with the station in order to simplify serialization operations in the client application.
ICWFGM_WeatherStream::ClearWeatherData | ( | ) |
Deletes all hourly and daily weather data in the file. Does not reset start time, starting codes, etc.
ICWFGM_WeatherStream::Clone | ( | [out] ICWFGM_WeatherStream ** | newWeatherStream | ) |
Creates a new weather stream with all the same properties and data of the object being called, returns a handle to the new object in 'newWeatherStream'.
newWeatherStream | A weather stream object. |
ICWFGM_WeatherStream::DailyStandardFFMC | ( | [in] unsigned __int64 | time, |
[out,retval] double * | ffmc | ||
) |
Retrieves the daily standard (Van Wagner) FFMC for the specified day. Note that other functions typically return the hourly FFMC value. Note that daily FFMC values change at noon LST, not at midnight.
time | A GMT time provided as seconds since January 1st, 1600. |
ffmc | Return value for daily FFMC. |
ICWFGM_WeatherStream::GetAttribute | ( | [in] unsigned short | option, |
[out, retval] VARIANT * | value | ||
) |
Gets the value of an "option" and saves it in the "value" variable provided.
option | The weather option of interest. Valid values are:
|
value | The value of the option. |
ICWFGM_WeatherStream::GetDailyValues | ( | [in] unsigned __int64 | time, |
[out] double * | min_temp, | ||
[out] double * | max_temp, | ||
[out] double * | min_ws, | ||
[out] double * | max_ws, | ||
[out] double * | rh, | ||
[out] double * | precip, | ||
[out] double * | wa | ||
) |
Returns the daily observations for the specified day. If the day is represented as daily observations, this method returns these specified values. If the day is represented as hourly readings, then it returns values calculated from the hourly readings.
time | Time identifying the day to inspect, provided as a count of seconds since Midnight January 1, 1600 GMT time. |
min_temp | Returned minimum temperature. |
max_temp | Returned maximum temperature. |
min_ws | Returned minimum windspeed. |
max_ws | Returned maximum windspeed. |
rh | Returned relative humidity. |
precip | Returned precipitation for the day. |
wa | Returned mean wind direction, provided in Cartesian radians. |
ICWFGM_WeatherStream::GetEventTime | ( | [in] unsigned long | flags, |
[in] unsigned __int64 | from_time, | ||
[out,retval] unsigned __int64 * | next_event | ||
) |
Gets the time of the next event by searching forwards or backwards (depending on the value of "flags" parameter) and saves the value of the next event to the "next_time" variable.
flags | To search backwards or forwards. Valid bit-flag identifiers are:
|
from_time | A GMT time provided as seconds since January 1st, 1600. |
next_event | A GMT time provided as seconds since January 1st, 1600, representing the time for the next event, based on 'flags'. |
ICWFGM_WeatherStream::GetInstantaneousValues | ( | [in] unsigned __int64 | time, |
[in] unsigned long | interpolation_method, | ||
[out] IWXData * | wx, | ||
[out] IFWIData * | ifwi, | ||
[out] DFWIData * | dfwi | ||
) |
Gets the instantaneous values for Temperature, DewPointTemperature, RH, Precipitation, WindSpeed and WindDirection (and saves these values in the data structure wx). It also gets FFMC, ISI and FWI (and saves theses values in the data structure ifwi) and similarly gets the values for dFFMC, dDMC, dDC and dBUI (and saves them to the data structure dfwi).
time | Time identifying the day and hour to inspect, provided as a count of seconds since Midnight January 1, 1600 GMT time. |
interpolation_method | Valid bit-flag values are:
|
wx | The data structure that stores the values for Temperature, Dew DewPointTemperature, RH, Precipitation, WindSpeed and WindDirection. |
ifwi | The data structure that stores the values for FFMC, ISI and FWI. |
dfwi | The data structure that stores the values for dFFMC, dDMC, dDC and dBUI. |
ICWFGM_WeatherStream::GetValidTimeRange | ( | [out] unsigned __int64 * | start, |
[out] __int64 * | duration | ||
) |
Returns the start time and duration for the data stored in this weather stream object. These objects return this data in GMT, where local time is set by SetAttribute().
start | Start time for the weather stream, specified in GMT time zone, as count of seconds since Midnight January 1, 1600. |
duration | Duration of the weather stream, provided as a count of seconds. |
ICWFGM_WeatherStream::Import | ( | [in] const BSTR | file_name, |
[in] unsigned short | options | ||
) |
Imports a weather stream with hourly data or daily data depending on the file. For importing a weather stream with hourly data the file must be of a specific format. The first line contains the header determining the file layout. Necessary columns will be identified as
Optional columns will be identified as
It is advised to contact the support team or visit the web site for an example file.
For importing a weather stream with daily data the file must be of a specific format. The first line contains the header determining the file layout. Column headers may be
It is advised to contact the support team or visit the web site for an example file.
file_name | Path/file of weather stream data. |
option | Bit-wise combination of
|
ICWFGM_WeatherStream::IsDailyObservations | ( | [in] unsigned __int64 | time | ) |
Returns the representation of a given day.
time | Time identifying the day to inspect, provided as a count of seconds since Midnight January 1, 1600 GMT time. |
ICWFGM_WeatherStream::IsImportedFromFile | ( | [in] unsigned __int64 | time | ) |
Retrieves information regarding whether a particular day's data was loaded from a file.
time | Time identifying the day and hour to inspect, provided as a count of seconds since Midnight January 1, 1600 GMT time. |
ICWFGM_WeatherStream::MakeDailyObservations | ( | [in] unsigned __int64 | time | ) |
There are two basic formats supported by this weather stream object: a day's values can be specified as hourly conditions or daily observations. If hourly conditions are provided, then daily observations are subsequently calculated. If the day's values are already specified as daily observations, then there is no change. This method may also append a preceding or following day to existing data.
time | Time identifying the day to modify, provided as a count of seconds since Midnight January 1, 1600 GMT time. |
ICWFGM_WeatherStream::MakeHourlyObservations | ( | [in] unsigned __int64 | time | ) |
There are two basic formats supported by this weather stream object: a day's values can be specified as hourly conditions or daily observations. If daily observations are provided, then hourly conditions are subsequently calculated. If the day's values are already specified as hourly conditions, then there is no change. This method may also append a preceding or following day to existing data.
time | Time identifying the day to modify, provided as a count of seconds since Midnight January 1, 1600 GMT time. |
ICWFGM_WeatherStream::MT_Lock | ( | [in] unsigned short | exclusive, |
[in] unsigned short | obtain | ||
) |
Changes the state of the object with respect to access rights. When the object is used by an active simulation, it must not be modified. When the object is somehow modified, it must be done so in an atomic action to prevent concerns with arising from multithreading. Note that these locks are primarily needed to ensure that data contributing during a simulation is not modified while the simulation is executing.
Locking request is forwarded to the attached ICWFGM_WeatherStation object.
In the event of an error, then locking is undone to reflect an error state.
exclusive | TRUE if the requester wants a write lock, false for read/shared access |
obtain | TRUE to obtain the lock, FALSE to release the lock. If this is FALSE, then the 'exclusive' parameter must match the initial call used to obtain the lock. |
ICWFGM_WeatherStream::put_WeatherStation | ( | [in] long | key, |
[in] ICWFGM_WeatherStation * | newVal | ||
) |
This method is a private method to only be called by a weather station or a weather grid. It is used to build associations between these objects.
key | Internal value. |
newVal | Internal value. |
ICWFGM_WeatherStream::SetAttribute | ( | [in] unsigned short | option, |
[in] VARIANT | value | ||
) |
Sets the value of an "option" to the value of the "value" variable provided. It is important to set the starting codes of the weather stream before importing the weather data. Changing the starting codes after importing mean Prometheus will recalculate everything.
option | The weather option of interest. Valid values are:
|
value | The value to set the option to. |
ICWFGM_WeatherStream::SetDailyValues | ( | [in] unsigned __int64 | time, |
[in] double | min_temp, | ||
[in] double | max_temp, | ||
[in] double | min_ws, | ||
[in] double | max_ws, | ||
[in] double | rh, | ||
[in] double | precip, | ||
[in] double | wa | ||
) |
Sets the daily observations for the specified day. If the day is represented as hourly readings, then this method will fail.
time | Time identifying the day to set, provided as a count of seconds since Midnight January 1, 1600 GMT time. |
min_temp | Minimum temperature. |
max_temp | Maximum temperature. |
min_ws | Minimum windspeed. |
max_ws | Maximum windspeed. |
rh | Relative humidity. |
precip | Daily precipitation. |
wa | Mean wind direction. |
ICWFGM_WeatherStream::SetInstantaneousValues | ( | [in] unsigned __int64 | time, |
[in] IWXData * | wx | ||
) |
Sets the instantaneous values for Temperature, DewPointTemperature, RH, Precipitation, WindSpeed and WindDirection via the IWXData data structure.
time | Time identifying the day and hour to inspect, provided as a count of seconds since Midnight January 1, 1600 GMT time. |
wx | The data structure that stores the values for Temperature, Dew DewPointTemperature, RH, Precipitation, WindSpeed and WindDirection. |
|
getsetproperty |
This property is unused by this object, and is available for exclusive use by the client code. It is a VARIANT value to ensure that the client code can store a pointer value (if it chooses) for use in manual subclassing this object. This value is not loaded or saved during serialization operations, and it is the responsibility of the client code to manage any value or object stored here. Access to this property is not thread-safe.
pVal | Value of UserData. |
newVal | Replacement value for UserData. |
|
getproperty |
This method is used to (only) retrieve which weather station a weather stream is associated with.
pVal | A weather station object. |