diff --git a/src/TODO b/src/TODO index 36f58f9e5e360934f8252c19bdc71352ed9a9486..2df774746adbba1079f474bf2944109bdd6ba8ba 100644 --- a/src/TODO +++ b/src/TODO @@ -1,25 +1,25 @@ -* finir de rédiger le manuel +* autoriser le fait le pouvoir donner une valeur par defaut à une constant + exportée. («provides const : n = 4; ») +* LazyCompiler.do_node -* Ident.long -> pas terrible non plus comme nom. -* Ident.idref : a remettre dans SyntaxTree +* Dans les messages d'erreurs, le numero de colonne est faux à cause des tabulations -* LazyCompiler.do_node -* Dump.dump_* -* GenLic +* finir de rédiger le manuel -* Dans les messages d'erreurs, le numeros de colonnes est faux à cause des tabulations +* Ident.long -> pas terrible non plus comme nom. -* rajouter le nom du fichier dans Lxm.t +* Ident.idref : a remettre dans SyntaxTree -* autoriser le fait le pouvoir donner une valeur par defaut à une constant - exportée. («provides const : n = 4; ») +* Dump.dump_* + +* GenLic * implementer une option --old-style-syntax pour faire quelque chose des trucs du genre "[int,int]" voire meme "[int,real]" qui ne sont plus autorisé, mais à - qui on pourrait donner du sens via des tableaux et des strucures factices \ No newline at end of file + qui on pourrait donner du sens via des tableaux et des structures factices \ No newline at end of file diff --git a/src/test/pfs.lus b/src/test/pfs.lus index 3b504b1619e98a5d3c1377f2b5fba8bc18a1dbcb..d58a856aa17c8eef80d56133f75f318e03617873 100644 --- a/src/test/pfs.lus +++ b/src/test/pfs.lus @@ -37,29 +37,29 @@ -- include "pfs_asn1_type.lus" const __DUMMY_VAL__ : bool; -type T_DTG_LSB = [real, real, real, real]; -type T_DTG_MEAS_TABLE_LINE = [real, real, real, real]; +type T_DTG_LSB = real^4; +type T_DTG_MEAS_TABLE_LINE = real^4; type T_TEMP = real; type T_HW_STATUSES = [bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, T_PFS_EWM_MSU_MSU_HS, bool, bool, bool, bool, bool, bool]; type T_PDE_CMD_A = [T_ON_OFF_CMD, T_CAM_CMD, T_CAM_CMD, T_CAM_CMD]; -type T_VECTOR9 = [real, real, real, real, real, real, real, real, real]; +type T_VECTOR9 = real^9; type T_PFS_BUS_DATA_BLOCK = [INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16, INT16]; type T_PFS_EC_UPDATE_CONF_MSU = [T_CONFIGURATION_TABLE, bool]; type T_CONTROLLER_TELEMETRY = [T_VELOCITY, T_THRUSTERS_OPENING, real, real, real]; -type T_DTG_ANGULAR_INCREMENT = [real, real, real, real]; -type T_VECTOR4 = [real, real, real, real]; -type T_VECTOR6 = [real, real, real, real, real, real]; -type T_SYNCHRO_BROADCAST_STATUS = [bool, bool, bool, bool]; -type T_PFS_EWM_MSU_MSU_HS = [bool, bool, bool]; +type T_DTG_ANGULAR_INCREMENT = real^4; +type T_VECTOR4 = real^4; +type T_VECTOR6 = real^6; +type T_SYNCHRO_BROADCAST_STATUS = bool^4; +type T_PFS_EWM_MSU_MSU_HS = bool^3; type INT16 = int; type T_MATRIX_3_4 = [T_MATRIX_3_4_LINE, T_MATRIX_3_4_LINE, T_MATRIX_3_4_LINE]; -type T_QUATERNION = [real, real, real, real]; +type T_QUATERNION = real^4; type T_CONTROLLER_STATE = [T_QUATERNION, T_ANGULAR_RATE, T_ACCELERATION]; -type T_VECTOR18 = [real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real]; -type T_EFFICIENCY_MATRIX_LINE = [real, real, real]; +type T_VECTOR18 = real^18; +type T_EFFICIENCY_MATRIX_LINE = real^3; type T_DPU_CMD = [T_ON_OFF_CMD, T_ON_OFF_CMD]; -type T_VECTOR12 = [real, real, real, real, real, real, real, real, real, real, real, real]; -type T_CAM_MODE = [bool, bool, bool]; +type T_VECTOR12 = real^12; +type T_CAM_MODE = bool^3; type T_PFS_1BUS_DATA = [T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK, T_PFS_BUS_DATA_BLOCK]; type T_TORQUE_EFFICIENCY_MATRIX = [T_TORQUE_EFFICIENCY_MATRIX_LINE, T_TORQUE_EFFICIENCY_MATRIX_LINE, T_TORQUE_EFFICIENCY_MATRIX_LINE]; type T_FCV_OPENING_DUR_CMD = [int, int]; @@ -67,41 +67,41 @@ type T_INITIAL_EFFICIENCY_MATRIX = [T_INITIAL_EFFICIENCY_MATRIX_LINE, T_INITIAL_ type T_ANGLE = real; type MYBOOL = bool; type MYINT = int; -type T_VECTOR8 = [real, real, real, real, real, real, real, real]; +type T_VECTOR8 = real^8; type T_NAVIGATION_TELEMETRY = [bool, T_ANGLE, T_ANGLE, T_NAVIGATION_OUTPUT]; type T_CURRENT = real; type T_VOLTAGE = real; type T_ANGULAR_RATE = [int, int, int]; type T_SW_WARNING_CODE = int; -type T_ACCELERATION = [real, real, real]; +type T_ACCELERATION = real^3; type T_CONTROLLER_FILTER_STATE = [T_MATRIX_3_4, T_MATRIX_3_4]; type T_CONTROLLER_CONFIG = [T_MASS, T_INERTIA, T_VECTOR3, T_INITIAL_EFFICIENCY_MATRIX, T_EFFICIENCY_MATRIX, T_VELOCITY, T_QUATERNION, T_QUATERNION, real]; type T_NAVIGATION_STATE = [T_QUATERNION, T_QUATERNION, T_QUATERNION, T_QUATERNION]; type T_THRUSTERS_OPENING = [T_FCV_OPENING_DUR_CMD, T_FCV_OPENING_DUR_CMD]; -type T_VECTOR3 = [real, real, real]; +type T_VECTOR3 = real^3; type T_PFS_TGM_DATA = [bool, int, bool, bool, int, bool, bool, int, int, int, int, int, int]; type T_HLTM = [bool, bool, bool, bool, bool, bool, T_MSU_STATE]; -type T_PFS_EWM_SSU_MSU_MEAS = [real, real, real, real]; +type T_PFS_EWM_SSU_MSU_MEAS = real^4; type T_NAVIGATION_CONFIGURATION = [T_QUATERNION, T_QUATERNION, real, T_QUATERNION, T_QUATERNION, T_VECTOR4, T_VECTOR4, T_VECTOR8, real, real, T_VECTOR12, T_VECTOR9, T_VECTOR12, T_VECTOR4]; type T_VELOCITY = real; type T_ON_OFF_CMD = [bool, bool]; -type T_INERTIA = [real, real, real]; -type T_MSU_STATE = [bool, bool, bool, bool]; +type T_INERTIA = real^3; +type T_MSU_STATE = bool^4; type T_HLTC = [bool, T_PFS_EC_UPDATE_CONF_MSU, bool, bool]; -type T_CM_CONFIGURATION = [real, int, [int, int, int], [real, real, real], [real, real, real], [int, int, int], [real, real, real, real, real, real], real, real, real, real, real, real, [real, real, real, real, real, real, real, real, real, real, real, real], [real, real, real], [real, real, real], T_VECTOR6, T_VECTOR6, T_VECTOR18, T_VECTOR4, T_VECTOR4]; +type T_CM_CONFIGURATION = [real, int, [int, int, int], real^3, real^3, [int, int, int], real^6, real, real, real, real, real, real, real^12, real^3, real^3, T_VECTOR6, T_VECTOR6, T_VECTOR18, T_VECTOR4, T_VECTOR4]; type T_MASS = real; -type T_FTCP_HEALTH_STATUS = [bool, bool, bool]; +type T_FTCP_HEALTH_STATUS = bool^3; type T_EFFICIENCY_MATRIX = [T_EFFICIENCY_MATRIX_LINE, T_EFFICIENCY_MATRIX_LINE, T_EFFICIENCY_MATRIX_LINE]; type T_SEQUENCER_CONFIGURATION = [bool, bool, bool, bool, bool, bool, int, bool, bool]; -type T_TORQUE_EFFICIENCY_MATRIX_LINE = [real, real, real, real]; +type T_TORQUE_EFFICIENCY_MATRIX_LINE = real^4; type T_CONFIGURATION_TABLE = [bool, bool, bool, bool, bool, bool, int, bool, bool]; type T_CONTROL_GAINS = [real, real]; type T_PFS_BUS_DATA = [T_PFS_1BUS_DATA, T_PFS_1BUS_DATA, T_PFS_1BUS_DATA, T_PFS_1BUS_DATA]; type T_PFS_EWC_MSU_PDE_T = [T_ACS_CMD, T_ACS_CMD, T_ACS_CMD, T_ACS_CMD]; type T_CAM_CMD = [T_ON_OFF_CMD, T_ON_OFF_CMD, T_ON_OFF_CMD, T_ON_OFF_CMD]; type T_NAVIGATION_OUTPUT = [T_QUATERNION, T_QUATERNION, T_ANGULAR_RATE]; -type T_CM_TELEMETRY = [[bool, bool, bool, bool], int, int, int, int, [int, int], [int, int, int, int, int, int], real, real]; -type T_CONTROLLER_SATURATION_LEVEL = [real, real, real]; +type T_CM_TELEMETRY = [bool^4, int, int, int, int, [int, int], [int, int, int, int, int, int], real, real]; +type T_CONTROLLER_SATURATION_LEVEL = real^3; type T_ACS_CMD = [bool, bool]; type T_DTG_MEAS_TABLE = [T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE, T_DTG_MEAS_TABLE_LINE]; type T_PFS_BUS_SENSOR_DATA = [T_PFS_TGM_DATA, T_PFS_TGM_DATA, T_PFS_ACM_DATA, T_PFS_ACM_DATA, T_PFS_ACM_DATA]; @@ -109,10 +109,10 @@ type T_PFS_ACM_DATA = [bool, int, int]; type T_POWER_CONSUMPTION = real; type T_FORCE_EFFICIENCY_MATRIX = [T_FORCE_EFFICIENCY_MATRIX_LINE, T_FORCE_EFFICIENCY_MATRIX_LINE, T_FORCE_EFFICIENCY_MATRIX_LINE]; type T_PFS_IWM_MEASUREMENTS = [T_VOLTAGE, T_VOLTAGE, T_VOLTAGE, T_VOLTAGE, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_VOLTAGE, T_TEMP, T_TEMP]; -type T_MATRIX_3_4_LINE = [real, real, real, real]; +type T_MATRIX_3_4_LINE = real^4; type T_OBUT = int; -type T_INITIAL_EFFICIENCY_MATRIX_LINE = [real, real, real, real]; -type T_FORCE_EFFICIENCY_MATRIX_LINE = [real, real, real, real]; +type T_INITIAL_EFFICIENCY_MATRIX_LINE = real^4; +type T_FORCE_EFFICIENCY_MATRIX_LINE = real^4; type PFS_Data__T_THRUSTERS_OPENING = T_THRUSTERS_OPENING; type PFS_Data__T_SEQUENCER_CONFIGURATION = T_SEQUENCER_CONFIGURATION; @@ -715,33 +715,33 @@ tel const base = 1; /* Fix me? */ -----include "DOWNSTREAM.lus" -type T_ACCELERATION = [real, real, real]; +type T_ACCELERATION = real^3; type T_ACS_CMD = [bool, bool]; type T_ANGLE = real; type T_ANGULAR_RATE = [int, int, int]; type T_CAM_CMD = [T_ON_OFF_CMD, T_ON_OFF_CMD, T_ON_OFF_CMD, T_ON_OFF_CMD]; -type T_CM_CONFIGURATION = [real, int, [int, int, int], [real, real, real], [real, real, real], [int, int, int], [real, real, real, real, real, real], real, real, real, real, real, real, [real, real, real, real, real, real, real, real, real, real, real, real], [real, real, real], [real, real, real], T_VECTOR6, T_VECTOR6, T_VECTOR18, T_VECTOR4, T_VECTOR4]; -type T_CM_TELEMETRY = [[bool, bool, bool, bool], int, int, int, int, [int, int], [int, int, int, int, int, int], real, real]; +type T_CM_CONFIGURATION = [real, int, [int, int, int], real^3, real^3, [int, int, int], real^6, real, real, real, real, real, real, real^12, real^3, real^3, T_VECTOR6, T_VECTOR6, T_VECTOR18, T_VECTOR4, T_VECTOR4]; +type T_CM_TELEMETRY = [bool^4, int, int, int, int, [int, int], [int, int, int, int, int, int], real, real]; type T_CONFIGURATION_TABLE = [bool, bool, bool, bool, bool, bool, int, bool, bool]; type T_CONTROLLER_CONFIG = [T_MASS, T_INERTIA, T_VECTOR3, T_INITIAL_EFFICIENCY_MATRIX, T_EFFICIENCY_MATRIX, T_VELOCITY, T_QUATERNION, T_QUATERNION, real]; type T_CONTROLLER_FILTER_STATE = [T_MATRIX_3_4, T_MATRIX_3_4]; -type T_CONTROLLER_SATURATION_LEVEL = [real, real, real]; +type T_CONTROLLER_SATURATION_LEVEL = real^3; type T_CONTROLLER_STATE = [T_QUATERNION, T_ANGULAR_RATE, T_ACCELERATION]; type T_CONTROLLER_TELEMETRY = [T_VELOCITY, T_THRUSTERS_OPENING, real, real, real]; type T_CONTROL_GAINS = [real, real]; type T_CURRENT = real; -type T_DTG_ANGULAR_INCREMENT = [real, real, real, real]; -type T_DTG_LSB = [real, real, real, real]; +type T_DTG_ANGULAR_INCREMENT = real^4; +type T_DTG_LSB = real^4; -- type T_DTG_MEAS_TABLE = [[real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real], [real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real], [real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real], [real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real]]; --- type T_EFFICIENCY_MATRIX = [[real, real, real], [real, real, real], [real, real, real]]; +-- type T_EFFICIENCY_MATRIX = [real^3, real^3, real^3]; type T_FCV_OPENING_DUR_CMD = [int, int]; --- type T_FORCE_EFFICIENCY_MATRIX = [[real, real, real], [real, real, real], [real, real, real], [real, real, real]]; -type T_FTCP_HEALTH_STATUS = [bool, bool, bool]; +-- type T_FORCE_EFFICIENCY_MATRIX = [real^3, real^3, real^3, real^3]; +type T_FTCP_HEALTH_STATUS = bool^3; type T_HW_STATUSES = [bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, T_PFS_EWM_MSU_MSU_HS, bool, bool, bool, bool, bool, bool]; -type T_INERTIA = [real, real, real]; ---type T_INITIAL_EFFICIENCY_MATRIX = [[real, real, real, real, real, real], [real, real, real, real, real, real], [real, real, real, real, real, real], [real, real, real, real, real, real]]; +type T_INERTIA = real^3; +--type T_INITIAL_EFFICIENCY_MATRIX = [real^6, real^6, real^6, real^6]; type T_MASS = real; ---type T_MATRIX_3_4 = [[real, real, real], [real, real, real], [real, real, real], [real, real, real]]; +--type T_MATRIX_3_4 = [real^3, real^3, real^3, real^3]; type T_MSU_ID = int; type T_MSU_STATUS = int; type T_MSU_TELEMETRY = [bool, bool, bool, bool, bool, bool, T_CAM_MODE, bool, bool, bool, T_CONFIGURATION_TABLE, T_CONFIGURATION_TABLE, T_MSU_STATUS, bool, bool, T_NAVIGATION_TELEMETRY, T_CONTROLLER_TELEMETRY, T_CM_TELEMETRY, T_OBUT, T_SYNCHRO_BROADCAST_STATUS, T_HW_STATUSES, T_SW_WARNING_CODE, T_FTCP_HEALTH_STATUS, int, T_MSU_ID, bool, bool, bool, bool, bool, T_PFS_EWM_DTG12_MSU, bool, bool, T_PFS_IWM_MEASUREMENTS, T_POWER_CONSUMPTION]; @@ -761,31 +761,31 @@ type T_PFS_EWM_DTG12_MSU = [T_PFS_EWM_DTG_MSU, T_PFS_EWM_DTG_MSU]; type T_PFS_EWM_DTG12_MSU_MODE = [T_PFS_EWM_DTG_MSU_MODE, T_PFS_EWM_DTG_MSU_MODE]; type T_PFS_EWM_DTG_MSU = [T_PFS_EWM_DTG_MSU_MODE, int, int]; type T_PFS_EWM_DTG_MSU_MODE = int; -type T_PFS_EWM_MSU_MSU_HS = [bool, bool, bool]; -type T_PFS_EWM_SSU_MSU_MEAS = [real, real, real, real]; +type T_PFS_EWM_MSU_MSU_HS = bool^3; +type T_PFS_EWM_SSU_MSU_MEAS = real^4; type T_PFS_IWM_MEASUREMENTS = [T_VOLTAGE, T_VOLTAGE, T_VOLTAGE, T_VOLTAGE, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_CURRENT, T_VOLTAGE, T_TEMP, T_TEMP]; type T_PFS_TGM_DATA = [bool, int, bool, bool, int, bool, bool, int, int, int, int, int, int]; type T_POWER_CONSUMPTION = real; -type T_QUATERNION = [real, real, real, real]; +type T_QUATERNION = real^4; type T_SEQUENCER_CONFIGURATION = [bool, bool, bool, bool, bool, bool, int, bool, bool]; type T_SW_WARNING_CODE = int; -type T_SYNCHRO_BROADCAST_STATUS = [bool, bool, bool, bool]; +type T_SYNCHRO_BROADCAST_STATUS = bool^4; type T_TEMP = real; type T_THRUSTERS_OPENING = [T_FCV_OPENING_DUR_CMD, T_FCV_OPENING_DUR_CMD]; --- type T_TORQUE_EFFICIENCY_MATRIX = [[real, real, real], [real, real, real], [real, real, real], [real, real, real]]; -type T_VECTOR12 = [real, real, real, real, real, real, real, real, real, real, real, real]; -type T_VECTOR18 = [real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real, real]; -type T_VECTOR3 = [real, real, real]; -type T_VECTOR4 = [real, real, real, real]; -type T_VECTOR6 = [real, real, real, real, real, real]; -type T_VECTOR8 = [real, real, real, real, real, real, real, real]; -type T_VECTOR9 = [real, real, real, real, real, real, real, real, real]; +-- type T_TORQUE_EFFICIENCY_MATRIX = [real^3, real^3, real^3, real^3]; +type T_VECTOR12 = real^12; +type T_VECTOR18 = real^18; +type T_VECTOR3 = real^3; +type T_VECTOR4 = real^4; +type T_VECTOR6 = real^6 ; +type T_VECTOR8 = real^8 ; +type T_VECTOR9 = real^9; type T_VELOCITY = real; type T_VOLTAGE = real; type int16 = int; -type T_CAM_MODE = [bool, bool, bool]; +type T_CAM_MODE = bool^3; type T_PFS_EC_UPDATE_CONF_MSU = [T_CONFIGURATION_TABLE, bool]; -type T_MSU_STATE = [bool, bool, bool, bool]; +type T_MSU_STATE = bool^4; type T_PDE_CMD_A = [T_ON_OFF_CMD, T_CAM_CMD, T_CAM_CMD, T_CAM_CMD]; type T_DPU_CMD = [T_ON_OFF_CMD, T_ON_OFF_CMD]; type T_HLTM = [bool, bool, bool, bool, bool, bool, T_MSU_STATE];