Mario Bambagini / ssWi

Dependents:   rover_car rover_pc supervisor watering_unit ... more

Embed: (wiki syntax)

« Back to documentation index

ssWiChannel Class Reference

ssWiChannel Class Reference

Abstract class for a communication channel. More...

#include <ssWiChannel.hpp>

Inherited by XBeeModule.

Public Member Functions

virtual bool init (int TXRate, int RXRate)=0
 Initialize ssWi on this channel.
virtual int read (char *msg)=0
 read from the socket
virtual void write (const char *msg, int n)=0
 write to the socket

Protected Member Functions

bool _init (ssWiChannel *c, int TXRate, int RXRate)
 Initialize the protocol.

Detailed Description

Abstract class for a communication channel.

Definition at line 16 of file ssWiChannel.hpp.


Member Function Documentation

bool _init ( ssWiChannel c,
int  TXRate,
int  RXRate 
) [protected]

Initialize the protocol.

Parameters:
cssWi channel
TXRatehow may times trans every second
RXRatehow may time rx every second
Returns:
true if the channel is ready, false otherwise

Definition at line 28 of file ssWiChannel.hpp.

virtual bool init ( int  TXRate,
int  RXRate 
) [pure virtual]

Initialize ssWi on this channel.

Parameters:
TXRatenumber of transmissions per second
RXRatenumber of receptions per second
Returns:
true if ssWi has been initialized succefully, false otherwise
virtual int read ( char *  msg ) [pure virtual]

read from the socket

Parameters:
msgbuffer where to write the read message
Returns:
the number of read bytes
virtual void write ( const char *  msg,
int  n 
) [pure virtual]

write to the socket

Parameters:
msgbuffer with the message to send
nnumber of bytes to send