X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fnet%2FDeluge%2FDeluge.h;h=6ef74f584231a46a9c87259c6f0bbb37ea66efd6;hb=e014c5d251e1706ee383c01597ed49173c00c8f3;hp=b938e4aee455b7362947edfcec87f121218153c2;hpb=3c0edd88ca1663f859090a7c33e720628bef5d61;p=tinyos-2.x.git diff --git a/tos/lib/net/Deluge/Deluge.h b/tos/lib/net/Deluge/Deluge.h index b938e4ae..6ef74f58 100644 --- a/tos/lib/net/Deluge/Deluge.h +++ b/tos/lib/net/Deluge/Deluge.h @@ -27,30 +27,49 @@ #ifndef __DELUGE_H__ #define __DELUGE_H__ -#include "DelugeMetadata.h" - -#define DISSMSG_DISS 0 -#define DISSMSG_REPROG 1 +typedef nx_struct DelugeIdent { + nx_uint32_t uidhash; // unique id of the image + nx_uint32_t size; // size of the whole image (ident + CRCs + binary) + nx_uint8_t numPgs; // number of pages of complete image + nx_uint8_t reserved; + nx_uint16_t crc; // crc over the above 4 fields + nx_uint8_t appname[16]; + nx_uint8_t username[16]; + nx_uint8_t hostname[16]; + nx_uint8_t platform[16]; + nx_uint32_t timestamp; + nx_uint32_t userhash; +} DelugeIdent; enum { DELUGE_INVALID_UID = 0xffffffff, DELUGE_NUM_VOLUMES = 4, }; -typedef nx_struct DelugeDissemination { - nx_uint8_t msg_type; - nx_uint32_t uid; // unique id of image - nx_uint16_t vNum; // version num of image +enum { + DELUGE_CMD_STOP = 1, + DELUGE_CMD_LOCAL_STOP = 2, + DELUGE_CMD_ONLY_DISSEMINATE = 3, + DELUGE_CMD_DISSEMINATE_AND_REPROGRAM = 4, + DELUGE_CMD_REPROGRAM = 5, // Reprogram the local mote + DELUGE_CMD_REBOOT = 6, // Reboot the local mode +}; + +#define UQ_DELUGE_METADATA "DelugeMetadata.client" +#define UQ_DELUGE_VOLUME_MANAGER "DelugeVolumeManager.client" + +typedef nx_struct DelugeCmd { + nx_uint8_t type; + nx_uint32_t uidhash; // unique id of image nx_uint8_t imgNum; // image number nx_uint16_t size; // size of the image -} DelugeDissemination; - -typedef struct DelugeNodeDesc { - imgvnum_t vNum; - uint32_t uid; - imgnum_t imgNum; - uint8_t reserved; - uint16_t crc; -} DelugeNodeDesc; +} DelugeCmd; + +typedef struct BootArgs { + uint16_t address; + uint32_t imageAddr; + uint8_t gestureCount; + bool noReprogram; +} BootArgs; #endif