trick/trick_source/sim_services/VariableServer/include/variable_server.h
Alex Lin 14a75508a3 Cleaning up once include variables and copyright cleanup.
Changed all header file once include variables to follow the same naming
convention and not start with any underscores.  Also deleted old
incorrect copyright notices.  Also removed $Id: tags from all files.

Fixes #14.  Fixes #22.
2015-03-23 16:03:14 -05:00

69 lines
1.7 KiB
C

/*
PURPOSE:
(Allows clients to get and set Trick parameters)
PROGRAMMERS:
(((Keith Vetter) (LinCom) (September 2001) (--)))
*/
#ifndef VARIABLE_SERVER_H
#define VARIABLE_SERVER_H
#include <pthread.h>
#include "sim_services/MemoryManager/include/reference.h"
#include "trick_utils/comm/include/tc.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
REF2 ref;
double scale_factor;
double bias;
} VARIABLE_NODE;
typedef struct {
int socket ; /* ** multicast socket file descriptor */
struct sockaddr_in addr ; /* ** multicast socket info */
} MCAST_INFO;
typedef struct VARIABLE_SERVER_struct {
int enabled ;
int debug; /* ** Variable_server debugging */
int synchronous ;
double update_rate;
double next;
int binary_data;
int no_handshake;
int num_vars;
int clear_cmd;
int send_cmd;
int pause_cmd;
int exists_cmd;
int exit_cmd;
VARIABLE_NODE *vars;
int multicast_on ; /* -- flag to switch between TCdevice and multcast socket */
TCDevice * connection ;
MCAST_INFO mcast_info ;
char local_byteorder ;
pthread_t thread_id ;
} VARIABLE_SERVER;
//void *var_server(void *); /* Server thread */
//void *var_serve_init(void *); /* Initialize server */
//void exit_var_server(void *); /* Exit handler for var init server */
//void exit_var_serv_threads( void ); /* Exit handler for var init server */
int vs_mcast_init(MCAST_INFO * M, char * address , int port ) ;
//int vs_write_data(VARIABLE_SERVER * V) ;
//int vs_write_error(VARIABLE_SERVER * V, char * incoming_str , char * error_str ) ;
//int vs_format_ascii(REF2 * ref, double scale_factor, double bias, char *value) ;
#ifdef __cplusplus
}
#endif
#endif