Hi...

I would like to declare the following in my c++ header file:

#include<wireless-phy.h>

..... (within my agent class) ...
 WirelessPhy       *nodePhy

using the above declaration, I want to access Pt_ value via getPt() function in
my c++ source file.

Thank you for your concern.
Aslinda Hassan

Quoting ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed <teto...@yahoo.com>:

> please declare more what is information that nneded to modify this file and
> what type of protocol please declare more to make discussion between them
> 
> --- On Fri, 9/23/11, Aslinda Hassan <aslinda.has...@mun.ca> wrote:
> 
> From: Aslinda Hassan <aslinda.has...@mun.ca>
> Subject: [ns] wireless-phy.h error
> To: ns-users@ISI.EDU
> Date: Friday, September 23, 2011, 2:41 PM
> 
> 
> Hi everyone,
> 
> Recently, I stumbled across this problem and I am hoping if anyone has the
> same
> experience before and could provide me some help.  I'm creating a routing
> protocol that requires some information from wireless-phy.h. 
> Unfortunately,
> whenever I tried to include wireless-phy.h file in my C++ header file, I got
> the following errors:
> 
> ./mac/wireless-phy.h:130: error: expected identifier before 'r'
> ./mac/wireless-phy.h:130: error: expected ‘}’ before 'r'
> ./mac/wireless-phy.h:130: error: expected unqualified-id before 'r'
> ./mac/wireless-phy.h: In member function ‘bool&
> WirelessPhy::Is_node_on()’:
> ./mac/wireless-phy.h:97: error: ‘node_on_’ was not declared in this
> scope
> ./mac/wireless-phy.h: In member function ‘bool
> WirelessPhy::Is_sleeping()’:
> ./mac/wireless-phy.h:98: error: ‘status_’ was not declared in this scope
> ./mac/wireless-phy.h: At global scope:
> ./mac/wireless-phy.h:132: error: no matching function for call to
> ‘Sleep_Timer::Sleep_Timer()’
> ./mac/wireless-phy.h:58: note: candidates are:
> Sleep_Timer::Sleep_Timer(WirelessPhy*)
> ./mac/wireless-phy.h:56: note:             
>    Sleep_Timer::Sleep_Timer(const
> Sleep_Timer&)
> ./mac/wireless-phy.h:135: error: expected unqualified-id before
> ‘private’
> ./mac/wireless-phy.h: In function ‘EnergyModel* em()’:
> ./mac/wireless-phy.h:143: error: ‘node’ was not declared in this scope
> ./mac/wireless-phy.h: At global scope:
> ./mac/wireless-phy.h:145: error: ‘friend’ used outside of class
> ./mac/wireless-phy.h:147: error: expected declaration before ‘}’ token
> 
> 
> What is more frustrating is, even when I just put statement 
> #include <wireless-phy.h> in my header file, without declaring any classes,
> I
> still receive the same errors.  I need information from WirelessPhy class
> to
> calculate the transmission range in my C++ source code.  
> 
> I hope anyone here could provide me some suggestions, solutions, or at least
> a
> workaround to this problem.  Your help is highly appreciated.  Thank you
> in
> advance
> 
> Aslinda Hassan
> 
> This electronic communication is governed by the terms and conditions at
> http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2011.php
> 
> 




This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2011.php

Reply via email to