Commit d8ec099d authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update the SQL interface

parent 0a95a46d
......@@ -70,7 +70,7 @@ class SQLTelecommands(TC):
''' Handle Postgresql databases for telecommands '''
name = 'Get from db'
def __init__(self, parent=None):
def __init__(self, parent=None, asn1_typename):
''' Initialise the widget '''
# to do here = create a table widget, and place all the entries
# of the given ASN.1 type
......@@ -82,7 +82,11 @@ class SQLTelecommands(TC):
'''' check if there is a sql_db directory, return False otherwise '''
return True
def sql2asn1(self, lineNb):
def getPageIndexes(self, offset, number):
# Thanasssis, please fill this one
pass
def sql2asn1(self, idx):
''' Thanassis: please retrieve the db entry for index "lineNb"
and convert it to an ASN.1 native type '''
pass
......@@ -127,6 +131,7 @@ class SQLTelemetries(TM):
@staticmethod
def applicable():
'''' check if there is a sql_db directory, return False otherwise '''
# Thanassis, please fill
return True
if __name__ == '__main__':
......
......@@ -40,7 +40,7 @@ log.addHandler(handler_console)
from ColorFormatter import ColorFormatter
from asn1_value_editor import asn1Editor, asn1Viewer, __version__, UserWidgets
from asn1_value_editor import asn1Editor, asn1Viewer, __version__
from plotmanager import PlotManager
import vn
......@@ -71,7 +71,8 @@ from sdlHandler import sdlHandler
from PySide.QtCore import QThread, QFile, Qt, Signal, QObject
from PySide.QtGui import(QApplication, QStatusBar, QLabel, QWidget,
QListWidget, QPushButton, QDockWidget, QTabWidget, QMenu, QAction)
QListWidget, QPushButton, QDockWidget, QTabWidget, QMenu, QAction,
QComboBox)
from PySide.QtUiTools import QUiLoader
......@@ -398,12 +399,12 @@ def gui():
# retrieve user widgets for TM and TC
customTC, customTM = [], []
for each in UserWidgets.__all__:
widget = getattr(UserWidget, each)
if widget.__base__ == UserWidget.TC:
customTC.append(widget)
elif widget.__base__ == UserWidget.TM:
customTM.append(widget)
# for each in UserWidgets.__all__:
# widget = getattr(UserWidget, each)
# if widget.__base__ == UserWidget.TC:
# customTC.append(widget)
# elif widget.__base__ == UserWidget.TM:
# customTM.append(widget)
if isinstance(editor, asn1Viewer): # TM Viewer
hasTM = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment