Feature #63514
Updated by Torchinsky Steve 3 months ago
We can communicate with QubicStudio using socket connection from a remote computer, such as qubic-central. This can be done with Python which gives us the capability to make our observation scripts in Python instead of the integrated Java environment of QubicStudio. The observation scripts would be launched from qubic-central, so we don't have to log on to QubicStudio with the full graphic interface. The observation scripts can be setup to launch at a specific time with "at" (same as cron, but at a specific time, allowing us to program in Sidereal time, rather than Solar time). See email from Wilfried Tue, 19 Apr 2022 16:39:24 for details of the interface: Date: Tue, 19 Apr 2022 16:39:24 From: Wilfried Marty <wilfried.marty@informarty.fr> To: Steve Torchinsky <satorchi@apc.in2p3.fr> Subject: Re: socket communication to dispatcher Pour l'encapsulation des commandes dispatcher voila ce qu'il te faut connaitre: Encapsulation générales des commandes: IMAGE: https://forge.in2p3.fr/attachments/373644 [IMAGE] Les ID à utiliser sont: #define SEND_TC_TO_SUBSYS_ID 0xC0 #define CUSTOM_TC_ID 0xD0 #define INTERN_TC_ID 0xD1 Dans le champ DATA, tu as l'id de la sous commande sur 16 bits, puis le corps de la commande Par exemple pour la commande bool TVirtualCommandEncode::sendStopBackup(quint16 backupsId) { QDispatcherTCByteArray* tcBuffer = startNewInternTC(0x0005); tcBuffer->append( ((backupsId & 0xFF00) >> 8)); tcBuffer->append( ((backupsId & 0x00FF))); return sendInternTC("sendStopBackup"); } Au final tu auras: (on se fout du CN que je laisse à 0) 0x55 0x00 0x00 0x00 0x00 0x00 0x05 0xD1 0x00 0x05 backupId_MSB backupId_LSB 0xAA STX CN SIZE ID sous id corps commande EOT L'encodage des commandes est dans TVirtualCommandEncode.cpp, les sous fonctions startNewInternTC, sendInternTC... sont dans QDispatcherTCByteArray.cpp Voila, si c'est pas clair, n'hésite pas à revenir vers moi. Les fichiers sources de la lib dispatcheraccess sont là: http://filez.irap.omp.eu/ymzopqnyjbiw Wilfried