hazy_message.h File Reference

Go to the source code of this file.

Classes

struct  se_lazy_naive_msg_bin_header
 Structure for messages used in single entity lazy naive queries. More...
struct  update_bin_header
 Structure for messages used in update queries. More...
struct  se_lazy_hazy_msg_bin_header
 Structure for messages used in single entity lazy hazy queries. More...
struct  delete_bin_header
struct  create_view_bin_str

Typedefs

typedef void * message_data
 type definition for message_data which is void pointer

Enumerations

enum  message_type {
  READ_SE_EAGER, READ_SE_LAZY_NAIVE, READ_SE_LAZY_HAZY, READ_COUNT,
  UPDATE, QUERY_SERVER_ID, CLOSE_CONNECTION, SERVER_NOOP,
  CREATE_VIEW, READ_SE_LAZY_NAIVE_BIN, READ_SE_LAZY_HAZY_BIN, UPDATE_BIN,
  DELETE_BIN
}
 message types More...

Functions

int build_read_se_answer (int entity_label, message_data msg, unsigned int nMaxSize)
 Builds answer msg for read single entity queries.
int build_read_count_answer (int count, message_data msg, unsigned int nMaxSize)
 Builds answer msg for read count queries.
int build_update_answer (message_data msg, unsigned int nMaxSize)
 Builds answer msg for update queries.
int build_delete_answer (message_data msg, unsigned int nMaxSize)
 Builds answer msg for querying server to see whether server is up and running.
int build_query_server_answer (int id, message_data msg, unsigned int nMaxSize)
 Builds answer msg for querying server to see whether server is up and running.
int build_close_connection_answer (int close_conn, message_data msg, unsigned int nMaxSize)
 Builds answer msg for closing the server.
int build_noop_server_answer (int acknowledge, message_data msg, unsigned int nMaxSize)
 Builds noop server msg for no operation (for experimental purposes).
int build_create_view_answer (message_data msg, unsigned int nMaxSize)
int build_se_eager_msg (const int view_id, const int entity_id, message_data msg, unsigned int nMaxSize)
 Builds querying msg for single entity eager.
int build_se_lazy_naive_msg (const int view_id, const char *vector_str, message_data msg, unsigned int nMaxSize)
 Builds querying msg for single entity lazy naive.
int build_se_lazy_hazy_msg (const int view_id, const char *vector_str, const double eps, message_data msg, unsigned int nMaxSize)
 Builds querying msg for single entity lazy hazy.
int build_count_msg (const int view_id, message_data msg, unsigned int nMaxSize)
 Builds querying msg for count.
int build_update_msg (const int view_id, const char *update_example, message_data msg, unsigned int nMaxSize)
 Builds querying msg for update.
int build_query_server_id_msg (message_data msg, unsigned int nMaxSize)
 Builds querying msg for server id.
int build_close_connection_msg (message_data msg, unsigned int nMaxSize)
 Builds querying msg for closing the connection.
int build_noop_server_msg (message_data msg, unsigned int nMaxSize)
 Builds querying msg for no operation with server (for experimental purposes).
enum message_type get_message_type (const message_data msg)
 Parses given message and extracts message type.
int build_se_lazy_naive_msg_bin (const int view_id, const void *vector_ptr, size_t vec_size, void *_out, size_t *out_size, unsigned int nMaxSize)
 Builds querying msg for single entity lazy naive that sends binary data.
int build_se_lazy_hazy_msg_bin (const int view_id, const double eps, const void *vector_ptr, size_t vec_size, void *_out, size_t *out_size, unsigned int nMaxSize)
 Builds querying msg for single entity lazy hazy that sends binary data.
int build_delete_msg_bin (const int view_id, const int entity_id, const void *db_name_ptr, size_t db_name_ptr_size, const void *table_name_ptr, size_t table_name_ptr_size, void *_out, size_t *out_size, unsigned int nMaxSize)
int build_create_view_msg (struct create_view_bin_str *s, message_data _out, unsigned int nMaxSize)
void parse_se_eager_msg (const message_data msg, int &view_id, int &entity_id)
 Parses single entity eager query messages.
void parse_view_id_in_se_eager_msg (const message_data msg, int &view_id)
 Parses view id in single entity eager query messages.
void parse_count_msg (const message_data msg, int &view_id)
 Parses count query messages.
void parse_delete_msg_bin (message_data msg, int &view_id, int &entity_id, std::string &db_name, std::string &training_table_name)
void parse_view_id_in_delete_msg_bin (message_data msg, int &view_id)
template<class T>
void parse_se_lazy_naive_msg (message_data msg, int &view_id, T &vec)
 Parses single entity lazy naive messages.
void parse_view_id_in_se_lazy_naive_msg (message_data msg, int &view_id)
 Parses view id in single entity lazy naive messages.
template<class T>
void parse_se_lazy_naive_msg_bin (void *msg, int &view_id, T &vec)
 Parses single entity lazy naive messages.
void parse_view_id_in_se_lazy_naive_msg_bin (void *msg, int &view_id)
 Parses view id in single entity lazy naive messages.
template<class T>
void parse_se_lazy_hazy_msg (message_data msg, int &view_id, T &vec, double &eps)
 Parses single entity lazy hazy messages.
void parse_view_id_in_se_lazy_hazy_msg (message_data msg, int &view_id)
 Parses view id in single entity lazy hazy messages.
template<class T>
void parse_se_lazy_hazy_msg_bin (void *msg, int &view_id, T &vec, double &eps)
 Parses single entity lazy hazy messages.
void parse_view_id_in_se_lazy_hazy_msg_bin (void *msg, int &view_id)
 Parses single entity lazy hazy messages.
template<class T>
void parse_update_msg (message_data msg, int &view_id, T &vec, int &classOfExample)
 Parses update messages.
void parse_view_id_in_update_msg (message_data msg, int &view_id)
 Parses update messages.
template<class T>
void parse_update_msg_bin (message_data msg, int &view_id, T &vec, int &classOfExample)
 Parses binary update messages.
void parse_view_id_in_update_msg_bin (message_data msg, int &view_id)
 Parses view id in binary update messages.
void parse_create_view_msg (message_data msg, struct create_view_bin_str *cv_struct)

Variables

const char szDelim = '|'
 delimiter between messages
const int CONVERT_CHAR_TO_INT = 48
 constant to convert character to its integer values
const char done_msg [6] = "done|"
 done msg used for updates


Detailed Description


Typedef Documentation

typedef void* message_data

type definition for message_data which is void pointer


Enumeration Type Documentation

enum message_type

message types

Enumerator:
READ_SE_EAGER 
READ_SE_LAZY_NAIVE 
READ_SE_LAZY_HAZY 
READ_COUNT 
UPDATE 
QUERY_SERVER_ID 
CLOSE_CONNECTION 
SERVER_NOOP 
CREATE_VIEW 
READ_SE_LAZY_NAIVE_BIN 
READ_SE_LAZY_HAZY_BIN 
UPDATE_BIN 
DELETE_BIN 


Function Documentation

int build_close_connection_answer ( int  close_conn,
message_data  _out,
unsigned int  nMaxSize 
)

Builds answer msg for closing the server.

Parameters:
[in] close_conn success of closing the connection
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_close_connection_msg ( message_data  _out,
unsigned int  nMaxSize 
)

Builds querying msg for closing the connection.

Parameters:
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_count_msg ( const int  view_id,
message_data  _out,
unsigned int  nMaxSize 
)

Builds querying msg for count.

Parameters:
[in] view_id id of the view
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_create_view_answer ( message_data  msg,
unsigned int  nMaxSize 
)

int build_create_view_msg ( struct create_view_bin_str s,
message_data  _out,
unsigned int  nMaxSize 
)

int build_delete_answer ( message_data  msg,
unsigned int  nMaxSize 
)

Builds answer msg for querying server to see whether server is up and running.

Parameters:
[in] id server id
[out] msg msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_delete_msg_bin ( const int  view_id,
const int  entity_id,
const void *  db_name_ptr,
size_t  db_name_ptr_size,
const void *  table_name_ptr,
size_t  table_name_ptr_size,
void *  _out,
size_t *  out_size,
unsigned int  nMaxSize 
)

int build_noop_server_answer ( int  acknowledge,
message_data  _out,
unsigned int  nMaxSize 
)

Builds noop server msg for no operation (for experimental purposes).

Parameters:
[in] acknowledge ack message
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_noop_server_msg ( message_data  _out,
unsigned int  nMaxSize 
)

Builds querying msg for no operation with server (for experimental purposes).

Parameters:
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_query_server_answer ( int  id,
message_data  _out,
unsigned int  nMaxSize 
)

Builds answer msg for querying server to see whether server is up and running.

Parameters:
[in] id server id
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_query_server_id_msg ( message_data  _out,
unsigned int  nMaxSize 
)

Builds querying msg for server id.

Parameters:
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_read_count_answer ( int  count,
message_data  _out,
unsigned int  nMaxSize 
)

Builds answer msg for read count queries.

Parameters:
[in] count count of entities in class
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_read_se_answer ( int  entity_label,
message_data  _out,
unsigned int  nMaxSize 
)

Builds answer msg for read single entity queries.

Parameters:
[in] entity_label class of the entity queried
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_se_eager_msg ( const int  view_id,
const int  entity_id,
message_data  _out,
unsigned int  nMaxSize 
)

Builds querying msg for single entity eager.

Parameters:
[in] view_id id of the view
[in] entity_id id of the entity
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_se_lazy_hazy_msg ( const int  view_id,
const char *  vector_str,
const double  eps,
message_data  _out,
unsigned int  nMaxSize 
)

Builds querying msg for single entity lazy hazy.

Parameters:
[in] view_id id of the view
[in] vector_str feature vector of the entity
[in] eps eps value of the entity
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_se_lazy_hazy_msg_bin ( const int  view_id,
const double  eps,
const void *  vector_ptr,
size_t  vec_size,
void *  _out,
size_t *  out_size,
unsigned int  nMaxSize 
)

Builds querying msg for single entity lazy hazy that sends binary data.

Parameters:
[in] view_id id of the view
[in] eps epsilon value of the entity being queries
[in] vector_ptr pointer to the feature vector of the entity
[in] vec_size size of the vector pointer
[out] _out msg being prepared
[in] out_size size of the _out msg
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_se_lazy_naive_msg ( const int  view_id,
const char *  vector_str,
message_data  _out,
unsigned int  nMaxSize 
)

Builds querying msg for single entity lazy naive.

Parameters:
[in] view_id id of the view
[in] vector_str feature vector of the entity
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_se_lazy_naive_msg_bin ( const int  view_id,
const void *  vector_ptr,
size_t  vec_size,
void *  _out,
size_t *  out_size,
unsigned int  nMaxSize 
)

Builds querying msg for single entity lazy naive that sends binary data.

Parameters:
[in] view_id id of the view
[in] vector_ptr pointer to the feature vector of the entity
[in] vec_size size of the vector pointer
[out] _out msg being prepared
[in] out_size size of the _out msg
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_update_answer ( message_data  _out,
unsigned int  nMaxSize 
)

Builds answer msg for update queries.

Parameters:
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

int build_update_msg ( const int  view_id,
const char *  update_example,
message_data  _out,
unsigned int  nMaxSize 
)

Builds querying msg for update.

Parameters:
[in] view_id id of the view
[in] update_example new update example
[out] _out msg being prepared
[in] nMaxSize max size of msg
Returns:
success of building the message

enum message_type get_message_type ( const message_data  msg  ) 

Parses given message and extracts message type.

Parameters:
[in] msg message to be parsed
Returns:
message_type message type of given msg

void parse_count_msg ( message_data  msg,
int &  view_id 
)

Parses count query messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view

void parse_create_view_msg ( message_data  msg,
struct create_view_bin_str cv_struct 
)

void parse_delete_msg_bin ( message_data  msg,
int &  view_id,
int &  entity_id,
std::string &  db_name,
std::string &  training_table_name 
)

void parse_se_eager_msg ( message_data  msg,
int &  view_id,
int &  entity_id 
)

Parses single entity eager query messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view
[out] entity_id id of the entity

template<class T>
void parse_se_lazy_hazy_msg ( message_data  msg,
int &  view_id,
T &  vec,
double &  eps 
)

Parses single entity lazy hazy messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view
[out] vec feature vector of the entity
[out] eps epsilon of the entity

template<class T>
void parse_se_lazy_hazy_msg_bin ( void *  msg,
int &  view_id,
T &  vec,
double &  eps 
)

Parses single entity lazy hazy messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view
[out] vec feature vector of the entity
[out] eps epsilon of the entity

template<class T>
void parse_se_lazy_naive_msg ( message_data  msg,
int &  view_id,
T &  vec 
)

Parses single entity lazy naive messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view
[out] vec feature vector of the entity

template<class T>
void parse_se_lazy_naive_msg_bin ( void *  msg,
int &  view_id,
T &  vec 
)

Parses single entity lazy naive messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view
[out] vec feature vector of the entity

template<class T>
void parse_update_msg ( message_data  msg,
int &  view_id,
T &  vec,
int &  classOfExample 
)

Parses update messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view
[out] vec feature vector of the new example
[out] classOfExample class of the new example

template<class T>
void parse_update_msg_bin ( message_data  msg,
int &  view_id,
T &  vec,
int &  classOfExample 
)

Parses binary update messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view
[out] vec feature vector of the new example
[out] classOfExample class of the new example

void parse_view_id_in_delete_msg_bin ( message_data  msg,
int &  view_id 
)

void parse_view_id_in_se_eager_msg ( message_data  msg,
int &  view_id 
)

Parses view id in single entity eager query messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view
[out] entity_id id of the entity

void parse_view_id_in_se_lazy_hazy_msg ( message_data  msg,
int &  view_id 
)

Parses view id in single entity lazy hazy messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view

void parse_view_id_in_se_lazy_hazy_msg_bin ( void *  msg,
int &  view_id 
)

Parses single entity lazy hazy messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view

void parse_view_id_in_se_lazy_naive_msg ( message_data  msg,
int &  view_id 
)

Parses view id in single entity lazy naive messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view

void parse_view_id_in_se_lazy_naive_msg_bin ( void *  msg,
int &  view_id 
)

Parses view id in single entity lazy naive messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view

void parse_view_id_in_update_msg ( message_data  msg,
int &  view_id 
)

Parses update messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view

void parse_view_id_in_update_msg_bin ( message_data  msg,
int &  view_id 
)

Parses view id in binary update messages.

Parameters:
[in] msg message to be parsed
[out] view_id id of the view


Variable Documentation

const int CONVERT_CHAR_TO_INT = 48

constant to convert character to its integer values

const char done_msg[6] = "done|"

done msg used for updates

const char szDelim = '|'

delimiter between messages


Generated on Wed Dec 15 10:46:16 2010 for Hazy_System by  doxygen 1.4.7