Interface ICWFGM WindDirectionGrid. More...
import "WeatherCom.idl";
Public Member Functions | |
HRESULT | Clone ([out]ICWFGM_WindDirectionGrid **newGrid) |
HRESULT | Import ([in]const unsigned short sector, [in]const double speed, [in] const BSTR prj_file_name, [in]const BSTR grid_file_name) |
HRESULT | Export ([in]const unsigned short sector, [in]const double speed, [in] const BSTR prj_file_name, [in]const BSTR grid_file_name) |
HRESULT | Remove ([in]const unsigned short sector, [in]const double speed) |
HRESULT | GetAttribute ([in]unsigned short option, [out, retval]VARIANT *value) |
HRESULT | SetAttribute ([in]unsigned short option, [in]VARIANT value) |
HRESULT | GetCount ([in]const unsigned short sector, [out, retval]unsigned short *count) |
HRESULT | GetWindSpeeds ([in]const unsigned short sector, [out]unsigned short *count, [in, out]SAFEARRAY(double)*speed_array) |
HRESULT | GetFilenames ([in]const unsigned short sector, [out]SAFEARRAY(BSTR)*filenames) |
HRESULT | GetSectorCount ([out, retval]unsigned short *count) |
HRESULT | GetSectorAngles ([in]const unsigned short sector, [out]double *min_angle, [out]double *max_angle) |
HRESULT | AddSector ([in]const BSTR sector_name, [in, out]double *min_angle, [in, out]double *max_angle, [out, retval]unsigned short *index) |
HRESULT | RemoveSector ([in]const unsigned short sector) |
HRESULT | GetSector ([in]unsigned short option, [in, out]double *angle, [in, out]unsigned short *sector, [out]BSTR *sector_name) |
HRESULT | ImportFrom ([in]ICWFGM_WeatherGridFilter *filter) |
HRESULT | ModifySectorSet ([in]SAFEARRAY(WeatherGridSetModifier) set_modifier) |
Interface ICWFGM WindDirectionGrid.
This object manages a collection weather data for a simulation engine's scenario. It implements the GridEngine interface for communication with the simulation engine. Since it only handles weather data, its GridEngine property should refer to an object that can provide fuel type and elevation data, latitude, longitude, etc.
In addition to the GridEngine interface, it also implements its own interface so that a client application may specify a collection of weather streams for use in a simulation. This object manages the spatial aspect of merging data together from multiple weather streams. Only one weather stream from a weather station may be associated with a weather grid at a time. This rule is imposed to avoid confusing situations to merge data from multiple streams. A stream cannot be attached to a weather grid until it is associated with a weather station, to ensure that it has a location.
ICWFGM_WindDirectionGrid::AddSector | ( | [in] const BSTR | sector_name, |
[in, out] double * | min_angle, | ||
[in, out] double * | max_angle, | ||
[out, retval] unsigned short * | index | ||
) |
Adds a sector to filter. The logic applied for determining the correct sector is >= min_angle, and < max_angle. When max_angle < min_angle, it is assumed to cross 0 degrees (north) in compass rotation. A sector must be at least 1 degree wide.
sector_name | Sector Name value, only used by the client application. |
min_angle | Minimum sector angle value, compass degress |
max_angle | Maximum sector angle value, compass degrees |
index | Index of new sector. |
ICWFGM_WindDirectionGrid::Clone | ( | [out] ICWFGM_WindDirectionGrid ** | newFilter | ) |
Creates a new wind direction filter with all the same properties and data of the object being called, returns a handle to the new object in 'newFilter'. No data is shared between these two objects, an exact copy (including of all loaded wind direction grid data) is created.
newFilter | A wind direction grid object. |
ICWFGM_WindDirectionGrid::Export | ( | [in] const unsigned short | sector, |
[in] const double | speed, | ||
[in] const BSTR | prj_file_name, | ||
[in] const BSTR | grid_file_name | ||
) |
Exports a Wind Direction Grid from a specific sector. Specification of the output projection file name is optional.
sector | Index of sector. |
prj_file_name | Projection File name |
grid_file_name | Grid File name |
ICWFGM_WindDirectionGrid::GetAttribute | ( | [in] unsigned short | option, |
[out, retval] VARIANT * | value | ||
) |
Polymorphic. This routine retrieves an attribute/option value given the attribute/option index.
option | The attribute of interest. Valid attributes are:
|
value | Location for the retrieved value to be placed. |
ICWFGM_WindDirectionGrid::GetCount | ( | [in] const unsigned short | sector, |
[out, retval] unsigned short * | count | ||
) |
Returns the number of grid files loaded into the specified sector.
sector | Index of sector. |
count | Number of wind speed ranges. |
ICWFGM_WindDirectionGrid::GetFilenames | ( | [in] const unsigned short | sector, |
[out] SAFEARRAY(BSTR)* | filenames | ||
) |
Gets filename for the grid loaded into the specified wind direction sector.
sector | Index of sector. |
filenames | Array of File names for given sector |
ICWFGM_WindDirectionGrid::GetSector | ( | [in] unsigned short | option, |
[in,out] double * | angle, | ||
[in,out] unsigned short * | sector, | ||
[out] BSTR * | sector_name | ||
) |
Gets the details of a sector of the grid. This function has two modes: If option is CWFGM_WINDGRID_BYINDEX, then this method keys off '*sector' and populates angle[0], angle[1], and sector_name, with the minimum angle, maximum angle, and name assigned to this sector, respectively.
If option is CWFGM_WINDGRID_BYANGLE, then this method keys off '*angle' and populates sector and sector_name with the index of, and name assigned, to sector.
option | Option value |
angle | Angle value |
sector | Index of sector. |
sector_name | Sector name |
ICWFGM_WindDirectionGrid::GetSectorAngles | ( | [in] const unsigned short | sector, |
[out] double * | min_angle, | ||
[out] double * | max_angle | ||
) |
Get the minimum and maximum sector angles for a specific sector. The logic applied for determining the correct sector is >= min_angle, and < max_angle. When max_angle < min_angle, it is assumed to cross 0 degrees.
sector | Index of sector. |
min_angle | Minimum sector angle value, compass degrees |
max_angle | Maximum sector angle value, compass degrees |
ICWFGM_WindDirectionGrid::GetSectorCount | ( | [out, retval] unsigned short * | count | ) |
Gets the number of sectors in this grid object.
count | Returns the number of sectors for the filter |
ICWFGM_WindDirectionGrid::GetWindSpeeds | ( | [in] const unsigned short | sector, |
[out] unsigned short * | count, | ||
[in,out] SAFEARRAY(double)* | speed_array | ||
) |
Returns the wind speeds for all grid files loaded into the specified sector.
sector | Index of sector. |
count | Returns number of elements stored in speed_array |
speed_array | 2D Speed data for sectors |
ICWFGM_WindDirectionGrid::Import | ( | [in] const unsigned short | sector, |
[in] const double | speed, | ||
[in] const BSTR | prj_file_name, | ||
[in] const BSTR | grid_file_name | ||
) |
Imports a Wind Direction Grid to a specific sector. If the import projection file is unspecified, then it is assumed to match the projection for the associated main ICWFGM_GridEngine object.
sector | Sector value. If sector is (unsigned short) -1, then the file is loaded into the default sector. |
speed | Wind speed value (kph) used to generate the grid |
prj_file_name | Projection File name |
grid_file_name | Name of file to import. |
ICWFGM_WindDirectionGrid::ImportFrom | ( | [in] ICWFGM_WeatherGridFilter * | filter | ) |
Imports from an existing filter. This function only exists to support legacy FGM files and should not be called directly by any client code.
filter | Weather grid filter to import from |
ICWFGM_WindDirectionGrid::ModifySectorSet | ( | [in] SAFEARRAY(WeatherGridSetModifier) | set_modifier | ) |
Updates the wind direction ranges in the grid.
set_modifier | A list of grid values to modify. |
ICWFGM_WindDirectionGrid::Remove | ( | [in] const unsigned short | sector, |
[in] const double | speed | ||
) |
Remove a loaded grid applicable to a given speed from the specified sector.
sector | Index of sector. |
speed | Speed value (kph) |
ICWFGM_WindDirectionGrid::RemoveSector | ( | [in] const unsigned short | sector | ) |
Removes sector from filter
sector | Index of sector. |
ICWFGM_WindDirectionGrid::SetAttribute | ( | [in] unsigned short | option, |
[in] VARIANT | value | ||
) |
Sets the value of an "option" to the value of the "value" variable provided.
option | The weather option of interest. Valid options are:
|
value | The value to set the option to. |