CSL 5.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes
Controller Class Reference

`#include <PME.h>`

List of all members.

## Public Member Functions
| Controller (string remote_net_addr, unsigned short remote_port)
| Controller ()
| ~Controller ()
void | set_remote_addr_and_port (string addr, unsigned short port)
void | set_data (controller_str &str)
void | get_data (CPoint &p, CPoint &v, GloveState &glove_st)
void | get_position (CPoint &p)
void * | remote_read_func (void *data)
void | start_reader_thread ()
void | get_remote_data ()

## Protected Attributes
CPoint | _position
CPoint | _velocity
GloveState | glove_state
csl::SynchPthread | sync
csl::ThreadPthread | thread
unsigned short | foreign_port
string | foreign_net_address
UDPSocket | sock

## Detailed Description

Definition at line 53 of file PME.h.

## Constructor & Destructor Documentation

Controller::Controller | ( | string | remote_net_addr,
|  | unsigned short | remote_port
| ) |  |
| inline

Definition at line 66 of file PME.h.

Controller::Controller | ( |  | ) |
| inline

Definition at line 68 of file PME.h.

Controller::~Controller | ( |  | ) |
| inline

Definition at line 69 of file PME.h.

## Member Function Documentation

void Controller::set_remote_addr_and_port | ( | string | addr,
|  | unsigned short | port
| ) |  |
| inline

Definition at line 70 of file PME.h.

void Controller::set_data | ( | controller_str & | str | ) |

Definition at line 14 of file PME.cpp.

References _position, _velocity, controller_str::dx, controller_str::dy, controller_str::dz, csl::SynchPthread::lock(), csl::CPoint::set(), sync, csl::SynchPthread::unlock(), controller_str::x, controller_str::y, and controller_str::z.

Referenced by get_remote_data().

void Controller::get_data | ( | CPoint & | p,
|  | CPoint & | v,
|  | GloveState & | glove_st
| ) |  |

Definition at line 28 of file PME.cpp.

References _position, _velocity, glove_state, csl::SynchPthread::lock(), sync, and csl::SynchPthread::unlock().

Referenced by PME::manage_sources().

void Controller::get_position | ( | CPoint & | p | ) |

Definition at line 36 of file PME.cpp.

References _position, csl::SynchPthread::lock(), sync, and csl::SynchPthread::unlock().

void* Controller::remote_read_func | ( | void * | data | ) |

void Controller::start_reader_thread | ( |  | ) |

void Controller::get_remote_data | ( |  | ) |

Definition at line 63 of file PME.cpp.

References controller_str::dx, controller_str::dy, controller_str::dz, foreign_net_address, foreign_port, controller_str::glove_state, UDPSocket::recvFrom(), UDPSocket::sendTo(), set_data(), sock, controller_str::x, controller_str::y, and controller_str::z.

Referenced by PME::manage_sources().

## Member Data Documentation

CPoint Controller::_position
| protected

Definition at line 55 of file PME.h.

Referenced by get_data(), get_position(), and set_data().

CPoint Controller::_velocity
| protected

Definition at line 56 of file PME.h.

Referenced by get_data(), and set_data().

GloveState Controller::glove_state
| protected

Definition at line 57 of file PME.h.

Referenced by get_data().

csl::SynchPthread Controller::sync
| protected

Definition at line 58 of file PME.h.

Referenced by get_data(), get_position(), and set_data().

csl::ThreadPthread Controller::thread
| protected

Definition at line 59 of file PME.h.

unsigned short Controller::foreign_port
| protected

Definition at line 61 of file PME.h.

Referenced by get_remote_data().

string Controller::foreign_net_address
| protected

Definition at line 62 of file PME.h.

Referenced by get_remote_data().

UDPSocket Controller::sock
| protected

Definition at line 63 of file PME.h.

Referenced by get_remote_data().

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

- CSL/Spatializers/VBAP/PME.h
- CSL/Spatializers/VBAP/PME.cpp