|
@@ -23,17 +23,35 @@ class TableColumnHeaderType(Enum):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-class SignalInitTableCheck:
|
|
|
|
|
|
+class SignalInitValueTableCheck:
|
|
|
|
|
|
Column_Need_Check = [TableColumnHeaderType.Signal.value,
|
|
Column_Need_Check = [TableColumnHeaderType.Signal.value,
|
|
TableColumnHeaderType.Type.value,
|
|
TableColumnHeaderType.Type.value,
|
|
TableColumnHeaderType.Bit.value,
|
|
TableColumnHeaderType.Bit.value,
|
|
TableColumnHeaderType.RawValue.value]
|
|
TableColumnHeaderType.RawValue.value]
|
|
|
|
|
|
- def __init__(self):
|
|
|
|
|
|
+ Type_Mapping = {
|
|
|
|
+ 'Boolean': bool,
|
|
|
|
+ 'UInt': ,
|
|
|
|
+ 'SInt': ,
|
|
|
|
+ 'Composite':,
|
|
|
|
+ 'Bytes':
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ def __init__(self, project_path: str):
|
|
|
|
+ pass
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ def check_row(self, row: list):
|
|
|
|
+ pass
|
|
|
|
+
|
|
|
|
+ def get_signal_init_value_table(self) -> list:
|
|
|
|
+ pass
|
|
|
|
+
|
|
|
|
+ def get_rx_tx_csv_file_name(self) -> tuple:
|
|
pass
|
|
pass
|
|
|
|
|
|
- def get_csv_data(self, file_name: str):
|
|
|
|
|
|
+ def get_csv_data(self, file_name: str) -> list:
|
|
with open(file_name, 'r') as csvfile:
|
|
with open(file_name, 'r') as csvfile:
|
|
spamreader = csv.reader(csvfile, delimiter=',')
|
|
spamreader = csv.reader(csvfile, delimiter=',')
|
|
is_header_readed = False
|
|
is_header_readed = False
|
|
@@ -43,7 +61,7 @@ class SignalInitTableCheck:
|
|
is_header_readed = True
|
|
is_header_readed = True
|
|
continue
|
|
continue
|
|
|
|
|
|
- table_data.append([row[column] for column in SignalInitTableCheck.Column_Need_Check])
|
|
|
|
|
|
+ table_data.append([row[column] for column in SignalInitValueTableCheck.Column_Need_Check])
|
|
|
|
|
|
return table_data
|
|
return table_data
|
|
|
|
|
|
@@ -51,5 +69,5 @@ class SignalInitTableCheck:
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
matrix_path = r'D:\01_Work\02_WP\EP39_EREV\branch\src\MatrixAssistant_V2.0\EP39_EREV_SIMU+_GW\20220729-qy1-EP39EREV_SIMU+_GW_Rx_初值表.csv'
|
|
matrix_path = r'D:\01_Work\02_WP\EP39_EREV\branch\src\MatrixAssistant_V2.0\EP39_EREV_SIMU+_GW\20220729-qy1-EP39EREV_SIMU+_GW_Rx_初值表.csv'
|
|
|
|
|
|
- sc = SignalInitTableCheck()
|
|
|
|
|
|
+ sc = SignalInitValueTableCheck()
|
|
sc.get_csv_data(matrix_path)
|
|
sc.get_csv_data(matrix_path)
|