[Tinyos-devel] Current status of the message buffer discussion

Miklos Maroti mmaroti at math.u-szeged.hu
Tue Jun 2 00:08:49 PDT 2009


Ok, The point of option #3 was not the compile time flag. Here is the
updated option:

------- Option #4 -------

interface Ieee154Packet
{
       command void format(message_t* msg, uint8_t flags);

       command address_t getSource16(message_t* msg);
       command address_t getDestination16(message_t* msg);
       command address_t getSource64(message_t* msg);
       command address_t getDestination64(message_t* msg);

       command void setSource16(message_t* msg, address_t addr);
       command void setDestination16(message_t* msg, address_t addr);
       command void setSource64(message_t* msg, address_t addr);
       command void setDestination64(message_t* msg, address_t addr);

       command void requestAck(message_t* msg, bool ack);
       command bool wasAcknowledged(message_t* msg);

       command void* payload(message_t* msg);
       command uint8_t payloadLength(message_t* msg);
       command void setPayloadLength(message_t* msg, uint8_t len);
       command uint8_t maxPayloadLength(message_t* msg);
}

interface Send
{
       command error_t send(message_t* msg);
       event void sendDone(message_t* msg, error_t error);
}

interface Receive
{
       event message_t* receive(message_t* msg);
}

Miklos

On Tue, Jun 2, 2009 at 7:40 AM, Omprakash Gnawali <gnawali at usc.edu> wrote:
> I thought option 3 will allow just one encapsulator because it uses a
> compile-time flag.
>
> - om_p
>
> On Mon, Jun 1, 2009 at 1:36 PM, Eric Decker <cire831 at gmail.com> wrote:
>> These end up with differently formatted headers and thusly need to be
>> handled by different encapsulators.
>>
>> On Mon, Jun 1, 2009 at 10:51 AM, Miklos Maroti <mmaroti at math.u-szeged.hu>
>> wrote:
>>>
>>> My question is, then how far in the networking stack do you want to
>>> handle differently the 16-bit and 64-bit addresses?
>>>
>>> I will come up with more interfaces.
>>>
>>> Miklos
>>>
>>> On Mon, Jun 1, 2009 at 3:49 PM, Omprakash Gnawali <gnawali at usc.edu> wrote:
>>> > We discussed these interfaces during net2 meeting last week. Option 3
>>> > might be problematic because something like blip might need support
>>> > for multiple addressing modes.
>>> >
>>> > - om_p
>>> >
>>> > On Fri, May 22, 2009 at 2:43 PM, Miklos Maroti
>>> > <mmaroti at math.u-szeged.hu> wrote:
>>> >> Dear Eric,
>>> >>
>>> >> You brought up very good points, and I am very happy that others are
>>> >> also engaged in the discussion. At this point I am convinced that both
>>> >> Jan's and my proposals could be made to work. But to really compare
>>> >> the two approaches we need use cases, very well defined used cases.
>>> >>
>>> >> Just to start the discussion, let me start with IEEE 802.15.4 link
>>> >> layer. Here are some options:
>>> >>
>>> >> ------- Option #1 -------
>>> >>
>>> >> interface Ieee154Send
>>> >> {
>>> >>        command error_t send64(uint64_t dest, bool ackReq, message_t*
>>> >> msg);
>>> >>        command error_t send16(uint16_t dest, bool ackReq, message_t*
>>> >> msg);
>>> >>        event void sendDone(message_t* msg, error_t error, bool acked);
>>> >>        command void* getPayload(message_t* msg, uint8_t len);
>>> >> }
>>> >>
>>> >> interface Ieee154Packet
>>> >> {
>>> >>        command uint16_t getSource16(message_t* msg);
>>> >>        command uint64_t getSource64(message_t* msg);
>>> >>        command uint16_t getDestination16(message_t* msg);
>>> >>        command uint64_t getDestination64(message_t* msg);
>>> >>        // no set commands as this interface should be used only for
>>> >> received messages
>>> >>
>>> >>        command void* getPayload(message_t* msg);
>>> >>        command uint8_t getLength(message_t* msg);
>>> >> }
>>> >>
>>> >> ------- Option #2 -------
>>> >>
>>> >> enum ieee154_flags
>>> >> {
>>> >>        IEEE154_ACK_REQ = 1 << 0,
>>> >>        IEEE154_FRAME_PENDING = 1 << 1,
>>> >>        IEEE154_COMPRESS_TO_16BIT = 1 << 2,
>>> >> };
>>> >>
>>> >> interface Ieee154Send
>>> >> {
>>> >>        command error_t send(uint64_t dest, uint8_t flags, message_t*
>>> >> msg,
>>> >> void* payload, uint8_t length);
>>> >>        event void sendDone(message_t* msg, error_t error, uint8_t
>>> >> flags);
>>> >>        command void* getPayload(message_t* msg, uint8_t len);
>>> >>        command uint8_t getMaxPayload();
>>> >> }
>>> >>
>>> >> interface Ieee154Receive
>>> >> {
>>> >>        event message_t* receive(uint64_t source, message_t* msg, void*
>>> >> payload, uint8_t length);
>>> >> }
>>> >>
>>> >> ------- Option #3 -------
>>> >>
>>> >> #ifdef USE_64BIT_ADDR
>>> >> typedef uint64_t address_t;
>>> >> #else
>>> >> typedef uint16_t address_t;
>>> >> #endif
>>> >>
>>> >> interface Ieee154Packet
>>> >> {
>>> >>        command void format(message_t* msg, uint8_t flags);
>>> >>
>>> >>        command address_t getSource(message_t* msg);
>>> >>        command address_t getDestination(message_t* msg);
>>> >>        command void setSource(message_t* msg, address_t addr);
>>> >>        command void setDestination(message_t* msg, address_t addr);
>>> >>
>>> >>        command void requestAck(message_t* msg, bool ack);
>>> >>        command bool wasAcknowledged(message_t* msg);
>>> >>
>>> >>        command void* payload(message_t* msg);
>>> >>        command uint8_t payloadLength(message_t* msg);
>>> >>        command void setPayloadLength(message_t* msg, uint8_t len);
>>> >>        command uint8_t maxPayloadLength(message_t* msg);
>>> >> }
>>> >>
>>> >> interface Send
>>> >> {
>>> >>        command error_t send(message_t* msg);
>>> >>        event void sendDone(message_t* msg, error_t error);
>>> >> }
>>> >>
>>> >> interface Receive
>>> >> {
>>> >>        event message_t* receive(message_t* msg);
>>> >> }
>>> >>
>>> >> Miklos
>>> >>
>>> >> _______________________________________________
>>> >> Tinyos-devel mailing list
>>> >> Tinyos-devel at millennium.berkeley.edu
>>> >>
>>> >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>>> >>
>>> >
>>>
>>> _______________________________________________
>>> Tinyos-devel mailing list
>>> Tinyos-devel at millennium.berkeley.edu
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>>
>>
>>
>> --
>> Eric B. Decker
>> Senior (over 50 :-) Researcher
>> Autonomous Systems Lab
>> Jack Baskin School of Engineering
>> UCSC
>>
>>
>



More information about the Tinyos-devel mailing list