Wire keywords (standard handler keywords documented in Wire )
// generate events for all UPnP devices coming up/down and report total count
set up create event { name: "up" priority: 1 }
set down create event { name: "down" priority: 1 }
set count create event { name: "count" priority: 1 }
create handler upnp {
match: $up $down $count "" ""
elogger: $plogger
}
Events generated:
| Event Name | Type | Description |
|---|---|---|
| up | AW_EVENT_TYPE_STRING | Device with matching name is up, send name |
| down | AW_EVENT_TYPE_STRING | Device with matching name is that was up is now down, send name |
| count | AW_EVENT_TYPE_INT32 | The number of devices matching the regex |
#include "sysnet.h"
#include "trie.h"
#include "regexmatch.h"
#include "monitor.h"
#include "wire.h"
Go to the source code of this file.
Data Structures | |
| struct | aw_upnphandler_devlist_s |
| struct | aw_upnphandler_events_t |
| Events generated. More... | |
| struct | aw_upnphandler_regex_t |
| Specifies a regex and associated events. More... | |
| struct | aw_upnphandler_state_t |
| State of handler during probing. More... | |
| struct | aw_upnphandler_t |
| Handler object. More... | |
| struct | aw_upnphandler_watcher_t |
| Compiled regex, associated events and state. More... | |
Defines | |
| #define | AW_UPNPHANDLER_DEFAULT_FLAGS (AW_UPNPHANDLER_COUNTONCHANGE) |
| #define | UPNP_MCAST_GROUP "239.255.255.250" |
| #define | UPNP_MCAST_PORT 1900 |
Typedefs | |
| typedef aw_upnphandler_devlist_s | aw_upnphandler_devlist_t |
Enumerations | |
| enum | aw_upnphandler_flag_t { AW_UPNPHANDLER_GROUP = 0x1, AW_UPNPHANDLER_COUNTONCHANGE = 0x2 } |
| enum | aw_upnphandler_state_cd_t { AW_UPNPHANDLER_IDLE, AW_UPNPHANDLER_WAIT_READ } |
| The state codes for each state on handler. More... | |
Functions | |
| aw_upnphandler_t * | aw_create_upnphandler (u_int32_t nregexs, const aw_upnphandler_regex_t *regexs, const byte_t *mcinterface, u_int32_t mcloopback, const aw_alarm_sched_t *sched, aw_logger_t *logger) |
| Create a upnphandler. | |
| void | aw_free_upnphandler (aw_upnphandler_t *p) |
| Free handler and all associated resources. | |
| aw_handler_t * | aw_wire_upnphandler (aw_wire_mkhandler_args_t *args) |
| Create a upnp handler using "wire". See header doc for keyword documentation. | |
|
|
Default settings |
|
|
|
|
|
|
|
|
|
|
|
Flag values. |
|
|
The state codes for each state on handler.
|
|
||||||||||||||||||||||||||||
|
Create a upnphandler. aw_create_upnphandler
|
|
|
Free handler and all associated resources. aw_free_upnphandler
|
|
|
Create a upnp handler using "wire". See header doc for keyword documentation. aw_wire_upnphandler |