The RMP Motion Controller APIs

RPCs

rpc Recorder (RecorderRequest) returns (RecorderResponse) {};
rpc RecorderBatch(RecorderBatchRequest) returns (RecorderBatchResponse) {};

Request

message RecorderRequest {
// Common request header.
RSI.RapidServer.RequestHeader header = 1;
// The Recorder index. (Check MotionController's Recorder count.)
int32 index = 2;
optional RecorderConfig config = 3;
optional RecorderAction action = 4;
}

Response

message RecorderResponse {
// Common response header. Always check the response header for errors.
RSI.RapidServer.ResponseHeader header = 1;
// Recorder index
int32 index = 2;
optional RecorderConfig config = 3;
optional RecorderAction action = 4;
optional RecorderInfo info = 5;
optional RecorderStatus status = 6;
}

Batch Request and Response

message RecorderBatchRequest {
// Common request header
RSI.RapidServer.RequestHeader header = 1;
repeated RecorderRequest requests = 2;
}
message RecorderBatchResponse {
// Common response header. Always check the response header for errors.
RSI.RapidServer.ResponseHeader header = 1;
repeated RecorderResponse responses = 2;
}

Config

message RecorderConfig {
// Recorder period, in samples.
int32 period = 1;
// If true, the recorder will use a circular buffer, overwriting old data (be sure to read it out).
bool circular_buffer = 2;
// The addresses to record. Get these from Controller/Axis/MultiAxis InfoGet rpcs.
repeated AddressInfo addresses = 3;
// Use this to start and end recording with motion.
RecorderTriggerOnMotion trigger = 4;
// Configure the recorder to generate a RECORDER_HIGH interrupt when the buffer reaches this size.
int32 buffer_high_count = 5;
// Read-only, this tells us how many records fit inside the recorder's buffer (see MotionController config's recorder buffer size).
int32 record_max_count = 6;
// Internal messages.
message RecorderTriggerOnMotion {
// Use an Axis index or MutliAxis's motion index if you want the recorder to start when motion starts.
int32 motion_index = 1;
}
}

Action

message RecorderAction {
optional Reset reset = 1;
optional Start start = 2;
optional Stop stop = 3;
message Reset {};
message Start {};
message Stop {};
}

Info

message RecorderInfo { }

Status

message RecorderStatus {
// Is the Recorder recording?
bool is_recording = 1;
// New data records, if there are any available.
repeated Record records = 3;
message Record {
// The number of these will depend on the number of addresses to record in the recorder configuration.
repeated RecordData data = 1;
// Type will depend on what is set in config for each address.
message RecordData {
// Keep the names short to keep packet sizes smaller.
oneof data {
double d = 1;
int32 i32 = 2;
}
}
}
}
RSI::RapidSequencer::API::Start
ServerInfo Start(Platform _platform, const char *const _nodeName, const char *const rmp_node, const char *const executable_path, const int32_t grpc_port=50051, const char *const friendly_name="RapidServer", const uint64_t timeout_ms=1000, const int32_t broadcast_port=60061)
Starts a RapidServer instance and confirms that the server process is started.
RSI