Functions
wmp_interface.h File Reference
#include <stdarg.h>
#include "wmp_config.h"
#include "Msg.h"
Include dependency graph for wmp_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char lqm_get_val (int i, int j)
int wmp_queue_tx_get_room (void)
int wmp_queue_tx_remove_head (void)
void wmpEnableIntControl (void)
void wmpExit (void)
void wmpForceBurst (int port)
void wmpForceTopology (char *name, int parameter)
int wmpGetActiveSearch (void)
int wmpGetCpuDelay (void)
int wmpGetFlowControl (void)
short wmpGetInstanceId (void)
int wmpGetLatestDistances (char *dist)
int wmpGetLatestLQM (char *lqm)
unsigned int wmpGetLoopId (void)
int wmpGetMessageReschedule (void)
unsigned int wmpGetMTU (void)
int wmpGetNetIT (void)
char wmpGetNodeId (void)
int wmpGetNumOfElementsInRXQueue (int port)
int wmpGetNumOfElementsInTXQueue (void)
char wmpGetNumOfNodes (void)
int wmpGetPrimBasedRouting (void)
int wmpGetRate (void)
unsigned int wmpGetSerial (void)
int wmpGetTimeout (void)
int wmpGetWCMult (void)
void wmpInmediateExit (void)
int wmpIsKernelSpace (void)
int wmpIsNetworkConnected (void)
int wmpIsNetworkConnectedBlocking (int timeout_ms)
int wmpNonBlockingPop (Msg *p)
unsigned int wmpPop (Msg *p)
int wmpPopData (unsigned int port, char **p, unsigned int *size, unsigned char *src, signed char *priority)
int wmpPopDataCopy (unsigned int port, char *p, unsigned int *size, unsigned char *src, signed char *priority)
void wmpPopDataDone (int id)
int wmpPopDataTimeout (unsigned int port, char **p, unsigned int *size, unsigned char *src, signed char *priority, int to)
int wmpPopDataTimeoutCopy (unsigned int port, char *p, unsigned int *size, unsigned char *src, signed char *priority, int to)
int wmpPush (Msg *p)
int wmpPushData (unsigned int port, char *p, unsigned int size, unsigned int dest, signed char priority)
void wmpRun (void)
void wmpRunBG (void)
void wmpSetActiveSearch (int val)
void wmpSetCpuDelay (int val)
void wmpSetFlowControl (int val)
void wmpSetInstanceId (short iid)
void wmpSetMessageReschedule (int val)
void wmpSetPrimBasedRouting (int val)
void wmpSetQuiet (void)
void wmpSetRate (int val)
void wmpSetRxError (char *name, int rate)
int wmpSetTaskMinimumSeparation (int port, int period)
void wmpSetTimeout (int val)
int wmpSetup (char node_id, char active_nodes)
int wmpSetupList (int _node_id, int _num_nodes, int nparam,...)
void wmpSetWCMult (int val)
int wmpTimedPop (Msg *p, int timeout_ms)
int wmpWaitData (unsigned int port, int to)

Function Documentation

char lqm_get_val ( int  i,
int  j 
)

Definition at line 159 of file lqm.c.

int wmp_queue_tx_get_room ( void  )

Returns the number of free posiitons in the TX queue

Returns:
number of free positions in the TX queue

Definition at line 154 of file queues.c.

int wmp_queue_tx_remove_head ( void  )

Remove the less priority message from the TX queue

Parameters:
pthe removed message

Definition at line 162 of file queues.c.

void wmpEnableIntControl ( void  )

Enable RT-WMP SIGINT control (CTRL^C will show an alive message)

void wmpExit ( void  )

Stop the process carefully

Definition at line 369 of file RT-WMP.c.

void wmpForceBurst ( int  port)

Definition at line 287 of file queues.c.

void wmpForceTopology ( char *  name,
int  parameter 
)

Definition at line 77 of file ml_com.c.

int wmpGetActiveSearch ( void  )

Returns the status of the active search capability

Returns:
status 1:on 0:off

Definition at line 145 of file core/wmp_misc.c.

int wmpGetCpuDelay ( void  )

Returns the delay that RT-WMP process waits before transmitting (to leave the processor to other tasks)

Returns:
delay in milliseconds

Definition at line 82 of file interface.c.

int wmpGetFlowControl ( void  )

Definition at line 141 of file interface.c.

short wmpGetInstanceId ( void  )

Definition at line 118 of file interface.c.

int wmpGetLatestDistances ( char *  dist)

Definition at line 62 of file interface.c.

int wmpGetLatestLQM ( char *  lqm)

Returns latest lqm in a buffer. The Matrix should be scanned with a innested for loop:

        char lqm[wmpGetNumOfNodes()*wmpGetNumOfNodes()],p;
        wmpGetLatestLQM(lqm);
        p = lqm;
	for (i = 0; i<wmpGetNumOfNodes() ; i++){
		for (j = 0; j<wmpGetNumOfNodes() ; j++){
			element_ij = *p;
			p++;
		};
	};

Parameters:
lqman (at least) n x n char buffer (output parameter)
Returns:
always 0

Definition at line 50 of file interface.c.

unsigned int wmpGetLoopId ( void  )

Definition at line 149 of file interface.c.

int wmpGetMessageReschedule ( void  )

Definition at line 133 of file interface.c.

unsigned int wmpGetMTU ( void  )

Returns the Maximum Transmission Unit for USER data

Returns:
the MTU size in bytes

Definition at line 127 of file core/wmp_misc.c.

int wmpGetNetIT ( void  )

Returns the network inactivity timeout

Returns:
the net inactivity timeout

Definition at line 110 of file interface.c.

char wmpGetNodeId ( void  )

Returns the WMP address of the local node

Returns:
the WMP address of the local node

Definition at line 42 of file interface.c.

int wmpGetNumOfElementsInRXQueue ( int  port)

Returns the number of elements in the RX queue

Returns:
number of elements in the RX queue

Definition at line 185 of file queues.c.

Returns the number of elements in the TX queue

Returns:
number of elements in the TX queue

Definition at line 181 of file queues.c.

char wmpGetNumOfNodes ( void  )

Returns the total number of nodes of the network

Returns:
the total number of nodes of the network

Definition at line 46 of file interface.c.

int wmpGetPrimBasedRouting ( void  )

Definition at line 513 of file wmp_interface.c.

int wmpGetRate ( void  )

Returns the network rate (used to calculate delays in frame-hops)

Returns:
rate in Mbps

Definition at line 106 of file interface.c.

unsigned int wmpGetSerial ( void  )

Definition at line 145 of file interface.c.

int wmpGetTimeout ( void  )

Returns the reception timeout

Returns:
reception timeout in milliseconds

Definition at line 90 of file interface.c.

int wmpGetWCMult ( void  )

Returns multiplier for the worst-case loop of the protocol (used to force worse worst-cases and increase QoS performances)

Returns:
multiplier

Definition at line 98 of file interface.c.

void wmpInmediateExit ( void  )

Stops the process killing the thread

Definition at line 380 of file RT-WMP.c.

int wmpIsKernelSpace ( void  )

Definition at line 71 of file kernel.h.

int wmpIsNetworkConnected ( void  )

Allows knowing if the network is connected (i.e. all the nodes are up and working and connected among them)

Returns:
1 if connected 0 if disconnected

Definition at line 179 of file lqm.c.

int wmpIsNetworkConnectedBlocking ( int  timeout_ms)

Allows knowing if the network is connected (i.e. all the nodes are up and working and connected among them and if not, blocks the caller thread until connected

Parameters:
timeout_msspecify the maximum wait for connection (if timeout_ms = 0 wait forever)
Returns:
1 if connected 0 if disconnected

Definition at line 183 of file lqm.c.

int wmpNonBlockingPop ( Msg p)

Dequeue a message from the RX Queue if present. If there are not message to dequeue, returns a negative value

Parameters:
pthe message to pop
Returns:
time spent in the queue (age) if dequeued -1 if no message to pop

Definition at line 229 of file queues.c.

unsigned int wmpPop ( Msg p)

Dequeue a message from the RX Queue

Parameters:
pthe message to pop
Returns:
time spent in the queue (age)

Definition at line 207 of file queues.c.

int wmpPopData ( unsigned int  port,
char **  p,
unsigned int *  size,
unsigned char *  src,
signed char *  priority 
)

Definition at line 255 of file queues.c.

int wmpPopDataCopy ( unsigned int  port,
char *  p,
unsigned int *  size,
unsigned char *  src,
signed char *  priority 
)

Definition at line 271 of file queues.c.

void wmpPopDataDone ( int  id)

Definition at line 267 of file queues.c.

int wmpPopDataTimeout ( unsigned int  port,
char **  p,
unsigned int *  size,
unsigned char *  src,
signed char *  priority,
int  to 
)

Definition at line 259 of file queues.c.

int wmpPopDataTimeoutCopy ( unsigned int  port,
char *  p,
unsigned int *  size,
unsigned char *  src,
signed char *  priority,
int  to 
)

Definition at line 279 of file queues.c.

int wmpPush ( Msg p)

Enqueue a message in the TX Queue

Parameters:
pthe message to push
Returns:
1 if success 0 if not (queue full)

Definition at line 189 of file queues.c.

int wmpPushData ( unsigned int  port,
char *  p,
unsigned int  size,
unsigned int  dest,
signed char  priority 
)

Definition at line 237 of file queues.c.

void wmpRun ( void  )

Starts the process in foreground (blocking)

Definition at line 365 of file RT-WMP.c.

void wmpRunBG ( void  )

Starts the process in background (separate thread)

Definition at line 358 of file RT-WMP.c.

void wmpSetActiveSearch ( int  val)

Set / Unset the active search capability (default:on)

Definition at line 141 of file core/wmp_misc.c.

void wmpSetCpuDelay ( int  val)

Sets the delay that RT-WMP process waits before transmitting (to leave the processor to other tasks)

Parameters:
valtime in milliseconds

Definition at line 78 of file interface.c.

void wmpSetFlowControl ( int  val)

Definition at line 137 of file interface.c.

void wmpSetInstanceId ( short  iid)

Definition at line 114 of file interface.c.

void wmpSetMessageReschedule ( int  val)

Definition at line 130 of file interface.c.

void wmpSetPrimBasedRouting ( int  val)

Definition at line 149 of file core/wmp_misc.c.

void wmpSetQuiet ( void  )

Avoid node tranmission

Definition at line 385 of file RT-WMP.c.

void wmpSetRate ( int  val)

Sets network rate (used to calculate delays in frame-hops)

Parameters:
valrate in Mbps

Definition at line 102 of file interface.c.

void wmpSetRxError ( char *  name,
int  rate 
)

Definition at line 119 of file ml_com.c.

int wmpSetTaskMinimumSeparation ( int  port,
int  period 
)

Definition at line 189 of file task_timing.c.

void wmpSetTimeout ( int  val)

Sets the reception timeout

Parameters:
valtime in milliseconds

Definition at line 86 of file interface.c.

int wmpSetup ( char  node_id,
char  active_nodes 
)

Sets up the network

Parameters:
node_idspecify the WMP address of the local node
active_nodesspecify the number of nodes in the network

Definition at line 139 of file RT-WMP.c.

int wmpSetupList ( int  _node_id,
int  _num_nodes,
int  nparam,
  ... 
)

Definition at line 91 of file RT-WMP.c.

void wmpSetWCMult ( int  val)

Sets multiplier for the worst-case loop of the protocol (used to force worse worst-cases and increase QoS performances)

Parameters:
valmultiplier

Definition at line 94 of file interface.c.

int wmpTimedPop ( Msg p,
int  timeout_ms 
)

Dequeue a message from the RX Queue if already in the queue or enqueued within timeous_ms milliseconds. If there are not message to dequeue, returns a negative value

Parameters:
pthe message to pop
timeout_mspop timeout in milliseconds
Returns:
time spent in the queue (age) if dequeued -1 if timeout expired

Definition at line 217 of file queues.c.

int wmpWaitData ( unsigned int  port,
int  to 
)

Definition at line 263 of file queues.c.



ros_rt_wmp
Author(s): Danilo Tardioli, dantard@unizar.es
autogenerated on Mon Oct 6 2014 08:27:13