16.20 - UNITYSTATE - 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.
pSendUnityStateEvent = MSM_CreateWEvent(pCtx,NULL);

pSendUnityStateEvent->szResourceId=L”sampleResId”;//set resource-id
pSendUnityStateEvent->eventType=UNITYSTATEEVENT;//set event type
pSendUnityStateEvent->szTDPID=L”sampleTDPID”;//set TDPID
pSendUnityStateEvent->iStateCode=10;//set state code
MSM_AddResourceType(pCtx,pSendUnityStateEvent,L”FLOAD”);//Add multi-argument resourceType					

status=MSM_SendEvent(pCtx,pSendUnityStateEvent);//send event

MSM_FreeAndClearWEventMembers(pCtx, pSendUnityStateEvent);
//Free event. Do not forget to call this
MSM_FreeWEvent(pCtx, pSendUnityStateEvent);
//Free Context.do not forget to call this.
TM_Free(pCtx);