Artemis Teensy Flight Software
The software on the Teensy in the Artemis cubesat.
|
The Artemis definitions. More...
#include "config/artemis_defs.h"
Functions | |
bool | kill_thread (uint8_t target_channel_id) |
Kill a running thread. More... | |
void | PushQueue (PacketComm &packet, std::deque< PacketComm > &queue, Threads::Mutex &mtx) |
Push a packet into a queue. More... | |
bool | PullQueue (PacketComm &packet, std::deque< PacketComm > &queue, Threads::Mutex &mtx) |
Pull a packet from a queue. More... | |
void | route_packet_to_main (PacketComm packet) |
Wrapper function to send a packet to the main channel. | |
void | route_packet_to_rfm23 (PacketComm packet) |
Wrapper function to send a packet to the RFM23. | |
void | route_packet_to_pdu (PacketComm packet) |
Wrapper function to send a packet to the PDU. | |
void | route_packet_to_rpi (PacketComm packet) |
Wrapper function to send a packet to the Raspberry Pi. | |
Variables | |
vector< struct thread_struct > | thread_list |
The list of active threads. More... | |
std::map< string, NODES > | NodeType |
Mapping between string names and NodeType. More... | |
std::deque< PacketComm > | main_queue |
The packet queue for the main channel. | |
std::deque< PacketComm > | rfm23_queue |
The packet queue for the RFM23 channel. | |
std::deque< PacketComm > | pdu_queue |
The packet queue for the PDU channel. | |
std::deque< PacketComm > | rpi_queue |
The packet queue for the Raspberry Pi channel. | |
Threads::Mutex | main_queue_mtx |
The mutex for the main channel's packet queue. | |
Threads::Mutex | rfm23_queue_mtx |
The mutex for the RFM23 channel's packet queue. | |
Threads::Mutex | pdu_queue_mtx |
The mutex for the PDU channel's packet queue. | |
Threads::Mutex | rpi_queue_mtx |
The mutex for the Raspberry Pi channel's packet queue. | |
Threads::Mutex | spi1_mtx |
The mutex for the SPI1 interface. | |
Threads::Mutex | i2c1_mtx |
The mutex for the I2C1 interface. | |
bool | deploymentmode = false |
Whether the satellite is in deployment mode. | |
The Artemis definitions.
This file defines global variables and functions used throughout the satellite.
bool kill_thread | ( | uint8_t | target_channel_id | ) |
Kill a running thread.
target_channel_id | The Channel_ID of the channel to kill. |
bool PullQueue | ( | PacketComm & | packet, |
std::deque< PacketComm > & | queue, | ||
Threads::Mutex & | mtx | ||
) |
Pull a packet from a queue.
This is a helper function to check a queue of packets for a packet.
packet | The packet object that will carry the pulled packet, if there is one. |
queue | The queue of packets to be pulled from. |
mtx | The mutex used to lock the queue. |
void PushQueue | ( | PacketComm & | packet, |
std::deque< PacketComm > & | queue, | ||
Threads::Mutex & | mtx | ||
) |
Push a packet into a queue.
This is a helper function to push a packet into a queue of packets. It will push out the first packet in the queue if the queue is too large.
packet | The packet object that will be pushed into the queue. |
queue | The queue of packets to be pulled from. |
mtx | The mutex used to lock the queue. |
std::map<string, NODES> NodeType |
Mapping between string names and NodeType.
vector<struct thread_struct> thread_list |
The list of active threads.
This is a list of thread_structs that correspond to each active thread, running a channel. There can be a maximum of 16 active threads.