#include <kvh_geo_fog_3d_packet_storage.hpp>
◆ KvhPacketStorage()
kvh::KvhPacketStorage::KvhPacketStorage |
( |
| ) |
|
◆ AddPacket()
int kvh::KvhPacketStorage::AddPacket |
( |
packet_id_e |
_packetId | ) |
|
- Parameters
-
_packetId | the id of the packet to add to the map |
- Returns
- 0 = success, <0 on error
Definition at line 72 of file packet_storage.cpp.
◆ Contains()
bool kvh::KvhPacketStorage::Contains |
( |
packet_id_e |
_packetId | ) |
|
if (packetStorage.Contains(packetId))
- Parameters
-
[in] | _packetId | The packet id we are looking |
- Returns
- bool True if in our map, false otherwise
Definition at line 179 of file packet_storage.cpp.
◆ GetPacket()
template<class T >
int kvh::KvhPacketStorage::GetPacket |
( |
packet_id_e |
_packetId, |
|
|
T & |
_packet |
|
) |
| |
|
inline |
◆ Init()
Correctly sets up a KvhPacketMap for the requested packets.
packetStorage.Init(initIdsVector);
- Parameters
-
_packRequest | [in] List of packets we'd like to request from the sensor |
- Returns
- [int]:
1 = Warning, duplicate id found 0 = Success, -1 = Failure, unsupported id found
Definition at line 37 of file packet_storage.cpp.
◆ PacketIsUpdated()
bool kvh::KvhPacketStorage::PacketIsUpdated |
( |
packet_id_e |
_packetId | ) |
|
if (packetStorage.PacketIsUpdated(packetId))
- Parameters
-
[in] | _packetId | The id associated with the packet we are checking for updates |
- Returns
- bool True if the packet has updated, false if not updated, or packet not found in map
Definition at line 164 of file packet_storage.cpp.
◆ PrintPacketSizes()
void kvh::KvhPacketStorage::PrintPacketSizes |
( |
| ) |
|
|
static |
kvh::KvhPacketStorage::PrintPacketSize();
Prints the sizes of all currently supported packets
- Todo:
- This maybe should be moved to global scope
Definition at line 211 of file packet_storage.cpp.
◆ PrintPacketTypes()
void kvh::KvhPacketStorage::PrintPacketTypes |
( |
| ) |
|
|
static |
Prints the string types of all supported packets
- Todo:
- This maybe should be moved to global scope
Definition at line 198 of file packet_storage.cpp.
◆ SetPacketUpdated()
int kvh::KvhPacketStorage::SetPacketUpdated |
( |
packet_id_e |
_packetId, |
|
|
bool |
_updateStatus |
|
) |
| |
packetStorage.SetPacketUpdated(packetId, true);
- Parameters
-
[in] | _packetId | The packet we are setting the updated status of |
[in] | _updateStatus | The IsUpdated value for the packet |
- Returns
- int 0 = Success -1 = Packet id not in map
Definition at line 148 of file packet_storage.cpp.
◆ Size()
int kvh::KvhPacketStorage::Size |
( |
| ) |
|
int size = packetStorage.Size();
- Returns
- The number of different packet types currently stored
Definition at line 188 of file packet_storage.cpp.
◆ UpdatePacket()
template<class T >
kvh::KvhPacketStorage::UpdatePacket |
( |
packet_id_e |
_packetId, |
|
|
T & |
_packetData |
|
) |
| |
|
inline |
- Parameters
-
_packetId | The id of the packet we want to update |
_packetData | A struct with data we want to update our storage to |
- Returns
- int 0 = Success -1 = Passed in packet type is not same as packet id -2 = Map does not contain this packet type currently
packetStorage.Init(initIdsVector);
packet_type_t packet;
packetStorage.updatePacket(packet_id, packet);
Definition at line 111 of file kvh_geo_fog_3d_packet_storage.hpp.
◆ packetMap_
Map this class encapsulates. Maps packet id to a pair with a bool for if the packet is updated, and a pointer to the packet.
Definition at line 71 of file kvh_geo_fog_3d_packet_storage.hpp.
The documentation for this class was generated from the following files: