HeMPS  8.0
Functions | Variables
pending_service.c File Reference

This module implements function relative a FIFO of the incomming packets (ServiceHeader FIFO) received by slave and that cannot be immediately handled. This modules is used only by the slave kernel. More...

#include "pending_service.h"
#include "../include/plasma.h"
#include "utils.h"
Include dependency graph for pending_service.c:

Functions

unsigned char add_pending_service (ServiceHeader *pending_service)
 
ServiceHeaderget_next_pending_service ()
 

Variables

ServiceHeader pending_services_FIFO [PENDING_SERVICE_TAM]
 pending services array declaration
 
unsigned int pending_service_first = 0
 first valid array index
 
unsigned int pending_service_last = 0
 last valid array index
 
unsigned char add_fifo = 0
 Keeps the last operation: 1 - last operation was add. 0 - last operation was remove.
 

Detailed Description

This module implements function relative a FIFO of the incomming packets (ServiceHeader FIFO) received by slave and that cannot be immediately handled. This modules is used only by the slave kernel.

HEMPS VERSION - 8.0 - support for RT applications

Distribution: June 2016

Created by: Marcelo Ruaro - contact: marce.nosp@m.lo.r.nosp@m.uaro@.nosp@m.acad.nosp@m..pucr.nosp@m.s.br

Research group: GAPH-PUCRS - contact: ferna.nosp@m.ndo..nosp@m.morae.nosp@m.s@pu.nosp@m.crs.b.nosp@m.r

Function Documentation

unsigned char add_pending_service ( ServiceHeader pending_service)

Add a new pending service. A pending service is a incoming service that cannot be handled immediately by kernel

Parameters
pending_serviceIncoming ServiceHeader pointer
Returns
1 if add was OK, 0 is the array is full (ERROR situation, while forever)
ServiceHeader* get_next_pending_service ( )

Searches by the next pending service, remove then, and return

Returns
The removed ServiceHeader pointer. As it is a memory position, the received part will do something with this pointer and discard the reference