GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCI / V6-0-0 > lci / mv2304
Typedefs | |
typedef struct _LCI_cue | LCI_cue |
Declaration of the opaque cue structure. | |
Enumerations | |
enum | LCI_CUE_END { LCI_CUE_FAILED = -1, LCI_CUE_UNSET = 0, LCI_CUE_SIGNALED = 1, LCI_CUE_TIMEDOUT = 2 } |
State information returned from LCI_wait indicating how the cue was terminated. More... | |
Functions | |
void | LCI_clearCue (LCI_cue *cue) |
Clear a cue. | |
void | LCI_clearCueCounts (LCI_cue *cue) |
Clear cue counters. | |
unsigned | LCI_deleteCue (LCI_cue *cue) |
Delete a cue. | |
void | LCI_getCueCounts (LCI_cue *cue, unsigned int *nWait, unsigned int *nSignal, unsigned int *nTimeout) |
Get cue counters. | |
LCI_cue * | LCI_newCue (void) |
Create a new cue. | |
void | LCI_signalCue (LCI_cue *cue) |
Signal cue completion. | |
unsigned | LCI_waitCue (LCI_cue *cue, unsigned timeout) |
Wait for a cue to complete or time out. |
enum LCI_CUE_END |
State information returned from LCI_wait indicating how the cue was terminated.
void LCI_clearCue | ( | LCI_cue * | cue | ) |
Clear a cue.
This routine puts the cue into a known cleared state, ready for the next wait.
cue | Pointer to an allocated, initialised cue structure (from LCI_newCue) |
void LCI_clearCueCounts | ( | LCI_cue * | cue | ) |
Clear cue counters.
This routine zeroes the counts of waits, signals and timeouts.
cue | Pointer to a cue being used. |
unsigned LCI_deleteCue | ( | LCI_cue * | cue | ) |
Delete a cue.
This routine destroys the semaphore and wake-up timer and then frees the memory associated with the cue structure
cue | Pointer to an initialised cue structure (make sure that it is not currently running!) |
LCI_SUCCESS | if all goes well | |
LCI_WUTDFAIL | if the wake-up timer could not be destroyed, because it was in a bad state |
void LCI_getCueCounts | ( | LCI_cue * | cue, | |
unsigned int * | nWait, | |||
unsigned int * | nSignal, | |||
unsigned int * | nTimeout | |||
) |
Get cue counters.
This routine obtains the counts of waits, signals and timeouts since the last time the cue was cleared.
cue | Pointer to a cue being used. | |
nWait | Address of an integer to receive the number of wait calls, or NULL if not needed. | |
nSignal | Address of an integer to receive the number of signal calls, or NULL if not needed. | |
nTimeout | Address of an integer to receive the number of timeouts, or NULL if not needed. |
LCI_cue* LCI_newCue | ( | void | ) |
Create a new cue.
This routine allocates memory for the cue structure then creates the timer and semaphore to be held by the structure
void LCI_signalCue | ( | LCI_cue * | cue | ) |
Signal cue completion.
This routine signals completion by setting the end state to LCI_CUE_SIGNALED and giving the semaphore
cue | Pointer to a cue that is being waited upon |
unsigned LCI_waitCue | ( | LCI_cue * | cue, | |
unsigned | timeout | |||
) |
Wait for a cue to complete or time out.
This routine starts the wake-up timer and takes the semaphore
cue | Pointer to an allocated, initialised cue structure (from LCI_newCue) | |
timeout | Time, in microseconds, until the call times out. |
LCI_CUE_SIGNALED | Another task called signal | |
LCI_CUE_TIMEDOUT | If the timer expired before the cue was signalled. | |
LCI_CUE_FAILED | Timer failed to start (because of incorrect state) |