rgbd
utility.cpp
Go to the documentation of this file.
1 #include "rgbd/utility.h"
2 
3 #include <ros/console.h>
4 
5 #include <exception>
6 #include <limits.h>
7 #include <unistd.h>
8 
9 
10 namespace rgbd
11 {
12 
14 {
15  char hostname[HOST_NAME_MAX];
16  if (gethostname(hostname, HOST_NAME_MAX) != 0)
17  {
18  ROS_FATAL_NAMED("utility", "Can't determine hostname");
19  throw std::runtime_error("Can't determine hostname");
20  }
21 
22  return std::string(hostname);
23 }
24 
25 }
std::string
exception
rgbd::get_hostname
std::string get_hostname()
Get the hostname of the current machine.
Definition: utility.cpp:13
utility.h
rgbd
Definition: client.h:24
std::runtime_error