APIs, concepts, guides, and more

PREMIUM FEATURE BETA

🔹 RPCs

rpc RTTask (RTTaskRequest) returns (RTTaskResponse) {};
rpc RTTaskBatch(RTTaskBatchRequest) returns (RTTaskBatchResponse) {};

🔹 Request

message RTTaskRequest {
// Common request header.
RSI.RapidServer.RequestHeader header = 1;
// The id of the task. This is the id assigned to the task when it was created.
int32 id = 2;
// The id of the task manager that the task was submitted to.
int32 manager_id = 3;
optional RTTaskConfig config = 4;
optional RTTaskAction action = 5;
}

🔹 Response

message RTTaskResponse {
// Common response header. Always check the response header for errors.
RSI.RapidServer.ResponseHeader header = 1;
// The id of the task. This is the id assigned to the task when it was created.
int32 id = 2;
// The id of the task manager that the task was submitted to.
int32 manager_id = 3;
optional RTTaskConfig config = 4;
optional RTTaskAction action = 5;
optional RTTaskInfo info = 6;
optional RTTaskStatus status = 7;
}

🔹 Batch Request and Response

message RTTaskBatchRequest {
// Common request header.
RSI.RapidServer.RequestHeader header = 1;
repeated RTTaskRequest requests = 2;
}
message RTTaskBatchResponse {
// Common response header. Always check the response header for errors.
RSI.RapidServer.ResponseHeader header = 1;
repeated RTTaskResponse responses = 2;
}
TaskPriority
Enum representing the priority levels for a real-time task.
Definition rttask.h:100
RTTaskManagerState
Enum representing the possible states of an RTTaskManager.
Definition rttask.h:74
RTTaskState
Enum representing the possible states of a real-time task.
Definition rttask.h:62
PlatformType
Enum representing the platform type for an RTTaskManager.
Definition rttask.h:85
RSINetworkEniResult
NetworkEniGenerate return values.
Definition rsienums.h:1389
RSINetworkStartMode
Network start modes.
Definition rsienums.h:587
RSIMotorDisableAction
Action for when a motor is disabled.
Definition rsienums.h:1284
RSINetworkStartError
Network start errors.
Definition rsienums.h:593
RSIMultiAxisAddressType
Used to get firmware address used in User Limits, Recorders, etc.
Definition rsienums.h:496
INtimeStatus
INtime status values.
Definition rsienums.h:1322
RSIHomeStage
Predefined Homing Stage sections.
Definition rsienums.h:396
RSINetworkType
Type of Network topology.
Definition rsienums.h:624
RSINodeType
Valid Node types.
Definition rsienums.h:674

🔹 Config

message RTTaskConfig {}

🔹 Action

message RTTaskAction {
// Stop the task.
optional Stop stop = 1;
// Reset the timing metrics for the task. (ExecutionTimeMax, Min, Mean, Last)
optional TimingReset timing_reset = 2;
// Wait until the task has executed this many times before returning.
optional ExecutionCountAbsoluteWait execution_count_absolute_wait = 3;
// Wait until the task has executed this many more times before returning.
optional ExecutionCountRelativeWait execution_count_relative_wait = 4;
message Stop {}
message TimingReset {}
message ExecutionCountAbsoluteWait {
// Wait until the task has executed this many times total.
optional int64 count = 1;
// The maximum time to wait for the task to execute the specified number of times.
optional int32 timeout_ms = 2;
}
message ExecutionCountRelativeWait {
// Wait until the task has executed this many more times from the current count.
optional int64 count = 1;
// The maximum time to wait for the task to execute the specified number of times.
optional int32 timeout_ms = 2;
}
}

🔹 Info

message RTTaskInfo {
// The unique id of the task (not unique across task managers).
int32 id = 1;
// The id of the task manager that created this task.
int32 manager_id = 2;
// The parameters that were used to create the task.
RTTaskCreationParameters creation_parameters = 3;
// Constants related to the RTTask class.
Constants constants = 4;
message Constants {
// Constants related to the RTTask creation parameters.
CreationParameterConstants creation_parameters = 1;
// Constants related to the RTTask status.
StatusConstants status = 2;
message CreationParameterConstants {
// The maximum length of the library directory path.
int32 directory_length_maximum = 1;
// The maximum length of the library name and user label.
int32 name_length_maximum = 2;
// The default task priority.
int32 priority_default = 3;
// The special value for the repeats field to indicate infinite repeats.
int32 repeat_forever = 4;
// The special value for the repeats field to indicate no repeats.
int32 repeat_none = 5;
// The default period for the task.
int32 period_default = 6;
// The default phase for the task.
int32 phase_default = 7;
// The default value for the enable_timing field.
int32 enable_timing_default = 8;
}
message StatusConstants {
// The special value for the execution count to indicate an invalid count.
int64 invalid_execution_count = 1;
// The special value for the execution time to indicate an invalid time.
uint64 invalid_execution_time = 2;
}
}
}

🔹 Status

message RTTaskStatus {
// The current state of the task (running, waiting, etc.)
RTTaskState state = 1;
// The number of times the task has executed.
optional int64 execution_count = 2;
// The maximum execution time of the task (in nanoseconds).
optional uint64 execution_time_max = 3;
// The minimum execution time of the task (in nanoseconds).
optional uint64 execution_time_min = 4;
// The mean execution time of the task (in nanoseconds).
optional double execution_time_mean = 5;
// The most recent execution time for the task (in nanoseconds).
optional uint64 execution_time_last = 6;
}

🔹 Additional Messages

RTTaskStateUNKNOWN = 0;
RTTaskStateDEAD = 1;
RTTaskStateDISABLED = 2;
RTTaskStateWAITING = 3;
RTTaskStateRUNNING = 4;
}