LibMultiSense
LibMultiSense Documentation
crl::multisense::system::NetworkConfig Class Reference

Class containing the network configuration for a specific sensor. More...

#include <MultiSenseTypes.hh>

Public Member Functions

 NetworkConfig ()
 Default constructor with the sensor factory default IP configuration. More...
 
 NetworkConfig (const std::string &a, const std::string &g, const std::string &n)
 Constructor to initialize the Ipv4 parameters. More...
 

Public Attributes

std::string ipv4Address
 An Ipv4 address corresponding to a sensor. More...
 
std::string ipv4Gateway
 An Ipv4 gateway corresponding to a sensor. More...
 
std::string ipv4Netmask
 An Ipv4 netmask corresponding to a sensor. More...
 

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 3389 of file MultiSenseTypes.hh.

Constructor & Destructor Documentation

◆ NetworkConfig() [1/2]

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

Default constructor with the sensor factory default IP configuration.

Definition at line 3402 of file MultiSenseTypes.hh.

◆ NetworkConfig() [2/2]

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 3416 of file MultiSenseTypes.hh.

Member Data Documentation

◆ ipv4Address

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

An Ipv4 address corresponding to a sensor.

Definition at line 3393 of file MultiSenseTypes.hh.

◆ ipv4Gateway

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

An Ipv4 gateway corresponding to a sensor.

Definition at line 3395 of file MultiSenseTypes.hh.

◆ ipv4Netmask

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

An Ipv4 netmask corresponding to a sensor.

Definition at line 3397 of file MultiSenseTypes.hh.


The documentation for this class was generated from the following file:
crl::multisense::Channel
Class which manages all communications with a MultiSense device.
Definition: MultiSenseChannel.hh:69
crl::multisense::Status_Ok
static CRL_CONSTEXPR Status Status_Ok
Definition: MultiSenseTypes.hh:98
crl::multisense::Channel::getNetworkConfig
virtual Status getNetworkConfig(system::NetworkConfig &c)=0
Query the current sensor's network configuration.
crl::multisense::Channel::setNetworkConfig
virtual Status setNetworkConfig(const system::NetworkConfig &c)=0
Set the current sensor's network configuration.
crl::multisense::Channel::Destroy
static void Destroy(Channel *instanceP)
Destroy a channel instance that was created using the static member function Channel::Create().
crl::multisense::Status
int32_t Status
General status typdef used as a return value for get/set crl::multisense::Channel methods.
Definition: MultiSenseTypes.hh:93
crl::multisense::Channel::setMtu
virtual Status setMtu(int32_t mtu)=0
Set the current sensor's MTU.
crl::multisense::system::NetworkConfig
Class containing the network configuration for a specific sensor.
Definition: MultiSenseTypes.hh:3389
crl::multisense::Channel::Create
static Channel * Create(const std::string &sensorAddress)
Create a Channel instance, used to manage all communications with a sensor.