#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 |
Class containing the network configuration for a specific sensor.
Example code to query a sensor's network configuration:
{.cpp}
//
// Instantiate a channel connecting to a sensor at the factory default
// IP address
crl::multisense::Channel* channel;
channel = crl::multisense::Channel::Create("10.66.171.21");
channel->setMtu(7200);
//
// Create a instance of NetworkConfig to store the sensor's network configuration
crl::multisense::system::NetworkConfig networkConfig;
//
// Query the network configuration from the Channel instance
crl::multisense::Status status = channel->getNetworkConfig(networkConfig));
//
// Check to see if the network configuration query succeeded
if(crl::multisense::Status_Ok != status) {
throw std::runtime_error("Unable to query sensor's network configuration");
}
//
// Use the network configuration...
//
// Destroy the channel instance
crl::multisense::Channel::Destroy(channel);
Example code to set a sensor's network configuration:
{.cpp}
//
// Instantiate a channel connecting to a sensor at the factory default
// IP address
crl::multisense::Channel* channel;
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
if(crl::multisense::Status_Ok != status) {
throw std::runtime_error("Unable to set the sensor's network configuration");
}
//
// Destroy the channel instance
crl::multisense::Channel::Destroy(channel);
Definition at line 2333 of file MultiSenseTypes.hh.
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
| a | A Ipv4 address |
| g | A Ipv4 gateway |
| n | A Ipv4 netmask |
Definition at line 2360 of file MultiSenseTypes.hh.
An Ipv4 address corresponding to a sensor
Definition at line 2337 of file MultiSenseTypes.hh.
An Ipv4 gateway corresponding to a sensor
Definition at line 2339 of file MultiSenseTypes.hh.
An Ipv4 netmask corresponding to a sensor
Definition at line 2341 of file MultiSenseTypes.hh.