APIs, concepts, guides, and more
Rapidcoderemote-api-mathblock

🔹 RPCs

rpc MathBlock (MathBlockRequest) returns (MathBlockResponse) {};
rpc MathBlockBatch(MathBlockBatchRequest) returns (MathBlockBatchResponse) {};

🔹 Request

message MathBlockRequest {
// Common request header.
RSI.RapidServer.RequestHeader header = 1;
// MathBlock index.
int32 index = 2;
optional MathBlockConfig config = 3;
optional MathBlockAction action = 4;
}

🔹 Response

message MathBlockResponse {
// Common response header. Always check the response header for errors.
RSI.RapidServer.ResponseHeader header = 1;
// MathBlock index.
int32 index = 2;
optional MathBlockConfig config = 3;
optional MathBlockAction action = 4;
optional MathBlockInfo info = 5;
optional MathBlockStatus status = 6;
}

🔹 Batch Request and Response

message MathBlockBatchRequest {
// Common request header.
RSI.RapidServer.RequestHeader header = 1;
repeated MathBlockRequest requests = 2;
}
message MathBlockBatchResponse {
// Common response header. Always check the response header for errors.
RSI.RapidServer.ResponseHeader header = 1;
repeated MathBlockResponse responses = 2;
}

🔹 Config

message MathBlockConfig {
// Host memory address for Input0 (left-hand operand).
optional uint64 input_address_0 = 1;
// Data type for Input0.
optional RSIDataType input_data_type_0 = 2;
// Host memory address for Input1 (right-hand operand).
optional uint64 input_address_1 = 3;
// Data type for Input1.
optional RSIDataType input_data_type_1 = 4;
// Data type for Output. (optional output)
optional RSIDataType output_data_type = 5;
// Host memory address for Output. Set to 0 to disable.
optional uint64 output_address = 6;
// Data type for processing / process value.
optional RSIDataType process_data_type = 7;
// Math operation to perform. Use NONE to disable.
optional RSIMathBlockOperation operation = 8;
}

🔹 Action

message MathBlockAction {
// Get the current process value of the MathBlock.
optional ProcessValueGet process_value_get = 1;
message ProcessValueGet {
// The process value result. (response only)
optional FirmwareValue value = 1;
}
}

🔹 Info

message MathBlockInfo {
// Process value host address (use with Recorder or UserLimit).
optional uint64 process_value_host_address = 1;
// Process value firmware address.
optional uint64 process_value_firmware_address = 2;
// Process value data type (matches Config.process_data_type but available even with skip_config).
optional RSIDataType process_value_data_type = 3;
}

🔹 Status

message MathBlockStatus {
// The MathBlock's index.
int32 index = 1;
// Current process value of the MathBlock (changes every sample).
optional FirmwareValue process_value = 2;
}