Take a look at this code:

One module has:

command result_t CPSSetReceive.setReceive[uint8_t channel](uint32_t id, 
uint32_t mask) {        
    if ((call CANReceive.setReceive[channel](id, mask)) && (call 
CANReceive.setReceive[channel + 7](id, mask))) {
...
}

This operation is called with a mask equal to CAN_DEFAULT_MASK, and is 
connected to a module with this code:

command result_t CANReceive.setReceive[uint8_t channel](uint32_t id, uint32_t 
mask) {
     //DEBUG
    if (channel == 10)
        if (mask != CAN_DEFAULT_MASK)
            call Leds.yellowOff();
    //*********************

    call MOb.disable[channel]();
    atomic status[channel] = IDLE;
    if (id >= MAX_ID)
        return SUCCESS;
    if (call MOb.prepareRx[channel](id, mask)) {
        atomic status[channel] = RX;
        return SUCCESS;
    }
    else
        return FAIL;
}

As you can see, in CPSSetReceive.setReceive[..](..) there are two calls to 
CANReceive.setReceive[..](..). In the first call, the actual parameters of 
CPSSetReceive.setReceive are equal to the actual parameters of 
CANReceive.setReceive. When you make the second call, in the body of 
CANReceive.setReceive[](), the actual parameters doesn't match with the 
parameters sent by CPSSetReceive.setReceive[](), even when the parameters 
aren't modified and aren't references or global variables. Is easy to conclude 
that the compiler is changing the semantic of my program. The cuestion is why. 
Any ideas?
I'm using TinyOS 1.1

Thanks in advance.







      Tarjeta de crédito Yahoo! de Banco Supervielle.
Solicitá tu nueva Tarjeta de crédito. De tu PC directo a tu casa. 
www.tuprimeratarjeta.com.ar 
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to