GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIM / V1-22-3 > lim / linux-gcc
#include <string.h>
#include <CCSDS/CCSDS_pkt.h>
#include <ITC/ITC_pubdefs.h>
#include <LIM/LIM_cmddefs.h>
#include <LIM/LIM_msgs.h>
#include <LIM/LIM_pubdefs.h>
#include <MSG/MSG_pubdefs.h>
#include <PBS/MBA.h>
#include <PBS/WCT.h>
#include <PBS/WUT.h>
#include <LIM_action.h>
#include <LIM_bulk.h>
#include <LIM_lpa.h>
#include <LIM_too.h>
#include <LIM_pkt_send.h>
#include <LIM_task.h>
Classes | |
struct | _LIM_Too |
State information for a TOO observation object. More... | |
Defines | |
#define | LIM_TOO_VALID_KEY (('L'<<24)+('T'<<16)+('O'<<8)+'O') |
Value that indicates the TOO observation object state is valid. | |
Functions | |
static unsigned int | lim_too_check (LIM_Too *object_p) |
Validate a TOO observation object pointer. | |
static unsigned int | lim_too_change_ready (LIM_Too *object_p, int new_ready, unsigned int new_start_sec, unsigned int new_duration) |
Change the READY, START_SEC, and DURATION values of an object. | |
static unsigned int | lim_too_change_started (LIM_Too *object_p, int new_state) |
Change the STARTED status of the object. | |
static WUT_cb_status | lim_too_wut_handler (void *prm, WUT_tmr *wut) |
Handle wake-up timer expiration. | |
unsigned int | LIM_too_new (LIM_Too **object_pp, LIM_Task *task_p, LIM_Action *action_p, LIM_Lpa *lpa_p, LIM_Bulk *bulk_p) |
Create and initialize a new TOO observation object. | |
unsigned int | LIM_too_delete (LIM_Too *object_p) |
Shutdown and delete a TOO observation object. | |
int | LIM_too_has_started (LIM_Too *object_p) |
Return the STARTED status of a TOO observation. | |
int | LIM_too_is_ready (LIM_Too *object_p) |
Return the READY status of a TOO observation. | |
unsigned int | LIM_too_remain_sec (LIM_Too *object_p) |
Return the number of seconds remaining in a TOO observation. | |
static unsigned int | lim_too_expire (LIM_Too *object_p) |
End a TOO observation. | |
unsigned int | LIM_too_handle_abort (LIM_Too *object_p, const ITC_QueueItem *qitem_p) |
Handle a TOO-Abort command. | |
unsigned int | LIM_too_handle_bulk (LIM_Too *object_p, const ITC_QueueItem *qitem_p) |
Handle a message on the BULK queue. | |
unsigned int | LIM_too_handle_physics_start (LIM_Too *object_p, const ITC_QueueItem *qitem_p) |
Handle a PHYSICS-START command in TOO mode. | |
unsigned int | LIM_too_handle_start (LIM_Too *object_p, const ITC_QueueItem *qitem_p, int start_ok) |
Handle a TOO-Start command. |
** CVS $Id: LIM_too.c,v 1.18 2011/03/29 21:20:29 apw Exp $ **
unsigned int lim_too_change_ready | ( | LIM_Too * | object_p, | |
int | new_ready, | |||
unsigned int | new_start_sec, | |||
unsigned int | new_duration | |||
) | [static] |
Change the READY, START_SEC, and DURATION values of an object.
object_p | Pointer to TOO observation object. | |
new_ready | New READY status. | |
new_start_sec | New START_SEC value. | |
new_duration | New DURATION value. |
References _LIM_Too::action_p, _LIM_Too::duration, LIM_action_report(), LIM_ACTION_TOO_STATE_CHANGE, LIM_task_lock_access(), LIM_task_unlock_access(), _LIM_Too::ready, _LIM_Too::start_sec, and _LIM_Too::task_p.
Referenced by lim_too_expire(), and LIM_too_handle_start().
unsigned int lim_too_change_started | ( | LIM_Too * | object_p, | |
int | new_state | |||
) | [static] |
Change the STARTED status of the object.
object_p | Pointer to TOO observation object. | |
new_state | New STARTED status. |
References _LIM_Too::action_p, LIM_action_report(), LIM_ACTION_TOO_STATE_CHANGE, LIM_task_lock_access(), LIM_task_unlock_access(), _LIM_Too::started, and _LIM_Too::task_p.
Referenced by lim_too_expire(), LIM_too_handle_physics_start(), and LIM_too_handle_start().
unsigned int lim_too_check | ( | LIM_Too * | object_p | ) | [static] |
Validate a TOO observation object pointer.
object_p | Pointer to TOO observation object. |
References _LIM_Too::key, and LIM_TOO_VALID_KEY.
Referenced by LIM_too_delete(), LIM_too_handle_abort(), LIM_too_handle_bulk(), LIM_too_handle_physics_start(), LIM_too_handle_start(), LIM_too_has_started(), LIM_too_is_ready(), LIM_too_remain_sec(), and lim_too_wut_handler().
unsigned int LIM_too_delete | ( | LIM_Too * | object_p | ) |
Shutdown and delete a TOO observation object.
object_p | Pointer to object. |
References _LIM_Too::key, lim_too_check(), and _LIM_Too::wut.
Referenced by LIM_mode_delete(), and LIM_too_new().
unsigned int lim_too_expire | ( | LIM_Too * | object_p | ) | [static] |
End a TOO observation.
object_p | Pointer to TOO observation object. |
References _LIM_Too::expired, lim_too_change_ready(), lim_too_change_started(), _LIM_Too::started, and _LIM_Too::wut.
Referenced by LIM_too_handle_abort(), and LIM_too_handle_bulk().
unsigned int LIM_too_handle_abort | ( | LIM_Too * | object_p, | |
const ITC_QueueItem * | qitem_p | |||
) |
Handle a TOO-Abort command.
object_p | Pointer to TOO observation object. | |
qitem_p | Pointer to queue item containing the command. |
References lim_too_check(), and lim_too_expire().
Referenced by lim_mode_too_abort().
unsigned int LIM_too_handle_bulk | ( | LIM_Too * | object_p, | |
const ITC_QueueItem * | qitem_p | |||
) |
Handle a message on the BULK queue.
object_p | Pointer to TOO observation object. | |
qitem_p | Pointer to queue item containing the message. |
References _LIM_Too::expired, lim_too_check(), lim_too_expire(), and _LIM_Too::ready.
Referenced by lim_mode_bulk().
unsigned int LIM_too_handle_physics_start | ( | LIM_Too * | object_p, | |
const ITC_QueueItem * | qitem_p | |||
) |
Handle a PHYSICS-START command in TOO mode.
object_p | Pointer to TOO observation object. | |
qitem_p | Pointer to queue item containing the command. |
References _LIM_Too::consign, _LIM_Too::cpu_mask, _LIM_Too::db, _LIM_Too::ignore, _LIM_Too::latc, LIM_lpa_get_start_parms(), LIM_LPA_MODE_TOO, LIM_lpa_send_start(), lim_too_change_started(), lim_too_check(), _LIM_Too::lpa_p, and _LIM_Too::started.
Referenced by lim_mode_physics_start().
unsigned int LIM_too_handle_start | ( | LIM_Too * | object_p, | |
const ITC_QueueItem * | qitem_p, | |||
int | start_ok | |||
) |
Handle a TOO-Start command.
object_p | Pointer to TOO observation object. | |
qitem_p | Pointer to queue item containing the command. | |
start_ok | Flag indicating that a PHYSICS-START cmd can be sent. |
References _LIM_TOO_Start_Prm::consign, _LIM_Too::consign, _LIM_Too::cpu_mask, _LIM_TOO_Start_Prm::cpus, _LIM_TOO_Start_Prm::db, _LIM_Too::db, _LIM_Too::duration, _LIM_TOO_Start_Prm::ignore, _LIM_Too::ignore, _LIM_TOO_Start_Prm::latc, _LIM_Too::latc, LIM_LPA_MODE_TOO, LIM_lpa_send_start(), lim_too_change_ready(), lim_too_change_started(), lim_too_check(), lim_too_wut_handler(), _LIM_Too::lpa_p, _LIM_TOO_Start_Prm::observation_id, _LIM_Too::observation_id, _LIM_TOO_Start_Pkt::pay, _LIM_Too::ready, _LIM_TOO_Start_Prm::seconds, and _LIM_Too::wut.
Referenced by lim_mode_too_start().
int LIM_too_has_started | ( | LIM_Too * | object_p | ) |
Return the STARTED status of a TOO observation.
object_p | Pointer to TOO observation object. |
References lim_too_check(), and _LIM_Too::started.
Referenced by LIM_mode_get_info().
int LIM_too_is_ready | ( | LIM_Too * | object_p | ) |
Return the READY status of a TOO observation.
object_p | Pointer to TOO observation object. |
References lim_too_check(), and _LIM_Too::ready.
Referenced by LIM_mode_get_info(), and lim_mode_target_mode().
unsigned int LIM_too_new | ( | LIM_Too ** | object_pp, | |
LIM_Task * | task_p, | |||
LIM_Action * | action_p, | |||
LIM_Lpa * | lpa_p, | |||
LIM_Bulk * | bulk_p | |||
) |
Create and initialize a new TOO observation object.
object_pp | Location to return pointer to new object. | |
task_p | Pointer to a task object. | |
action_p | Pointer to an action reporting object. | |
lpa_p | Pointer to an LPA task interface object. | |
bulk_p | Pointer to a BULK queue object. |
References _LIM_Too::action_p, _LIM_Too::bulk_p, _LIM_Too::key, LIM_too_delete(), LIM_TOO_VALID_KEY, _LIM_Too::lpa_p, _LIM_Too::ready, _LIM_Too::started, _LIM_Too::task_p, and _LIM_Too::wut.
Referenced by LIM_mode_new().
unsigned int LIM_too_remain_sec | ( | LIM_Too * | object_p | ) |
Return the number of seconds remaining in a TOO observation.
object_p | Pointer to TOO observation object. |
References _LIM_Too::duration, lim_too_check(), _LIM_Too::ready, and _LIM_Too::start_sec.
Referenced by LIM_mode_get_info().
WUT_cb_status lim_too_wut_handler | ( | void * | prm, | |
WUT_tmr * | wut | |||
) | [static] |
Handle wake-up timer expiration.
prm | Pointer to TOO observation object. | |
wut | Pointer to wake-up timer. |
References _LIM_Too::bulk_p, _LIM_Too::expired, LIM_bulk_send(), and lim_too_check().
Referenced by LIM_too_handle_start().