The RMP Motion Controller APIs
RapidSequencer.cs
2using System;
3using System.Collections.Generic;
4using System.Linq;
5using System.Text;
6using System.Threading.Tasks;
7
9namespace RSI.RapidSequencer
10{
13
16 public struct EngineStatus
17 {
18 public bool Running;
19 public SequencerType SequencerType;
20 public ulong TaskCount;
21 }
22
25 public struct TaskStatus
26 {
27 public TaskState State;
28 public ulong LineNumber;
29 public ulong Counter;
30 }
31
34 public struct SequencerGlobal
35 {
36 public enum DataType
37 {
38 Bool,
39 Char,
40 Int16,
41 UInt16,
42 Int32,
43 UInt32,
44 Int64,
45 UInt64,
46 Double,
47 }
48
49 public string Name;
50 public ulong HostAddress;
51 public uint FirmwareAddress;
52 public uint Index;
53 public ulong Size;
54 public DataType Type;
55 public dynamic Value;
56 }
57
63 public class RapidSequencer
64 {
66 public const uint CONNECT_TIMEOUT_MS = 1000;
67
69 public const uint CONNECT_ATTEMPTS = 3;
70
72 public const string DEFAULT_ENTRY_POINT = "main";
73
74 private Grpc.Core.Channel channel;
75 private RapidSequencerService.RapidSequencerServiceClient client;
76 private string _grpcAddr;
77 private int _grpcPort;
78 private CompileSuccess lastCompileSuccess = null;
79 private string warnings = "";
80
86 public RapidSequencer(string grpcAddr, int grpcPort, uint connectTimeoutMs = CONNECT_TIMEOUT_MS, uint connectAttempts = CONNECT_ATTEMPTS)
87 {
88 _grpcAddr = grpcAddr;
89 _grpcPort = grpcPort;
90 channel = new Grpc.Core.Channel(_grpcAddr, _grpcPort, Grpc.Core.ChannelCredentials.Insecure);
91
92 channel.ConnectAsync(DateTime.Now);
93 System.Threading.Thread.Sleep(1);
94
95 int attempts = 0;
96 while (attempts < connectAttempts && channel.State != Grpc.Core.ChannelState.Ready)
97 {
98 channel.TryWaitForStateChangedAsync(channel.State, DateTime.UtcNow.AddMilliseconds(connectTimeoutMs)).Wait();
99 attempts++;
100 if (attempts >= connectAttempts)
101 {
102 throw new Exception("RapidSequencer failed to transition to ready state");
103 }
104 }
105
106 client = new RapidSequencerService.RapidSequencerServiceClient(channel);
107 }
108
111 public int PortGet()
112 {
113 return _grpcPort;
114 }
115
118 public string IpGet()
119 {
120 return _grpcAddr;
121 }
122
123 public static string ParseRepeatedString(Google.Protobuf.Collections.RepeatedField<string> result)
124 {
125 string output = "";
126 foreach (var str in result)
127 {
128 output += str + "\n";
129 }
130 return output;
131 }
132
136 public string CommandLineRun(string command)
137 {
138 var request = new CommandLineRequest { Command = command };
139 var reply = client.CommandLine(request);
140 return ParseRepeatedString(reply.Result);
141 }
142
149 public CompileSuccess Compile(string path, string entryPoint = DEFAULT_ENTRY_POINT, string exceptionHandler = "")
150 {
151 var request = new CompileRequest { Path = path, EntryPoint = entryPoint, ExceptionHandler = exceptionHandler };
152 var reply = client.Compile(request, null, DateTime.UtcNow.AddSeconds(10));
153 string errorMessage = "Unknown compilation error!";
154 warnings = "";
155 foreach (var str in reply.Warnings)
156 {
157 warnings += str + "\n";
158 }
159
160 switch (reply.ResultCase)
161 {
162 case CompileResponse.ResultOneofCase.CompileSuccess:
163 lastCompileSuccess = reply.CompileSuccess;
164 break;
165 case CompileResponse.ResultOneofCase.CompileFailure:
166 var failInfo = reply.CompileFailure;
167 errorMessage =
168 "Compilation Failure: " + failInfo.CompilerText +
169 "\n Message: " + failInfo.CompilerMessage +
170 "\n Line: " + failInfo.CompilerLine + ", character: " + failInfo.CompilerStart;
171 throw new Exception(errorMessage);
172 case CompileResponse.ResultOneofCase.GeneralFailure:
173 errorMessage = "Compilation General Failure: " + reply.GeneralFailure;
174 throw new Exception(errorMessage);
175 default:
176 throw new Exception(errorMessage);
177 }
178
179 return reply.CompileSuccess;
180 }
181
184 public string WarningsGet()
185 {
186 return warnings;
187 }
188
189 private string RunCore(CompileSuccess compileSuccess, ulong[] breakpoints, bool block)
190 {
191 if (compileSuccess == null)
192 {
193 throw new Exception("No previously successful compilation found!");
194 }
195 var request = new RunRequest { Block = block, Compiled = compileSuccess, };
196 if (breakpoints != null)
197 {
198 foreach (var breakpoint in breakpoints)
199 {
200 request.Breakpoints.Add(breakpoint);
201 }
202 }
203 var reply = client.Run(request);
204 return reply.Task.Id;
205 }
206
210 public string Run(ulong[] breakpoints = null)
211 {
212 return RunCore(lastCompileSuccess, breakpoints, true);
213 }
214
219 public string Run(CompileSuccess compileSuccess, ulong[] breakpoints = null)
220 {
221 return RunCore(compileSuccess, breakpoints, true);
222 }
223
227 public string RunAsync(ulong[] breakpoints = null)
228 {
229 return RunCore(lastCompileSuccess, breakpoints, false);
230 }
231
236 public string RunAsync(CompileSuccess compileSuccess, ulong[] breakpoints = null)
237 {
238 return RunCore(compileSuccess, breakpoints, false);
239 }
240
242 public void Shutdown()
243 {
244 var serverControlClient = new RapidServer.ServerControlService.ServerControlServiceClient(channel);
245 serverControlClient.Shutdown(new RapidServer.ServerShutdownRequest());
246 }
247
251 public void EngineStart(string rmpNode = "NodeA", string rmpPath = "")
252 {
253 client.EngineStart(new EngineStartRequest { RmpNode = rmpNode, RmpPath = rmpPath });
254 }
255
257 public void EngineStop()
258 {
259 client.EngineStop(new EngineStopRequest());
260 }
261
265 {
266 var reply = client.EngineStatusGet(new EngineStatusRequest());
267 return new EngineStatus { Running = reply.Running, SequencerType = reply.Type, TaskCount = reply.TaskCount, };
268 }
269
273 public static TaskID TaskIDFromString(string taskId)
274 {
275 return new TaskID { Id = taskId };
276 }
277
280 public void TaskStop(string taskId)
281 {
282 client.TaskStop(TaskIDFromString(taskId));
283 }
284
287 public void TaskPause(string taskId)
288 {
289 client.TaskPause(TaskIDFromString(taskId));
290 }
291
294 public void TaskResume(string taskId)
295 {
296 client.TaskResume(TaskIDFromString(taskId));
297 }
298
301 public void TaskRemove(string taskId)
302 {
303 var reply = client.TaskRemove(TaskIDFromString(taskId));
304 if (!reply.Result)
305 {
306 throw new Exception($"Failed to remove task: {taskId}. Ensure that task is stopped before removing.");
307 }
308 }
309
313 public TaskStatus TaskStatusGet(string taskId)
314 {
315 var reply = client.TaskStatusGet(TaskIDFromString(taskId));
316 return new TaskStatus { State = reply.State, LineNumber = reply.LineNumber, Counter = reply.Counter, };
317 }
318
322 public string TaskOutputGet(string taskId)
323 {
324 var reply = client.TaskOutputGet(TaskIDFromString(taskId));
325 return ParseRepeatedString(reply.Result);
326 }
327
330 public void DebugResume(string taskId)
331 {
332 client.DebugCommand(new DebugRequest { Task = TaskIDFromString(taskId), Action = DebugAction.ResumeUnspecified });
333 }
334
337 public void DebugPause(string taskId)
338 {
339 client.DebugCommand(new DebugRequest { Task = TaskIDFromString(taskId), Action = DebugAction.Pause });
340 }
341
344 public void DebugStep(string taskId)
345 {
346 client.DebugCommand(new DebugRequest { Task = TaskIDFromString(taskId), Action = DebugAction.Step });
347 }
348
351 public void DebugStepIn(string taskId)
352 {
353 client.DebugCommand(new DebugRequest { Task = TaskIDFromString(taskId), Action = DebugAction.StepIn });
354 }
355
358 public void DebugStepOut(string taskId)
359 {
360 client.DebugCommand(new DebugRequest { Task = TaskIDFromString(taskId), Action = DebugAction.StepOut });
361 }
362
363
367 public void DebugBreakpointSet(string taskId, ulong lineNumber)
368 {
369 client.DebugCommand(new DebugRequest { Task = TaskIDFromString(taskId), Action = DebugAction.BreakpointSet, LineNumber = (int)lineNumber });
370 }
371
375 public void DebugBreakpointRemove(string taskId, ulong lineNumber)
376 {
377 client.DebugCommand(new DebugRequest { Task = TaskIDFromString(taskId), Action = DebugAction.BreakpointUnset, LineNumber = (int)lineNumber });
378 }
379
380 private SequencerGlobal ParseGlobalVariableGetResponse(GlobalVariableGetResponse reply)
381 {
382 var globalVar = new SequencerGlobal
383 {
384 HostAddress = reply.HostAddress,
385 FirmwareAddress = reply.FirmwareAddress,
386 Index = reply.Index
387 };
388
389 switch (reply.ValueCase)
390 {
391 case GlobalVariableGetResponse.ValueOneofCase.Bool:
392 globalVar.Type = SequencerGlobal.DataType.Bool;
393 globalVar.Value = reply.Bool;
394 break;
395 case GlobalVariableGetResponse.ValueOneofCase.Char:
396 globalVar.Type = SequencerGlobal.DataType.Char;
397 globalVar.Value = reply.Char;
398 break;
399 case GlobalVariableGetResponse.ValueOneofCase.Int16:
400 globalVar.Type = SequencerGlobal.DataType.Int16;
401 globalVar.Value = reply.Int16;
402 break;
403 case GlobalVariableGetResponse.ValueOneofCase.Uint16:
404 globalVar.Type = SequencerGlobal.DataType.UInt16;
405 globalVar.Value = reply.Uint16;
406 break;
407 case GlobalVariableGetResponse.ValueOneofCase.Int32:
408 globalVar.Type = SequencerGlobal.DataType.Int32;
409 globalVar.Value = reply.Int32;
410 break;
411 case GlobalVariableGetResponse.ValueOneofCase.Uint32:
412 globalVar.Type = SequencerGlobal.DataType.UInt32;
413 globalVar.Value = reply.Uint32;
414 break;
415 case GlobalVariableGetResponse.ValueOneofCase.Int64:
416 globalVar.Type = SequencerGlobal.DataType.Int64;
417 globalVar.Value = reply.Int64;
418 break;
419 case GlobalVariableGetResponse.ValueOneofCase.Uint64:
420 globalVar.Type = SequencerGlobal.DataType.UInt64;
421 globalVar.Value = reply.Uint64;
422 break;
423 case GlobalVariableGetResponse.ValueOneofCase.Double:
424 globalVar.Type = SequencerGlobal.DataType.Double;
425 globalVar.Value = reply.Double;
426 break;
427 default:
428 throw new Exception("Unknown data type in GlobalVariableGetResponse.");
429 }
430 return globalVar;
431 }
432
437 {
438 var request = new GlobalVariableGetRequest { Name = name };
439 var reply = client.GlobalVariableGet(request);
440 var global = ParseGlobalVariableGetResponse(reply);
441 global.Name = name;
442 return global;
443 }
444
445 private SequencerGlobal ParseGlobalVariableData(GlobalVariableData data)
446 {
447 var globalVar = new SequencerGlobal
448 {
449 Name = data.Name,
450 HostAddress = data.HostAddress,
451 FirmwareAddress = data.FirmwareAddress,
452 Index = data.Index,
453 Size = data.Size
454 };
455
456 switch (data.ValueCase)
457 {
458 case GlobalVariableData.ValueOneofCase.Bool:
459 globalVar.Type = SequencerGlobal.DataType.Bool;
460 globalVar.Value = data.Bool;
461 break;
462 case GlobalVariableData.ValueOneofCase.Char:
463 globalVar.Type = SequencerGlobal.DataType.Char;
464 globalVar.Value = data.Char;
465 break;
466 case GlobalVariableData.ValueOneofCase.Int16:
467 globalVar.Type = SequencerGlobal.DataType.Int16;
468 globalVar.Value = data.Int16;
469 break;
470 case GlobalVariableData.ValueOneofCase.Uint16:
471 globalVar.Type = SequencerGlobal.DataType.UInt16;
472 globalVar.Value = data.Uint16;
473 break;
474 case GlobalVariableData.ValueOneofCase.Int32:
475 globalVar.Type = SequencerGlobal.DataType.Int32;
476 globalVar.Value = data.Int32;
477 break;
478 case GlobalVariableData.ValueOneofCase.Uint32:
479 globalVar.Type = SequencerGlobal.DataType.UInt32;
480 globalVar.Value = data.Uint32;
481 break;
482 case GlobalVariableData.ValueOneofCase.Int64:
483 globalVar.Type = SequencerGlobal.DataType.Int64;
484 globalVar.Value = data.Int64;
485 break;
486 case GlobalVariableData.ValueOneofCase.Uint64:
487 globalVar.Type = SequencerGlobal.DataType.UInt64;
488 globalVar.Value = data.Uint64;
489 break;
490 case GlobalVariableData.ValueOneofCase.Double:
491 globalVar.Type = SequencerGlobal.DataType.Double;
492 globalVar.Value = data.Double;
493 break;
494 default:
495 throw new Exception("Unkown data type in GlobalVariableData.");
496 }
497 return globalVar;
498 }
499
503 public SequencerGlobal[] GlobalVariableListGet(bool skipValues = false)
504 {
505 var request = new GlobalVariableListGetRequest { SkipValues = skipValues };
506 var reply = client.GlobalVariableListGet(request);
507 List<SequencerGlobal> globals = new List<SequencerGlobal>();
508 foreach (var globalData in reply.Data)
509 {
510 globals.Add(ParseGlobalVariableData(globalData));
511 }
512 return globals.ToArray();
513 }
514
519 public void GlobalVariableSet(string name, SequencerGlobal.DataType type, dynamic value)
520 {
521 var request = new GlobalVariableSetRequest { Name = name };
522 switch (type)
523 {
524 case SequencerGlobal.DataType.Bool:
525 request.Bool = Convert.ToBoolean(value);
526 break;
527 case SequencerGlobal.DataType.Char:
528 request.Char = Convert.ToChar(value);
529 break;
530 case SequencerGlobal.DataType.Int16:
531 request.Int16 = Convert.ToInt16(value);
532 break;
533 case SequencerGlobal.DataType.UInt16:
534 request.Uint16 = Convert.ToUInt16(value);
535 break;
536 case SequencerGlobal.DataType.Int32:
537 request.Int32 = Convert.ToInt32(value);
538 break;
539 case SequencerGlobal.DataType.UInt32:
540 request.Uint32 = Convert.ToUInt32(value);
541 break;
542 case SequencerGlobal.DataType.Int64:
543 request.Int64 = Convert.ToInt64(value);
544 break;
545 case SequencerGlobal.DataType.UInt64:
546 request.Uint64 = Convert.ToUInt64(value);
547 break;
548 case SequencerGlobal.DataType.Double:
549 request.Double = Convert.ToDouble(value);
550 break;
551 default:
552 throw new Exception("Unkown data type given in GlobalVariableSet().");
553 }
554 client.GlobalVariableSet(request);
555 }
556 }
557
561 {
562 public const string DEFAULT_SEQUENCER_NODE_NAME = "NodeB";
563 public const string DEFAULT_RMP_NODE_NAME = "NodeA";
564 public const string DEFAULT_IP = "localhost";
565 public const string DEFAULT_MCAST_GROUP = "224.0.0.0";
566 public const int DEFAULT_GRPC_PORT = 50051;
567 public const ulong DEFAULT_TIMEOUT_MS = 1000;
568 public const int DEFAULT_DISCOVER_PORT = 60061;
569
577 public static RapidSequencer[] Discover(DiscoveryType discoveryType, ushort numExpectedSequencers = 0, string sequencerNodeName = DEFAULT_SEQUENCER_NODE_NAME, ulong timeoutMs = DEFAULT_TIMEOUT_MS, int discoveryPort = DEFAULT_DISCOVER_PORT)
578 {
579 ServerInfoCollection result;
580 if (discoveryType == DiscoveryType.All)
581 {
582 result = API.DiscoverBroadcast(discoveryType, numExpectedSequencers, sequencerNodeName, timeoutMs, discoveryPort);
583 }
584 else if (discoveryType == DiscoveryType.Local_Intime)
585 {
586 result = API.DiscoverLocalINtime(sequencerNodeName);
587 }
588 else if (discoveryType == DiscoveryType.Local_Windows)
589 {
590 result = API.DiscoverLocalWindows();
591 }
592 else
593 {
594 result = API.DiscoverLocal(sequencerNodeName);
595 }
596
597
598 var foundSequencers = new List<RapidSequencer>();
599 for (uint index = 0; index < result.ServerCount(); index++)
600 {
601 try
602 {
603 //foundSequencers.Add(new RapidSequencer(addresses[index], ports[index]));
604
605 var sequencerInfo = result.ServerInfoGet(index);
606 foundSequencers.Add(new RapidSequencer(sequencerInfo.AddressGet(), sequencerInfo.PortGet()));
607 }
608 catch
609 {
610 // something happened to the seqeuncer or the grpc channel failed for some reason? Just don't add it to the list?
611 // For now, I will just not add a sequencer to the list if the Constructor throws an exception due to the grpc channels not being set up properly
612 }
613 }
614
615 return foundSequencers.ToArray();
616 }
617
629 public static RapidSequencer Create(Platform platform, string sequencerNodeName, string rmpNodeName, string executablePath,
630 int grpcPort = DEFAULT_GRPC_PORT, string friendlyName = "RapidServer", ulong timeoutMs = DEFAULT_TIMEOUT_MS, int discoveryPort = DEFAULT_DISCOVER_PORT)
631 {
632 //int sequencerCount = 10;
633 //int addressSize = 46;
634 //string[] addresses = new string[sequencerCount];
635 //int[] ports = new int[sequencerCount];
636 //int usedElements;
637 //int foundIndex;
638
639 //var result = RSI.RapidSequencer.API.CreateStart(platform, sequencerNodeName, rmpNodeName, executablePath, ref addresses, sequencerCount, addressSize,
640 // ports, sequencerCount, out usedElements, out foundIndex, timeoutMs, (int)grpcPort, friendlyName, mcastGroup, (int)mcastPort);
641
642 //if (result == CreateDiscoverResult.OK && usedElements > 0 && foundIndex > -1)
643 //{
644 // var sequencer = new RapidSequencer(addresses[foundIndex], ports[foundIndex]);
645 // sequencer.EngineStart();
646 // return sequencer;
647 //}
648 //else
649 //{
650 // string errorMessage = $"Failed to create a new sequencer at port: {grpcPort}. ";
651 // switch (result)
652 // {
653 // case CreateDiscoverResult.DiscoveryTimeout:
654 // errorMessage += "Discovery timed out.";
655 // break;
656 // case CreateDiscoverResult.ExecutableDNE:
657 // errorMessage += "Executable could not be found.";
658 // break;
659 // case CreateDiscoverResult.ExecutableFailure:
660 // errorMessage += "Executable failure.";
661 // break;
662 // case CreateDiscoverResult.UnknownINtimeNode:
663 // errorMessage += "Unknown INtime node.";
664 // break;
665 // case CreateDiscoverResult.UnknownPlatform:
666 // errorMessage += "Unknown platform.";
667 // break;
668 // }
669 // throw new Exception(errorMessage);
670 //}
671
672 var result = RSI.RapidSequencer.API.Start(platform, sequencerNodeName, rmpNodeName, executablePath, grpcPort, friendlyName, timeoutMs, discoveryPort);
673 return new RapidSequencer(result.AddressGet(), result.PortGet());
674 }
675
686 public static RapidSequencer CreateWindows(string sequencerNodeName, string rmpNodeName, string executablePath, int grpcPort = DEFAULT_GRPC_PORT,
687 string friendlyName = "RapidServer", ulong timeoutMs = DEFAULT_TIMEOUT_MS, int discoveryPort = DEFAULT_DISCOVER_PORT)
688 {
689 return Create(Platform.Windows, sequencerNodeName, rmpNodeName, executablePath, grpcPort, friendlyName, timeoutMs, discoveryPort);
690 }
691
702 public static RapidSequencer CreateRT(string sequencerNodeName, string rmpNodeName, string executablePath, int grpcPort = DEFAULT_GRPC_PORT,
703 string friendlyName = "RapidServer", ulong timeoutMs = DEFAULT_TIMEOUT_MS, int discoveryPort = DEFAULT_DISCOVER_PORT)
704 {
705 return Create(Platform.INtime, sequencerNodeName, rmpNodeName, executablePath, grpcPort, friendlyName, timeoutMs, discoveryPort);
706 }
707 }
708
710}
SequencerGlobal[] GlobalVariableListGet(bool skipValues=false)
Gets the status of the global variables.
void DebugResume(string taskId)
Resumes the specified task.
void TaskRemove(string taskId)
Removes the specified task. Task must be stopped to be removed, throws an exception if the removal fa...
string TaskOutputGet(string taskId)
Gets the string output of the specified task.
void DebugBreakpointSet(string taskId, ulong lineNumber)
Places a breakpoint at the given line number in the specified task.
string RunAsync(ulong[] breakpoints=null)
Run the last compiled script. Does not wait for the script to finish excecution. Returns the ID of th...
TaskStatus TaskStatusGet(string taskId)
Gets the status of the specified task as a TaskStatus struct.
string CommandLineRun(string command)
Command the RapidSequencer to execute a given line and return the output.
void TaskStop(string taskId)
Stops the specified task.
void DebugBreakpointRemove(string taskId, ulong lineNumber)
Removes any breakpoints at the given line number in the specified task.
CompileSuccess Compile(string path, string entryPoint=DEFAULT_ENTRY_POINT, string exceptionHandler="")
Compiles the script at the given path. If successful, saves this compilation result to run at a later...
void DebugPause(string taskId)
Pauses the specified task.
void GlobalVariableSet(string name, SequencerGlobal.DataType type, dynamic value)
Sets the value of the specified global variable.
RapidSequencer(string grpcAddr, int grpcPort, uint connectTimeoutMs=CONNECT_TIMEOUT_MS, uint connectAttempts=CONNECT_ATTEMPTS)
Constructs a RapidSequencer object.
static TaskID TaskIDFromString(string taskId)
Creates a TaskID object from the given string.
string Run(ulong[] breakpoints=null)
Run the last compiled script. Waits for the script to finish execution. Returns the ID of the resulti...
string IpGet()
Returns the IPv4 address the RapidSequencer process is located at.
void TaskPause(string taskId)
Pauses the specified task.
void DebugStep(string taskId)
Proceeds to the next line of the specified task and pauses.
void EngineStart(string rmpNode="NodeA", string rmpPath="")
Starts the runtime of the RapidSequencer process.
string Run(CompileSuccess compileSuccess, ulong[] breakpoints=null)
Run the script using the given compilation result. Waits for the script to finish execution....
int PortGet()
Returns the port the RapidSequencer proecess is listening on.
string RunAsync(CompileSuccess compileSuccess, ulong[] breakpoints=null)
Run the script using the given compilation result. Does not wait for the script to finish excecution....
void TaskResume(string taskId)
Resumes the specified task.
string WarningsGet()
Returns the warnings from the last compilation the RapidSequencer performed.
void DebugStepIn(string taskId)
Enters the called function at the current line of the specified task. If unable to enter a function,...
EngineStatus EngineStatusGet()
Gets the status of the RapidSequencer process.
void DebugStepOut(string taskId)
Exits the execution of the currently executing function in the specified task. Pauses at the line the...
SequencerGlobal GlobalVariableGet(string name)
Gets the value of the global variable with the given name.
static RapidSequencer Create(Platform platform, string sequencerNodeName, string rmpNodeName, string executablePath, int grpcPort=DEFAULT_GRPC_PORT, string friendlyName="RapidServer", ulong timeoutMs=DEFAULT_TIMEOUT_MS, int discoveryPort=DEFAULT_DISCOVER_PORT)
Creates a RapidSequencer process on the given platform at the specified port if one does not already ...
static RapidSequencer CreateRT(string sequencerNodeName, string rmpNodeName, string executablePath, int grpcPort=DEFAULT_GRPC_PORT, string friendlyName="RapidServer", ulong timeoutMs=DEFAULT_TIMEOUT_MS, int discoveryPort=DEFAULT_DISCOVER_PORT)
Creates a real-time RapidSequencer process at the specified port if one does not already exist....
static RapidSequencer CreateWindows(string sequencerNodeName, string rmpNodeName, string executablePath, int grpcPort=DEFAULT_GRPC_PORT, string friendlyName="RapidServer", ulong timeoutMs=DEFAULT_TIMEOUT_MS, int discoveryPort=DEFAULT_DISCOVER_PORT)
Creates a Windows RapidSequencer process at the specified port if one does not already exist....
static RapidSequencer[] Discover(DiscoveryType discoveryType, ushort numExpectedSequencers=0, string sequencerNodeName=DEFAULT_SEQUENCER_NODE_NAME, ulong timeoutMs=DEFAULT_TIMEOUT_MS, int discoveryPort=DEFAULT_DISCOVER_PORT)
Discovers existing RapidSequencer processes and returns an array of RapidSequencer objects to interfa...
The RapidSequencerFactory provides static methods for creating RapidSequencer processes or discoverin...
An object for interacting with a RapidSequencer process.
const uint CONNECT_TIMEOUT_MS
The default timeout for creating a connection is 1000 milliseconds.
const uint CONNECT_ATTEMPTS
The default number of connection attempts to make during object construction.
void Shutdown()
Shuts down the RapidSequencer process.
const string DEFAULT_ENTRY_POINT
The name of the default function the RapidSequencer will use when running a script.
void EngineStop()
Stops the runtime of the RapidSequencer process.
Structure for describing the status of the RapidSequencer proccess. Describes whether the process is ...
Structure for describing a global tag. Contains information about the type, name, and value of the ta...
Structure for describing the status of a task. Describes what state the task is in,...