Contiki 3.x
codeprop.c File Reference

Code propagation and storage. More...

#include "contiki.h"
#include "sys/clock.h"
#include "loader/elfloader.h"
#include "net/ip/tcpip.h"
#include "dev/eeprom.h"
#include "dev/leds.h"
#include "lib/random.h"
#include "codeprop.h"

Go to the source code of this file.

Detailed Description

Code propagation and storage.

Author
Adam Dunkels adam@.nosp@m.sics.nosp@m..se

This file implements a simple form of code propagation, which allows a binary program to be downloaded and propagated throughout a network of devices.

Features:

Commands: load code, start code Point-to-point download over TCP Point-to-multipoint delivery over UDP broadcasts Versioning of code modules

Procedure:

  1. Receive code over TCP
  2. Send code packets over UDP

When a code packet is deemed to be missed, a NACK is sent. If a NACK is received, the sending restarts at the point in the binary where the NACK pointed to. (This is not very efficient, but simple to implement...)

States:

Receiving code header -> receiving code -> sending code

Definition in file codeprop.c.