-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserver_commands.h
41 lines (28 loc) · 1.23 KB
/
server_commands.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* server_commands.h
*
* Defines a set of server functions that correspond to user commands. The purpose of these functions is to take a
* user command and parameters and call the corresponding instrument specific function.
*/
#ifndef _SERVER_COMMANDS_H
#define _SERVER_COMMANDS_H
#include "server_functions.h"
#include "command_def.h"
using namespace std;
// Get server version
int CMD_GETVERSION(Command cmd, SOCKET s, int NumParams, int NumOptions);
// Reply to ping
int CMD_PING(Command cmd, SOCKET s, int NumParams, int NumOptions);
// Ping COM port with client-provided command
int CMD_PINGCOM(Command cmd, SOCKET s, int NumParams, int NumOptions);
// Open COM port
int CMD_OPEN(Command cmd, SOCKET s, int NumParams, int NumOptions);
// Close COM port
int CMD_CLOSE(Command cmd, SOCKET s, int NumParams, int NumOptions);
// Check status of COM port handle
int CMD_CHECKCOM(Command cmd, SOCKET s, int NumParams, int NumOptions);
// Send and receive data from COM port
int CMD_SENDRCV(Command cmd, SOCKET s, int NumParams, int NumOptions);
// Send and receive data from COM port (convert to char to hexadecimal)
int CMD_SENDRCV_HEX(Command cmd, SOCKET s, int NumParams, int NumOptions);
#endif