Skip to main content

Hardware

Hardware for the C++ Replication API

Abstract

Each site may contain one or more physical devices, including computers, tablets, phones, and so forth. These devices are referred to as hardware. Each instance of hardware may contain one or more OpSystems.

Each site may contain one or more physical devices, including computers, tablets, phones, and so forth. These devices are referred to as hardware. Each instance of hardware may contain one or more OpSystems.

Class

FCREPLHardware

This class is below Site in the hierarchy. It contains a list of OpSystems present on the hardware. It represents the physical computer.

Getters

Table 1. Getters

List of MAC address for the hardware

void GetMacAddresses(ppFCREPLMac *macList, int *macCount) { ((pRCESHardware)this)->GetMacAddresses((ppRCESMac *)macList, macCount); };



Inherited getters

Table 2. Inherited getters

Hardware identification

int GetID();

Site identification

Note

It is linked to the FCREPLSite class.

int GetSiteID();

Hardware name

const char *GetName();

MAC list with count

void GetMacAddresses(ppRCESMac *macList, int *macCount);

Hardware description

const char *GetDescription();

Hardware memory

int GetMemory();

Hardware disk space

int GetDiskSpace();

Hardware number of CPUs

int GetCPU();



Setters

Table 3. Setters

List of MAC addresses for the hardware

void SetMacAddresses(ppFCREPLMac macList, int macCount) { ((pRCESHardware)this)->SetMacAddresses((ppRCESMac)macList, macCount); };

Hardware name

void SetMacAddresses(ppFCREPLMac macList, int macCount) { ((pRCESHardware)this)->SetMacAddresses((ppRCESMac)macList, macCount); };

Hardware description

void SetDescription(const char *description) { ((pRCESHardware)this)->SetDescription(description); };



Inherited setters

Table 4. Inherited setters

Hardware identification

void SetID(int id);

Hardware name

void SetName(const char *name);

Hardware MAC list with count

void SetMacAddresses(ppRCESMac macList, int macCount);

Hardware description

void SetDescription(const char *description);

Site identification

Note

This is linked to the FCREPLSite class.

void SetSiteID(int siteID);

Hardware memory

void SetMemory(int memory);

Hardware disk space

void SetDiskSpace(int diskSpace);

Hardware number of CPUs

void SetCPU(int cpu);



Class

FCREPLMac

This class is the MAC address representation of the Hardware.

Inherited getters

Table 5. Inherited getters

MAC address

const char *GetAddress();

MAC type

const char *GetType();

Hardware identification

Note

This is linked to FCREPLSite class.

int GetHardwareID();



Setters

Table 6. Setters

MAC address

void SetAddress(const char *address) { ((pRCESMac)this)->SetAddress(address); };

MAC type

void SetType(const char *type) { ((pRCESMac)this)->SetType(type); };



Inherited setters

Table 7. Inherited setters

Address

void SetAddress(const char *address);

Type

void SetType(const char *type);

Hardware identification

Note

This is linked to FCREPLSite class.

void SetHardwareID(int hardwareID);



Retrieve all the hardware entity objects for the given site identification.

Prototype

FCREPL_API int fcReplGetHardwares(pFCREPLConn replConn, int siteID, ppFCREPLHardware *hardwareList, int *hardwareCount);

Parameters

Table 8. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

siteID [IN]

Site identification

hardwareList [OUT]

Hardware entity list

hardwareCount [OUT]

Number of hardware entities in the list



Return

Error code

Retrieve the hardware entity object by its name.

Prototype

Parameters

Table 9. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

siteID [IN]

Site identification

name [IN]

Hardware name

hardware [OUT]

Hardware entity retrieved



Return

Error code

Retrieve the hardware entity object by its MAC address.

Prototype

FCREPL_API int fcReplGetHardware(pFCREPLConn replConn, const char *mac, ppFCREPLHardware hardware);

Parameters

Table 10. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

mac [IN]

MAC address

hardware [OUT]

Hardware entity retrieved



Return

Error code

Add a hardware entity into the database or update the existing record if there is already hardware with the given siteID/name.

Prototype

FCREPL_API int fcReplPersistHardware(pFCREPLConn replConn, pFCREPLHardware hardware);

Parameters

Table 11. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

hardware [IN]

Hardware entity to be persisted



Return

Error code

Delete the hardware by its identification.

Prototype

FCREPL_API int fcReplRemoveHardware(pFCREPLConn replConn, int hardwareID, bool recursive);

Parameters

Table 12. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

hardwareId [IN]

Hardware identification

recursive [IN]

Recursive flag



Return

Error code