Mario Bambagini / ssWi

Dependents:   rover_car rover_pc supervisor watering_unit ... more

Embed: (wiki syntax)

« Back to documentation index

ssWi.hpp File Reference

ssWi.hpp File Reference

internal functions for mananing the protocol More...

Go to the source code of this file.

Functions

bool ssWi_init (ssWiChannel *c, int rateTX, int rateRX)
 Initialize the ssWi protocol.
bool ssWi_isActive (PortID port)
 check if the communication port is open
bool ssWi_setPort (PortID port)
 open the specified port
bool ssWi_unsetPort (PortID port)
 free the specified port

Detailed Description

internal functions for mananing the protocol

Definition in file ssWi.hpp.


Function Documentation

bool ssWi_init ( ssWiChannel c,
int  rateTX,
int  rateRX 
)

Initialize the ssWi protocol.

It is not possible to have two instances of this protocol at the same time.

Parameters:
cchannel to be used for sending/receving data
rateTXtransmission rate (how many time every second)
rateRXreceiving rate (how many time every second)
Returns:
true if the network has been correctly initialized, false otherwise
Warning:
rx should be at least twice more frequent than tx (rateRX >= 2*rateTX)

Definition at line 66 of file ssWi.cpp.

bool ssWi_isActive ( PortID  port )

check if the communication port is open

Parameters:
portport identified to check
Returns:
true if the port is open, false otherwise

Definition at line 159 of file ssWi.cpp.

bool ssWi_setPort ( PortID  port )

open the specified port

Parameters:
portport identified to open
Returns:
true if the port has been opened, false otherwise

Definition at line 165 of file ssWi.cpp.

bool ssWi_unsetPort ( PortID  port )

free the specified port

Parameters:
portport identified to close
Returns:
true if the port has been closed, false otherwise

Definition at line 176 of file ssWi.cpp.