OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
OpenDDS::FaceTSS::config::TopicSettings Class Reference

#include <TopicSettings.h>

Public Member Functions

int set (const char *name, const char *value)
 

Public Attributes

char type_name_ [TYPE_NAME_LEN]
 
FACE::MESSAGE_TYPE_GUID platform_view_guid_
 
FACE::MESSAGE_SIZE_TYPE max_message_size_
 

Static Public Attributes

static const int TYPE_NAME_LEN = 128
 

Detailed Description

Definition at line 13 of file TopicSettings.h.

Member Function Documentation

◆ set()

int OpenDDS::FaceTSS::config::TopicSettings::set ( const char *  name,
const char *  value 
)

Definition at line 14 of file TopicSettings.cpp.

References ACE_ERROR, ACE_TEXT(), atoi(), LM_ERROR, max_message_size_, OPENDDS_END_VERSIONED_NAMESPACE_DECL, platform_view_guid_, type_name_, and TYPE_NAME_LEN.

Referenced by OpenDDS::FaceTSS::config::Parser::parse_topic().

15 {
16  int status = 0;
17  if (!std::strcmp(name, "platform_view_guid")) {
19  } else if (!std::strcmp(name, "max_message_size")) {
21  } else if (!std::strcmp(name, "type_name")) {
22  // Guarantee that value will fit in type_name_ and still be null terminated
23  // type_name_ is sized to TYPE_NAME_LEN
24  if (std::strlen(value) >= sizeof(type_name_)) {
25  ACE_ERROR((LM_ERROR, ACE_TEXT("Type name %C exceeds allowable length,"
26  "must be < %d\n"), value, TYPE_NAME_LEN));
27  status = 1;
28  } else {
29  std::strncpy(type_name_, value, sizeof(type_name_));
30  }
31  } else {
32  // no match
33  ACE_ERROR((LM_ERROR, ACE_TEXT("Don't know of setting %C\n"), name));
34  status = 1;
35  }
36 
37  return status;
38 }
#define ACE_ERROR(X)
const LogLevel::Value value
Definition: debug.cpp:61
FACE::MESSAGE_SIZE_TYPE max_message_size_
Definition: TopicSettings.h:21
const char *const name
Definition: debug.cpp:60
ACE_TEXT("TCP_Factory")
int atoi(const char *s)
FACE::MESSAGE_TYPE_GUID platform_view_guid_
Definition: TopicSettings.h:20

Member Data Documentation

◆ max_message_size_

FACE::MESSAGE_SIZE_TYPE OpenDDS::FaceTSS::config::TopicSettings::max_message_size_

Definition at line 21 of file TopicSettings.h.

Referenced by FACE::TS::Create_Connection(), and set().

◆ platform_view_guid_

FACE::MESSAGE_TYPE_GUID OpenDDS::FaceTSS::config::TopicSettings::platform_view_guid_

Definition at line 20 of file TopicSettings.h.

Referenced by FACE::TS::Create_Connection(), and set().

◆ type_name_

char OpenDDS::FaceTSS::config::TopicSettings::type_name_[TYPE_NAME_LEN]

Definition at line 19 of file TopicSettings.h.

Referenced by FACE::TS::Create_Connection(), and set().

◆ TYPE_NAME_LEN

const int OpenDDS::FaceTSS::config::TopicSettings::TYPE_NAME_LEN = 128
static

Definition at line 15 of file TopicSettings.h.

Referenced by set().


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