hamilton3c

package
v0.0.0-...-68f30f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2017 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) Handle

func (t *Handler) Handle(sm *bw2bind.SimpleMessage, im *common.Message)
type 6 is emitted by hamilton-3c motes for temperature

#define AES_SKIP_START_BYTES 4

typedef struct __attribute__((packed,aligned(4))) {
  0   uint16_t type;
  2   uint16_t serial;
  //From below is encrypted
  //We use a zero IV, so it is important that the first AES block
  //is completely unique, which is why we include uptime.
  //It is expected that hamilton nodes never reboot and that
  //uptime is strictly monotonic
  4   uint64_t uptime;
  12  uint16_t flags; //which of the fields below exist
  14  int16_t acc_x;
  16  int16_t acc_y;
  18  int16_t acc_z;
  20  int16_t mag_x;
  22  int16_t mag_y;
  24  int16_t mag_z;
  26  uint16_t tmp_die;
  28  uint16_t tmp_val;
  30  int16_t hdc_tmp;
  32  int16_t hdc_hum;
  34  uint16_t light_lux;
  36  uint16_t buttons;
  38  uint16_t occup;
  40  uint32_t reserved1;
  44  uint32_t reserved2;
  48  uint32_t reserved3;
  52
} ham7c_t;

func (*Handler) Init

func (t *Handler) Init(cl *bw2bind.BW2Client, p *spawnable.Params)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL