|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Can you tell me how to set attributes of C userdefined node? |
« View previous topic :: View next topic » |
Author |
Message
|
eyu |
Posted: Wed Dec 07, 2011 1:17 am Post subject: Can you tell me how to set attributes of C userdefined node? |
|
|
Newbie
Joined: 07 Dec 2011 Posts: 4
|
hi all,
i installed Switch sample into my WMB environment successfully. And now i add some fields to the switch node attributes, but i don't know how to set attributes in C code.
I have read through the whole WMB information center and searched the current forum, but still there is no usefull info.
Could anybody tell me how?
thanks in advance |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Dec 07, 2011 11:24 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
For the C user defined node sample, called "NumCompute", the C libraries for the NumCompute node are stored in subfolders according to platform. To export the NumComputeNode.lil file into a temporary directory, click File > Export > General > File system, click Next. The UDESampleCCode directory contains the source code for the NumCompute node. Follow the tutorial to discover the needed steps. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
eyu |
Posted: Wed Dec 07, 2011 4:32 pm Post subject: |
|
|
Newbie
Joined: 07 Dec 2011 Posts: 4
|
hi lancelotlinc,
thanks for your reply. but i really want to know how to set attributes for a C userdefined node in C code.
For example:
if i add some fields to the node attributes when creating the user interface representation of a user defined node in the workbench, how can i set attributes in C code for this node?
i looked through the NumComputeNode.c file, the _NumCompute_createNodeContext() function, there is no other fields setting except "nodeTraceSetting" & "nodeTraceOutfile".
insAttrTblEntry()??_setAttribute()??
please help me.
lancelotlinc wrote: |
For the C user defined node sample, called "NumCompute", the C libraries for the NumCompute node are stored in subfolders according to platform. To export the NumComputeNode.lil file into a temporary directory, click File > Export > General > File system, click Next. The UDESampleCCode directory contains the source code for the NumCompute node. Follow the tutorial to discover the needed steps. |
|
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Dec 07, 2011 5:17 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
eyu |
Posted: Wed Dec 07, 2011 5:28 pm Post subject: |
|
|
Newbie
Joined: 07 Dec 2011 Posts: 4
|
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Dec 07, 2011 5:59 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
eyu |
Posted: Wed Dec 07, 2011 6:06 pm Post subject: |
|
|
Newbie
Joined: 07 Dec 2011 Posts: 4
|
lancelotlinc wrote: |
Congratulations. Looks like you have done it. |
should not i add some code to _NumCompute_createNodeContext() function in NumComputeNode.c file???
just like
Code: |
/* Create attributes and set default values */
{
const CciChar* ucsAttr = CciString("nodeTraceSetting", BIP_DEF_COMP_CCSID) ;
insAttrTblEntry(p, (CciChar*)ucsAttr, CNI_TYPE_INTEGER);
_setAttribute(p, (CciChar*)ucsAttr, (CciChar*)constZero);
free((void *)ucsAttr) ;
}
{
const CciChar* ucsAttr = CciString("nodeTraceOutfile", BIP_DEF_COMP_CCSID) ;
insAttrTblEntry(p, (CciChar*)ucsAttr, CNI_TYPE_STRING);
_setAttribute(p, (CciChar*)ucsAttr, (CciChar*)constSwitchTraceLocation);
free((void *)ucsAttr) ;
} |
Otherwise, how does WMB runtime environment know what attributes have been added?? |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|