Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
SensorNet Class Reference

#include <SensorNet.h>

List of all members.

Classes

class  Node

Public Member Functions

bool getInfo (SensorNet::Node *node)
bool getSensorReadings (SensorNet::Node *node, std::vector< lse_sensor_msgs::Nostril > *mox, std::vector< lse_sensor_msgs::Anemometer > *termistor)
bool getSensors (SensorNet::Node *node)
bool getTime (SensorNet::Node *node, ros::Time *current_time, ros::Time *next_reading)
bool scanNodes (int period)
 SensorNet (std::string port_name, int baud_rate)
bool setAddress (SensorNet::Node *node, char new_address)
bool setAllPWM (SensorNet::Node *node, int pwm1, int pwm2, int pwm3, int pwm4)
bool setPWM (SensorNet::Node *node, ros::Time time, unsigned int id, int pwm)
bool setSensors (SensorNet::Node *node, int s1, int s2, int s3, int s4, int w1, int w2)
bool setTime (SensorNet::Node *node, ros::Time start_time)
bool syncNodes ()
bool syncTime (SensorNet::Node *node)
 ~SensorNet ()

Public Attributes

std::vector< Nodenodes
int timeout

Private Member Functions

void appendInt (std::string *data, int value)
void appendTime (std::string *data, ros::Time time)
int extractInt (std::string data)
ros::Time extractTime (std::string data)
bool sendCommand (char address, char command)
bool waitForIt (char address)

Private Attributes

cereal::CerealPortserial_port
ros::Time start_time

Detailed Description

Definition at line 73 of file SensorNet.h.


Constructor & Destructor Documentation

SensorNet::SensorNet ( std::string  port_name,
int  baud_rate 
)

Definition at line 39 of file SensorNet.cpp.

Definition at line 55 of file SensorNet.cpp.


Member Function Documentation

void SensorNet::appendInt ( std::string *  data,
int  value 
) [private]

Definition at line 232 of file SensorNet.cpp.

void SensorNet::appendTime ( std::string *  data,
ros::Time  time 
) [private]

Definition at line 170 of file SensorNet.cpp.

int SensorNet::extractInt ( std::string  data) [private]

Definition at line 240 of file SensorNet.cpp.

ros::Time SensorNet::extractTime ( std::string  data) [private]

Definition at line 202 of file SensorNet.cpp.

Definition at line 486 of file SensorNet.cpp.

bool SensorNet::getSensorReadings ( SensorNet::Node node,
std::vector< lse_sensor_msgs::Nostril > *  mox,
std::vector< lse_sensor_msgs::Anemometer > *  termistor 
)

Definition at line 321 of file SensorNet.cpp.

Definition at line 557 of file SensorNet.cpp.

bool SensorNet::getTime ( SensorNet::Node node,
ros::Time current_time,
ros::Time next_reading 
)

Definition at line 294 of file SensorNet.cpp.

bool SensorNet::scanNodes ( int  period)

Definition at line 107 of file SensorNet.cpp.

bool SensorNet::sendCommand ( char  address,
char  command 
) [private]

Definition at line 66 of file SensorNet.cpp.

bool SensorNet::setAddress ( SensorNet::Node node,
char  new_address 
)

Definition at line 584 of file SensorNet.cpp.

bool SensorNet::setAllPWM ( SensorNet::Node node,
int  pwm1,
int  pwm2,
int  pwm3,
int  pwm4 
)

Definition at line 417 of file SensorNet.cpp.

bool SensorNet::setPWM ( SensorNet::Node node,
ros::Time  time,
unsigned int  id,
int  pwm 
)

Definition at line 455 of file SensorNet.cpp.

bool SensorNet::setSensors ( SensorNet::Node node,
int  s1,
int  s2,
int  s3,
int  s4,
int  w1,
int  w2 
)

Definition at line 525 of file SensorNet.cpp.

bool SensorNet::setTime ( SensorNet::Node node,
ros::Time  start_time 
)

Definition at line 271 of file SensorNet.cpp.

Definition at line 149 of file SensorNet.cpp.

Definition at line 250 of file SensorNet.cpp.

bool SensorNet::waitForIt ( char  address) [private]

Definition at line 86 of file SensorNet.cpp.


Member Data Documentation

std::vector<Node> SensorNet::nodes

Definition at line 120 of file SensorNet.h.

Definition at line 139 of file SensorNet.h.

Definition at line 141 of file SensorNet.h.

Definition at line 136 of file SensorNet.h.


The documentation for this class was generated from the following files:


sensornet
Author(s): Gonçalo Cabrita and Pedro Sousa
autogenerated on Mon Jan 6 2014 11:27:58