Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help me with this programme in opnet!

Status
Not open for further replies.

Cking

Junior Member level 1
Joined
May 11, 2007
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,373
opc_stat_local

static void
aodv_rte_local_stats_reg (void)
{
/** Initializes the local statistic handles **/
FIN (aodv_rte_local_stats_reg (void));

/* Allocate memory for the structure that stores */
/* all the statistic handles */
local_stat_handle_ptr = (AodvT_Local_Stathandles*) op_prg_mem_alloc (sizeof (AodvT_Local_Stathandles));

/* Register each of the local statistic */
local_stat_handle_ptr->route_discovery_time_shandle = op_stat_reg ("AODV.Route Discovery Time", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->pkt_queue_size_shandle = op_stat_reg ("AODV.Packet Queue Size", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->num_pkts_discard_shandle = op_stat_reg ("AODV.Total Packets Dropped", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->route_table_size_shandle = op_stat_reg ("AODV.Route Table Size", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->num_hops_shandle = op_stat_reg ("AODV.Number of Hops per Route", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->rte_traf_rcvd_bps_shandle = op_stat_reg ("AODV.Routing Traffic Received (bits/sec)", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->rte_traf_rcvd_pps_shandle = op_stat_reg ("AODV.Routing Traffic Received (pkts/sec)", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->rte_traf_sent_bps_shandle = op_stat_reg ("AODV.Routing Traffic Sent (bits/sec)", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->rte_traf_sent_pps_shandle = op_stat_reg ("AODV.Routing Traffic Sent (pkts/sec)", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->total_requests_sent_shandle = op_stat_reg ("AODV.Total Route Requests Sent", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->total_replies_sent_shandle = op_stat_reg ("AODV.Total Route Replies Sent", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->total_replies_sent_from_dest_shandle = op_stat_reg ("AODV.Total Replies Sent from Destination", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->total_cached_replies_sent_shandle = op_stat_reg ("AODV.Total Cached Replies Sent", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->total_route_errors_sent_shandle = op_stat_reg ("AODV.Total Route Errors Sent", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);
local_stat_handle_ptr->total_requests_fwd_shandle = op_stat_reg ("AODV.Total Route Requests Forwarded", OPC_STAT_INDEX_NONE, OPC_STAT_LOCAL);

FOUT;
}
this is procedure in aodv, the sentence bolded is hard for me to catch.
i think there is no need to allocate memory in advance.
what do you think?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top