RInside Version 0.2.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
constants.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Christian Authmann
3  */
4 
5 #pragma once
6 
7 
8 #define ris_socket_address "example_server.sock"
9 
10 const uint32_t RIS_MAGIC_NUMBER = 0xF00BA5;
11 const char RIS_CMD_SETVALUE = 1;
12 const char RIS_CMD_GETVALUE = 2;
13 const char RIS_CMD_SETCALLBACK = 3;
14 const char RIS_CMD_RUN = 4;
15 const char RIS_CMD_GETCONSOLE = 5;
16 const char RIS_CMD_INITPLOT = 6;
17 const char RIS_CMD_GETPLOT = 7;
18 const char RIS_CMD_EXIT = 8;
19 
20 
21 const char RIS_REPLY_OK = 101;
22 const char RIS_REPLY_CALLBACK = 102;
23 const char RIS_REPLY_VALUE = 103;
24 const char RIS_REPLY_ERROR = 104;
25 
26 
27 /*
28  * The Socket protocol is as follows:
29  *
30  * The Client initiates the connection by sending the "magic number"
31  *
32  * Then the Client sends a CMD, followed by the required parameters.
33  * The server sends a REPLY, followed by a value, an error or any other
34  * relevant payload.
35  *
36  * For the exact parameters of each command, see rinsideserver.cpp
37  *
38  * Communication is continued until the client terminates the connection. The server
39  * should only terminate the connection when encountering an unrecoverable error.
40  */
const char RIS_CMD_GETCONSOLE
Definition: constants.h:15
const char RIS_REPLY_OK
Definition: constants.h:21
const uint32_t RIS_MAGIC_NUMBER
Definition: constants.h:10
const char RIS_CMD_RUN
Definition: constants.h:14
const char RIS_CMD_INITPLOT
Definition: constants.h:16
const char RIS_REPLY_ERROR
Definition: constants.h:24
const char RIS_CMD_GETPLOT
Definition: constants.h:17
const char RIS_CMD_SETVALUE
Definition: constants.h:11
const char RIS_CMD_EXIT
Definition: constants.h:18
const char RIS_REPLY_CALLBACK
Definition: constants.h:22
const char RIS_REPLY_VALUE
Definition: constants.h:23
const char RIS_CMD_GETVALUE
Definition: constants.h:12
const char RIS_CMD_SETCALLBACK
Definition: constants.h:13