7 #ifndef _ARTEMIS_DEFS_H
8 #define _ARTEMIS_DEFS_H
10 #include <TeensyThreads.h>
12 #include <support/packetcomm.h>
15 #define ARTEMIS_CURRENT_BEACON_1_COUNT 2
17 #define ARTEMIS_CURRENT_SENSOR_COUNT 5
20 #define ARTEMIS_TEMP_SENSOR_COUNT 7
48 #define MAXQUEUESIZE 8
116 extern std::map<string, NODES>
NodeType;
135 Threads::Mutex &mtx);
137 Threads::Mutex &mtx);
const float heater_threshold
The activation temperature, in Celsius, of the heater.
Definition: artemis_defs.h:45
Threads::Mutex rpi_queue_mtx
The mutex for the Raspberry Pi channel's packet queue.
Definition: artemis_defs.cpp:42
Threads::Mutex main_queue_mtx
The mutex for the main channel's packet queue.
Definition: artemis_defs.cpp:36
Threads::Mutex rfm23_queue_mtx
The mutex for the RFM23 channel's packet queue.
Definition: artemis_defs.cpp:38
bool kill_thread(uint8_t channel_id)
Kill a running thread.
Definition: artemis_defs.cpp:62
Threads::Mutex spi1_mtx
The mutex for the SPI1 interface.
Definition: artemis_defs.cpp:45
std::deque< PacketComm > pdu_queue
The packet queue for the PDU channel.
Definition: artemis_defs.cpp:31
const float MV_PER_ADC_UNIT
The conversion factor between ADC units and voltage.
Definition: artemis_defs.h:42
Threads::Mutex i2c1_mtx
The mutex for the I2C1 interface.
Definition: artemis_defs.cpp:47
bool PullQueue(PacketComm &packet, std::deque< PacketComm > &queue, Threads::Mutex &mtx)
Pull a packet from a queue.
Definition: artemis_defs.cpp:104
std::map< string, NODES > NodeType
Mapping between string names and NodeType.
Definition: artemis_defs.cpp:20
void route_packet_to_rfm23(PacketComm packet)
Wrapper function to send a packet to the RFM23.
Definition: artemis_defs.cpp:120
vector< struct thread_struct > thread_list
The list of active threads.
Definition: artemis_defs.cpp:17
bool deploymentmode
Whether the satellite is in deployment mode.
Definition: artemis_defs.cpp:50
std::deque< PacketComm > rpi_queue
The packet queue for the Raspberry Pi channel.
Definition: artemis_defs.cpp:33
void PushQueue(PacketComm &packet, std::deque< PacketComm > &queue, Threads::Mutex &mtx)
Push a packet into a queue.
Definition: artemis_defs.cpp:83
const float OFFSET_F
The offset of the temperature sensors.
Definition: artemis_defs.h:34
void route_packet_to_rpi(PacketComm packet)
Wrapper function to send a packet to the Raspberry Pi.
Definition: artemis_defs.cpp:128
const float MV_PER_DEGREE_F
The conversion factor between temperature and voltage.
Definition: artemis_defs.h:27
void route_packet_to_pdu(PacketComm packet)
Wrapper function to send a packet to the PDU.
Definition: artemis_defs.cpp:124
std::deque< PacketComm > rfm23_queue
The packet queue for the RFM23 channel.
Definition: artemis_defs.cpp:29
void route_packet_to_main(PacketComm packet)
Wrapper function to send a packet to the main channel.
Definition: artemis_defs.cpp:116
NODES
Enumeration of Node ID.
Definition: artemis_defs.h:51
TEENSY_PINS
Enumeration of Teensy 4.1 pins, based on Artemis OBC v4.23.
Definition: artemis_defs.h:69
std::deque< PacketComm > main_queue
The packet queue for the main channel.
Definition: artemis_defs.cpp:27
Threads::Mutex pdu_queue_mtx
The mutex for the PDU channel's packet queue.
Definition: artemis_defs.cpp:40
Definition: packetcomm.h:13
Headers and definitions common to all COSMOS Kernel.
PacketComm packet
The packet used throughout the channel.
Definition: pdu_channel.cpp:19
The structure of a thread.
Definition: artemis_defs.h:63