Go to the documentation of this file.
38 if (0 == strcmp(
grdpRtItem[ii].FormatInfo.name, name)) {
53 pRti->progComplete = 0;
58 pRti->opAborted |= !ret;
68 if (pRti && (total > 0)) {
69 pRti->progComplete = 0;
70 pRti->progTotal = total;
71 ret = !pRti->opAborted;
82 if (pRti && !pRti->opAborted) {
84 const clock_t DELAY = (CLOCKS_PER_SEC / 2);
90 pRti->progComplete, pRti->progTotal);
93 pRti->opAborted |= !ret;
118 sprintf(p,
"%ld:%02ld:%02ld (h:mm:ss) / %ld msec", (
long)hours,
142 pRti->progComplete = 0;
145 pRti->opAborted |= !ret;
159 pRti->progComplete = 0;
208 const char access[],
const char desc[],
const char range[])
void grdpSendDebugMsg(GRDP_RTITEM *pRti, const char txt[], PWP_UINT32 code)
Send a debug text message (PWP_MSGID_DEBUG) to the framework.
GRDP_RTITEM grdpRtItem[]
The runtime array of GRDP_RTITEM items.
void PwuProgressEnd(const char api[], PWP_BOOL ok)
Send a progress end message (PWP_MSGID_PROGEND) to the framework.
PWP_ENUM_VALTYPE
Supported PWP-API getValue() transfer types.
PWP_BOOL PwuAssignValue(const char group[], const char name[], const char value[], bool createIfNotExists)
Assign or create a value.
#define GRDP_CLKS_TO_HMS(c, h, m, s)
Returns the clock value c decomposed into hours, minutes, and seconds (PWP_INT32)....
PWP_BOOL PwuAssignValueInt(const char group[], const char name[], PWP_INT value, bool createIfNotExists)
PWP_BOOL grdpAssignInfoValueReal(const char name[], const PWP_REAL value, const bool create)
Creates a key/PWP_REAL-value pair that defines a GRDP info attribute.
GRDP_RTITEM * grdpFindFormatByName(const char name[])
Find an item in grdpRtItem[] by it's name.
PWP_BOOL PwuProgressStatus(const char api[], PWP_UINT32 complete, PWP_UINT32 total)
Send a progress status message (PWP_MSGID_PROGSTATUS, value >= 0) to the framework.
PWP_BOOL PwuPublishValueDefinition(const char group[], const char name[], PWP_ENUM_VALTYPE type, const char value[], const char access[], const char desc[], const char range[])
Create a value.
void grdpSendInfoMsg(GRDP_RTITEM *pRti, const char txt[], PWP_UINT32 code)
Send an info text message (PWP_MSGID_INFO) to the framework.
PWP_BOOL PwuProgressNextStep(const char api[])
Send a progress "next step" message (PWP_MSGID_PROGSTATUS, value = -1) to the framework.
PWP_BOOL grdpPublishValueDefinition(const char name[], PWP_ENUM_VALTYPE type, const char value[], const char access[], const char desc[], const char range[])
Creates a collection of key/value pairs that represent a published grid import attribute definition.
PWP_BOOL grdpProgressEnd(GRDP_RTITEM *pRti, const PWP_BOOL ok)
Ends all progress tracking.
void PwuSendWarningMsg(const char api[], const char txt[], PWP_UINT32 code)
Send a warning text message (PWP_MSGID_WARNING) to the framework.
#define GRDP_RT_CLKS_DIFF(rti, startId, endId)
Returns the clock time difference between startId and endId as clocks[endId] - clocks[startId]....
Pointwise Grid Model API Specification (PWGM-API)
void PwuSendInfoMsg(const char api[], const char txt[], PWP_UINT32 code)
Send an info text message (PWP_MSGID_INFO) to the framework.
static void sendDiffTimeMsg(GRDP_RTITEM *pRti, const char txt[], clock_t diff)
GRDP_ENUM_CLOCKS
Supported GRDP clock id values.
PWP_BOOL grdpAssignInfoValue(const char name[], const char value[], const bool create)
Creates a key/string-value pair that defines a GRDP info attribute.
The data representing a grid importer instance.
void PwuSendErrorMsg(const char api[], const char txt[], PWP_UINT32 code)
Send an error text message (PWP_MSGID_ERROR) to the framework.
void grdpSendWarningMsg(GRDP_RTITEM *pRti, const char txt[], PWP_UINT32 code)
Send a warning text message (PWP_MSGID_WARNING) to the framework.
PWP_BOOL PwuAssignValueUInt(const char group[], const char name[], PWP_UINT value, bool createIfNotExists)
#define GRDP_CLKS_TO_MSECS(c)
Returns the clock value c as milli seconds (PWP_INT32). Only whole ms values are possible.
GRDP_RTITEM * grdpFindFormatById(PWP_UINT32 id)
Find an item in grdpRtItem[] by it's id.
PWP_BOOL grdpAssignInfoValueEnum(const char name[], const char value[], const bool create)
Creates a key/enum-value pair that defines a GRDP info attribute.
PWP_BOOL grdpAssignInfoValueInt(const char name[], const PWP_INT value, const bool create)
Creates a key/PWP_INT-value pair that defines a GRDP info attribute.
PWU_RTITEM * pApiData
Pointer to the associated PWU_RTITEM structure.
PWP_BOOL grdpAssignInfoValueUInt(const char name[], const PWP_UINT value, const bool create)
Creates a key/PWP_UINT-value pair that defines a GRDP info attribute.
PWP_BOOL grdpProgressBeginStep(GRDP_RTITEM *pRti, PWP_UINT32 total)
Begins a progress tracking step.
static void sendClkDiffTimeMsg(GRDP_RTITEM *pRti, const char txt[], GRDP_ENUM_CLOCKS startId, GRDP_ENUM_CLOCKS endId)
PWP_BOOL grdpProgressInit(GRDP_RTITEM *pRti, PWP_UINT32 cnt)
Initializes a progress tracking session.
PWP_APIINFO apiInfo
The PWP-API instance information.
PWP_BOOL PwuAssignValueReal(const char group[], const char name[], PWP_REAL value, bool createIfNotExists)
PWP_BOOL grdpAssignInfoValueBool(const char name[], const bool value, const bool create)
Creates a key/bool-value pair that defines a GRDP info attribute.
void grdpSendErrorMsg(GRDP_RTITEM *pRti, const char txt[], PWP_UINT32 code)
Send an error text message (PWP_MSGID_ERROR) to the framework.
void PwuSendDebugMsg(const char api[], const char txt[], PWP_UINT32 code)
Send a debug text message (PWP_MSGID_DEBUG) to the framework.
PWP_BOOL grdpProgressIncr(GRDP_RTITEM *pRti)
Completes a progress tracking sub-step.
Pointwise Plugin API (PWP-API)
PWP_BOOL grdpProgressEndStep(GRDP_RTITEM *pRti)
Completes a progress tracking major step.
PWP_BOOL PwuAssignValueEnum(const char group[], const char name[], const char value[], bool createIfNotExists)
PWP_UINT32 grdpFormatCnt
The number of entries in grdpRtItem[] array.
const char * name
full API spec name
PWP_BOOL PwuProgressBegin(const char api[], PWP_UINT32 totalSteps)
Send a progress begin message (PWP_MSGID_PROGBEGIN) to the framework.