STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
combined_fsw_gui.ElodinClient Class Reference

Public Member Functions

 __init__ (self, str host="127.0.0.1", int port=2240)
bool connect (self)
 disconnect (self)
bool send_state_transition (self, str target_state)
bool send_actuator_command (self, int actuator_id, int state)
List[Dict] query_telemetry (self, str packet_type, Optional[float] start_time=None, Optional[float] end_time=None, int limit=100)

Public Attributes

 host = host
 port = port
Optional[socket.socket] socket = None
bool connected = False
dict PACKET_IDS

Protected Member Functions

bytes _create_header (self, ElodinPacketType packet_type, List[int] packet_id, int payload_length)

Detailed Description

Client for communicating with Elodin database

Definition at line 535 of file combined_fsw_gui.py.

Constructor & Destructor Documentation

◆ __init__()

combined_fsw_gui.ElodinClient.__init__ ( self,
str host = "127.0.0.1",
int port = 2240 )

Definition at line 538 of file combined_fsw_gui.py.

Member Function Documentation

◆ _create_header()

bytes combined_fsw_gui.ElodinClient._create_header ( self,
ElodinPacketType packet_type,
List[int] packet_id,
int payload_length )
protected
Create Elodin packet header

Definition at line 656 of file combined_fsw_gui.py.

◆ connect()

bool combined_fsw_gui.ElodinClient.connect ( self)
Connect to Elodin database

Definition at line 556 of file combined_fsw_gui.py.

◆ disconnect()

combined_fsw_gui.ElodinClient.disconnect ( self)
Disconnect from Elodin

Definition at line 570 of file combined_fsw_gui.py.

◆ query_telemetry()

List[Dict] combined_fsw_gui.ElodinClient.query_telemetry ( self,
str packet_type,
Optional[float] start_time = None,
Optional[float] end_time = None,
int limit = 100 )
Query telemetry data from Elodin

Definition at line 626 of file combined_fsw_gui.py.

◆ send_actuator_command()

bool combined_fsw_gui.ElodinClient.send_actuator_command ( self,
int actuator_id,
int state )
Send actuator command to Elodin

Definition at line 601 of file combined_fsw_gui.py.

◆ send_state_transition()

bool combined_fsw_gui.ElodinClient.send_state_transition ( self,
str target_state )
Send state transition command to Elodin

Definition at line 577 of file combined_fsw_gui.py.

Member Data Documentation

◆ connected

bool combined_fsw_gui.ElodinClient.connected = False

Definition at line 542 of file combined_fsw_gui.py.

◆ host

combined_fsw_gui.ElodinClient.host = host

Definition at line 539 of file combined_fsw_gui.py.

◆ PACKET_IDS

dict combined_fsw_gui.ElodinClient.PACKET_IDS
Initial value:
= {
"COMMAND": [0xFF, 0x01],
"PT_DATA": [0x01, 0x00],
"TC_DATA": [0x02, 0x00],
"IMU_DATA": [0x03, 0x00],
"ENGINE_STATUS": [0x10, 0x00],
"SYSTEM_HEALTH": [0x11, 0x00],
"VALVE_STATUS": [0x12, 0x00],
"STATE_MACHINE": [0x20, 0x00], # State machine commands
}

Definition at line 545 of file combined_fsw_gui.py.

◆ port

combined_fsw_gui.ElodinClient.port = port

Definition at line 540 of file combined_fsw_gui.py.

◆ socket

Optional[socket.socket] combined_fsw_gui.ElodinClient.socket = None

Definition at line 541 of file combined_fsw_gui.py.


The documentation for this class was generated from the following file: