libgs.database.CommsLog

class libgs.database.CommsLog(db='sqlite:///libgs.db', binary_fmt='hex', disk_path='.', **kwargs)[source]

Database class for storing communications with the satellite.

The columns are:

nid The norad id of the object that is being communicated with
pass_id The current pass ID
orig The actor that sent the message
dest The actor that received the message
msg The message itself

Additionally a primary key and timestamp is automatically added to each record.

See Database for description of available arguments

Methods

get([limit, tstamps]) Get the communication log.
put(nid, pass_id, orig, dest, msg) Add new item to the log

Attributes

ACTORS Name of the various actors that send or receive communications

Inherited from base class

count_rows(table) Return the number of rows in a table
create_table(name, *columns, **kwargs) Set up the columns and add a unique key.
get_df(table[, where, limit, orderby, …]) Get data from communications database as a pandas.DataFrame object
get_file(fname) Grab a file resource and return the bytes or string (.bin or .txt)
put_df(table, df[, index, if_exists]) Add dataframe to database, appending metadata for when it was added