//'syntax = "proto2";' 
package protocol;

import "stats_messages.proto";
import "header.proto";

message progran_message {
       optional progran_direction msg_dir = 100;
	oneof msg {
              prp_hello hello_msg = 1;
              prp_echo_request echo_request_msg = 2;
	      prp_echo_reply echo_reply_msg = 3;
	      prp_stats_request stats_request_msg = 4;
	      prp_stats_reply stats_reply_msg = 5;
	      prp_ul_sr_info ul_sr_info_msg = 6;
	}
}

enum progran_direction {
     //option allow_alias = true;
     NOT_SET = 0;
     INITIATING_MESSAGE = 1;
     SUCCESSFUL_OUTCOME=2;
     UNSUCCESSFUL_OUTCOME=3;	
}
	
enum progran_err {
        option allow_alias = true;
	// message errors
	NO_ERR = 0;	
	MSG_DEQUEUING = -1;
	MSG_ENQUEUING = -2;
	MSG_DECODING = -3;
	MSG_ENCODING = -4;
	MSG_BUILD = -5;
	MSG_NOT_SUPPORTED = -6; 
	MSG_NOT_HANDLED = -7;
	MSG_NOT_VALIDATED = -8;
	MSG_OUT_DATED = -9;

	
	// other erros
	UNEXPECTED = -100;	
}	

//
// Maintenance and discovery messages
//

message prp_hello {
	optional prp_header header = 1;
}

message prp_echo_request {
	optional prp_header header = 1;
	extensions 100 to 199;
}


message prp_echo_reply {
	optional prp_header header = 1;
	extensions 100 to 199;
}


//
// Statistics request and reply message
//

message prp_stats_request {
	optional prp_header header = 1;
	optional prp_stats_type type = 2;
	oneof body {
	      prp_complete_stats_request complete_stats_request = 3;
	      prp_cell_stats_request cell_stats_request = 4;
	      prp_ue_stats_request ue_stats_request = 5;
	}
}

message prp_stats_reply {
	optional prp_header header = 1;
	repeated prp_ue_stats_report ue_report = 2;
	repeated prp_cell_stats_report cell_report = 3;
}

//
// Asynchronous messages
//

message prp_ul_sr_info {
	optional prp_header header = 1;
	optional uint32 sfn_sf = 2;
	repeated uint32 rnti = 3;
}

// Extensions of the echo request and reply
// messages for carrying a latency value in ms
message prp_echo_request_latency {
	extend prp_echo_request {
	       optional uint32 latency = 100;
	}
}

message prp_echo_reply_latency {
	extend prp_echo_reply {
	       optional uint32 latency = 100;
	}
}


