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(1500);
//
// 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(1500);
//
// 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 3425 of file Legacy/include/MultiSense/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 3438 of file Legacy/include/MultiSense/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 3452 of file Legacy/include/MultiSense/MultiSenseTypes.hh.

Member Data Documentation

◆ ipv4Address

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

An Ipv4 address corresponding to a sensor

Definition at line 3429 of file Legacy/include/MultiSense/MultiSenseTypes.hh.

◆ ipv4Gateway

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

An Ipv4 gateway corresponding to a sensor

Definition at line 3431 of file Legacy/include/MultiSense/MultiSenseTypes.hh.

◆ ipv4Netmask

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

An Ipv4 netmask corresponding to a sensor

Definition at line 3433 of file Legacy/include/MultiSense/MultiSenseTypes.hh.


The documentation for this class was generated from the following file:
crl::multisense::Status_Ok
static CRL_CONSTEXPR Status Status_Ok
Definition: Legacy/include/MultiSense/MultiSenseTypes.hh:99
crl::multisense::Channel::Destroy
static void Destroy(Channel *instanceP)
Definition: Legacy/details/channel.cc:863
crl::multisense::system::NetworkConfig
Definition: Legacy/include/MultiSense/MultiSenseTypes.hh:3425
crl::multisense::Channel::setMtu
virtual Status setMtu(int32_t mtu)=0
crl::multisense::Channel::getNetworkConfig
virtual Status getNetworkConfig(system::NetworkConfig &c)=0
crl::multisense::Channel::Create
static Channel * Create(const std::string &sensorAddress)
Definition: Legacy/details/channel.cc:817
crl::multisense::Status
int32_t Status
Definition: Legacy/include/MultiSense/MultiSenseTypes.hh:94
crl::multisense::Channel::setNetworkConfig
virtual Status setNetworkConfig(const system::NetworkConfig &c)=0
crl::multisense::Channel
Definition: Legacy/include/MultiSense/MultiSenseChannel.hh:69


multisense_lib
Author(s):
autogenerated on Thu Apr 17 2025 02:49:10