2019-04-12 12:56:37 +00:00
|
|
|
#ifndef STATUS_H
|
|
|
|
#define STATUS_H
|
|
|
|
|
|
|
|
#include "contiki.h"
|
|
|
|
#include "sys/etimer.h"
|
|
|
|
#include "sys/process.h"
|
|
|
|
|
2019-05-08 16:47:58 +00:00
|
|
|
#include "os/dev/button-hal.h"
|
2019-05-08 20:05:24 +00:00
|
|
|
#include "batmon-sensor.h"
|
2019-05-08 16:47:58 +00:00
|
|
|
|
2019-04-12 12:56:37 +00:00
|
|
|
#include "../common/supermarket_net.h"
|
|
|
|
#include "event.h"
|
2019-05-08 20:05:24 +00:00
|
|
|
#include "leds.cart.h"
|
2019-04-12 12:56:37 +00:00
|
|
|
#include "sendrecv.h"
|
|
|
|
|
|
|
|
enum CartStatus {
|
|
|
|
NOT_ASSOCIATED,
|
|
|
|
ASSOCIATED,
|
|
|
|
SHOPPING,
|
2019-04-13 07:28:16 +00:00
|
|
|
CASH_OUT_WAIT4ACK,
|
|
|
|
CASH_OUT_SEND_LIST
|
2019-04-12 12:56:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern enum CartStatus status;
|
2019-05-08 20:05:24 +00:00
|
|
|
extern struct etimer assigner_timer;
|
|
|
|
extern struct etimer battery_timer;
|
|
|
|
extern struct ctimer led_timer;
|
|
|
|
|
|
|
|
extern int8_t battery_charge;
|
2019-04-12 12:56:37 +00:00
|
|
|
|
|
|
|
void s_not_associated(process_event_t ev, process_data_t data);
|
2019-04-12 14:30:05 +00:00
|
|
|
void s_associated(process_event_t ev, process_data_t data);
|
2019-04-13 07:28:16 +00:00
|
|
|
void s_shopping(process_event_t ev, process_data_t data);
|
|
|
|
void s_cash_out_wait4ack(process_event_t ev, process_data_t data);
|
|
|
|
void s_cash_out_send_list(process_event_t ev, process_data_t data);
|
2019-04-12 12:56:37 +00:00
|
|
|
|
|
|
|
#endif
|