#include <time.h>
Go to the source code of this file.
Classes | |
struct | owwl_data_temperature |
Structure to hold thermometer data. More... | |
struct | owwl_data_barometer |
Structure to hold barometer data. More... | |
struct | owwl_data_humidity |
Structure to hold hygrometer data. More... | |
struct | owwl_data_solar |
Structure to hold solar sensor data. More... | |
struct | owwl_data_wind |
Structure to hold wind data. More... | |
struct | owwl_data_rain |
Structure to hold rain data. More... | |
struct | owwl_data_gpc |
Structure to hold general-purpose counter data. More... | |
struct | owwl_data_psb |
Structure to hold PSB device data. More... | |
struct | owwl_data_diode |
Structure to hold diode thermometer data. More... | |
struct | owwl_data_grt |
Structure to hold GRT device data. More... | |
struct | owwl_data_cryo |
Structure to hold calibrated cryogenic thermometer data. More... | |
struct | owwl_data_heater |
Structure to hold heater voltage data. More... | |
struct | owwl_data_resistance |
Structure to hold resistance data. More... | |
struct | owwl_data_floats |
Structure to hold device data - general floats. More... | |
union | device_data_union |
A union of all possible device data structures. More... | |
struct | owwl_data_ |
Structure used to hold a data item. More... | |
struct | owwl_client_ |
Structure used to hold client connexion data. More... | |
struct | owwl_server_ |
Structure used to hold server data. More... | |
struct | owwl_conn |
Structure used to hold connexion data. More... | |
struct | owwl_buffer |
Structure used to build transmit (server) data stream. More... | |
Defines | |
#define | OWW_PROTO_VERSION 101L |
#define | OwwlUnit_Metric 0 |
#define | OwwlUnit_Imperial 1 |
#define | OwwlUnit_Alt1 2 |
#define | OwwlUnit_Alt2 3 |
#define | OwwlUnit_Mm OwwlUnit_Metric |
#define | OwwlUnit_Inch OwwlUnit_Imperial |
#define | OwwlUnit_Kph OwwlUnit_Metric |
#define | OwwlUnit_Mph OwwlUnit_Imperial |
#define | OwwlUnit_Mps OwwlUnit_Alt1 |
#define | OwwlUnit_Knot OwwlUnit_Alt2 |
#define | OwwlUnit_Mbar OwwlUnit_Metric |
#define | OwwlUnit_InchHg OwwlUnit_Imperial |
#define | OwwlUnit_Kpa OwwlUnit_Alt1 |
#define | OwwlUnit_Atm OwwlUnit_Alt2 |
#define | OwwlUnit_Bearing OwwlUnit_Metric |
#define | OwwlUnit_Point16 OwwlUnit_Imperial |
#define | OwwlUnit_Name OwwlUnit_Alt1 |
#define | OwwlUnit_Radians OwwlUnit_Alt2 |
#define | OwwlSubtype_Any -1 |
#define | OwwlSubtype_Default 0 |
#define | OwwlBuffInc 16 |
#define | OWW_TRX_END 0L |
#define | OWW_TRX_TIME 0x1000000L |
#define | OWW_TRX_WIND 0x2000000L |
#define | OWW_TRX_RAIN 0x3000000L |
#define | OWW_TRX_T 0x4000000L |
#define | OWW_TRX_RH 0x6000000L |
#define | OWW_TRX_BP 0x7000000L |
#define | OWW_TRX_SOLAR 0xb000000L |
#define | OWW_TRX_PSB 0x10000000L |
#define | OWW_TRX_DIODE 0x11000000L |
#define | OWW_TRX_GRT 0x12000000L |
#define | OWW_TRX_CRYO 0x13000000L |
#define | OWW_TRX_HEATER 0x14000000L |
#define | OWW_TRX_RESISTANCE 0x15000000L |
#define | OWW_TRX_UPDT 0x80000000L |
#define | OWW_TRX_GPC 0x90000000L |
#define | OWW_TRX_LOC 0xa0000000L |
#define | OWW_TRX_HEAD 0xff000000L |
#define | OWW_TRX_SUB_TRH 0x10000L |
#define | OWW_TRX_SUB_TB 0x20000L |
#define | OWW_TRX_SUB_TCD 0x10000L |
#define | OWW_TRX_SUB_TCG 0x20000L |
#define | OWW_TRX_SERIAL 0x100L |
#define | OWW_TRX_SIZE 1L |
#define | OWW_TRX_MSG_WSDATA 1 |
#define | OWW_TRX_MSG_UPDT 2 |
#define | OWW_TRX_MSG_MORT 3 |
#define | OWW_TRX_MSG_ANNOUN 4 |
Typedefs | |
typedef owwl_data_ | owwl_data |
Structure used to hold a data item. | |
typedef owwl_client_ | owwl_client |
Structure used to hold client connexion data. | |
typedef owwl_server_ | owwl_server |
Structure used to hold server data. | |
typedef int(* | owwl_func )(owwl_conn *conn, owwl_data *data, void *user_data) |
Enumerations | |
enum | owwl_unit_class_enum { owwl_unit_class_unknown = -1, owwl_unit_class_dimensionless = 0, owwl_unit_class_time, owwl_unit_class_count, owwl_unit_class_count_rate, owwl_unit_class_length, owwl_unit_class_length_rate, owwl_unit_class_speed, owwl_unit_class_temperature, owwl_unit_class_pressure, owwl_unit_class_direction, owwl_unit_class_humidity, owwl_unit_class_voltage, owwl_unit_class_muvoltage, owwl_unit_class_nanocurrent, owwl_unit_class_cryo, owwl_unit_class_resistance } |
An enumeration used to specify the class of unit associated with a data stream. More... | |
enum | owwl_device_type_enum { OwwlDev_Any = -1, OwwlDev_Temperature = 0, OwwlDev_Barometer, OwwlDev_Humidity, OwwlDev_Wind, OwwlDev_Rain, OwwlDev_Gpc, OwwlDev_Solar, OwwlDev_Psb = 64, OwwlDev_Diode, OwwlDev_Grt, OwwlDev_Cryo, OwwlDev_Heater, OwwlDev_Resistance } |
Enumeration for different types of device. More... | |
enum | owwl_temperature_subtype_enum { OwwlTemp_Any = OwwlSubtype_Any, OwwlTemp_Thermometer = OwwlSubtype_Default, OwwlTemp_Humidity, OwwlTemp_Barometer } |
Enum for thermometer sub-types. More... | |
enum | owwl_cryo_subtype_enum { OwwlCryo_Any = OwwlSubtype_Any, OwwlCryo_Thermometer = OwwlSubtype_Default, OwwlCryo_Diode, OwwlCryo_Grt } |
Enum for calibrated cryogenic thermometer sub-types. More... | |
enum | owwl_read_result { Owwl_Read_Disconnect = -2, Owwl_Read_Error = -1, Owwl_Read_Read_And_Decoded = 0, Owwl_Read_Again } |
The values returned by owwl_read(). More... | |
Functions | |
owwl_conn * | owwl_new_conn (int socket, void *user_data) |
Create a new owwl connexion context. | |
int | owwl_read (owwl_conn *conn) |
Try to read new data from server. | |
int | owwl_free (owwl_conn *conn) |
Free up finished-with connexion context. | |
unsigned int | owwl_data_arg_to_id (owwl_data *data, int arg) |
Get an integer id uniquely identifying a data stream. | |
void | owwl_id_to_data_arg (owwl_conn *conn, unsigned int id, owwl_data **data, int *arg) |
Get a data stream pointer from a unique id value. | |
int | owwl_foreach (owwl_conn *conn, owwl_func func, void *user_data) |
Call a function for each data entry. | |
int | owwl_foreach_ordered (owwl_conn *conn, owwl_func func, void *user_data) |
Call a function for each data entry, in a set order. | |
char * | owwl_name (owwl_data *data, char *buffer, int bufflen, int *length, int long_not_short) |
Get a name for a data entry. | |
char * | owwl_arg_stem (enum owwl_device_type_enum device_type, int device_subtype, int arg) |
Name for a data argument. | |
char * | owwl_arg_name (owwl_data *data, char *buffer, int bufflen, int *length, int long_not_short, int arg) |
Get a name for a data entry argument. | |
enum owwl_unit_class_enum | owwl_unit_class (owwl_data *data, int arg) |
Get the unit class for an arg. | |
char * | owwl_unit_name (owwl_data *data, int unit_type, int arg) |
Get the unit name string for a data value. | |
char * | owwl_unit_desc (owwl_data *data, int unit_type, int arg) |
Get the unit string for a data value. | |
int | owwl_next_arg (owwl_data *data, int arg) |
Get the next arg number. | |
owwl_data * | owwl_find (owwl_conn *conn, enum owwl_device_type_enum device_type, int device_subtype, int index) |
Find a device by type and index. | |
owwl_data * | owwl_find_first (owwl_conn *conn, enum owwl_device_type_enum device_type, int device_subtype) |
Find the first device of the given type. | |
int | owwl_tx_build (owwl_conn *conn, int msg_type, owwl_buffer *buff) |
Fill a buffer with data for transmission. | |
int | owwl_data_in (owwl_conn *conn, enum owwl_device_type_enum device_type, int device_subtype, int index,...) |
Update or add data values in a data stream. | |
int | owwl_tx_new_server (owwl_conn *conn, SOCKET socket) |
Create a new server from a listening socket. | |
int | owwl_tx (owwl_conn *conn, owwl_buffer *buff) |
Send contents of buffer buff to all clients. | |
void | owwl_tx_add_timestamp (owwl_conn *conn) |
Set the timestamp on conn according to the current time. | |
int | owwl_tx_poll_servers (owwl_conn *conn) |
Poll for incoming data and connexion requests. |
|
Structure used to hold a data item. Data are stored in an array of "owwl_data". Each item contains a union of data structures for the various data types. Functions to convert data to strings or doubles are provided. |
|
Get a name for a data entry argument.
|
|
Name for a data argument.
|
|
Get an integer id uniquely identifying a data stream.
|
|
Update or add data values in a data stream. This is a convenience function for updating data streams. You could just as well access the data structs directly, which would remove the overhead of device lookup, if you retain a list of pointers.
Data streams listed under
|
|
Find a device by type and index.
|
|
Find the first device of the given type.
|
|
Call a function for each data entry. The function should return non-zero to break out of the loop
|
|
Call a function for each data entry, in a set order. The function should return non-zero to break out of the loop
|
|
Get a data stream pointer from a unique id value.
|
|
Get a name for a data entry.
|
|
Create a new owwl connexion context.
|
|
Get the next arg number.
|
|
Try to read new data from server.
|
|
Send contents of buffer
|
|
Set the timestamp on
|
|
Fill a buffer with data for transmission.
|
|
Create a new server from a listening socket.
|
|
Poll for incoming data and connexion requests.
|
|
Get the unit class for an arg.
|
|
Get the unit string for a data value.
|
|
Get the unit name string for a data value.
|