APIs, concepts, guides, and more
_constants.cs
1
2public static class Constants
3{
4 /* General constants */
5 public const string RMP_WINDOWS_PATH = @"..\..\";
6 public const string RMP_LINUX_PATH = "/rsi";
7 public const string RMP_NODE_NAME = "NodeA";
8 public const string RMP_NIC_PRIMARY = "";
9 public const int RMP_CPU_AFFINITY = 0;
10 public const bool USE_HARDWARE = false;
11 // If running with phantom axes, set AXIS_COUNT to the number of axes you want to simulate
12 // If running with hardware, set AXIS_COUNT to match the number of physical axes connected
13 // In either case, the sample apps will only use up to 6 axes as defined by the constants array below
14 public const int AXIS_COUNT = 6;
15 public const int MULTIAXIS_COUNT = 1;
16
17 /* Axis-specific constants */
18 // Use these constants to define which axes to use in the sample apps (zero-based indexing).
19 // E.g., if you have 4 axes connected but want to only use the first and last axis, set AXIS_0_INDEX = 0 and AXIS_1_INDEX = 3
20 public const int AXIS_0_INDEX = 0;
21 public const int AXIS_1_INDEX = 1;
22 public const int AXIS_2_INDEX = 2;
23 public const int AXIS_3_INDEX = 3;
24 public const int AXIS_4_INDEX = 4;
25 public const int AXIS_5_INDEX = 5;
26 public const double AXIS_0_USER_UNITS = 1;
27 public const double AXIS_1_USER_UNITS = 1;
28 public const double AXIS_2_USER_UNITS = 1;
29 public const double AXIS_3_USER_UNITS = 1;
30 public const double AXIS_4_USER_UNITS = 1;
31 public const double AXIS_5_USER_UNITS = 1;
32
33 /* Additional constants */
34 // The longest RSI has needed for enabling an amplifier is 750 ms, and the default for AmpEnableSet is 500 ms (if you provide no second argument)
35 public const int AMP_ENABLE_MS = 750;
36 public const string RAPIDSERVER_IP = "127.0.0.1";
37 public const int RAPIDSERVER_PORT = 50080;
38
39
40 /*
41 ┌────────────────────────────────────┐
42 │ END USER-DEFINED CONSTANTS │
43 │ NO EDITING NEEDED BEYOND THIS LINE │
44 └────────────────────────────────────┘
45 */
46
47 /* Internal Constants */
48 // Note: sized to match max AXIS_COUNT. Always use AXIS_COUNT to limit iterations, never the length of these arrays.
49 public static readonly int[] AXIS_INDICES =
50 {
57 };
58 public static readonly double[] AXIS_USER_UNITS =
59 {
66 };
67
68 public const int EXIT_SUCCESS = 0;
69 public const int EXIT_FAILURE = 1;
70
71}
Constants used in the C# sample apps.
Definition _constants.cs:3
const double AXIS_0_USER_UNITS
Default: 1.
Definition _constants.cs:26
const bool USE_HARDWARE
Default: false.
Definition _constants.cs:10
const string RAPIDSERVER_IP
Default: 127.0.0.1.
Definition _constants.cs:36
const int MULTIAXIS_COUNT
Default: 1.
Definition _constants.cs:15
const int EXIT_FAILURE
Exit code for failed execution.
Definition _constants.cs:69
const int RAPIDSERVER_PORT
Default: 50080.
Definition _constants.cs:37
const int AXIS_COUNT
Default: 6.
Definition _constants.cs:14
const double AXIS_2_USER_UNITS
Default: 1.
Definition _constants.cs:28
const int AXIS_0_INDEX
Default: 0.
Definition _constants.cs:20
const int AXIS_5_INDEX
Default: 5.
Definition _constants.cs:25
const double AXIS_3_USER_UNITS
Default: 1.
Definition _constants.cs:29
const int RMP_CPU_AFFINITY
Default: 0.
Definition _constants.cs:9
const int AMP_ENABLE_MS
Default: 750.
Definition _constants.cs:35
const int AXIS_3_INDEX
Default: 3.
Definition _constants.cs:23
const string RMP_LINUX_PATH
Default: /rsi.
Definition _constants.cs:6
const string RMP_NIC_PRIMARY
Default: "".
Definition _constants.cs:8
const int AXIS_4_INDEX
Default: 4.
Definition _constants.cs:24
const int EXIT_SUCCESS
Exit code for successful execution.
Definition _constants.cs:68
const double AXIS_5_USER_UNITS
Default: 1.
Definition _constants.cs:31
const double AXIS_1_USER_UNITS
Default: 1.
Definition _constants.cs:27
const int AXIS_1_INDEX
Default: 1.
Definition _constants.cs:21
const string RMP_NODE_NAME
Default: NodeA.
Definition _constants.cs:7
const int AXIS_2_INDEX
Default: 2.
Definition _constants.cs:22
const double AXIS_4_USER_UNITS
Default: 1.
Definition _constants.cs:30
const string RMP_WINDOWS_PATH
Default: .....
Definition _constants.cs:5