16.10 - STATE - Teradata Ecosystem Manager

Teradata Ecosystem Manager API Reference

prodname
Teradata Ecosystem Manager
vrm_release
16.10
created_date
June 2017
category
Programming Reference
featnum
B035-3204-067K
#include <tmsmapi.h>
//initialize Api
pCtx = TM_Init();
//Create Event placeholder.
pStateEvent = MSM_CreateWEvent(pCtx,NULL);
pStateEvent->szResourceId=L”sampleResId”;//set resource-id
pStateEvent->eventType=STATEEVENT;//set event type
pStateEvent->szTDPID=L”sampleTDPID”;//set TDPID
pStateEvent->iStateCode=10;//set state code
MSM_AddWResourceType(pCtx,pSendStateEvent,TMSM_WRESOURCETYPE_FLOAD);//Add multi-argument resourceType
status=MSM_SendWEvent(pCtx, pStateEvent);//send event
MSM_FreeAndClearWEventMembers(pCtx, pStateEvent);
//Free event. Do not forget to call this
MSM_FreeWEvent(pCtx, pStateEvent);
//Free Context.do not forget to call this.
TM_Free(pCtx);