syntax = "proto3";
package rofi.messages;

import "common.proto";
import "joint.proto";
import "module.proto";


message RoficomJoint {
    // technically is a Joint - could be important in SpaceJoint
    Orientation orientation = 1;
    int32 source_module_id = 2;
    int32 dest_module_id = 3;
    int32 source_connector = 4;
    int32 dest_connector = 5;
    // repeated double positions ???
}

message SpaceJoint {
    Joint joint = 1;
    Vector4 ref_point = 2;
    int32 dest_module_id = 3;
    int32 dest_component = 4;
}

message ModuleInfo {
    Module module = 1;
    repeated int32 in_joints_idx = 2;
    repeated int32 out_joints_idx = 3;
    repeated int32 space_joints = 4;
    Matrix44 position = 5;
}

message Rofibot {
    map<int32, ModuleInfo> modules = 2;
    map<int32, RoficomJoint> module_joints = 3;
    map<int32, SpaceJoint> space_joints = 4;
    bool prepared = 5;
}
