为节点对象的实例创建任何上下文。无论何时构造节点对象的实例,由消息代理调用它。当由代理部署消息流时或当启动执行组时,构造节点。
在其中定义 | 类型 | 成员 |
---|---|---|
CNI_VFT | 必需 | iFpCreateNodeContext |
CciContext* cniCreateNodeContext( CciFactory* factoryObject, CciChar* nodeName, CciNode* nodeObject);
static char* functionName = (char *)"_Switch_createNodeContext()"; NODE_CONTEXT_ST* p; /* Allocate a pointer to the local context */ p = (NODE_CONTEXT_ST *)malloc(sizeof(NODE_CONTEXT_ST)); if (p) { /* Clear the context area */ memset(p, 0, sizeof(NODE_CONTEXT_ST)); /* Save our node object pointer in our context */ p->nodeObject = nodeObject; /* Save our node name */ CciCharNCpy((CciChar*)&p->nodeName, nodeName, MAX_NODE_NAME_LEN);} else /* Handle errors */