Classes | Enumerations | Functions
prot Namespace Reference

Holds the data structures used in the data transmission protocol. More...

Classes

struct  ND_DiffInfo
 Data transmitted from client to server at the end of the navigation process (transmission of sphere differences) More...
 
struct  ND_ErrorData
 Error information, can be sent by client or by server. More...
 
struct  ND_IC_Response
 Server response to an initial contact. Holds some information about the graph of spheres. More...
 
struct  ND_ImageData
 Used to transmit a single image. More...
 
struct  ND_InitialContact
 This is the data structure that is transmitted at first contact, both for request and answer. More...
 
struct  ND_NavRequest
 Navigation request, see PlatiServer_TCP::callback_S2_1() and PlatiServer_TCP::callback_S2_2() More...
 
struct  ND_PathInfo
 Send by server to client upon receiving a navigation request. Holds the number of steps/spheres that the server computed, AND their coordinates. More...
 
struct  ND_ServerStats
 Network reception stats container. Sent by server upon request by client. See MT_ServerStatsRequ. More...
 
struct  ND_SimpleData
 To be used whenever we have no special data to put in buffer. More...
 
struct  ND_SphRequest
 Transmitted by Client to Server to request a sphere. More...
 
struct  NetwData
 Base class for network data frame, private and virtual. See 2 - Common Header. More...
 

Enumerations

enum  En_MessageType : BYTE {
  MT_UNDEFINED, MT_Ack, MT_IC, MT_ICR,
  MT_NavRequest_1, MT_NavRequest_2, MT_PathInfo, MT_RequSph,
  MT_Cancel, MT_Error, MT_RequImage, MT_SphImage,
  MT_DiffImage, MT_DiffInfo, MT_TR, MT_ServerStatsRequ,
  MT_ServerStatsResp, MT_TestMode_1, MT_KillServer, MT_DUMMY
}
 List of messages that are send. These are linked to fsmn::En_Events through g_event_map. For the associated human-readable strings, see getString( En_MessageType ). More...
 
enum  En_DataType : BYTE {
  DT_UNDEFINED, DT_NetwData, DT_SimpleData, DT_ICR,
  DT_DiffInfo, DT_ErrorData, DT_ImageData, DT_InitialContact,
  DT_NavRequest, DT_PathInfo, DT_ServerStats, DT_SphRequest,
  DT_DUMMY
}
 Describes the data type that is being transmitted in a network frame. See NetwData::_frameDataType. More...
 

Functions

std::string getString (En_MessageType en)
 
std::string getString (En_DataType en)
 
template<typename T >
prot::NetwData getMessageContent (const T &buff)
 

Detailed Description

Holds the data structures used in the data transmission protocol.

Enumeration Type Documentation

◆ En_DataType

enum En_DataType : BYTE

Describes the data type that is being transmitted in a network frame. See NetwData::_frameDataType.

Enumerator
DT_UNDEFINED 
Todo:
use this to check for illegal data ?
DT_NetwData 

base class, never instanciated

DT_SimpleData 

ND_SimpleData.

DT_ICR 

ND_IC_Response.

DT_DiffInfo 

ND_DiffInfo.

DT_ErrorData 

ND_ErrorData.

DT_ImageData 

ND_ImageData.

DT_InitialContact 

ND_InitialContact.

DT_NavRequest 

ND_NavRequest.

DT_PathInfo 

ND_PathInfo.

DT_ServerStats 

ND_ServerStats.

DT_SphRequest 

ND_SphRequest.

DT_DUMMY 

◆ En_MessageType

List of messages that are send. These are linked to fsmn::En_Events through g_event_map. For the associated human-readable strings, see getString( En_MessageType ).

For a list of the data types allowed for each of these messages, see 4 - Correspondence table between data types and allowed messages

Warning
This byte will be embedded as first element of a data structure inheriting from NetwData. But a given data structure can be used for different messages.
Enumerator
MT_UNDEFINED 
MT_Ack 

general acknowledge

MT_IC 

Initial Contact (IC)

MT_ICR 

Initial Contact Response.

MT_NavRequest_1 

navigation request (using locations)

MT_NavRequest_2 

navigation request (using location for "dest" and image for "from")

MT_PathInfo 

general information about the path. Send by server only.

MT_RequSph 

Request Next Sphere (client -> server). Server will respond with RGB sphere.

MT_Cancel 

can be send either by client or server, to tell the partner that it can't continue. More information is given in payload, which will be ND_ErrorData

MT_Error 

something bad happened. Sent by server to client when the server receives invalid command (or unexpected command)

MT_RequImage 
MT_SphImage 
MT_DiffImage 

Difference Image. Related: PlatiClient::loadAndSendDiffImage()

MT_DiffInfo 
MT_TR 

Target Reached.

MT_ServerStatsRequ 

the client wants to get the servers inner data (stats, and so on). See fsmn::ev_ServerStatsRequ

MT_ServerStatsResp 

data sent from server to client

MT_TestMode_1 
MT_KillServer 
MT_DUMMY 

Function Documentation

◆ getMessageContent()

prot::NetwData prot::getMessageContent ( const T &  buff)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getString() [1/2]

std::string prot::getString ( En_MessageType  en)
inline
Here is the caller graph for this function:

◆ getString() [2/2]

std::string prot::getString ( En_DataType  en)
inline