fprime_gds.executables.tcpserver
¶
Module Contents¶
Classes¶
|
Derived from original Stable demo during R&TD and adapted |
|
Derived from original Stable demo during R&TD and adapted |
|
TCP Socket server. |
|
UDP Socket server. |
|
Destination object for all clients registered. |
Functions¶
|
|
|
|
|
-
class
fprime_gds.executables.tcpserver.
ThreadedTCPRequestHandler
(request, client_address, server)[source]¶ Bases:
socketserver.StreamRequestHandler
Derived from original Stable demo during R&TD and adapted for use in new FSW gse.py applicaiton.
TCP socket server for commands, log events, and telemetry data. Later this will handle other things such as sequence files and parameters.
Handle is instanced in own thread for each client.
Registration is done by sending the string “Register <name>”. Sending a message to destination <name> is done as “A5A5 <name> <data>” Note only <data> is sent. Any client that sends a “List” comment makes the server display all registered clients.
-
handle
(self)[source]¶ The function that is invoked upon a new client. This function listens for data on the socket. Packets for now are assumed to be separated by a newline. For each packet, call processPkt.
-
getCmds
(self, inputString, end_of_command=b'\n')[source]¶ Build a command from partial or full socket input
-
getNewMsg
(self)[source]¶ After registration wait for an incoming message The first part must always be an “A5A5 ” or a “List “
-
readHeader
(self)[source]¶ - Read the 9 byte header (e.g. “A5A5 GUI ” or “A5A5 FSW “),
or just read the “List
” command.
-
-
class
fprime_gds.executables.tcpserver.
ThreadedUDPRequestHandler
(request, client_address, server)[source]¶ Bases:
socketserver.BaseRequestHandler
Derived from original Stable demo during R&TD and adapted for use in new FSW gse.py applicaiton.
TCP socket server for commands, log events, and telemetry data. Later this will handle other things such as sequence files and parameters.
Handle is instanced in own thread for each client.
Registration is done by sending the string “Register <name>”. Sending a message to destination <name> is done as “A5A5 <name> <data>” Note only <data> is sent. Any client that sends a “List” comment makes the server display all registered clients.
-
handle
(self)[source]¶ The function that is invoked when a packet is received. This function listens for data on the socket. Packets for now are assumed to be separated by a newline. For each packet, call processPkt.
-
getNewMsg
(self, packet)[source]¶ After registration wait for an incoming message The first part must always be an “A5A5 ” or a “List “
-
readHeader
(self, packet)[source]¶ - Read the 9 byte header (e.g. “A5A5 GUI ” or “A5A5 FSW “),
or just read the “List
” command.
-
-
class
fprime_gds.executables.tcpserver.
ThreadedTCPServer
(server_address, RequestHandlerClass, bind_and_activate=True)[source]¶ Bases:
socketserver.ThreadingMixIn
,socketserver.TCPServer
TCP Socket server.
Keep a dictionary of destination objects containing queues and socket id’s for writting to destinations.
-
class
fprime_gds.executables.tcpserver.
ThreadedUDPServer
(server_address, RequestHandlerClass, bind_and_activate=True)[source]¶ Bases:
socketserver.ThreadingMixIn
,socketserver.UDPServer
UDP Socket server.
-
class
fprime_gds.executables.tcpserver.
DestObj
(name, request)[source]¶ Destination object for all clients registered.
Build: 1.4.1