Greetings, I'm a beginner in tinyos. Im trying to run a code created in the 1.x days onto tinyos-2.x. When I tried compiling the unmodified code in 2.x, I'm getting the error as "7: component Main not found" followed by series of errors attached with this mail. From the TOSSIM tutorial I learnt that I need python to run the tossim. So, when I was following the steps as in the tutorial, I couldnt create a tossim object using "t= Tossim([])" it gave NameError:name Tossim is not defined. Can you please tell me what is the actual problem? Is it purely an upgrade issue? or its two different set of problems?
Awaiting an earlier suitable reply. Thanks, Pratibha
mkdir -p build/micaz placing object files in build/micaz writing XML schema to app.xml compiling GPSRSim to object file sim.o ncc -c -shared -fPIC -o build/micaz/sim.o -g -O0 -I/opt/tinyos-2.x/tos/platform/pc/packet -tossim -fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\) -finline-limit=100000 -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb -DTOSH_DATA_LENGTH=100 -DGPSR_PAYLOAD_SIZE=58 -DGPSR_MAX_NEIGHBORS=40 -DGPSR_BEACON_INTERVAL=5 -DGPSR_FORWARDER_QUEUE_SIZE=100 -DGPSR_FORWARDER_MEM_SIZE=10000 -DGPSR_ROUTER_QUEUE_SIZE=100 -DGPSR_ROUTER_MEM_SIZE=10000 -DLLC_QUEUE_SIZE=100 -DLLC_MEM_SIZE=10000 -DFULL_CLDP -DCLDP_STATISTICS -DGPSR_CLDP_INTERVAL=15 -DGPSR_SIMULATION -DGPSR_SIM_NODES=200 -DGPSR_TRACE_PATH -DGPSR_SHORT_TRACE -DPACKET_SEND_DELAY=50 -I. -I../../tos/interfaces -I../../tos/system -I../../tos/lib -I../../tos/types -DIDENT_PROGRAM_NAME=\"GPSRSim\" -DIDENT_USER_ID=\"xubuntos\" -DIDENT_HOSTNAME=\"xubuntos-tinyos\" -DIDENT_USER_HASH=0x00f95284L -DIDENT_UNIX_TIME=0x4837b485L -DIDENT_UID_HASH=0x1ffd4c7aL -Wno-nesc-data-race GPSRSim.nc -fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc-dumpfile=app.xml In component `GPSRSim': GPSRSim.nc:7: component Main not found In file included from GPSRSimM.nc:7, from GPSRSim.nc:7: In interface `GPSRForwarder': ../../tos/interfaces/GPSRForwarder.nc:31: only commands and events can be defined in interfaces ../../tos/interfaces/GPSRForwarder.nc:31: warning: return-type defaults to `int' ../../tos/interfaces/GPSRForwarder.nc:31: syntax error before `init' ../../tos/interfaces/GPSRForwarder.nc:34: only commands and events can be defined in interfaces ../../tos/interfaces/GPSRForwarder.nc:34: warning: return-type defaults to `int' ../../tos/interfaces/GPSRForwarder.nc:34: redefinition of `result_t' ../../tos/interfaces/GPSRForwarder.nc:34: syntax error before `send_msg' ../../tos/interfaces/GPSRForwarder.nc:35: only commands and events can be defined in interfaces ../../tos/interfaces/GPSRForwarder.nc:35: warning: return-type defaults to `int' ../../tos/interfaces/GPSRForwarder.nc:35: redefinition of `result_t' ../../tos/interfaces/GPSRForwarder.nc:35: syntax error before `send_msg_done' ../../tos/interfaces/GPSRForwarder.nc:41: only commands and events can be defined in interfaces ../../tos/interfaces/GPSRForwarder.nc:41: warning: return-type defaults to `int' ../../tos/interfaces/GPSRForwarder.nc:41: redefinition of `result_t' ../../tos/interfaces/GPSRForwarder.nc:41: syntax error before `get_position' ../../tos/interfaces/GPSRForwarder.nc:42: only commands and events can be defined in interfaces ../../tos/interfaces/GPSRForwarder.nc:42: warning: return-type defaults to `int' ../../tos/interfaces/GPSRForwarder.nc:42: redefinition of `result_t' ../../tos/interfaces/GPSRForwarder.nc:42: syntax error before `set_position' In file included from GPSRSim.nc:7: In component `GPSRSimM': GPSRSimM.nc:9: too few arguments to interface `PacketTriggerTimer' In file included from GPSRSim.nc:7: GPSRSimM.nc:27: syntax error before `StdControl' GPSRSimM.nc:31: warning: declaration of `unique' shadows global declaration <dummy>: warning: location of shadowed declaration GPSRSimM.nc:31: syntax error before `(' GPSRSimM.nc:31: warning: return-type defaults to `int' GPSRSimM.nc:31: conflicting types for `sim_log_debug' /opt/tinyos-2.x/tos/lib/tossim/sim_log.c:238: previous declaration of `sim_log_debug' GPSRSimM.nc:31: warning: type defaults to `int' in declaration of `DBG_USR1' GPSRSimM.nc:31: syntax error before string constant GPSRSimM.nc:34: warning: type defaults to `int' in declaration of `dst_node' GPSRSimM.nc:34: conflicting types for `dst_node' GPSRSimM.nc:20: previous declaration of `dst_node' GPSRSimM.nc:34: `TOS_LOCAL_ADDRESS' undeclared here (not in a function) GPSRSimM.nc:34: warning: data definition has no type or storage class GPSRSimM.nc:35: warning: type defaults to `int' in declaration of `send_seqno' GPSRSimM.nc:35: conflicting types for `send_seqno' GPSRSimM.nc:21: previous declaration of `send_seqno' GPSRSimM.nc:35: warning: data definition has no type or storage class GPSRSimM.nc:36: syntax error before `return' GPSRSimM: `PacketTriggerTimer.fired' not implemented GPSRSimM: `GPSRForwarder.receive_msg' not implemented GPSRSimM: `StdControl.start' not implemented GPSRSimM: `StdControl.stop' not implemented In file included from ../../tos/system/GPSRC.nc:36, from GPSRSim.nc:7: In interface `GPSREvent': ../../tos/interfaces/GPSREvent.nc:30: only commands and events can be defined in interfaces ../../tos/interfaces/GPSREvent.nc:30: warning: return-type defaults to `int' ../../tos/interfaces/GPSREvent.nc:30: syntax error before `add_neighbor' ../../tos/interfaces/GPSREvent.nc:31: only commands and events can be defined in interfaces ../../tos/interfaces/GPSREvent.nc:31: warning: return-type defaults to `int' ../../tos/interfaces/GPSREvent.nc:31: redefinition of `result_t' ../../tos/interfaces/GPSREvent.nc:31: syntax error before `del_neighbor' ../../tos/interfaces/GPSREvent.nc:32: only commands and events can be defined in interfaces ../../tos/interfaces/GPSREvent.nc:32: warning: return-type defaults to `int' ../../tos/interfaces/GPSREvent.nc:32: redefinition of `result_t' ../../tos/interfaces/GPSREvent.nc:32: syntax error before `chg_neighbor' In file included from ../../tos/system/GPSRC.nc:37, from GPSRSim.nc:7: In interface `GPSRDebug': ../../tos/interfaces/GPSRDebug.nc:31: only commands and events can be defined in interfaces ../../tos/interfaces/GPSRDebug.nc:31: warning: return-type defaults to `int' ../../tos/interfaces/GPSRDebug.nc:31: syntax error before `act_link' ../../tos/interfaces/GPSRDebug.nc:32: only commands and events can be defined in interfaces ../../tos/interfaces/GPSRDebug.nc:32: warning: return-type defaults to `int' ../../tos/interfaces/GPSRDebug.nc:32: redefinition of `result_t' ../../tos/interfaces/GPSRDebug.nc:32: syntax error before `deact_link' In file included from ../../tos/system/GPSR_RouterM.nc:33, from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: In interface `NeighborList': ../../tos/interfaces/NeighborList.nc:32: only commands and events can be defined in interfaces ../../tos/interfaces/NeighborList.nc:32: warning: return-type defaults to `int' ../../tos/interfaces/NeighborList.nc:32: syntax error before `init' ../../tos/interfaces/NeighborList.nc:47: only commands and events can be defined in interfaces ../../tos/interfaces/NeighborList.nc:47: warning: return-type defaults to `int' ../../tos/interfaces/NeighborList.nc:47: redefinition of `result_t' ../../tos/interfaces/NeighborList.nc:47: syntax error before `set_position' In file included from ../../tos/system/GPSR_RouterM.nc:38, from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: In interface `LLCControl': ../../tos/interfaces/LLCControl.nc:30: only commands and events can be defined in interfaces ../../tos/interfaces/LLCControl.nc:30: warning: return-type defaults to `int' ../../tos/interfaces/LLCControl.nc:30: syntax error before `init' ../../tos/interfaces/LLCControl.nc:33: only commands and events can be defined in interfaces ../../tos/interfaces/LLCControl.nc:33: warning: return-type defaults to `int' ../../tos/interfaces/LLCControl.nc:33: redefinition of `result_t' ../../tos/interfaces/LLCControl.nc:33: syntax error before `link_state_req' ../../tos/interfaces/LLCControl.nc:36: only commands and events can be defined in interfaces ../../tos/interfaces/LLCControl.nc:36: warning: return-type defaults to `int' ../../tos/interfaces/LLCControl.nc:36: redefinition of `result_t' ../../tos/interfaces/LLCControl.nc:36: syntax error before `link_state_ind' In file included from ../../tos/system/GPSR_RouterM.nc:39, from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: In interface `LLCSend': ../../tos/interfaces/LLCSend.nc:30: only commands and events can be defined in interfaces ../../tos/interfaces/LLCSend.nc:30: warning: return-type defaults to `int' ../../tos/interfaces/LLCSend.nc:30: syntax error before `send_packet_done' In file included from ../../tos/system/GPSR_RouterM.nc:40, from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: In interface `LLCReceive': ../../tos/interfaces/LLCReceive.nc:30: only commands and events can be defined in interfaces ../../tos/interfaces/LLCReceive.nc:30: warning: return-type defaults to `int' ../../tos/interfaces/LLCReceive.nc:30: syntax error before `receive_packet' In file included from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: In component `GPSR_RouterM': ../../tos/system/GPSR_RouterM.nc:44: too few arguments to interface `BeaconTimer' ../../tos/system/GPSR_RouterM.nc:46: too few arguments to interface `CLDPTriggerTimer' In file included from ../../tos/system/GPSR_RouterM.nc:55, from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: ../../tos/lib/gpsr_queue.c: In function `push_queue': ../../tos/lib/gpsr_queue.c:29: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c:29: (Each undeclared identifier is reported only once ../../tos/lib/gpsr_queue.c:29: for each function it appears in.) ../../tos/lib/gpsr_queue.c:31: `DBG_USR2' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `pop_queue': ../../tos/lib/gpsr_queue.c:45: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `front_queue': ../../tos/lib/gpsr_queue.c:55: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `get_ith_queue': ../../tos/lib/gpsr_queue.c:66: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `queue_full': ../../tos/lib/gpsr_queue.c:78: `DBG_USR2' undeclared (first use in this function) In file included from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: ../../tos/system/GPSR_RouterM.nc: At top level: ../../tos/system/GPSR_RouterM.nc:103: syntax error before `NeighborList' GPSR_RouterM: `GPSREvent.result_t' not implemented GPSR_RouterM: `GPSREvent.result_t' not implemented GPSR_RouterM: `GPSREvent.result_t' not implemented GPSR_RouterM: `GPSR_SEND_CONTROL_PACKET.runTask' not implemented GPSR_RouterM: `GPSRDebug.get_neighbor_table' not implemented GPSR_RouterM: `GPSRDebug.result_t' not implemented GPSR_RouterM: `GPSRDebug.result_t' not implemented GPSR_RouterM: `GPSRDebug.debug' not implemented GPSR_RouterM: `CLDPTriggerTimer.fired' not implemented GPSR_RouterM: `NeighborList.find_neighbor' not implemented GPSR_RouterM: `NeighborList.find_counterclockwise_node' not implemented GPSR_RouterM: `NeighborList.find_greedy_node' not implemented GPSR_RouterM: `NeighborList.find_clockwise_node' not implemented GPSR_RouterM: `NeighborList.result_t' not implemented GPSR_RouterM: `NeighborList.result_t' not implemented GPSR_RouterM: `BeaconTimer.fired' not implemented GPSR_RouterM: `SET_MYLOCATION.runTask' not implemented In file included from ../../tos/system/GPSR_ForwarderM.nc:50, from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: In component `GPSR_ForwarderM': ../../tos/lib/gpsr_queue.c: In function `push_queue': ../../tos/lib/gpsr_queue.c:29: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c:31: `DBG_USR2' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `pop_queue': ../../tos/lib/gpsr_queue.c:45: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `front_queue': ../../tos/lib/gpsr_queue.c:55: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `get_ith_queue': ../../tos/lib/gpsr_queue.c:66: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `queue_full': ../../tos/lib/gpsr_queue.c:78: `DBG_USR2' undeclared (first use in this function) In file included from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: ../../tos/system/GPSR_ForwarderM.nc: At top level: ../../tos/system/GPSR_ForwarderM.nc:65: syntax error before `GPSRForwarder' GPSR_ForwarderM: `GPSR_FORWARD_PACKET.runTask' not implemented GPSR_ForwarderM: `GPSRForwarder.result_t' not implemented GPSR_ForwarderM: `GPSRForwarder.result_t' not implemented GPSR_ForwarderM: `GPSRForwarder.result_t' not implemented GPSR_ForwarderM: `GPSRForwarder.result_t' not implemented GPSR_ForwarderM: `GPSRForwarder.result_t' not implemented In file included from ../../tos/system/LLCC.nc:40, from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: In component `LLCM': ../../tos/system/LLCM.nc:38: interface BareSendMsg not found ../../tos/system/LLCM.nc:39: interface ReceiveMsg not found ../../tos/system/LLCM.nc:42: too few arguments to interface `ResendFrameTimer' In file included from ../../tos/system/LLCM.nc:58, from ../../tos/system/LLCC.nc:40, from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: ../../tos/lib/gpsr_queue.c: In function `push_queue': ../../tos/lib/gpsr_queue.c:29: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c:31: `DBG_USR2' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `pop_queue': ../../tos/lib/gpsr_queue.c:45: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `front_queue': ../../tos/lib/gpsr_queue.c:55: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `get_ith_queue': ../../tos/lib/gpsr_queue.c:66: `DBG_USR1' undeclared (first use in this function) ../../tos/lib/gpsr_queue.c: In function `queue_full': ../../tos/lib/gpsr_queue.c:78: `DBG_USR2' undeclared (first use in this function) In file included from ../../tos/system/LLCC.nc:40, from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: ../../tos/system/LLCM.nc: At top level: ../../tos/system/LLCM.nc:65: syntax error before `release_llc_link' ../../tos/system/LLCM.nc:66: syntax error before `reset_llc_link' ../../tos/system/LLCM.nc:73: syntax error before `tx_frame' ../../tos/system/LLCM.nc:74: syntax error before `rx_frame_ptr' ../../tos/system/LLCM.nc:75: syntax error before `rx_frame' ../../tos/system/LLCM.nc:91: syntax error before `LLCControl' ../../tos/system/LLCM.nc:94: warning: type defaults to `int' in declaration of `tx_frame_pos' ../../tos/system/LLCM.nc:94: conflicting types for `tx_frame_pos' ../../tos/system/LLCM.nc:72: previous declaration of `tx_frame_pos' ../../tos/system/LLCM.nc:94: warning: data definition has no type or storage class ../../tos/system/LLCM.nc:95: warning: type defaults to `int' in declaration of `rx_frame_ptr' ../../tos/system/LLCM.nc:95: `rx_frame' undeclared here (not in a function) ../../tos/system/LLCM.nc:95: warning: data definition has no type or storage class ../../tos/system/LLCM.nc:97: syntax error before `for' ../../tos/system/LLCM.nc:97: syntax error before `<' ../../tos/system/LLCM.nc:97: syntax error before `++' LLCM: `LLCControl.result_t' not implemented LLCM: `LLCControl.result_t' not implemented LLCM: `LLCControl.result_t' not implemented LLCM: `ResendFrameTimer.fired' not implemented LLCM: `send_llcframe_task.runTask' not implemented LLCM: `LLCSend.send_packet' not implemented LLCM: `LLCSend.result_t' not implemented LLCM: `LLCReceive.result_t' not implemented In file included from ../../tos/system/GPSRC.nc:42, from GPSRSim.nc:7: In component `LLCC': ../../tos/system/LLCC.nc:40: component RadioCRCPacket not found ../../tos/system/LLCC.nc:40: component TimerC not found ../../tos/system/LLCC.nc:40: component RandomLFSR not found ../../tos/system/LLCC.nc:57: cannot find `Control' ../../tos/system/LLCC.nc:58: cannot find `Send' ../../tos/system/LLCC.nc:59: cannot find `Receive' ../../tos/system/LLCC.nc:60: no match ../../tos/system/LLCC.nc:61: cannot find `StdControl' ../../tos/system/LLCC.nc:62: cannot find `Timer' In component `GPSRC': ../../tos/system/GPSRC.nc:48: no match ../../tos/system/GPSRC.nc:50: cannot find `StdControl' ../../tos/system/GPSRC.nc:51: cannot find `Timer' ../../tos/system/GPSRC.nc:54: cannot find `Timer' In component `GPSRSim': GPSRSim.nc:9: cannot find `StdControl' GPSRSim.nc:11: cannot find `StdControl' GPSRSim.nc:12: cannot find `Timer' make: *** [sim-exe] Error 1
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help