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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MagAccHandler

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

func (*MagAccHandler) Handle

func (t5 *MagAccHandler) Handle(sm *bw2bind.SimpleMessage, im *common.Message)

func (*MagAccHandler) Init

func (t5 *MagAccHandler) Init(cl *bw2bind.BW2Client, p *spawnable.Params)

type TempHandler

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

func (*TempHandler) Handle

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

0600 fc00 0000 0000 ec61 fc58 0000 0000 f65954a11e000000 0000 0600 fc00 0000 0000 f065 ac6f 335c 0000 fddb0f881e000000 0000

typedef struct __attribute__((packed)) {
  uint16_t type; 0:2
  uint16_t flags; 2:4 00fc
  uint16_t tmp_die; 4:6
  uint16_t tmp_val; 6:8
  uint16_t hdc_tmp; 8:10
  uint16_t hdc_hum; 10:12
  uint16_t light_lux; 12:14
  uint16_t buttons; 14:16
  uint64_t uptime; 16:24
  uint16_t occup; 24:26
} temp_measurement_t;

0600fc0000000000ec61fc5800000000f65954a11e0000000000

typedef struct __attribute__((packed)) {
  uint16_t type;
  uint16_t flags; //which of the fields below exist
  uint16_t tmp_die;
  uint16_t tmp_val;
  uint16_t hdc_tmp;
  uint16_t hdc_hum;
  uint16_t light_lux;
  uint16_t buttons;
  uint64_t uptime;
  uint16_t occup;
} temp_measurement_t;

#define FLAG_TEMP_HAS_TMP_DIE 0x01 #define FLAG_TEMP_HAS_TMP_VAL 0x02 #define FLAG_TEMP_HAS_HDC_TMP 0x04 #define FLAG_TEMP_HAS_HDC_HUM 0x08 #define FLAG_TEMP_HAS_LUX 0x10 #define FLAG_TEMP_HAS_BUTTONS 0x20 #define FLAG_TEMP_HAS_UPTIME 0x40 #define FLAG_TEMP_HAS_OCCUP 0x80

func (*TempHandler) Init

func (t6 *TempHandler) 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