Changeset 152 for uKadecot/trunk/kadecot/wamp_broker.h
- Timestamp:
- Jan 14, 2016, 1:17:21 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uKadecot/trunk/kadecot/wamp_broker.h
r108 r152 39 39 #define WAMP_BROKER_H 40 40 41 typedef enum wamp_subscription_kind 42 { 43 WAMP_SUBSCRIPTION_KIND_NONE, 44 WAMP_SUBSCRIPTION_KIND_ECHONETLITE, 45 WAMP_SUBSCRIPTION_KIND_ARDUINO, 46 } wamp_subscription_kind_t; 47 48 typedef struct wamp_echonetlite_subscription 49 { 50 char deviceName[40]; 51 char *proprtyName; 52 uint16_t devType; 53 uint8_t epc; 54 } wamp_echonetlite_subscription_t; 55 56 typedef struct wamp_arduino_subscription 57 { 58 uint8_t pinno; 59 uint16_t threshold; 60 } wamp_arduino_subscription_t; 61 41 62 typedef struct wamp_subscription 42 63 { … … 44 65 unsigned int requestId; 45 66 int subscriptionId; 46 char deviceName[40]; 47 char *proprtyName; 48 uint16_t devType; 49 uint8_t epc; 67 wamp_subscription_kind_t kind; 68 union{ 69 wamp_echonetlite_subscription_t echonetlite; 70 wamp_arduino_subscription_t arduino; 71 }; 50 72 } wamp_subscription_t; 51 73 … … 55 77 unsigned int requestId; 56 78 int subscriptionId; 57 wamp_subscription_t subscriptions[ 10];79 wamp_subscription_t subscriptions[30]; 58 80 wamp_subscription_t *current_subscription; 59 81 const char *error; … … 66 88 void wamp_broker_subscribe_options(wamp_broker_t *broker); 67 89 void wamp_broker_subscribe_topic(wamp_broker_t *broker, const char *value); 90 void wamp_broker_subscribe_echonetlite_topic(wamp_broker_t *broker, const char *value, int pos); 91 void wamp_broker_subscribe_arduino_topic(wamp_broker_t *broker, const char *value, int pos); 68 92 void wamp_broker_subscribe_close(struct wamp_state *s); 69 93 … … 89 113 void wamp_broker_publish_inf(wamp_broker_t *broker, uint16_t pubId, int deviceId, 90 114 uint16_t devType, uint8_t epc, uint8_t pdc, uint8_t *p_edt); 115 void wamp_broker_publish_pin(wamp_broker_t *broker, uint16_t pubId, int deviceId, 116 int pinno, uint16_t value); 91 117 92 118 #endif // WAMP_BROKER_H
Note:
See TracChangeset
for help on using the changeset viewer.