trick/include/trick/variable_server.h
Alex Lin 19025d77ad Standardize directory names
Reorganized.  Created a new top level include directory that will hold all of Trick's header files. Moved all of the Trick headers to this directory.  Created a libexec directory that holds all of the executables that users don't need to execute directly.  Changed all of the executables remaining in bin to start with "trick-".  In the sim_services directories changed all source files to find the Trick headers in their new location.  Since all of the include files are gone in sim_services, removed the src directories as well, moving all of the source files up a level.  Moved the makefiles, docs, man, and other architecture independent files into a top level share directory.  Renamed lib_${TRICK_HOST_CPU} to lib64 or lib depending on the platform we're currently on.

refs #63
2015-06-09 08:44:42 -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 "trick/reference.h"
#include "trick/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