ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Can you tell me how to set attributes of C userdefined node?

Post new topic  Reply to topic
 Can you tell me how to set attributes of C userdefined node? « View previous topic :: View next topic » 
Author Message
eyu
PostPosted: Wed Dec 07, 2011 1:17 am    Post subject: Can you tell me how to set attributes of C userdefined node? Reply with quote

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
View user's profile Send private message
lancelotlinc
PostPosted: Wed Dec 07, 2011 11:24 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
eyu
PostPosted: Wed Dec 07, 2011 4:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
lancelotlinc
PostPosted: Wed Dec 07, 2011 5:17 pm    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

For example, what attribubte would you like to set ?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
eyu
PostPosted: Wed Dec 07, 2011 5:28 pm    Post subject: Reply with quote

Newbie

Joined: 07 Dec 2011
Posts: 4

lancelotlinc wrote:
For example, what attribubte would you like to set ?


hi,

i have attached the picture here:

https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14733673&#14733673

1.jpg
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Dec 07, 2011 5:59 pm    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Congratulations. Looks like you have done it.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
eyu
PostPosted: Wed Dec 07, 2011 6:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Can you tell me how to set attributes of C userdefined node?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.