Project

General

Custom queries

Profile

Actions

Feature #63514

open

Task #63713: Hardware and raw data

python interface to QubicStudio

Added by Torchinsky Steve 3 months ago. Updated 3 months ago.

Status:
In progress
Priority:
Normal
Assigned To:
Category:
Hardware and raw data
Start date:
01/16/2025
Due date:
05/01/2025 (Due in 18 days)
% Done:

0%

Estimated time:
8.00 h

Description

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 <>
To: Steve Torchinsky <>
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
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

Actions #1

Updated by Torchinsky Steve 3 months ago

encapsulation table from Wilfried's email
https://forge.in2p3.fr/attachments/373644

Actions #2

Updated by Torchinsky Steve 3 months ago

  • Description updated (diff)
Actions #3

Updated by Torchinsky Steve 3 months ago

  • Description updated (diff)
Actions #4

Updated by Huchet Alexandre 3 months ago

  • Parent task set to #63713
Actions

Also available in: Atom PDF