Class CCWFGM WindDirectionGrid. More...
#include <CWFGM_WindDirectionGrid.h>
Public Member Functions | |
STDMETHOD() | Clone (ICWFGM_WindDirectionGrid **newGrid) |
STDMETHOD() | Import (const unsigned short sector, const double speed, const BSTR prj_file_name, const BSTR grid_file_name) |
STDMETHOD() | Export (const unsigned short sector, const double speed, const BSTR prj_file_name, const BSTR grid_file_name) |
STDMETHOD() | Remove (const unsigned short sector, const double speed) |
STDMETHOD() | GetAttribute (USHORT option, VARIANT *value) |
STDMETHOD() | SetAttribute (unsigned short option, VARIANT value) |
STDMETHOD() | GetCount (const unsigned short sector, unsigned short *count) |
STDMETHOD() | GetWindSpeeds (const unsigned short sector, unsigned short *count, SAFEARRAY **speed_array) |
STDMETHOD() | GetFilenames (const unsigned short sector, SAFEARRAY **filenames) |
STDMETHOD() | GetSectorCount (unsigned short *count) |
STDMETHOD() | GetSectorAngles (const USHORT sector, double *min_angle, double *max_angle) |
STDMETHOD() | AddSector (const BSTR sector_name, double *min_angle, double *max_angle, unsigned short *index) |
STDMETHOD() | RemoveSector (const unsigned short sector) |
STDMETHOD() | GetSector (USHORT option, double *angle, unsigned short *sector, BSTR *sector_name) |
STDMETHOD() | ImportFrom (ICWFGM_WeatherGridFilter *filter) |
STDMETHOD() | ModifySectorSet (SAFEARRAY *set_modifier) |
STDMETHOD() | MT_Lock (__int64 layerThread, USHORT exclusive, USHORT obtain) |
STDMETHOD() | Valid (__int64 layerThread, ULONGLONG start_time, LONGLONG duration, ULONG option, SAFEARRAY **application_count) |
STDMETHOD() | GetAttribute (__int64 layerThread, USHORT option, VARIANT *value) |
STDMETHOD() | GetDimensions (__int64 layerThread, USHORT *x_dim, USHORT *y_dim) |
STDMETHOD() | GetFuelData (__int64 layerThread, USHORT _x, USHORT _y, ULONGLONG time, ICWFGM_Fuel **fuel) |
STDMETHOD() | GetFuelIndexData (__int64 layerThread, USHORT x, USHORT y, ULONGLONG time, UCHAR *fuel_index) |
STDMETHOD() | GetElevationData (__int64 layerThread, USHORT x, USHORT y, SHORT allow_defaults_returned, double *elevation, double *slope_factor, double *slope_azimuth) |
STDMETHOD() | GetAttributeData (__int64 layerThread, USHORT _x, USHORT _y, ULONGLONG time, USHORT option, VARIANT *attribute) |
STDMETHOD() | GetWeatherData (__int64 layerThread, USHORT x, USHORT y, ULONGLONG time, ULONG interpolate_method, IWXData *wx, IFWIData *ifwi, DFWIData *dfwi) |
STDMETHOD() | GetFuelDataArray (__int64 layerThread, USHORT _x_min, USHORT _y_min, USHORT _x_max, USHORT _y_max, ULONGLONG time, SAFEARRAY **fuel) |
STDMETHOD() | GetFuelIndexDataArray (__int64 layerThread, USHORT _x_min, USHORT _y_min, USHORT _x_max, USHORT _y_max, ULONGLONG time, SAFEARRAY **fuel) |
STDMETHOD() | GetElevationDataArray (__int64 layerThread, USHORT x_min, USHORT y_min, USHORT x_max, USHORT y_max, SHORT allow_defaults_returned, SAFEARRAY **elevation, SAFEARRAY **slope_factor, SAFEARRAY **slope_azimuth) |
STDMETHOD() | GetWeatherDataArray (__int64 layerThread, USHORT x_min, USHORT y_min, USHORT x_max, USHORT y_max, ULONGLONG time, ULONG interpolate_method, SAFEARRAY **wx, SAFEARRAY **ifwi, SAFEARRAY **dfwi) |
STDMETHOD() | GetAttributeDataArray (__int64 layerThread, USHORT _x_min, USHORT _y_min, USHORT _x_max, USHORT _y_max, ULONGLONG time, USHORT option, SAFEARRAY **attribute) |
STDMETHOD() | GetEventTime (__int64 layerThread, ULONG flags, ULONGLONG from_time, ULONGLONG *next_event) |
STDMETHOD() | PreCalculationEvent (__int64 layerThread, ULONGLONG time, ULONG mode) |
STDMETHOD() | PostCalculationEvent (__int64 layerThread, ULONGLONG time, ULONG mode) |
STDMETHOD() | GetGridEngine (__int64 layerThread, ICWFGM_GridEngine **pVal) |
STDMETHOD() | PutGridEngine (__int64 layerThread, ICWFGM_GridEngine *newVal) |
STDMETHOD() | get_LayerManager (ICWFGM_LayerManager **pVal) |
STDMETHOD() | put_LayerManager (ICWFGM_LayerManager *newVal) |
STDMETHOD() | get_UserData (VARIANT *pVal) |
STDMETHOD() | put_UserData (VARIANT newVal) |
Public Member Functions inherited from ICWFGM_WindDirectionGrid | |
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) |
Public Member Functions inherited from ICWFGM_GridEngine | |
HRESULT | MT_Lock ([in] __int64 layerThread, [in] unsigned short exclusive, [in] unsigned short obtain) |
HRESULT | Valid ([in] __int64 layerThread, [in] unsigned __int64 start_time, [in] __int64 duration, [in] unsigned long option, [in, out] SAFEARRAY(unsigned short)*application_count) |
HRESULT | GetAttribute ([in] __int64 layerThread, [in] unsigned short option, [out, retval]VARIANT *value) |
HRESULT | GetDimensions ([in] __int64 layerThread, [out] unsigned short *x_dim, [out]unsigned short *y_dim) |
HRESULT | GetFuelData ([in] __int64 layerThread, [in] unsigned short _x, [in] unsigned short _y, [in] unsigned __int64 time, [out, retval]ICWFGM_Fuel **fuel) |
HRESULT | GetFuelIndexData ([in] __int64 layerThread, [in] unsigned short x, [in] unsigned short y, [in] unsigned __int64 time, [out, retval]unsigned char *fuel_index) |
HRESULT | GetElevationData ([in] __int64 layerThread, [in] unsigned short x, [in] unsigned short y, [in] short allow_defaults_returned, [out]double *elevation, [out] double *slope_factor, [out] double *slope_azimuth) |
HRESULT | GetAttributeData ([in] __int64 layerThread, [in] unsigned short x, [in] unsigned short y, [in] unsigned __int64 time, [in] unsigned short option, [out, retval] VARIANT *attribute) |
HRESULT | GetWeatherData ([in] __int64 layerThread, [in] unsigned short x, [in] unsigned short y, [in] unsigned __int64 time, [in]unsigned long interpolate_method, [out]IWXData *wx, [out]IFWIData *ifwi, [out]DFWIData *dfwi) |
HRESULT | GetFuelDataArray ([in] __int64 layerThread, [in] unsigned short _x_min, [in] unsigned short _y_min, [in] unsigned short _x_max, [in]unsigned short _y_max,[in]unsigned __int64 time, [in, out] SAFEARRAY(ICWFGM_Fuel *)*fuel) |
HRESULT | GetFuelIndexDataArray ([in] __int64 layerThread, [in]unsigned short _x_min, [in]unsigned short _y_min, [in]unsigned short _x_max, [in]unsigned short _y_max, [in]unsigned __int64 time, [in, out] SAFEARRAY(unsigned char)*fuel_index) |
HRESULT | GetElevationDataArray ([in] __int64 layerThread, [in]unsigned short x_min, [in]unsigned short y_min, [in]unsigned short x_max, [in]unsigned short y_max, [in]short allow_defaults_returned, [in, out] SAFEARRAY(double)*elevation, [in, out] SAFEARRAY(double)*slope_factor, [in, out] SAFEARRAY(double)*slope_azimuth) |
HRESULT | GetWeatherDataArray ([in] __int64 layerThread, [in]unsigned short x_min, [in]unsigned short y_min, [in]unsigned short x_max, [in] unsigned short y_max, [in]unsigned __int64 time, [in]unsigned long interpolate_method, [in, out] SAFEARRAY(IWXData)*wx, [in, out] SAFEARRAY(IFWIData)*ifwi, [in, out] SAFEARRAY(DFWIData)*dfwi) |
HRESULT | GetAttributeDataArray ([in] __int64 layerThread, [in]unsigned short x_min, [in]unsigned short y_min, [in]unsigned short x_max, [in]unsigned short y_max, [in] unsigned __int64 time, [in] unsigned short option, [in, out] SAFEARRAY(VARIANT)*attribute) |
HRESULT | GetEventTime ([in] __int64 layerThread, [in] unsigned long flags, [in] unsigned __int64 from_time, [out, retval] unsigned __int64 *next_event) |
HRESULT | PreCalculationEvent ([in] __int64 layerThread, [in] unsigned __int64 time, [in] unsigned long mode) |
HRESULT | PostCalculationEvent ([in] __int64 layerThread, [in] unsigned __int64 time, [in] unsigned long mode) |
HRESULT | GetGridEngine ([in] __int64 layerThread, [out, retval] ICWFGM_GridEngine **pVal) |
HRESULT | PutGridEngine ([in] __int64 layerThread, [in] ICWFGM_GridEngine *newVal) |
Additional Inherited Members | |
Properties inherited from ICWFGM_GridEngine | |
ICWFGM_LayerManager | LayerManager [get, set] |
VARIANT | UserData [get, set] |
Class CCWFGM 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 wind direction grids for use in a simulation. It can be configured to handle any number of different arcs (sectors) representing different wind directions that can be encountered. Then, any number of these sectors can have wind direction grid information loaded into it. This object is unconcerned about how other weather data has been provided: if times and other input data are valid, then this object will apply the updated wind direction data according to the defined rules.
This object will also update any FWI calculations required based on options and input values.
No weather streams or weather stations are associated with this object since it simply updates and replaces wind direction values based on the grid rules.
CCWFGM_WindDirectionGrid::AddSector | ( | const BSTR | sector_name, |
double * | min_angle, | ||
double * | max_angle, | ||
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. |
S_OK | Successful. |
ERROR_DATA_NOT_UNIQUE | Data provided not unique |
ERROR_SECTOR_TOO_SMALL | Sector value too small |
ERROR_NAME_NOT_UNIQUE | Name provided not unique |
E_POINTER | Invalid pointer. |
CCWFGM_WindDirectionGrid::Clone | ( | 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. |
E_POINTER | The address provided for "newFilter" is invalid. |
S_OK | Successful. |
E_OUTOFMEMORY | Insufficient memory. |
ERROR_SEVERITY_WARNING | Unspecified failure. |
E_NOINTERFACE | Internal serialization issue. |
CCWFGM_WindDirectionGrid::Export | ( | const unsigned short | sector, |
const double | speed, | ||
const BSTR | prj_file_name, | ||
const BSTR | grid_file_name | ||
) |
Exports a Wind Direction Grid from a specific sector, for a specific speed. Specification of the output projection file name is optional.
sector | Index of sector. |
speed | Wind speed value (kph) |
prj_file_name | Projection File name |
grid_file_name | Grid File name |
S_OK | Successful. |
ERROR_GRID_SIZE_INCORRECT | Incorrect grid size. |
E_POINTER | Error |
ERROR_GRID_UNINITIALIZED | Grid uninitialized. |
ERROR_SCENARIO_SIMULATION_RUNNING | Scenario simulation running. |
CCWFGM_WindDirectionGrid::get_LayerManager | ( | ICWFGM_LayerManager ** | pVal | ) |
This property is must be set before any calls to GetGridEngine or PutGridEngine. Additionally, this property should be considered write-once. This value should be set to the ICWFGM_LayerManager object which any layerThread assigned to this object will have been allocated from.
pVal | value of LayerManager |
CCWFGM_WindDirectionGrid::get_UserData | ( | VARIANT * | pVal | ) |
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 |
E_POINTER | The address provided for pVal is invalid |
S_OK | Successful |
CCWFGM_WindDirectionGrid::GetAttribute | ( | USHORT | option, |
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. |
E_POINTER | value is NULL |
E_INVALIDARG | unknown requested option |
S_OK | Success |
CCWFGM_WindDirectionGrid::GetAttribute | ( | __int64 | layerThread, |
USHORT | option, | ||
VARIANT * | value | ||
) |
Polymorphic. If layerThread is non-zero, then this filter object simply forwards the call to the next lower GIS layer determined by layerThread. If layerthread is zero, then this object will interpret the call.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
option | The attribute of interest. Valid attributes are:
|
value | Location for the retrieved value to be placed. |
E_POINTER | value is NULL |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
S_OK | Success |
CCWFGM_WindDirectionGrid::GetAttributeData | ( | __int64 | layerThread, |
USHORT | _x, | ||
USHORT | _y, | ||
ULONGLONG | time, | ||
USHORT | option, | ||
VARIANT * | attribute | ||
) |
Polymorphic. This filter object simply forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
_x | Value on x-axis. |
_y | Value on y-axis. |
time | A GMT time provided as seconds since January 1st, 1600. |
option | Data array option. |
attribute | Return value for attribute. |
S_OK | Returned attribute is valid. |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::GetAttributeDataArray | ( | __int64 | layerThread, |
USHORT | _x_min, | ||
USHORT | _y_min, | ||
USHORT | _x_max, | ||
USHORT | _y_max, | ||
ULONGLONG | time, | ||
USHORT | option, | ||
SAFEARRAY ** | attribute | ||
) |
Polymorphic. This filter object simply forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
_x_min | Minimum value (inclusive) on x-axis. |
_y_min | Minimum value (inclusive) on y-axis. |
_x_max | Maximum value (inclusive) on x-axis. |
_y_max | Maximum value (inclusive) on y-axis. |
time | A GMT time provided as seconds since January 1st, 1600. |
option | Data array option. |
attribute | Data array attribute. |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::GetCount | ( | const unsigned short | sector, |
unsigned short * | count | ||
) |
Returns the number of grid files loaded into the specified sector.
sector | Index of sector. |
count | Number of wind speed ranges. |
S_OK | Successful. |
ERROR_SECTION_INVALID_INDEX | Invalid section value error |
E_POINTER | Invalid pointer |
CCWFGM_WindDirectionGrid::GetDimensions | ( | __int64 | layerThread, |
USHORT * | x_dim, | ||
USHORT * | y_dim | ||
) |
This filter object simply forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
x_dim | x dimension of the grid. |
y_dim | y dimension of the grid. |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::GetElevationData | ( | __int64 | layerThread, |
USHORT | x, | ||
USHORT | y, | ||
SHORT | allow_defaults_returned, | ||
double * | elevation, | ||
double * | slope_factor, | ||
double * | slope_azimuth | ||
) |
This filter object simply forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
x | x grid location. |
y | y grid location. |
allow_defaults_returned | Flag for allowing defaults to be returned |
elevation | Elevation (m) of the requested location. |
slope_factor | Percentage ground slope specified as a decimal value (0 - 1) |
slope_azimuth | Direction of up-slope, Cartesian radians. |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::GetElevationDataArray | ( | __int64 | layerThread, |
USHORT | x_min, | ||
USHORT | y_min, | ||
USHORT | x_max, | ||
USHORT | y_max, | ||
SHORT | allow_defaults_returned, | ||
SAFEARRAY ** | elevation, | ||
SAFEARRAY ** | slope_factor, | ||
SAFEARRAY ** | slope_azimuth | ||
) |
This filter object simply forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
x_min | Minimum value (inclusive) on x-axis. |
y_min | Minimum value (inclusive) on y-axis. |
x_max | Maximum value (inclusive) on x-axis. |
y_max | Maximum value (inclusive) on y-axis. |
allow_defaults_returned | Flag for allowing defaults to be returned |
elevation | Array of elevations for the defined bounding rectangle (to fill in). |
slope_factor | Array of slope factors for the defined bounding rectangle (to fill in). |
slope_azimuth | Array of slope azimuths for the defined bounding rectangle (to fill in). |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::GetEventTime | ( | __int64 | layerThread, |
ULONG | flags, | ||
ULONGLONG | from_time, | ||
ULONGLONG * | next_event | ||
) |
This method will examine start and end dates and diurnal periods to determine the time at which the next event for known change in weather data occurs. This filter object it will then forward the call to the next lower GIS layer determined by layerThread and combine results.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
flags | Calculation flags. 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'. |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::GetFilenames | ( | const unsigned short | sector, |
SAFEARRAY ** | filenames | ||
) |
Returns an array of filenames for specified wind speed sector
sector | Index of sector. |
filenames | File names for sector |
S_OK | Successful. |
ERROR_SECTOR_INVALID_INDEX | Invalid sector index. |
CCWFGM_WindDirectionGrid::GetFuelData | ( | __int64 | layerThread, |
USHORT | _x, | ||
USHORT | _y, | ||
ULONGLONG | time, | ||
ICWFGM_Fuel ** | fuel | ||
) |
This filter object simply forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
_x | Value on x-axis. |
_y | Value on y-axis. |
time | A GMT time provided as seconds since January 1st, 1600. |
fuel | return value |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::GetFuelDataArray | ( | __int64 | layerThread, |
USHORT | _x_min, | ||
USHORT | _y_min, | ||
USHORT | _x_max, | ||
USHORT | _y_max, | ||
ULONGLONG | time, | ||
SAFEARRAY ** | fuel | ||
) |
This filter object simply forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
_x_min | Minimum value (inclusive) on x-axis. |
_y_min | Minimum value (inclusive) on y-axis. |
_x_max | Maximum value (inclusive) on x-axis. |
_y_max | Maximum value (inclusive) on y-axis. |
time | A GMT time provided as seconds since January 1st, 1600. |
fuel | array for return values |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::GetFuelIndexData | ( | __int64 | layerThread, |
USHORT | x, | ||
USHORT | y, | ||
ULONGLONG | time, | ||
UCHAR * | fuel_index | ||
) |
This filter object simply forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
x | Value on x-axis. |
y | Value on y-axis. |
time | A GMT time provided as seconds since January 1st, 1600. |
fuel_index | return value |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::GetFuelIndexDataArray | ( | __int64 | layerThread, |
USHORT | _x_min, | ||
USHORT | _y_min, | ||
USHORT | _x_max, | ||
USHORT | _y_max, | ||
ULONGLONG | time, | ||
SAFEARRAY ** | fuel | ||
) |
This filter object simply forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
_x_min | Minimum value (inclusive) on x-axis. |
_y_min | Minimum value (inclusive) on y-axis. |
_x_max | Maximum value (inclusive) on x-axis. |
_y_max | Maximum value (inclusive) on y-axis. |
time | A GMT time provided as seconds since January 1st, 1600. |
fuel | array for return values |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::GetGridEngine | ( | __int64 | layerThread, |
ICWFGM_GridEngine ** | pVal | ||
) |
This method retrieves the next lower GIS layer for layerThread, used to determine the stacking and order of objects associated to a scenario.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
pVal | Pointer to grid engine. |
S_OK | Successful look-up |
E_POINTER | Address provided for value is invalid. |
CCWFGM_WindDirectionGrid::GetSector | ( | USHORT | option, |
double * | angle, | ||
unsigned short * | sector, | ||
BSTR * | sector_name | ||
) |
Gets the details of a sector of the grid. If option is CWFGM_WINDGRID_BYINDEX, this method 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, this method populates sector and sector_name with the index of, and name assigned, to sector. If option is any other value, no action is taken and the method return S_FALSE.
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 |
S_OK | Successful. |
ERROR_INVALID_INDEX | Error invalid index in 'sector'. |
ERROR_INVALID_DATA | Error invalid data in 'angle' - no sector exists which contains 'angle'. |
E_INVALIDARG | Unknown option. |
CCWFGM_WindDirectionGrid::GetSectorAngles | ( | const USHORT | sector, |
double * | min_angle, | ||
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 |
S_OK | Successful. |
ERROR_SECTOR_INVALID_INDEX | Invalid Sector Index. |
CCWFGM_WindDirectionGrid::GetSectorCount | ( | unsigned short * | count | ) |
Gets the number of sectors in this grid object.
count | Returns the number of sectors for the filter |
S_OK | Successful. |
CCWFGM_WindDirectionGrid::GetWeatherData | ( | __int64 | layerThread, |
USHORT | x, | ||
USHORT | y, | ||
ULONGLONG | time, | ||
ULONG | interpolate_method, | ||
IWXData * | wx, | ||
IFWIData * | ifwi, | ||
DFWIData * | dfwi | ||
) |
This object conditionally updates weather at location (x, y) at time 'time'. 'interpolate_method' determines various rules for how FWI calculations take place: if FWI calculations are being recursively calculated back in time, etc. All weather and fwi calculations are performed (as requested and determined). Note that some modes require a potentially long- duration recursive calculation to take place, which may take some time (and stack space) to perform.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
x | Value on x-axis. |
y | Value on y-axis. |
time | A GMT time provided as seconds since January 1st, 1600. |
interpolate_method | Interpolation method identifier. Valid bit-flag identifiers are:
|
wx | Weather information. |
ifwi | IFWI Information. |
dfwi | DFWI Information. |
CWFGM_WEATHER_INITIAL_VALUES_ONLY | Given time, only initial weather values (used for starting FWI calculations) could be returned. |
ERROR_INVALID_DATA | Invalid latitude/longitude available for calculations. |
E_INVALIDARG | Error in calculations (likely FWI calculations). |
E_POINTER | Invalid wx, ifwi, or dfwi pointers. |
S_OK | Calculations are successful |
CCWFGM_WindDirectionGrid::GetWeatherDataArray | ( | __int64 | layerThread, |
USHORT | x_min, | ||
USHORT | y_min, | ||
USHORT | x_max, | ||
USHORT | y_max, | ||
ULONGLONG | time, | ||
ULONG | interpolate_method, | ||
SAFEARRAY ** | wx, | ||
SAFEARRAY ** | ifwi, | ||
SAFEARRAY ** | dfwi | ||
) |
This object conditionally updates weather at the specified location for storage in the provided array(s) at time 'time'. 'interpolate_method' determines various rules for how FWI calculations take place: if FWI calculations are being recursively calculated back in time, etc. All weather and fwi calculations are performed (as requested and determined). Note that some modes require a potentially long- duration recursive calculation to take place, which may take some time (and stack space) to perform.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
x_min | Minimum value (inclusive) on x-axis. |
y_min | Minimum value (inclusive) on y-axis. |
x_max | Maximum value (inclusive) on x-axis. |
y_max | Maximum value (inclusive) on y-axis. |
time | A GMT time provided as seconds since January 1st, 1600. |
interpolate_method | Interpolation method identifier. Valid bit-flag identifiers are:
|
wx | Array of Weather information. |
ifwi | Array of Instantaneous FWI codes. |
dfwi | Array of Daily FWI codes. |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
E_INVALIDARG | The array is not 2D, or is insufficient in size to contain the requested data |
CCWFGM_WindDirectionGrid::GetWindSpeeds | ( | const unsigned short | sector, |
unsigned short * | count, | ||
SAFEARRAY ** | 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 |
S_OK | Successful. |
E_POINTER | Invalid pointer |
E_INVALIDARG | Invalid argument |
ERROR_SECTION_INVALID_INDEX | Invalid section index error |
CCWFGM_WindDirectionGrid::Import | ( | const unsigned short | sector, |
const double | speed, | ||
const BSTR | prj_file_name, | ||
const BSTR | grid_file_name | ||
) |
Imports a Wind Direction Grid to a specific sector and assigned applicable speed ranges. If the import projection file is unspecified, then it is assumed to match the projection for the associated main ICWFGM_GridEngine object.
sector | Index of sector. |
speed | Wind speed value (kph) |
prj_file_name | Projection File name |
grid_file_name | Grid File name |
S_OK | Successful. |
ERROR_GRID_SIZE_INCORRECT | Incorrect grid size. |
E_POINTER | Error |
ERROR_GRID_UNINITIALIZED | Grid uninitialized. |
ERROR_SCENARIO_SIMULATION_RUNNING | Scenario simulation running. |
CCWFGM_WindDirectionGrid::ImportFrom | ( | 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 |
S_OK | Successful. |
E_POINTER | Invalid pointer. |
CCWFGM_WindDirectionGrid::ModifySectorSet | ( | SAFEARRAY * | set_modifier | ) |
Updates the wind direction ranges in the grid.
set_modifier | A list of grid values to modify. |
CCWFGM_WindDirectionGrid::MT_Lock | ( | __int64 | layerThread, |
USHORT | exclusive, | ||
USHORT | 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.
All routines in the ICWFGM_GridEngine interface are necessarily NOT multithreading safe (for performance) but other interfaces for a given COM object implementing this interface must be by specification. Locking request is forwarded to the next lower object in the 'layerThread' layering.
In the event of an error, then locking is undone to reflect an error state.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
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. |
SUCCESS_STATE_OBJECT_UNLOCKED | Lock was released. |
SUCCESS_STATE_OBJECT_LOCKED_WRITE | Exclusive/write lock obtained. |
SUCCESS_STATE_OBJECT_LOCKED_SCENARIO | A scenario successfully required a lock for purposes of simulating. |
SUCCESS_STATE_OBJECT_LOCKED_READ | Shared/read lock obtained. |
S_OK | Successful |
ERROR_GRID_UNINITIALIZED | No path via layerThread can be determined to further determine successful locks. |
CCWFGM_WindDirectionGrid::PostCalculationEvent | ( | __int64 | layerThread, |
ULONGLONG | time, | ||
ULONG | mode | ||
) |
This filter object simply forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
time | A GMT time provided as seconds since January 1st, 1600. |
mode | Calculation mode. |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::PreCalculationEvent | ( | __int64 | layerThread, |
ULONGLONG | time, | ||
ULONG | mode | ||
) |
This filter object simply forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
time | A GMT time provided as seconds since January 1st, 1600. |
mode | Calculation mode. |
ERROR_GRID_UNINITIALIZED | No object in the grid layering to forward the request to. |
CCWFGM_WindDirectionGrid::put_LayerManager | ( | ICWFGM_LayerManager * | newVal | ) |
This property is must be set before any calls to GetGridEngine or PutGridEngine. Additionally, this property should be considered write-once. This value should be set to the ICWFGM_LayerManager object which any layerThread assigned to this object will have been allocated from.
newVal | value for LayerManager |
CCWFGM_WindDirectionGrid::put_UserData | ( | VARIANT | newVal | ) |
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.
newVal | Replacement value for UserData |
S_OK | Successful |
CCWFGM_WindDirectionGrid::PutGridEngine | ( | __int64 | layerThread, |
ICWFGM_GridEngine * | newVal | ||
) |
This method sets the next lower GIS layer for layerThread, used to determine the stacking and order of objects associated to a scenario.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
newVal | Pointer to new grid engine. |
E_NOINTERFACE | Provided object (newVal) does not support the required ICWFGM_GridEngine interface (mis-cast) |
S_OK | Mapping assignment between layerThread and newval was successful. |
CCWFGM_WindDirectionGrid::Remove | ( | const unsigned short | sector, |
const double | speed | ||
) |
Remove a loaded grid applicable to a given speed from the specified sector.
sector | Index of sector. |
speed | Speed value (kph) |
S_OK | Successful. |
ERROR_SECTOR_INVALID_INDEX | Invalid sector index error |
ERROR_SPEED_OUT_OF_RANGE | Speed out of range error |
CCWFGM_WindDirectionGrid::RemoveSector | ( | const unsigned short | sector | ) |
Removes sector from filter
sector | Index of sector. |
S_OK | |
ERROR_SECTOR_INVALID_INDEX | Invalid sector index. |
CCWFGM_WindDirectionGrid::SetAttribute | ( | unsigned short | option, |
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. |
S_OK | Successful. |
ERROR_WEATHER_OPTION_INVALID | The weather option referred to is unknown. |
E_INVALIDARG | If value's value is incorrect. |
ERROR_SCENARIO_SIMULATION_RUNNING | Cannot set an attribute if the simulation is running. |
E_FAIL | Failed. |
CCWFGM_WindDirectionGrid::Valid | ( | __int64 | layerThread, |
ULONGLONG | start_time, | ||
LONGLONG | duration, | ||
ULONG | option, | ||
SAFEARRAY ** | application_count | ||
) |
This method validates weather grid based on its start time, duration, and other properties. It then forwards the call to the next lower GIS layer determined by layerThread.
layerThread | Handle for scenario layering/stack access, allocated from an ICWFGM_LayerManager COM object. Needed. It is designed to allow nested layering analogous to the GIS layers. |
start_time | Start time of grid data |
duration | Duration of observational data in grid |
option | Determines type of Valid request. Valid values are:
|
application_count | Optional (dependent on option). Array of counts for how often a particular type of grid occurs in the set of ICWFGM_GridEngine objects associated with a scenario. |
S_OK | Successful. |
ERROR_GRID_UNINITIALIZED | Grid not initialized. |
ERROR_GRID_TIME_OUT_OF_RANGE | Start, end application times are invalid for this grid. |