Snippets

HBPNeurorobotics engine_grpc.proto

Created by erdisayar
syntax = "proto3";

/* use import proto/any.proto for C#, use the other import below for python
*/
import "any.proto";

/*
import "google/protobuf/any.proto";
*/
package EngineGrpc;

/*
 * Remote Procedure Calls available to the gRPC engine
 * These are commands that the engine client can send to the engine server
 */
service EngineGrpcService
{
    rpc initialize  (InitializeRequest)   returns (InitializeReply)   {}
    rpc shutdown    (ShutdownRequest)     returns (ShutdownReply)     {}
    rpc runLoopStep (RunLoopStepRequest)  returns (RunLoopStepReply)  {}
    rpc setDataPacks(SetDataPacksRequest) returns (SetDataPacksReply) {}
    rpc getDataPacks(GetDataPacksRequest) returns (GetDataPacksReply) {}
    rpc reset       (ResetRequest)        returns (ResetReply)        {}
}

/*
 * Data of a single datapack sent by server in response to the getDataPack command
 * and received after a call of setDataPack command
 * Contains datapack metadata and data specific to the datapack type
 */
 message DataPackMessage
 {
     DataPackIdentifier  dataPackId = 1;
     google.protobuf.Any data       = 2;
 }
 
 /*
  * DataPack metadata
  */
 message DataPackIdentifier
 {
     string dataPackName = 1;
     string dataPackType = 2;
     string engineName   = 3;
 }

/*
 * Message sent by client with the init command
 * Contains initialization configuration in form of a stringified JSON
 */
message InitializeRequest
{
    string json = 1;
}

/*
 * Server's response to the init command
 */
message InitializeReply
{
    string json = 1;
}

/*
 * Message sent by client with the shutdown command
 * Contains additional shutdown parameters in form of a stringified JSON
 */
message ShutdownRequest
{
    string json = 1;
}

/*
 * Server's response to the shutdown command
 */
message ShutdownReply
{
    string json = 1;
}

/*
 * Message sent by client with the runLoopStep command
 * Contains requested time step of the simulation
 */
message RunLoopStepRequest
{
    int64 timeStep = 1;
}

/*
 * Server's response to the runLoopStep command
 * Contains current time of the simulation (after running the requested time step)
 */
message RunLoopStepReply
{
    int64 engineTime = 1;
}

/*
 * Message sent by client with the setDataPack command
 * Contains data for multiple datapacks
 */
message SetDataPacksRequest
{
    repeated DataPackMessage dataPacks = 1;
}

/*
 * Server's response to the setDataPack command
 */
message SetDataPacksReply
{
    // Empty
}

/*
 * Message sent by client with the getDataPack command
 * Contains metadata of multiple datapacks
 */
message GetDataPacksRequest
{
    repeated DataPackIdentifier datapackIds = 1;
}

/*
 * Server's response to the getDataPack command
 * Contains data of multiple datapacks
 */
message GetDataPacksReply
{
    repeated DataPackMessage dataPacks = 1;
}

/*
 * Request sent by reset command
 */
message ResetRequest
{
    string json = 1;
}

/*
 * Server's response to the reset command
 */
message ResetReply
{
    string json = 1;
}

// EOF

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.