On Jun 11, 2009, at 1:27 PM, Gary Lee wrote: > hi, > > What is wrong with the following statement? > > Components new AMSenderC(TOS_NODE_ID)? > > That is, can I used TOS_NODE_ID as the AM? When I compile it, I got > error saying that "TOS_NODE_ID" is not a constant... >
TOS_NODE_ID is a variable (it has a location in memory). You can't pass a variable to a generic component initializer. Furthermore, why do you pass the node ID to AMSenderC? That generic takes an AM type (message type identifier) as a parameter, not an AM address (node identifier). The former is 8 bits, the latter is 16... Phil _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
