Try to add the direcory path of ConnectionC in your Makefile.

CFLAGS += -I$(TOSDIR)/path

replace 'path' with the actual path of ConnectionC in tinyos-2.1.1/tos/.

On Tue, Mar 27, 2012 at 6:20 PM, Jared Fisher <[email protected]> wrote:

>   Hello,
>
> I am getting an error saying that it cannot find a file. I am unsure if
> this is the correct way to go also.
>
> What I have so far is a ConnectionC module, Connection interface, a
> ControllerAppC and ControllerC. If you think in object oriented terms, I am
> trying to create a class ConnectionC, which is used in ControllerC.
>
> What I have so far is (I removed a bunch of irrelevant code)
>
> ControllerAppC.nc
> ---Code---
> configuration ControllerAppC {}
>
> implementation
> {
>     components MainC;
>     components LedsC;
>     components ControllerC as App;
>     components ConnectionC as conn;
>     ...
>
>     App.Boot -> MainC;
>     App.Leds -> LedsC;
>     //Should something be here to wire ConnectionC?
> }
>
> ControllerC.nc
> ---Code---
> module ControllerC
> {
>     uses interface Boot;
>     uses interface Leds;
>     uses interface Connection as conn;
> }
> implementation {...}
>
> Connection.nc
> ---Code---
> interface Connection
> {
>     command error_t closeConnection();
>     command error_t openConnection(uint16_t id);
> }
>
> ConnectionC.nc
> ---Code---
> module ConnectionC
> {
>     provides interface Connection;
>     ...
> }
>
> implementation
> {
>     command error_t Connection.openConnection(uint16_t id){...}
>     command error_t Connection.closeConnection(){...}
>     ...
> }
>
> I am getting this error when I compile
> In component `ControllerAppC.AMSenderC.SenderC.AMQueueEntryP':
> /opt/tinyos-2.1.1/tos/system/AMQueueEntryP.nc: In function `Send.sendDone':
> /opt/tinyos-2.1.1/tos/system/AMQueueEntryP.nc(ControllerAppC.AMSenderC.SenderC.AMQueueEntryP):58:
> AMSend.sendDone not connected
> In component `ControllerC':
> ControllerC.nc: In function `Receive.receive':
> ControllerC.nc:33: conn.openConnection not connected
> make: *** [exe0] Error 1
>
> and if I add
> App.conn –> ConnectionC; where I put a comment in the AppC file, I get.
> In component `ControllerAppC':
> ControllerAppC.nc:23: cannot find `ConnectionC'
> make: *** [exe0] Error 1
>
> Is there a way to solve this?
> Regards,
> JF
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to