11 struct lwes_event_type_db
*
12 create_db
(char
*filename
)
14 return lwes_event_type_db_create
(filename
);
18 destroy_db
(struct lwes_event_type_db
* db
)
20 return lwes_event_type_db_destroy
(db
);
24 create_emitter
(char
*address
, char
*iface
, int port
,
25 int emit_heartbeat
, short freq
)
27 return lwes_emitter_create
(address
, iface
, port
, emit_heartbeat
, freq
);
31 create_emitter_with_ttl
(char
*address
, char
*iface
, int port
,
32 int emit_heartbeat
, short freq
, int ttl
)
34 return lwes_emitter_create_with_ttl
(address
, iface
, port
, emit_heartbeat
,
39 emit
(struct lwes_emitter
*emitter
, struct lwes_event
*event
)
41 return lwes_emitter_emit
(emitter
, event
);
45 emitto
(char
*address
, char
*iface
, int port
, struct lwes_emitter
*emitter
,
46 struct lwes_event
*event
)
48 return lwes_emitter_emitto
(address
, iface
, port
, emitter
, event
);
52 destroy_emitter
(struct lwes_emitter
*emitter
)
54 return lwes_emitter_destroy
(emitter
);
58 create_event
(struct lwes_event_type_db
* db
, char
*event_name
)
60 return lwes_event_create
(db
, event_name
);
64 create_event_with_encoding
(struct lwes_event_type_db
*db
, char
*event_name
,
67 return lwes_event_create_with_encoding
(db
, event_name
, encoding
);
71 set_uint16
(struct lwes_event
*event
, char
*attribute_name
,
72 unsigned short a_uint16
)
74 return lwes_event_set_U_INT_16
(event
, attribute_name
, a_uint16
);
78 get_uint16
(struct lwes_event
* event
, char
* attribute_name
,
79 unsigned short
*a_uint16
)
81 return lwes_event_get_U_INT_16
(event
, attribute_name
, a_uint16
);
85 set_int16
(struct lwes_event
* event
, char
* attribute_name
,
88 return lwes_event_set_INT_16
(event
, attribute_name
, an_int16
);
92 get_int16
(struct lwes_event
* event
, char
* attribute_name
,
95 return lwes_event_get_INT_16
(event
, attribute_name
, an_int16
);
99 set_uint32
(struct lwes_event
* event
, char
* attribute_name
,
100 unsigned int a_uint32
)
102 return lwes_event_set_U_INT_32
(event
, attribute_name
, a_uint32
);
106 get_uint32
(struct lwes_event
* event
, char
* attribute_name
,
107 unsigned int
* a_uint32
)
109 return lwes_event_get_U_INT_32
(event
, attribute_name
, a_uint32
);
113 set_int32
(struct lwes_event
* event
, char
* attribute_name
,
116 return lwes_event_set_INT_32
(event
, attribute_name
, an_int32
);
120 get_int32
(struct lwes_event
* event
, char
* attribute_name
,
123 return lwes_event_get_INT_32
(event
, attribute_name
, an_int32
);
127 set_uint64
(struct lwes_event
* event
, char
* attribute_name
,
130 return lwes_event_set_U_INT_64_w_string
(event
, attribute_name
, a_uint64
);
134 get_uint64
(struct lwes_event
* event
, char
* attribute_name
,
135 unsigned long long
* a_uint64
)
137 return lwes_event_get_U_INT_64
(event
, attribute_name
, a_uint64
);
141 set_int64
(struct lwes_event
* event
, char
* attribute_name
,
144 return lwes_event_set_INT_64_w_string
(event
, attribute_name
, an_int64
);
148 get_int64
(struct lwes_event
* event
, char
* attribute_name
,
151 return lwes_event_get_INT_64
(event
, attribute_name
, an_int64
);
155 set_string
(struct lwes_event
* event
, char
* attribute_name
,
158 return lwes_event_set_STRING
(event
, attribute_name
, a_string
);
162 get_string
(struct lwes_event
* event
, char
* attribute_name
,
165 return lwes_event_get_STRING
(event
, attribute_name
, a_string
);
169 set_ip_addr
(struct lwes_event
* event
, char
* attribute_name
,
172 return lwes_event_set_IP_ADDR_w_string
(event
, attribute_name
, an_ip_addr
);
176 get_ip_addr
(struct lwes_event
*event
, char
*attribute_name
,
177 struct in_addr
*an_ip_addr
)
179 return lwes_event_get_IP_ADDR
(event
, attribute_name
, an_ip_addr
);
183 set_boolean
(struct lwes_event
* event
, char
* attribute_name
,
186 return lwes_event_set_BOOLEAN
(event
, attribute_name
, a_boolean
);
190 get_boolean
(struct lwes_event
*event
, char
*attribute_name
,
193 return lwes_event_get_BOOLEAN
(event
, attribute_name
, a_boolean
);
197 destroy_event
(struct lwes_event
*event
)
199 return lwes_event_destroy
(event
);
203 current_time_millis
(char
*buffer
)
205 LWES_INT_64 current_time
= 0LL;
206 current_time
= currentTimeMillisLongLong
();
207 snprintf
(buffer
,17,"%016llX",current_time
);