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;
optional RetrieveRecords retrieve_records = 4;
message Reset {}
message Start {}
message Stop {}
message RetrieveRecords {
// New data records will be in the response, if any are available.
repeated Record records = 1;
// A data record from the recorder.
message Record {
// The number of these will depend on the number of addresses to record in the recorder configuration.
repeated Data data = 1;
// Type will depend on what is set in config for each address.
message Data {
// Keep the names short to keep packet sizes smaller.
oneof data {
double d = 1;
int32 i32 = 2;
}
}
}
}
}

Info

Status

message RecorderStatus {
// Is the Recorder recording?
bool is_recording = 1;
// The number of records available for retreival.
int32 records_available = 2;
}