From cf9ea20a628eae7acd8f19ffbb68cadffc9e5a2a Mon Sep 17 00:00:00 2001 From: aespin Date: Tue, 20 Aug 2024 10:09:47 +0200 Subject: [PATCH] wip --- .gitignore | 1 + README.md | 0 bd.dat | Bin 0 -> 432 bytes bdreq.dat | Bin 0 -> 44 bytes cmd/main.go | 9 + ed.dat | Bin 0 -> 888 bytes edreq.dat | Bin 0 -> 48 bytes go.mod | 22 + go.sum | 67 + internal/app/app.go | 96 + internal/helpers/helper.go | 26 + internal/helpers/helper_test.go | 40 + internal/logging/logging.go | 87 + internal/rspdb/rspdb.go | 703 +++ internal/server/server.go | 33 + internal/service/service.go | 86 + pkg/api/api.pb.go | 7340 +++++++++++++++++++++++++++++++ pkg/api/api.proto | 654 +++ pkg/api/api_grpc.pb.go | 220 + pkg/api/generate.go | 3 + pkg/api/service.go | 15 + uf.dat | Bin 0 -> 500 bytes ufreq.dat | Bin 0 -> 48 bytes ur.dat | Bin 0 -> 500 bytes urreq.dat | Bin 0 -> 48 bytes 25 files changed, 9402 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 bd.dat create mode 100644 bdreq.dat create mode 100644 cmd/main.go create mode 100644 ed.dat create mode 100644 edreq.dat create mode 100644 go.mod create mode 100644 go.sum create mode 100644 internal/app/app.go create mode 100644 internal/helpers/helper.go create mode 100644 internal/helpers/helper_test.go create mode 100644 internal/logging/logging.go create mode 100644 internal/rspdb/rspdb.go create mode 100644 internal/server/server.go create mode 100644 internal/service/service.go create mode 100644 pkg/api/api.pb.go create mode 100644 pkg/api/api.proto create mode 100644 pkg/api/api_grpc.pb.go create mode 100644 pkg/api/generate.go create mode 100644 pkg/api/service.go create mode 100644 uf.dat create mode 100644 ufreq.dat create mode 100644 ur.dat create mode 100644 urreq.dat diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5657f6e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vendor \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/bd.dat b/bd.dat new file mode 100644 index 0000000000000000000000000000000000000000..523cbe61fe58887c04eb5c16619fe96a217e447e GIT binary patch literal 432 zcmZQzfPfW@8p>;Ojd*cVRsnDltqZZ)PQJ&C^ps?XNCilT^JgkxnPrpiGkb< m!!R-Iv>4F+(ol?D1wwR{)8U=^ZijcS2V#8!?nLM!h6MnD;UxM1 literal 0 HcmV?d00001 diff --git a/bdreq.dat b/bdreq.dat new file mode 100644 index 0000000000000000000000000000000000000000..f1a62eabf967829002dc28be52c7586002a31a82 GIT binary patch literal 44 kcmdO4kWpm-0wx9)AQoZZX5a&2MJ7XIV*_&&kPHF<05LEE0{{R3 literal 0 HcmV?d00001 diff --git a/cmd/main.go b/cmd/main.go new file mode 100644 index 0000000..1d75ae3 --- /dev/null +++ b/cmd/main.go @@ -0,0 +1,9 @@ +package main + +import "git.espin.casa/albert/cml04-gdm-int/internal/app" + +func main() { + if err := app.Run(); err != nil { + panic(err) + } +} diff --git a/ed.dat b/ed.dat new file mode 100644 index 0000000000000000000000000000000000000000..890724293b300ee9cfde963b086846aa65cbfc4a GIT binary patch literal 888 zcmZQzfPeyKEoBf(gh7IV2}trV@H22RurnAK7#JCvSwK}mC}tEMAf~9ELc*G$p*I`} xDgi4HBQE^lhG`LLKU@O?)^q?(D api.BdRollData + 9, // 1: api.UrRollDataRes.roll_data:type_name -> api.UrRollData + 10, // 2: api.EdRollDataRes.roll_data:type_name -> api.EdRollData + 11, // 3: api.UfRollDataRes.roll_data:type_name -> api.UfRollData + 0, // 4: api.RollDataService.BdRollData:input_type -> api.BdRollDataReq + 2, // 5: api.RollDataService.UrRollData:input_type -> api.UrRollDataReq + 4, // 6: api.RollDataService.EdRollData:input_type -> api.EdRollDataReq + 6, // 7: api.RollDataService.UfRollData:input_type -> api.UfRollDataReq + 1, // 8: api.RollDataService.BdRollData:output_type -> api.BdRollDataRes + 3, // 9: api.RollDataService.UrRollData:output_type -> api.UrRollDataRes + 5, // 10: api.RollDataService.EdRollData:output_type -> api.EdRollDataRes + 7, // 11: api.RollDataService.UfRollData:output_type -> api.UfRollDataRes + 8, // [8:12] is the sub-list for method output_type + 4, // [4:8] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_api_proto_init() } +func file_api_proto_init() { + if File_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BdRollDataReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BdRollDataRes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UrRollDataReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UrRollDataRes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EdRollDataReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EdRollDataRes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UfRollDataReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UfRollDataRes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BdRollData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UrRollData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EdRollData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UfRollData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_api_proto_goTypes, + DependencyIndexes: file_api_proto_depIdxs, + MessageInfos: file_api_proto_msgTypes, + }.Build() + File_api_proto = out.File + file_api_proto_rawDesc = nil + file_api_proto_goTypes = nil + file_api_proto_depIdxs = nil +} diff --git a/pkg/api/api.proto b/pkg/api/api.proto new file mode 100644 index 0000000..f539493 --- /dev/null +++ b/pkg/api/api.proto @@ -0,0 +1,654 @@ +syntax = "proto3"; + +package api; + +option go_package = "git.espin.casa/albert/cml04-gdm-int6464/pkg/api;api"; + +service RollDataService { + rpc BdRollData(BdRollDataReq) returns (BdRollDataRes); + rpc UrRollData(UrRollDataReq) returns (UrRollDataRes); + rpc EdRollData(EdRollDataReq) returns (EdRollDataRes); + rpc UfRollData(UfRollDataReq) returns (UfRollDataRes); +} + + +message BdRollDataReq { + string sender = 1; + string roll_id = 2; + string time_stamp = 100; +} + +message BdRollDataRes { + string msg = 1; + BdRollData roll_data = 2; + string time_stamp = 100; +} + +message UrRollDataReq { + string sender = 1; + string roll_id = 2; + string time_stamp = 100; +} + +message UrRollDataRes { + string msg = 1; + UrRollData roll_data = 2; + string time_stamp = 100; +} + +message EdRollDataReq { + string sender = 1; + string roll_id = 2; + string time_stamp = 100; +} + +message EdRollDataRes { + string msg = 1; + EdRollData roll_data = 2; + string time_stamp = 100; +} + +message UfRollDataReq { + string sender = 1; + string roll_id = 2; + string time_stamp = 100; +} + +message UfRollDataRes { + string msg = 1; + UfRollData roll_data = 2; + string time_stamp = 100; +} + +message BdRollData { + string bd_roll_set_date = 1; + string bd_roll_set_id = 2; + string bd_top_roll_number = 3; + string bd_bot_roll_number = 4; + string bd_roll_material = 5; + int64 bd_roll_install_pos = 6; + int64 bd_roll_set_type = 7; + double bd_roll_diam_nom_act_top = 8; + double bd_roll_diam_nom_act_bot = 9; + double bd_roll_nominal_gap = 10; + int64 bd_roll_grooves = 11; + double bd_roll_groove_width0 = 12; + double bd_roll_groove_width1 = 13; + double bd_roll_groove_width2 = 14; + double bd_roll_groove_width3 = 15; + double bd_roll_groove_width4 = 16; + double bd_roll_groove_width5 = 17; + double bd_roll_groove_width6 = 18; + double bd_roll_groove_width7 = 19; + double bd_roll_groove_width8 = 20; + double bd_roll_groove_width9 = 21; + double bd_roll_groove_stiffness_top0 = 22; + double bd_roll_groove_stiffness_top1 = 23; + double bd_roll_groove_stiffness_top2 = 24; + double bd_roll_groove_stiffness_top3 = 25; + double bd_roll_groove_stiffness_top4 = 26; + double bd_roll_groove_stiffness_top5 = 27; + double bd_roll_groove_stiffness_top6 = 28; + double bd_roll_groove_stiffness_top7 = 29; + double bd_roll_groove_stiffness_top8 = 30; + double bd_roll_groove_stiffness_top9 = 31; + double bd_roll_groove_stiffness_bot0 = 32; + double bd_roll_groove_stiffness_bot1 = 33; + double bd_roll_groove_stiffness_bot2 = 34; + double bd_roll_groove_stiffness_bot3 = 35; + double bd_roll_groove_stiffness_bot4 = 36; + double bd_roll_groove_stiffness_bot5 = 37; + double bd_roll_groove_stiffness_bot6 = 38; + double bd_roll_groove_stiffness_bot7 = 39; + double bd_roll_groove_stiffness_bot8 = 40; + double bd_roll_groove_stiffness_bot9 = 41; + double bd_roll_groove_pos0 = 42; + double bd_roll_groove_pos1 = 43; + double bd_roll_groove_pos2 = 44; + double bd_roll_groove_pos3 = 45; + double bd_roll_groove_pos4 = 46; + double bd_roll_groove_pos5 = 47; + double bd_roll_groove_pos6 = 48; + double bd_roll_groove_pos7 = 49; + double bd_roll_groove_pos8 = 50; + double bd_roll_groove_pos9 = 51; + int64 bd_roll_groove_sharp0 = 52; + int64 bd_roll_groove_sharp1 = 53; + int64 bd_roll_groove_sharp2 = 54; + int64 bd_roll_groove_sharp3 = 55; + int64 bd_roll_groove_sharp4 = 56; + int64 bd_roll_groove_sharp5 = 57; + int64 bd_roll_groove_sharp6 = 58; + int64 bd_roll_groove_sharp7 = 59; + int64 bd_roll_groove_sharp8 = 60; + int64 bd_roll_groove_sharp9 = 61; + double bd_roll_groove_depth0 = 62; + double bd_roll_groove_depth1 = 63; + double bd_roll_groove_depth2 = 64; + double bd_roll_groove_depth3 = 65; + double bd_roll_groove_depth4 = 66; + double bd_roll_groove_depth5 = 67; + double bd_roll_groove_depth6 = 68; + double bd_roll_groove_depth7 = 69; + double bd_roll_groove_depth8 = 70; + double bd_roll_groove_depth9 = 71; + int64 bd_roll_assembly_status = 72; + int64 bd_no_of_fin_sec = 73; + string bd_init_sec0 = 74; + string bd_init_sec1 = 75; + string bd_init_sec2 = 76; + string bd_init_sec3 = 77; + string bd_init_sec4 = 78; + string bd_fin_sec0 = 79; + string bd_fin_sec1 = 80; + string bd_fin_sec2 = 81; + string bd_fin_sec3 = 82; + string bd_fin_sec4 = 83; + double bd_roll_actual_shimps_top = 84; + double bd_roll_actual_shimps_bot = 85; + double bd_tonnage_accum0 = 86; + double bd_tonnage_accum1 = 87; + double bd_tonnage_accum2 = 88; + double bd_tonnage_accum3 = 89; + double bd_tonnage_accum4 = 90; + double bd_tonnage_accum5 = 91; + double bd_tonnage_accum6 = 92; + double bd_tonnage_accum7 = 93; + double bd_tonnage_accum8 = 94; + double bd_tonnage_accum9 = 95; + string bd_roll_id = 96; + bool bd_del_flag = 97; + string bd_roll_set_id_old = 98; + string bd_fin_sec5 = 99; + string bd_fin_sec6 = 100; + string bd_fin_sec7 = 101; + string bd_fin_sec8 = 102; + string bd_fin_sec9 = 103; + string bd_fin_sec10 = 104; + string bd_fin_sec11 = 105; + string bd_fin_sec12 = 106; + string bd_fin_sec13 = 107; + string bd_fin_sec14 = 108; + string bd_fin_sec15 = 109; + string bd_fin_sec16 = 110; + string bd_fin_sec17 = 111; + string bd_fin_sec18 = 112; + string bd_fin_sec19 = 113; + bool old_flag = 114; + double altura_barron_salida = 115; + double altura_barron_entrada = 116; + string familia = 117; + bool correccion = 118; + bool estado_registro = 119; + string fecha_registro = 120; + string fecha_envio = 121; +} + +message UrRollData { + string ur_roll_set_date = 1; + string ur_roll_set_id = 2; + string ur_roll_set_id_hrolls = 3; + string ur_hto_roll_number = 4; + string ur_hbo_roll_number = 5; + int64 ur_roll_install_pos = 6; + int64 ur_roll_set_type = 7; + double ur_tonnage_accum0 = 8; + double ur_tonnage_accum1 = 9; + double ur_tonnage_accum2 = 10; + double ur_tonnage_accum3 = 11; + double ur_tonnage_accum4 = 12; + double ur_tonnage_accum5 = 13; + double ur_tonnage_accum6 = 14; + double ur_tonnage_accum7 = 15; + double ur_tonnage_accum8 = 16; + double ur_tonnage_accum9 = 17; + double ur_change_sleeve_length = 18; + double ur_change_sleeve_depth = 19; + int64 ur_roll_assembly_status = 20; + int64 ur_no_of_fin_sec = 21; + string ur_init_sec0 = 22; + string ur_init_sec1 = 23; + string ur_init_sec2 = 24; + string ur_init_sec3 = 25; + string ur_init_sec4 = 26; + string ur_fin_sec0 = 27; + string ur_fin_sec1 = 28; + string ur_fin_sec2 = 29; + string ur_fin_sec3 = 30; + string ur_fin_sec4 = 31; + string ur_roll_material_h = 32; + double ur_roll_diam_act_hbo = 33; + double ur_roll_diam_act_htp = 34; + double ur_h_nomgap = 35; + double ur_actual_shimps_hbo = 36; + double ur_actual_shimps_htp = 37; + double ur_roll_barrel_width_hbo = 38; + double ur_roll_barrel_width_htp = 39; + double ur_roll_cham_width_hbo = 40; + double ur_roll_cham_width_htp = 41; + double ur_roll_angle_hbo = 42; + double ur_roll_angle_htb = 43; + string ur_roll_set_id_vrolls = 44; + string ur_vds_roll_number = 45; + string ur_vos_roll_number = 46; + string ur_roll_material_v = 47; + double ur_roll_diam_act_vds = 48; + double ur_roll_diam_act_vos = 49; + double ur_roll_angle_vds = 50; + double ur_roll_angle_vos = 51; + double ur_passline_offset = 52; + double ur_actual_shimps_vds_1 = 53; + double ur_actual_shimps_vds_2 = 54; + double ur_actual_shimps_vos_1 = 55; + double ur_actual_shimps_vos_2 = 56; + double ur_pin_v_chock = 57; + int64 ur_roll_grooves = 58; + double ur_roll_groove_width0 = 59; + double ur_roll_groove_width1 = 60; + double ur_roll_groove_width2 = 61; + double ur_roll_groove_width3 = 62; + double ur_roll_groove_width4 = 63; + double ur_roll_groove_width5 = 64; + double ur_roll_groove_width6 = 65; + double ur_roll_groove_width7 = 66; + double ur_roll_groove_width8 = 67; + double ur_roll_groove_width9 = 68; + double ur_roll_groove_stiffness_top0 = 69; + double ur_roll_groove_stiffness_top1 = 70; + double ur_roll_groove_stiffness_top2 = 71; + double ur_roll_groove_stiffness_top3 = 72; + double ur_roll_groove_stiffness_top4 = 73; + double ur_roll_groove_stiffness_top5 = 74; + double ur_roll_groove_stiffness_top6 = 75; + double ur_roll_groove_stiffness_top7 = 76; + double ur_roll_groove_stiffness_top8 = 77; + double ur_roll_groove_stiffness_top9 = 78; + double ur_roll_groove_stiffness_bot0 = 79; + double ur_roll_groove_stiffness_bot1 = 80; + double ur_roll_groove_stiffness_bot2 = 81; + double ur_roll_groove_stiffness_bot3 = 82; + double ur_roll_groove_stiffness_bot4 = 83; + double ur_roll_groove_stiffness_bot5 = 84; + double ur_roll_groove_stiffness_bot6 = 85; + double ur_roll_groove_stiffness_bot7 = 86; + double ur_roll_groove_stiffness_bot8 = 87; + double ur_roll_groove_stiffness_bot9 = 88; + double ur_roll_groove_pos0 = 89; + double ur_roll_groove_pos1 = 90; + double ur_roll_groove_pos2 = 91; + double ur_roll_groove_pos3 = 92; + double ur_roll_groove_pos4 = 93; + double ur_roll_groove_pos5 = 94; + double ur_roll_groove_pos6 = 95; + double ur_roll_groove_pos7 = 96; + double ur_roll_groove_pos8 = 97; + double ur_roll_groove_pos9 = 98; + int64 ur_roll_groove_sharp0 = 99; + int64 ur_roll_groove_sharp1 = 100; + int64 ur_roll_groove_sharp2 = 101; + int64 ur_roll_groove_sharp3 = 102; + int64 ur_roll_groove_sharp4 = 103; + int64 ur_roll_groove_sharp5 = 104; + int64 ur_roll_groove_sharp6 = 105; + int64 ur_roll_groove_sharp7 = 106; + int64 ur_roll_groove_sharp8 = 107; + int64 ur_roll_groove_sharp9 = 108; + double ur_roll_thrust_plate = 109; + string ur_roll_id = 110; + bool ur_del_flag = 111; + string ur_roll_set_id_old = 112; + string top_shaft_ur = 113; + string bot_shaft_ur = 114; + string ur_fin_sec5 = 115; + string ur_fin_sec6 = 116; + string ur_fin_sec7 = 117; + string ur_fin_sec8 = 118; + string ur_fin_sec9 = 119; + string ur_fin_sec10 = 120; + string ur_fin_sec11 = 121; + string ur_fin_sec12 = 122; + string ur_fin_sec13 = 123; + string ur_fin_sec14 = 124; + string ur_fin_sec15 = 125; + string ur_fin_sec16 = 126; + string ur_fin_sec17 = 127; + string ur_fin_sec18 = 128; + string ur_fin_sec19 = 129; + bool old_flag = 130; + int64 ampuesa_corta = 131; + bool estado_registro = 132; + string fecha_registro = 133; + string fecha_envio = 134; +} + +message EdRollData { + string ed_roll_set_date = 1; + string ed_roll_set_id = 2; + string ed_top_roll_number = 3; + string ed_bot_roll_number = 4; + string ed_roll_material = 5; + int64 ed_roll_install_pos = 6; + int64 ed_roll_set_type = 7; + double ed_roll_diam_nom_htp = 8; + double ed_roll_diam_nom_hbo = 9; + double ed_roll_nominal_gap = 10; + int64 ed_roll_assembly_status = 11; + int64 ed_no_of_fin_sec = 12; + string ed_init_sec0 = 13; + string ed_init_sec1 = 14; + string ed_init_sec2 = 15; + string ed_init_sec3 = 16; + string ed_init_sec4 = 17; + string ed_fin_sec0 = 18; + string ed_fin_sec1 = 19; + string ed_fin_sec2 = 20; + string ed_fin_sec3 = 21; + string ed_fin_sec4 = 22; + int64 ed_roll_no_of_grooves = 23; + double ed_roll_groove_stiff_top0 = 24; + double ed_roll_groove_stiff_top1 = 25; + double ed_roll_groove_stiff_top2 = 26; + double ed_roll_groove_stiff_top3 = 27; + double ed_roll_groove_stiff_top4 = 28; + double ed_roll_groove_stiff_top5 = 29; + double ed_roll_groove_stiff_top6 = 30; + double ed_roll_groove_stiff_top7 = 31; + double ed_roll_groove_stiff_top8 = 32; + double ed_roll_groove_stiff_top9 = 33; + double ed_roll_groove_stiff_bot0 = 34; + double ed_roll_groove_stiff_bot1 = 35; + double ed_roll_groove_stiff_bot2 = 36; + double ed_roll_groove_stiff_bot3 = 37; + double ed_roll_groove_stiff_bot4 = 38; + double ed_roll_groove_stiff_bot5 = 39; + double ed_roll_groove_stiff_bot6 = 40; + double ed_roll_groove_stiff_bot7 = 41; + double ed_roll_groove_stiff_bot8 = 42; + double ed_roll_groove_stiff_bot9 = 43; + double ed_roll_groove_pos0 = 44; + double ed_roll_groove_pos1 = 45; + double ed_roll_groove_pos2 = 46; + double ed_roll_groove_pos3 = 47; + double ed_roll_groove_pos4 = 48; + double ed_roll_groove_pos5 = 49; + double ed_roll_groove_pos6 = 50; + double ed_roll_groove_pos7 = 51; + double ed_roll_groove_pos8 = 52; + double ed_roll_groove_pos9 = 53; + double ed_actual_shimps_hbo = 54; + double ed_actual_shimps_htp = 55; + double ed_change_sleeve_length = 56; + double ed_change_sleeve_depth = 57; + double ed_tonnage_accum0 = 58; + double ed_tonnage_accum1 = 59; + double ed_tonnage_accum2 = 60; + double ed_tonnage_accum3 = 61; + double ed_tonnage_accum4 = 62; + double ed_tonnage_accum5 = 63; + double ed_tonnage_accum6 = 64; + double ed_tonnage_accum7 = 65; + double ed_tonnage_accum8 = 66; + double ed_tonnage_accum9 = 67; + double ed_roll_flange_diam_top0 = 68; + double ed_roll_flange_diam_top1 = 69; + double ed_roll_flange_diam_top2 = 70; + double ed_roll_flange_diam_top3 = 71; + double ed_roll_flange_diam_top4 = 72; + double ed_roll_flange_diam_top5 = 73; + double ed_roll_flange_diam_top6 = 74; + double ed_roll_flange_diam_top7 = 75; + double ed_roll_flange_diam_top8 = 76; + double ed_roll_flange_diam_top9 = 77; + double ed_roll_flange_diam_bot0 = 78; + double ed_roll_flange_diam_bot1 = 79; + double ed_roll_flange_diam_bot2 = 80; + double ed_roll_flange_diam_bot3 = 81; + double ed_roll_flange_diam_bot4 = 82; + double ed_roll_flange_diam_bot5 = 83; + double ed_roll_flange_diam_bot6 = 84; + double ed_roll_flange_diam_bot7 = 85; + double ed_roll_flange_diam_bot8 = 86; + double ed_roll_flange_diam_bot9 = 87; + double ed_roll_web_diam_top0 = 88; + double ed_roll_web_diam_top1 = 89; + double ed_roll_web_diam_top2 = 90; + double ed_roll_web_diam_top3 = 91; + double ed_roll_web_diam_top4 = 92; + double ed_roll_web_diam_top5 = 93; + double ed_roll_web_diam_top6 = 94; + double ed_roll_web_diam_top7 = 95; + double ed_roll_web_diam_top8 = 96; + double ed_roll_web_diam_top9 = 97; + double ed_roll_web_diam_bot0 = 98; + double ed_roll_web_diam_bot1 = 99; + double ed_roll_web_diam_bot2 = 100; + double ed_roll_web_diam_bot3 = 101; + double ed_roll_web_diam_bot4 = 102; + double ed_roll_web_diam_bot5 = 103; + double ed_roll_web_diam_bot6 = 104; + double ed_roll_web_diam_bot7 = 105; + double ed_roll_web_diam_bot8 = 106; + double ed_roll_web_diam_bot9 = 107; + double ed_roll_cham_width_top0 = 108; + double ed_roll_cham_width_top1 = 109; + double ed_roll_cham_width_top2 = 110; + double ed_roll_cham_width_top3 = 111; + double ed_roll_cham_width_top4 = 112; + double ed_roll_cham_width_top5 = 113; + double ed_roll_cham_width_top6 = 114; + double ed_roll_cham_width_top7 = 115; + double ed_roll_cham_width_top8 = 116; + double ed_roll_cham_width_top9 = 117; + double ed_roll_cham_width_bot0 = 118; + double ed_roll_cham_width_bot1 = 119; + double ed_roll_cham_width_bot2 = 120; + double ed_roll_cham_width_bot3 = 121; + double ed_roll_cham_width_bot4 = 122; + double ed_roll_cham_width_bot5 = 123; + double ed_roll_cham_width_bot6 = 124; + double ed_roll_cham_width_bot7 = 125; + double ed_roll_cham_width_bot8 = 126; + double ed_roll_cham_width_bot9 = 127; + double ed_roll_angle_flange_face0 = 128; + double ed_roll_angle_flange_face1 = 129; + double ed_roll_angle_flange_face2 = 130; + double ed_roll_angle_flange_face3 = 131; + double ed_roll_angle_flange_face4 = 132; + double ed_roll_angle_flange_face5 = 133; + double ed_roll_angle_flange_face6 = 134; + double ed_roll_angle_flange_face7 = 135; + double ed_roll_angle_flange_face8 = 136; + double ed_roll_angle_flange_face9 = 137; + double ed_roll_root_radius0 = 138; + double ed_roll_root_radius1 = 139; + double ed_roll_root_radius2 = 140; + double ed_roll_root_radius3 = 141; + double ed_roll_root_radius4 = 142; + double ed_roll_root_radius5 = 143; + double ed_roll_root_radius6 = 144; + double ed_roll_root_radius7 = 145; + double ed_roll_root_radius8 = 146; + double ed_roll_root_radius9 = 147; + double ed_passline_offset = 148; + int64 ed_d_roll_groove_sharp0 = 149; + int64 ed_d_roll_groove_sharp1 = 150; + int64 ed_d_roll_groove_sharp2 = 151; + int64 ed_d_roll_groove_sharp3 = 152; + int64 ed_d_roll_groove_sharp4 = 153; + int64 ed_d_roll_groove_sharp5 = 154; + int64 ed_d_roll_groove_sharp6 = 155; + int64 ed_d_roll_groove_sharp7 = 156; + int64 ed_d_roll_groove_sharp8 = 157; + int64 ed_d_roll_groove_sharp9 = 158; + double ed_d_roll_groove_width0 = 159; + double ed_d_roll_groove_width1 = 160; + double ed_d_roll_groove_width2 = 161; + double ed_d_roll_groove_width3 = 162; + double ed_d_roll_groove_width4 = 163; + double ed_d_roll_groove_width5 = 164; + double ed_d_roll_groove_width6 = 165; + double ed_d_roll_groove_width7 = 166; + double ed_d_roll_groove_width8 = 167; + double ed_d_roll_groove_width9 = 168; + string ed_roll_id = 169; + bool ed_del_flag = 170; + string ed_roll_set_id_old = 171; + string ed_fin_sec5 = 172; + string ed_fin_sec6 = 173; + string ed_fin_sec7 = 174; + string ed_fin_sec8 = 175; + string ed_fin_sec9 = 176; + string ed_fin_sec10 = 177; + string ed_fin_sec11 = 178; + string ed_fin_sec12 = 179; + string ed_fin_sec13 = 180; + string ed_fin_sec14 = 181; + string ed_fin_sec15 = 182; + string ed_fin_sec16 = 183; + string ed_fin_sec17 = 184; + string ed_fin_sec18 = 185; + string ed_fin_sec19 = 186; + bool old_flag = 187; + bool estado_registro = 188; + string fecha_registro = 189; + string fecha_envio = 190; +} + + + +message UfRollData { + string uf_roll_set_date = 1; + string uf_roll_set_id = 2; + string uf_roll_set_id_hrolls = 3; + string uf_hto_roll_number = 4; + string uf_hbo_roll_number = 5; + int64 uf_roll_install_pos = 6; + int64 uf_roll_set_type = 7; + double uf_tonnage_accum0 = 8; + double uf_tonnage_accum1 = 9; + double uf_tonnage_accum2 = 10; + double uf_tonnage_accum3 = 11; + double uf_tonnage_accum4 = 12; + double uf_tonnage_accum5 = 13; + double uf_tonnage_accum6 = 14; + double uf_tonnage_accum7 = 15; + double uf_tonnage_accum8 = 16; + double uf_tonnage_accum9 = 17; + double uf_change_sleeve_length = 18; + double uf_change_sleeve_depth = 19; + int64 uf_roll_assembly_status = 20; + int64 uf_no_of_fin_sec = 21; + string uf_init_sec0 = 22; + string uf_init_sec1 = 23; + string uf_init_sec2 = 24; + string uf_init_sec3 = 25; + string uf_init_sec4 = 26; + string uf_fin_sec0 = 27; + string uf_fin_sec1 = 28; + string uf_fin_sec2 = 29; + string uf_fin_sec3 = 30; + string uf_fin_sec4 = 31; + string uf_roll_material_h = 32; + double uf_roll_diam_act_hbo = 33; + double uf_roll_diam_act_htp = 34; + double uf_h_nomgap = 35; + double uf_actual_shimps_hbo = 36; + double uf_actual_shimps_htp = 37; + double uf_roll_barrel_width_hbo = 38; + double uf_roll_barrel_width_htp = 39; + double uf_roll_cham_width_hbo = 40; + double uf_roll_cham_width_htp = 41; + double uf_roll_angle_hbo = 42; + double uf_roll_angle_htb = 43; + string uf_roll_set_id_vrolls = 44; + string uf_vds_roll_number = 45; + string uf_vos_roll_number = 46; + string uf_roll_material_v = 47; + double uf_roll_diam_act_vds = 48; + double uf_roll_diam_act_vos = 49; + double uf_roll_angle_vds = 50; + double uf_roll_angle_vos = 51; + double uf_passline_offset = 52; + double uf_actual_shimps_vds_1 = 53; + double uf_actual_shimps_vds_2 = 54; + double uf_actual_shimps_vos_1 = 55; + double uf_actual_shimps_vos_2 = 56; + double uf_pin_v_chock = 57; + int64 uf_roll_grooves = 58; + double uf_roll_groove_width0 = 59; + double uf_roll_groove_width1 = 60; + double uf_roll_groove_width2 = 61; + double uf_roll_groove_width3 = 62; + double uf_roll_groove_width4 = 63; + double uf_roll_groove_width5 = 64; + double uf_roll_groove_width6 = 65; + double uf_roll_groove_width7 = 66; + double uf_roll_groove_width8 = 67; + double uf_roll_groove_width9 = 68; + double uf_roll_groove_stiffness_top0 = 69; + double uf_roll_groove_stiffness_top1 = 70; + double uf_roll_groove_stiffness_top2 = 71; + double uf_roll_groove_stiffness_top3 = 72; + double uf_roll_groove_stiffness_top4 = 73; + double uf_roll_groove_stiffness_top5 = 74; + double uf_roll_groove_stiffness_top6 = 75; + double uf_roll_groove_stiffness_top7 = 76; + double uf_roll_groove_stiffness_top8 = 77; + double uf_roll_groove_stiffness_top9 = 78; + double uf_roll_groove_stiffness_bot0 = 79; + double uf_roll_groove_stiffness_bot1 = 80; + double uf_roll_groove_stiffness_bot2 = 81; + double uf_roll_groove_stiffness_bot3 = 82; + double uf_roll_groove_stiffness_bot4 = 83; + double uf_roll_groove_stiffness_bot5 = 84; + double uf_roll_groove_stiffness_bot6 = 85; + double uf_roll_groove_stiffness_bot7 = 86; + double uf_roll_groove_stiffness_bot8 = 87; + double uf_roll_groove_stiffness_bot9 = 88; + double uf_roll_groove_pos0 = 89; + double uf_roll_groove_pos1 = 90; + double uf_roll_groove_pos2 = 91; + double uf_roll_groove_pos3 = 92; + double uf_roll_groove_pos4 = 93; + double uf_roll_groove_pos5 = 94; + double uf_roll_groove_pos6 = 95; + double uf_roll_groove_pos7 = 96; + double uf_roll_groove_pos8 = 97; + double uf_roll_groove_pos9 = 98; + int64 uf_roll_groove_sharp0 = 99; + int64 uf_roll_groove_sharp1 = 100; + int64 uf_roll_groove_sharp2 = 101; + int64 uf_roll_groove_sharp3 = 102; + int64 uf_roll_groove_sharp4 = 103; + int64 uf_roll_groove_sharp5 = 104; + int64 uf_roll_groove_sharp6 = 105; + int64 uf_roll_groove_sharp7 = 106; + int64 uf_roll_groove_sharp8 = 107; + int64 uf_roll_groove_sharp9 = 108; + double uf_roll_thrust_plate = 109; + string uf_roll_id = 110; + bool uf_del_flag = 111; + string uf_roll_set_id_old = 112; + string top_shaft_uf = 113; + string bot_shaft_uf = 114; + string uf_fin_sec5 = 115; + string uf_fin_sec6 = 116; + string uf_fin_sec7 = 117; + string uf_fin_sec8 = 118; + string uf_fin_sec9 = 119; + string uf_fin_sec10 = 120; + string uf_fin_sec11 = 121; + string uf_fin_sec12 = 122; + string uf_fin_sec13 = 123; + string uf_fin_sec14 = 124; + string uf_fin_sec15 = 125; + string uf_fin_sec16 = 126; + string uf_fin_sec17 = 127; + string uf_fin_sec18 = 128; + string uf_fin_sec19 = 129; + bool old_flag = 130; + int64 ampuesa_corta = 131; + bool estado_registro = 132; + string fecha_registro = 133; + string fecha_envio = 134; +} diff --git a/pkg/api/api_grpc.pb.go b/pkg/api/api_grpc.pb.go new file mode 100644 index 0000000..44ba3bf --- /dev/null +++ b/pkg/api/api_grpc.pb.go @@ -0,0 +1,220 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.23.2 +// source: api.proto + +package api + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + RollDataService_BdRollData_FullMethodName = "/api.RollDataService/BdRollData" + RollDataService_UrRollData_FullMethodName = "/api.RollDataService/UrRollData" + RollDataService_EdRollData_FullMethodName = "/api.RollDataService/EdRollData" + RollDataService_UfRollData_FullMethodName = "/api.RollDataService/UfRollData" +) + +// RollDataServiceClient is the client API for RollDataService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RollDataServiceClient interface { + BdRollData(ctx context.Context, in *BdRollDataReq, opts ...grpc.CallOption) (*BdRollDataRes, error) + UrRollData(ctx context.Context, in *UrRollDataReq, opts ...grpc.CallOption) (*UrRollDataRes, error) + EdRollData(ctx context.Context, in *EdRollDataReq, opts ...grpc.CallOption) (*EdRollDataRes, error) + UfRollData(ctx context.Context, in *UfRollDataReq, opts ...grpc.CallOption) (*UfRollDataRes, error) +} + +type rollDataServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRollDataServiceClient(cc grpc.ClientConnInterface) RollDataServiceClient { + return &rollDataServiceClient{cc} +} + +func (c *rollDataServiceClient) BdRollData(ctx context.Context, in *BdRollDataReq, opts ...grpc.CallOption) (*BdRollDataRes, error) { + out := new(BdRollDataRes) + err := c.cc.Invoke(ctx, RollDataService_BdRollData_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rollDataServiceClient) UrRollData(ctx context.Context, in *UrRollDataReq, opts ...grpc.CallOption) (*UrRollDataRes, error) { + out := new(UrRollDataRes) + err := c.cc.Invoke(ctx, RollDataService_UrRollData_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rollDataServiceClient) EdRollData(ctx context.Context, in *EdRollDataReq, opts ...grpc.CallOption) (*EdRollDataRes, error) { + out := new(EdRollDataRes) + err := c.cc.Invoke(ctx, RollDataService_EdRollData_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rollDataServiceClient) UfRollData(ctx context.Context, in *UfRollDataReq, opts ...grpc.CallOption) (*UfRollDataRes, error) { + out := new(UfRollDataRes) + err := c.cc.Invoke(ctx, RollDataService_UfRollData_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RollDataServiceServer is the server API for RollDataService service. +// All implementations must embed UnimplementedRollDataServiceServer +// for forward compatibility +type RollDataServiceServer interface { + BdRollData(context.Context, *BdRollDataReq) (*BdRollDataRes, error) + UrRollData(context.Context, *UrRollDataReq) (*UrRollDataRes, error) + EdRollData(context.Context, *EdRollDataReq) (*EdRollDataRes, error) + UfRollData(context.Context, *UfRollDataReq) (*UfRollDataRes, error) + mustEmbedUnimplementedRollDataServiceServer() +} + +// UnimplementedRollDataServiceServer must be embedded to have forward compatible implementations. +type UnimplementedRollDataServiceServer struct { +} + +func (UnimplementedRollDataServiceServer) BdRollData(context.Context, *BdRollDataReq) (*BdRollDataRes, error) { + return nil, status.Errorf(codes.Unimplemented, "method BdRollData not implemented") +} +func (UnimplementedRollDataServiceServer) UrRollData(context.Context, *UrRollDataReq) (*UrRollDataRes, error) { + return nil, status.Errorf(codes.Unimplemented, "method UrRollData not implemented") +} +func (UnimplementedRollDataServiceServer) EdRollData(context.Context, *EdRollDataReq) (*EdRollDataRes, error) { + return nil, status.Errorf(codes.Unimplemented, "method EdRollData not implemented") +} +func (UnimplementedRollDataServiceServer) UfRollData(context.Context, *UfRollDataReq) (*UfRollDataRes, error) { + return nil, status.Errorf(codes.Unimplemented, "method UfRollData not implemented") +} +func (UnimplementedRollDataServiceServer) mustEmbedUnimplementedRollDataServiceServer() {} + +// UnsafeRollDataServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RollDataServiceServer will +// result in compilation errors. +type UnsafeRollDataServiceServer interface { + mustEmbedUnimplementedRollDataServiceServer() +} + +func RegisterRollDataServiceServer(s grpc.ServiceRegistrar, srv RollDataServiceServer) { + s.RegisterService(&RollDataService_ServiceDesc, srv) +} + +func _RollDataService_BdRollData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BdRollDataReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RollDataServiceServer).BdRollData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RollDataService_BdRollData_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RollDataServiceServer).BdRollData(ctx, req.(*BdRollDataReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _RollDataService_UrRollData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UrRollDataReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RollDataServiceServer).UrRollData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RollDataService_UrRollData_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RollDataServiceServer).UrRollData(ctx, req.(*UrRollDataReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _RollDataService_EdRollData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EdRollDataReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RollDataServiceServer).EdRollData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RollDataService_EdRollData_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RollDataServiceServer).EdRollData(ctx, req.(*EdRollDataReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _RollDataService_UfRollData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UfRollDataReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RollDataServiceServer).UfRollData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RollDataService_UfRollData_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RollDataServiceServer).UfRollData(ctx, req.(*UfRollDataReq)) + } + return interceptor(ctx, in, info, handler) +} + +// RollDataService_ServiceDesc is the grpc.ServiceDesc for RollDataService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RollDataService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.RollDataService", + HandlerType: (*RollDataServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "BdRollData", + Handler: _RollDataService_BdRollData_Handler, + }, + { + MethodName: "UrRollData", + Handler: _RollDataService_UrRollData_Handler, + }, + { + MethodName: "EdRollData", + Handler: _RollDataService_EdRollData_Handler, + }, + { + MethodName: "UfRollData", + Handler: _RollDataService_UfRollData_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api.proto", +} diff --git a/pkg/api/generate.go b/pkg/api/generate.go new file mode 100644 index 0000000..113f504 --- /dev/null +++ b/pkg/api/generate.go @@ -0,0 +1,3 @@ +package api + +//go:generate protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative api.proto diff --git a/pkg/api/service.go b/pkg/api/service.go new file mode 100644 index 0000000..8ea58bb --- /dev/null +++ b/pkg/api/service.go @@ -0,0 +1,15 @@ +package api + +type RollDataID string + +type RollDataReq struct { + Sender string + ID RollDataID + TimeStamp string +} + +type RollDataRes struct { + ID RollDataID + TimeStamp string + RollData any +} diff --git a/uf.dat b/uf.dat new file mode 100644 index 0000000000000000000000000000000000000000..91b57be03bad9ded603f7b5b9489d09d42fe9eb1 GIT binary patch literal 500 zcmZQzfPgoQ+R7l72!jLz6OiO#kY*5Kc*<;GU|?inX`~CHEsf23II-u0=obJ literal 0 HcmV?d00001 diff --git a/ur.dat b/ur.dat new file mode 100644 index 0000000000000000000000000000000000000000..e726ab59dd12bb4012b9ce1c2c33d40b3d73be87 GIT binary patch literal 500 zcmZQzfPgoQn#v%S2!jLz6OiO#&}QIb=w>u9Ffg(-u+#<9CMICTOb{(Zk{_HH7#09A z1O&qvNHjJvuyjJV3j+`v7hiV0ucrY1|}fM!=TN;&S1)DXl!g?ZVHk?1pq|~0$cz9 literal 0 HcmV?d00001