16.20 - APPSTATE - Teradata Ecosystem Manager

Teradata® Ecosystem Manager API Reference

prodname
Teradata Ecosystem Manager
vrm_release
16.20
created_date
December 2020
category
Programming Reference
featnum
B035-3204-107K
#include <tmsmapi.h>
//initialize Api
pCtx = TM_Init();
//Create Event placeholder.
pApplicationStateEvent = MSM_CreateWEvent(pCtx,NULL);
pApplicationStateEvent->eventType=APPSTATEEVENT;//set event type
pApplicationStateEvent->szTDPID=L”sampleTDPID”;//set TDPID
pApplicationStateEvent->iStateCode=10;//set statecode
pApplicationStateEvent->szApplicationId=L"SampleApplication";//set application id
status=MSM_SendWEvent(pCtx,pApplicationStateEvent);//send event
MSM_FreeAndClearWEventMembers(pCtx, pApplicationStateEvent);
//Free event. Do not forget to call this
MSM_FreeWEvent(pCtx, pApplicationStateEvent);
//Free Context.do not forget to call this.
TM_Free(pCtx);