Public Member Functions | Public Attributes | List of all members
crl::multisense::system::NetworkConfig Class Reference

#include <MultiSenseTypes.hh>

Public Member Functions

 NetworkConfig ()
 
 NetworkConfig (const std::string &a, const std::string &g, const std::string &n)
 

Public Attributes

std::string ipv4Address
 
std::string ipv4Gateway
 
std::string ipv4Netmask
 

Detailed Description

Class containing the network configuration for a specific sensor.

Example code to query a sensor's network configuration:

//
// Instantiate a channel connecting to a sensor at the factory default
// IP address
channel = crl::multisense::Channel::Create("10.66.171.21");
channel->setMtu(7200);
//
// Create a instance of NetworkConfig to store the sensor's network configuration
//
// Query the network configuration from the Channel instance
crl::multisense::Status status = channel->getNetworkConfig(networkConfig));
//
// Check to see if the network configuration query succeeded
throw std::runtime_error("Unable to query sensor's network configuration");
}
//
// Use the network configuration...
//
// Destroy the channel instance

Example code to set a sensor's network configuration:

//
// Instantiate a channel connecting to a sensor at the factory default
// IP address
channel = crl::multisense::Channel::Create("10.66.171.21");
channel->setMtu(7200);
//
// Create a new instance of a Network configuration with the new desired
// network configuration
crl::multisense::system::NetworkConfig networkConfig("10.66.171.22",
"10.66.171.1",
"255.255.255.0");;
//
// Send the new network configuration to the device
crl::multisense::Status status = channel->setNetworkConfig(networkConfig));
//
// Check to see if the new network configuration was received
throw std::runtime_error("Unable to set the sensor's network configuration");
}
//
// Destroy the channel instance

Definition at line 2333 of file MultiSenseTypes.hh.

Constructor & Destructor Documentation

crl::multisense::system::NetworkConfig::NetworkConfig ( )
inline

Default constructor with the sensor factory default IP configuration

Definition at line 2346 of file MultiSenseTypes.hh.

crl::multisense::system::NetworkConfig::NetworkConfig ( const std::string &  a,
const std::string &  g,
const std::string &  n 
)
inline

Constructor to initialize the Ipv4 parameters

Parameters
aA Ipv4 address
gA Ipv4 gateway
nA Ipv4 netmask

Definition at line 2360 of file MultiSenseTypes.hh.

Member Data Documentation

std::string crl::multisense::system::NetworkConfig::ipv4Address

An Ipv4 address corresponding to a sensor

Definition at line 2337 of file MultiSenseTypes.hh.

std::string crl::multisense::system::NetworkConfig::ipv4Gateway

An Ipv4 gateway corresponding to a sensor

Definition at line 2339 of file MultiSenseTypes.hh.

std::string crl::multisense::system::NetworkConfig::ipv4Netmask

An Ipv4 netmask corresponding to a sensor

Definition at line 2341 of file MultiSenseTypes.hh.


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


multisense_lib
Author(s):
autogenerated on Sat Apr 6 2019 02:16:47