How can I get and set the subq attributes pk capacity and bit capacity within my process model?

Categories:
Solution Number:
S20597
Last Modified:
2013-08-20
Issue

How can I get and set the subq attributes pk capacity and bit capacity within my process model?

Solution

Getting and setting the pk capacity and bit capacity from within a process model can be accomplished using a combination of the topo and ima KP packages. The following is some example code that shows the getting of the current values, then setting new values:/* Get this objects ID */self_id = op_id_self ();/* Get the queues object ID */op_ima_obj_attr_get (self_id, subqueue, &queue_objid);/* Obtain how many subqueues exist */subq_count = op_topo_child_count (queue_objid, OPC_OBJMTYPE_ALL);/* Get the object IDs of each subqueue. Get subqueue attributes and alter */for (i = 0; i < subq_count; i++) { /* Obtain object ID of the ith subqueue */ subq_objid = op_topo_child (queue_objid, OPC_OBJMTYPE_ALL, i); /* Get current subqueue attribute settings */ op_ima_obj_attr_get (subq_objid, bit capacity, &bit_capacity); op_ima_obj_attr_get (subq_objid, pk capacity, &pk_capacity); /* Determine new values */ new_bit_capacity = bit_capacity * 10; new_pk_capacity = pk_capacity * 10; /* Set new attribute values */ op_ima_obj_attr_set (subq_objid, bit capacity, new_bit_capacity); op_ima_obj_attr_set (subq_objid, pk capacity, new_pk_capacity);}

Environment

DES Kernel->Process Modeling/Coding

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case