Skip to content

Commit

Permalink
fix: configurations mess
Browse files Browse the repository at this point in the history
  • Loading branch information
Pippo98 committed May 24, 2024
1 parent 4c9912a commit 4dab761
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 34 deletions.
55 changes: 55 additions & 0 deletions proto/app/app_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,56 @@ message Connection
string mode = 3;
}

message DoubleTrigger
{
string id = 1;
string message = 2;
string signal = 3;
int32 comparator = 4;
double value = 5;
uint32 color = 6;
}

message EnumTrigger
{
string id = 1;
string message = 2;
string signal = 3;
int32 comparator = 4;
uint64 value = 5;
uint32 color = 6;
}

message BitTrigger
{
string id = 1;
string message = 2;
string signal = 3;
int32 comparator = 4;
uint64 value = 5;
uint32 color = 6;
}

message AxisItem
{
string message = 1;
string signal = 2;
bool isEnum = 3;
uint32 color = 4;
}

message Axis
{
string name = 1;
repeated AxisItem items = 3;
}

message CustomPlot
{
string name = 1;
map<int32, Axis> axes = 2;
}

message AppConfig
{
uint64 loginTimestamp = 1;
Expand All @@ -20,4 +70,9 @@ message AppConfig
map<string, string> filesPaths = 7;
map<string, string> stringCache = 8;
map<string, bool> boolCache = 9;

repeated DoubleTrigger doubleTriggers = 10;
repeated EnumTrigger enumTriggers = 11;
repeated BitTrigger bitTriggers = 12;
repeated CustomPlot customPlots = 13;
}
36 changes: 2 additions & 34 deletions proto/app/app_data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,6 @@ syntax = "proto3";

package App;

message DoubleTrigger
{
string id = 1;
string message = 2;
string signal = 3;
int32 comparator = 4;
double value = 5;
uint32 color = 6;
}

message EnumTrigger
{
string id = 1;
string message = 2;
string signal = 3;
int32 comparator = 4;
uint64 value = 5;
uint32 color = 6;
}

message BitTrigger
{
string id = 1;
string message = 2;
string signal = 3;
int32 comparator = 4;
uint64 value = 5;
uint32 color = 6;
}

message CustomPlotItem
{
Expand All @@ -48,7 +19,7 @@ message CustomPlotAxis
repeated CustomPlotItem items = 2;
}

message CustomPlot
message NewCustomPlot
{
string title = 1;
map<int32, CustomPlotAxis> axes = 2;
Expand All @@ -57,7 +28,7 @@ message CustomPlot
message CustomSubPlots
{
uint32 rows = 1;
repeated CustomPlot plots = 2;
repeated NewCustomPlot plots = 2;
}

message CustomPlotsTab
Expand All @@ -67,8 +38,5 @@ message CustomPlotsTab

message AppData
{
repeated DoubleTrigger doubleTriggers = 1;
repeated EnumTrigger enumTriggers = 2;
repeated BitTrigger bitTriggers = 3;
map<string, CustomPlotsTab> customPlotsTabs = 4;
}

0 comments on commit 4dab761

Please sign in to comment.