#include <overhead_vision_client.h>
Inheritance diagram for OverheadVisionClient:

Public Member Functions | |
| OverheadVisionClient (int patternNumber=0) | |
| Constructor for base vision client class. | |
| virtual | ~OverheadVisionClient (void) |
| Short Description. | |
| int | nextPacket (void) |
| Gets next packet in vision packet queue. | |
| int | findMyPattern (void) |
| int | findPattern (int patternNumber) |
| Short Description. | |
| int | getIndex (int index) |
| Short Description. | |
| virtual int | recv (void)=0 |
| virtual int | recvNoWait (void)=0 |
| int | getSeqNum (void) |
| int | getCount (void) |
| int | getID (void) |
| float | getX (void) |
| float | getZ (void) |
| float | getAngle (void) |
Protected Types | |
| enum | { CONTROL_DATA = 0, VISION_DATA = 1, CRAFT2CRAFT = 2 } |
Protected Attributes | |
| int | myPatternNumber |
| std::queue< srv_packet_t > | packetQ |
| const srv_packet_t * | currentPacket |
| const unsigned short * | currentData |
Static Protected Attributes | |
| static const float | toMeters = 1.0 / 10000.0 |
| static const float | toRadians = M_PI / 1800.0 |
Private Member Functions | |
| OverheadVisionClient (const OverheadVisionClient &o) | |
| const OverheadVisionClient & | operator= (const OverheadVisionClient &o) |
Definition at line 83 of file overhead_vision_client.h.
|
|
Definition at line 87 of file overhead_vision_client.h. |
|
|
Constructor for base vision client class. In normal operation the system will be connect to the server and it will continously send vision packets to this client. You can use either a blocking or non-blocking recieve to get the packets from the network. Calling recv[NoWait]() will only queue packets locally. nextPacket() must be used to iterate through packets in the queue. The reasons for queue packets is two-fold. First with network stream protocols (TCP / Bluetooth RFCOMM) there is no gaurantee that recv will only return one vision packet with each call. It's also possible to put the recv() and nextPacket() functions in seperate threads, where one thread recv()'s in a tight loop, and the other thread could be a realtime thread that can quickly read packets from the queue. Each vision packet may contain data for multiple vehicles so findPattern() can be used to lookup the data for a specific pattern number (if it exists). If you want to iterate over over all the data in the vision packet use getIndex().
Definition at line 70 of file overhead_vision_client.cpp. |
|
|
Short Description. Long Description if necessary.
Definition at line 43 of file overhead_vision_client.cpp. |
|
|
Definition at line 125 of file overhead_vision_client.h. |
|
|
Definition at line 96 of file overhead_vision_client.h. References findPattern(), and myPatternNumber. Referenced by main(). |
|
|
Short Description. Long Description if necessary.
Definition at line 123 of file overhead_vision_client.cpp. References currentData, currentPacket, srv_packet_t::data, srv_packet_t::header, i, and srv_pkt_header_t::num_hc_included. Referenced by findMyPattern(). |
|
|
Definition at line 162 of file overhead_vision_client.h. References currentData, and toRadians. |
|
|
Definition at line 138 of file overhead_vision_client.h. References currentPacket, srv_packet_t::header, and srv_pkt_header_t::num_hc_included. Referenced by main(). |
|
|
Definition at line 144 of file overhead_vision_client.h. References currentData. |
|
|
Short Description. Long Description if necessary.
Definition at line 150 of file overhead_vision_client.cpp. References currentData, currentPacket, and srv_packet_t::data. |
|
|
Definition at line 132 of file overhead_vision_client.h. References currentPacket, srv_packet_t::header, and srv_pkt_header_t::seq_number. Referenced by main(). |
|
|
Definition at line 150 of file overhead_vision_client.h. References currentData, and toMeters. Referenced by main(). |
|
|
Definition at line 156 of file overhead_vision_client.h. References currentData, and toMeters. Referenced by main(). |
|
|
Gets next packet in vision packet queue. In normal operation recv will be called and will usually get no more than one packet at a time. But it may be possible re
Definition at line 93 of file overhead_vision_client.cpp. References currentPacket, and packetQ. Referenced by main(). |
|
|
Definition at line 126 of file overhead_vision_client.h. |
|
|
Implemented in OverheadVisionClientBluetooth, and OverheadVisionClientWifi. Referenced by main(). |
|
|
Implemented in OverheadVisionClientBluetooth, and OverheadVisionClientWifi. |
|
|
Definition at line 116 of file overhead_vision_client.h. Referenced by findPattern(), getAngle(), getID(), getIndex(), getX(), and getZ(). |
|
|
Definition at line 115 of file overhead_vision_client.h. Referenced by findPattern(), getCount(), getIndex(), getSeqNum(), and nextPacket(). |
|
|
Definition at line 112 of file overhead_vision_client.h. Referenced by findMyPattern(). |
|
|
Definition at line 114 of file overhead_vision_client.h. Referenced by nextPacket(), OverheadVisionClientWifi::tcpRecv(), and OverheadVisionClientWifi::udpRecv(). |
|
|
Definition at line 118 of file overhead_vision_client.h. |
|
|
Definition at line 119 of file overhead_vision_client.h. Referenced by getAngle(). |
1.4.4