Device struct.
More...
#include <RVC.h>
|
| 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...
|
| |
◆ Destroy()
| static void RVC::Device::Destroy |
( |
Device |
d | ) |
|
|
static |
Destroy the device.
- Parameters
-
◆ GetDeviceInfo()
| bool RVC::Device::GetDeviceInfo |
( |
DeviceInfo * |
pinfo | ) |
|
Get the DeviceInfo object.
- Parameters
-
| pinfo | Current 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
-
| d | NetworkDevice |
| type | NetworkType of Device DHCP/Static |
| ip | Current ip of Device |
| netMask | Current netmask of Device |
| gateway | Current gateway of Device |
| status | Device`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
-
| d | NetworkDevice |
| type | NetworkType of Device DHCP/Static |
| ip | New ip for Device, valid if NetworkType is NetworkType_STATIC |
| netMask | New netmask for Device, valid if NetworkType is NetworkType_STATIC |
| gateway | New 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_path | device firmware path, rvbin |
| config_data_path | config data path, if set to nullptr, will ignore |
- Returns
- bool Status
The documentation for this struct was generated from the following file: