Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple Service Location Protocol of 6LoWPAN implementation in TinyOS #304

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/tests/TestRPL/udp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ CFLAGS+=-DPACKET_INTERVAL=5120UL

CFLAGS+=-DRPL_ROOT_ADDR=11

<<<<<<< HEAD
# enable printf
CFLAGS += -DNEW_PRINTF_SEMANTICS -DPRINTFUART_ENABLED -DPRINTF_BUFFER_SIZE=1024
=======






GOALS += blip rpl

>>>>>>> BLIP+RPL: updating /apps

TINYOS_ROOT_DIR?=../../../..
include $(TINYOS_ROOT_DIR)/Makefile.include
2 changes: 2 additions & 0 deletions apps/tests/blip/TestLinkLocal/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
COMPONENT=TestLinkLocalAppC
GOALS += blip
TINYOS_ROOT_DIR?=../../../..
include $(TINYOS_ROOT_DIR)/Makefile.include
CFLAGS += -DIN6_NO_GLOBAL -DLIB6LOWPAN_HC_VERSION=-1
CFLAGS += -DPRINTFUART_ENABLED
PFLAGS += -DIN6_PREFIX=\"fec0::\"
1 change: 1 addition & 0 deletions apps/tests/blip/TestLinkLocal/TestLinkLocalAppC.nc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ configuration TestLinkLocalAppC {
TestLinkLocalC.Timer -> TimerMilliC;
TestLinkLocalC.Leds -> LedsC;

components PrintfC,SerialStartC;
components StaticIPAddressTosIdC; // Use TOS_NODE_ID in address
//components StaticIPAddressC; // Use LocalIeee154 in address
}
11 changes: 5 additions & 6 deletions apps/tests/blip/TestLinkLocal/TestLinkLocalC.nc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include <PrintfUART.h>
#include "blip_printf.h"
#include <lib6lowpan/ip.h>

module TestLinkLocalC {
Expand All @@ -23,7 +23,6 @@ module TestLinkLocalC {
};

event void Boot.booted() {
printfUART_init();
call SplitControl.start();
m_data.seqno = 0;
}
Expand Down Expand Up @@ -51,16 +50,16 @@ module TestLinkLocalC {
event void Sock.recvfrom(struct sockaddr_in6 *src, void *payload,
uint16_t len, struct ip6_metadata *meta) {
nx_struct echo_state *cmd = payload;
printfUART("TestLinkLocalC: recv from: ");
printfUART_in6addr(&src->sin6_addr);
printfUART("\n");
printf("TestLinkLocalC: recv from: ");
printf_in6addr(&src->sin6_addr);
printf("\n");

if (cmd->cmd == CMD_ECHO) {
cmd->cmd = CMD_REPLY;
call Sock.sendto(src, payload, len);
call Leds.led1Toggle();
} else {
printfUART("TestLinkLocalC: reply seqno: %li\n", cmd->seqno);
printf("TestLinkLocalC: reply seqno: %li\n", cmd->seqno);
call Leds.led2Toggle();
}
}
Expand Down
50 changes: 50 additions & 0 deletions tos/lib/net/sslp/DA/SSLC_DA.nc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@


configuration SSLC_DA
{

provides interface SplitControl;


}

implementation
{
components SSLP_DA;
SplitControl = SSLP_DA;

components IPStackC;
SSLP_DA.RadioControl->IPStackC;

components new TimerMilliC() as DATimer;
SSLP_DA.DATimer -> DATimer;

components new TimerMilliC() as DeleteTimer;
SSLP_DA.DeleteTimer -> DeleteTimer;

components new UdpSocketC() as Send,
new UdpSocketC() as Receive;

SSLP_DA.UDPSend -> Send;
SSLP_DA.UDPReceive -> Receive;

components IPAddressC;
SSLP_DA.IPAddress->IPAddressC;

components LedsC;
SSLP_DA.Leds -> LedsC;

// #ifdef RPL_ROUTING
// components RPLRoutingC;
//#endif


#ifdef IN6_PREFIX
components StaticIPAddressTosIdC;
#endif





}
Loading