2015-02-26 15:02:31 +00:00
|
|
|
/********************************* TRICK HEADER *******************************
|
2016-11-08 09:25:07 +00:00
|
|
|
PURPOSE: ( Variable server test )
|
2015-02-26 15:02:31 +00:00
|
|
|
REFERENCES: ( None )
|
2016-11-08 09:25:07 +00:00
|
|
|
ASSUMPTIONS AND LIMITATIONS: ( None )
|
2015-02-26 15:02:31 +00:00
|
|
|
PROGRAMMERS: ( (Lindsay Landry) (L3) (9-12-2013) )
|
|
|
|
********************************************************************************/
|
|
|
|
#include <wchar.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include "trick_utils/comm/include/tc.h"
|
|
|
|
#include "trick_utils/comm/include/tc_proto.h"
|
|
|
|
|
2015-03-23 21:03:14 +00:00
|
|
|
#ifndef VS_HH
|
|
|
|
#define VS_HH
|
2016-11-08 09:25:07 +00:00
|
|
|
class VSTest {
|
2015-02-26 15:02:31 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
unsigned short port_num;
|
|
|
|
const char * hostest;
|
|
|
|
char got_read[80];
|
|
|
|
double cycle_rate;
|
|
|
|
|
|
|
|
TCDevice bob;
|
|
|
|
|
|
|
|
char a;
|
|
|
|
unsigned char b;
|
|
|
|
short c;
|
|
|
|
unsigned short d;
|
2016-11-08 09:25:07 +00:00
|
|
|
int e; /* M xy-position */
|
2015-02-26 15:02:31 +00:00
|
|
|
unsigned int f;
|
|
|
|
long g;
|
|
|
|
unsigned long h;
|
|
|
|
float i;
|
|
|
|
double j;
|
|
|
|
long long k;
|
|
|
|
unsigned long long l;
|
|
|
|
bool m;
|
|
|
|
|
|
|
|
|
|
|
|
VSTest();
|
|
|
|
~VSTest();
|
|
|
|
|
|
|
|
int init();
|
|
|
|
int default_vars();
|
|
|
|
int vs_write(char* cmd_buffer);
|
|
|
|
int vs_read();
|
|
|
|
void printLine();
|
|
|
|
|
|
|
|
int shutdown();
|
|
|
|
|
|
|
|
// TEST FUNCTIONS
|
|
|
|
int testAddRemove();
|
|
|
|
int testExists();
|
|
|
|
int testPause();
|
|
|
|
int testOther();
|
|
|
|
int testCycle();
|
|
|
|
|
|
|
|
private:
|
|
|
|
int get_line(char* thing);
|
|
|
|
int strcmp_IgnoringWhiteSpace(const char* s1, const char* s2);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|