PiImageStreamer
Loading...
Searching...
No Matches
TaskRates.h File Reference
#include "Cameracfg.h"
Include dependency graph for TaskRates.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MOTOR_PWM_TASK_PERIOD   (5000)
 
#define MOTOR_PWM_TASK_PRIORITY   (54)
 
#define SERVO_MOTOR_PULSE_PERIOD   (20000)
 
#define SERVO_MOTOR_PULSE_PRIORITY   (45)
 
#define DISTANCE_SENSOR_ALIGNMENT_PULSE_PERIOD   (20000)
 
#define DISTANCE_SENSOR_ALIGNMENT_PULSE_PRIORITY   (45)
 
#define SERVO_MOTOR_TASK_PERIOD   (65000)
 
#define SERVO_MOTOR_TASK_PRIORITY   (20)
 
#define DISTANCE_SENSOR_TASK_PERIOD   (65000)
 
#define DISTANCE_SENSOR_TASK_PRIORITY   (20)
 
#define MOTOR_CTRL_TASK_PERIOD   (10000)
 
#define MOTOR_CTRL_TASK_PRIORITY   (50)
 
#define COLLISION_SENSOR_TASK_PERIOD   (50000)
 
#define COLLISION_SENSOR_TASK_PRIORITY   (25)
 
#define LED_PWM_TASK_PERIOD   (25000)
 
#define LED_PWM_TASK_PRIORITY   (40)
 
#define LINE_TRACKER_SENSOR_TASK_PERIOD   (5000)
 
#define LINE_TRACKER_SENSOR_TASK_PRIORITY   (50)
 
#define LINE_FOLLOWING_CONTROLLER_TASK_PERIOD   (15000)
 
#define LINE_FOLLOWING_CONTROLLER_TASK_PRIORITY   (50)
 
#define CAMERA_CONTROLLER_PERIOD   (65000)
 
#define CAMERA_CONTROLLER_PRIORITY   (20)
 
#define CAMERA_TASK_PERIOD   (1000000/CAMERA_FPS)
 
#define CAMERA_TASK_PRIORITY   (35)
 
#define HORN_TASK_PERIOD   (101000)
 
#define HORN_TASK_PRIORITY   (10)
 
#define ROBOT_STATUS_MANAGER_TASK_PERIOD   (500000)
 
#define ROBOT_STATUS_MANAGER_TASK_PRIORITY   (5)
 
#define IMAGE_STREAM_TASK_PERIOD   ((1000000/STREAM_FPS))
 
#define IMAGE_STREAM_TASK_PRIORITY   (15)
 
#define ROBOT_CONTROLLER_PRIORITY   (24)
 
#define NETWORK_RECEPTION_TASK_PRIORITY   (29)
 
#define NETWORK_TRANSMIT_TASK_PRIORITY   (6)
 

Detailed Description

Author
Walter Schilling (schil.nosp@m.ling.nosp@m.@msoe.nosp@m..edu)
Version
1.0

LICENSE

This code is developed as part of the MSOE SWE4211 Real Time Systems course, but can be freely used by others.

SWE4211 Real Time Systems is a required course for students studying the discipline of software engineering.

This Software is provided under the License on an "AS IS" basis and without warranties of any kind concerning the Software, including without limitation merchantability, fitness for a particular purpose, absence of defects or errors, accuracy, and non-infringement of intellectual property rights other than copyright. This disclaimer of warranty is an essential part of the License and a condition for the grant of any rights to this Software.

DESCRIPTION

This file defines the task periods for all periodic tasks within the system as well as the priorities. In this setup, the higher the priority tasks have higher decimal numbers for the priority. All periods are given in microseconds. Priorities are SCHED_FIFO priorities (1 to 99).

Macro Definition Documentation

◆ CAMERA_CONTROLLER_PERIOD

#define CAMERA_CONTROLLER_PERIOD   (65000)

This macro defines the task rate and priority for the camera controller, which positions the camera.

◆ CAMERA_TASK_PERIOD

#define CAMERA_TASK_PERIOD   (1000000/CAMERA_FPS)

These macros set up the camera task rate. The period is derived from CAMERA_FPS in Cameracfg.h.

◆ COLLISION_SENSOR_TASK_PERIOD

#define COLLISION_SENSOR_TASK_PERIOD   (50000)

This macro defines the task rate for the collision sensor.

◆ DISTANCE_SENSOR_ALIGNMENT_PULSE_PERIOD

#define DISTANCE_SENSOR_ALIGNMENT_PULSE_PERIOD   (20000)

This macro defines the pulse period and priority for the servo that aligns the distance sensor.

◆ DISTANCE_SENSOR_TASK_PERIOD

#define DISTANCE_SENSOR_TASK_PERIOD   (65000)

This macro defines the task rate for the distance sensor.

◆ HORN_TASK_PERIOD

#define HORN_TASK_PERIOD   (101000)

This is the task rate for the horn controller.

◆ IMAGE_STREAM_TASK_PERIOD

#define IMAGE_STREAM_TASK_PERIOD   ((1000000/STREAM_FPS))

These macros control the Image stream. The period is derived from STREAM_FPS in Cameracfg.h.

◆ LED_PWM_TASK_PERIOD

#define LED_PWM_TASK_PERIOD   (25000)

This macro defines the PWM period and priority for each of the colored LED (searchlight) pins.

◆ LINE_FOLLOWING_CONTROLLER_TASK_PERIOD

#define LINE_FOLLOWING_CONTROLLER_TASK_PERIOD   (15000)

This macro defines the task rate and priority for the line following controller.

◆ LINE_TRACKER_SENSOR_TASK_PERIOD

#define LINE_TRACKER_SENSOR_TASK_PERIOD   (5000)

This macro defines the task rate and priority for the line tracker sensor.

◆ MOTOR_CTRL_TASK_PERIOD

#define MOTOR_CTRL_TASK_PERIOD   (10000)

This macro defines the task rate for the motor controllers. All motors on the robot run at the same rate.

◆ MOTOR_PWM_TASK_PERIOD

#define MOTOR_PWM_TASK_PERIOD   (5000)

This macro defines the PWM period and priority for the motor drive pins.

◆ ROBOT_CONTROLLER_PRIORITY

#define ROBOT_CONTROLLER_PRIORITY   (24)

Non periodic tasks and their priorities. These tasks block (for example, on a queue or a socket) rather than running on a fixed period.

◆ ROBOT_STATUS_MANAGER_TASK_PERIOD

#define ROBOT_STATUS_MANAGER_TASK_PERIOD   (500000)

This macro defines the task rate and priority for the robot status manager.

◆ SERVO_MOTOR_PULSE_PERIOD

#define SERVO_MOTOR_PULSE_PERIOD   (20000)

This macro defines the pulse period and priority for the servo motor control signal. A 20 ms period is the standard frame rate for hobby servos.

◆ SERVO_MOTOR_TASK_PERIOD

#define SERVO_MOTOR_TASK_PERIOD   (65000)

This macro defines the task rate for the servo controller, which updates the servo position.