RVC  1.14.1
a product by RVBUST.
RVC::Device Struct Reference

Device struct. More...

#include <RVC.h>

Public Member Functions

bool IsValid () const
 Check device is valid or not. More...
 
void Print () const
 Print device info.
 
bool GetDeviceInfo (DeviceInfo *pinfo)
 Get the DeviceInfo object. More...
 
int SetNetworkConfig (enum NetworkDevice d, NetworkType type, const char *ip, const char *netMask, const char *gateway)
 Set the Device network configuration. More...
 
int GetNetworkConfig (enum NetworkDevice d, NetworkType *type, char *ip, char *netMask, char *gateway, int *status)
 Get the device network configuration. More...
 
bool UpgradeFirmware (const char *device_firmware_path, const char *config_data_path)
 Upgrade RVC Device Firmware. More...
 
bool IsFirmwareMatch (void)
 Check if device firmware is match. More...
 

Static Public Member Functions

static void Destroy (Device d)
 Destroy the device. More...
 

Public Attributes

Handle m_handle
 RVC Handle.
 

Detailed Description

Device struct.

Member Function Documentation

◆ Destroy()

static void RVC::Device::Destroy ( Device  d)
static

Destroy the device.

Parameters
dDevice to be destroyed

◆ GetDeviceInfo()

bool RVC::Device::GetDeviceInfo ( DeviceInfo pinfo)

Get the DeviceInfo object.

Parameters
pinfoCurrent Device information
Returns
true Success
false Failed

◆ GetNetworkConfig()

int RVC::Device::GetNetworkConfig ( enum NetworkDevice  d,
NetworkType type,
char *  ip,
char *  netMask,
char *  gateway,
int *  status 
)

Get the device network configuration.

Parameters
dNetworkDevice
typeNetworkType of Device DHCP/Static
ipCurrent ip of Device
netMaskCurrent netmask of Device
gatewayCurrent gateway of Device
statusDevice`s status
Returns
int Status code

◆ IsFirmwareMatch()

bool RVC::Device::IsFirmwareMatch ( void  )

Check if device firmware is match.

Returns
true : firmware match
false : firmware mismatch, need to upgrade

◆ IsValid()

bool RVC::Device::IsValid ( ) const

Check device is valid or not.

Returns
true Valid
false Not valid

◆ SetNetworkConfig()

int RVC::Device::SetNetworkConfig ( enum NetworkDevice  d,
NetworkType  type,
const char *  ip,
const char *  netMask,
const char *  gateway 
)

Set the Device network configuration.

Parameters
dNetworkDevice
typeNetworkType of Device DHCP/Static
ipNew ip for Device, valid if NetworkType is NetworkType_STATIC
netMaskNew netmask for Device, valid if NetworkType is NetworkType_STATIC
gatewayNew gateway for Device, valid if NetworkType is NetworkType_STATIC
Returns
int status code

◆ UpgradeFirmware()

bool RVC::Device::UpgradeFirmware ( const char *  device_firmware_path,
const char *  config_data_path 
)

Upgrade RVC Device Firmware.

Parameters
device_firmware_pathdevice firmware path, rvbin
config_data_pathconfig data path, if set to nullptr, will ignore
Returns
bool Status

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