Beruflich Dokumente
Kultur Dokumente
Hints
• printf(“%s”, (char*) string);
• memcpy(dst, src, sizeof(bytes));
● Reference:
http://tinyos.stanford.edu/tinyos-wiki/index.php/Mote-
PC_serial_communication_and_SerialForwarder_(TOS_2.
1.1_and_later)
• Basic interfaces:
– Packet: Set/get payload of TinyOS message_t packets
– Send: Send packet by calling send() command
– Receive: Reception of packets signaled by receive() event
• Active Message interfaces allow for multiplexing:
– AMPacket: Provide source and destination address to
packet
– AMSend: Send packet to destination address
MoteIF TestSerial.java
rcm->counter = counter;
call AMSend.send(AM_BROADCAST_ADDR, &packet, …sizeof
(test_serial_msg_t));
}
Communication is expensive!
● >10x w.r.t. MCU on
● 3 orders of magnitude w.r.t. sleep