7 #ifndef _SYSTEM_CLASS_HEADER_
8 #define _SYSTEM_CLASS_HEADER_
14 #define MAX_ETHERNET_PHYSICAL_ADDRESS_LENGTH 6
39 const tChar* strDescription,
40 tUInt8* pui8PhysicalAddress) = 0;
67 const tChar* strDescription,
68 tUInt8* pui8PhysicalAddress)
70 m_vecAdapters.resize(m_vecAdapters.size() + 1);
71 m_vecAdapters.back().strAdapterName = strName;
72 m_vecAdapters.back().strDescription = strDescription;
85 return m_vecAdapters.empty();
94 return m_vecAdapters.size();
104 return m_vecAdapters.at(nPos);
232 const cString& strWorkingPath =
"",
512 const cString &strOriginatorName,
514 const cString &strRecipientName,
#define MAX_ETHERNET_PHYSICAL_ADDRESS_LENGTH
Max length of physical ethernet address.
uint8_t tUInt8
type definition for unsigned integer values (8bit) (platform and compiler independent type).
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).
int64_t tInt64
type definition for signed integer values (64bit) (platform and compiler independent type).
int16_t tInt16
type definition for signed integer values (16bit) (platform and compiler independent type).
int32_t tInt32
type definition for signed integer values (32bit) (platform and compiler independent type).
tInt64 tTimeStamp
type definition for a time value.
unsigned int tUInt
type definition for unsigned integer value (platform and compiler dependent type).
void tVoid
The tVoid is always the definition for the void (non-type).
uint16_t tUInt16
type definition for unsigned integer values (16bit) (platform and compiler independent type).
tVoid * tHandle
type definition for a handle value (platform and compiler dependent type).
int tInt
type definition for signed integer value (platform and compiler dependent type).
bool tBool
The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).
uint32_t tUInt32
type definition for unsigned integer values (32bit) (platform and compiler independent type).
size_t tSize
type definition for a array size values, map size values etc.
int8_t tInt8
type definition for signed integer values (8bit) (platform and compiler independent type).
uint64_t tUInt64
type definition for unsigned integer values (64bit) (platform and compiler independent type).
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
static tVoid MemCopy(tVoid *pDest, const tVoid *pSrc, tSize nCount)
Copies data from one buffer to another.
A common result class usable as return value throughout.
Callback for cSystem::GetEthernetAdapterInfo()
virtual tResult HandleAdapterInfo(const tChar *strName, const tChar *strDescription, tUInt8 *pui8PhysicalAddress)=0
This will be called for each available ethernet adapter.
Helper class to store ethernet adapter infos, see cSystem::GetEthernetAdapterInfo.
tResult HandleAdapterInfo(const tChar *strName, const tChar *strDescription, tUInt8 *pui8PhysicalAddress)
This will be called for each available ethernet adapter.
std::vector< tAdapterInfo > m_vecAdapters
internal
const tAdapterInfo & At(tUInt nPos)
Returns the given adapter information at position nPos.
tBool Empty() const
Returns whether or not object is empty.
tSize Size() const
Returns the amount of adapter infos stored in this object.
System or platform specific functions.
static tUInt64 GetVirtualMemoryUsedByMe()
Returns the amount of virtual memory currently used by the calling process.
static tResult SwapEndian(tInt8 *pi8Value)
Swaps the bytes of a 8 Bit value in place.
static tTimeStamp GetTime()
On Windows platform method will return elapsed time in microseconds since the system was started.
static tResult HasIfaceWithMAC(const cString &strMACAddress)
Checks whether he host as an interface with a specific MAC address.
static cString GetLastErrorString(const tUInt32 ui32Error)
Returns a descriptive string of the last error.
static tResult NetworkToHost(tUInt16 *pui16Value)
Swaps the bytes of a 16 Bit value from network to host byte order.
static tUInt32 GetLastSystemError()
Returns the last system error.
static tResult SwapEndian(tUInt16 *pui16Value)
Swaps the bytes of a 16 Bit value in place.
static tUInt64 GetCurrentProcessId()
Returns the current process id.
static cString GetEnvVariable(const cString &strName, const cString &strDefaultValue="")
This function fetches values from the system's environment configuration.
static tVoid Sleep(tTimeStamp tmMicroseconds)
The calling thread will sleep for the specified amount of time.
static tUInt64 GetVirtualUserMemoryTotal()
Returns the total amount of virtual memory for User-mode applications.
static tUInt64 GetVirtualMemoryUsed()
Returns the amount of virtual memory currently used (system global)
static tInt32 Execute(const cFilename &strExeFile, const cString &strArgs="", const cFilename &strWorkingPath="", const tBool bModal=tFalse, cString *pOutput=nullptr, const cFilename oStdErrForward="")
Starts an executable and optionally wait for the application to close down.
static tResult HostToNetwork(tUInt32 *pui32Value)
Swaps the bytes of a 32 Bit value from host to network byte order.
static tUInt64 GetVirtualUserMemoryUsed()
Returns the amount of virtual user memory currently used (process)
static tResult ChildTerminate(tUInt64 nChildProcessId)
Terminates a child process.
static tUInt64 GetPhysicalMemoryUsedByMe()
Returns the amount of physical memory currently used by the calling process.
static tResult SetEnvVariable(const cString &strName, const cString &strValue)
This function creates a system's environment variable for the current execution.
static cString GetUserName()
This function gets the user name currently logged on.
static tResult SwapEndian(tInt32 *pi32Value)
Swaps the bytes of a 32 Bit value in place.
static tBool QueryDriveSpace(const cString &strDriveLetter, tUInt64 &uint64FreeSize)
This Function retrieves the free disk space in bytes for the specified location (win32).
static tResult SwapEndian(tUInt8 *pui8Value)
Swaps the bytes of a 8 Bit value in place.
static tResult GetEthernetAdapterInfo(IAdapterInfoCallback *pAdapterInfo)
Returns all detected ethernet adapters.
static tResult NetworkToHost(tUInt32 *pui32Value)
Swaps the bytes of a 32 Bit value from network to host byte order.
static tResult HostToNetwork(tUInt64 *pui64Value)
Swaps the bytes of a 64 Bit value from host to network byte order.
static tResult ChildWait(tUInt64 nChildProcessId, tTimeStamp tmTimeOut=-1)
Wait until a child process exits.
static tInt32 GetCurrentThreadId()
Returns the current thread id.
static tResult SwapEndian(tUInt32 *pui32Value)
Swaps the bytes of a 32 Bit value in place.
static tResult GetMallocInfo(tUInt64 &nMallocTotal, tUInt64 &nMallocFree, tUInt64 &nMallocUsed)
Returns information about the status of malloc memory handling.
static cString GetComputerName()
This function gets the name of the local computer.
static tUInt64 GetPhysicalMemoryUsed(tBool bIncludeCaches=tFalse)
Returns the amount of physical memory currently used (system global)
static tUInt32 OpenDocument(tHandle hWndParent, const cFilename &strFilename, const cString &strWorkingPath="", tBool bModal=tFalse, tBool bMessage=tFalse)
Opens a document with the registered standard application.
static tResult ChildExecute(tUInt64 *pChildProcessId, const cFilename &strExeFile, const cString &strArgs="")
Starts a child process.
static tInt GetProcessorCount()
Returns the count of processors.
static tResult SwapEndian(tInt64 *pi64Value)
Swaps the bytes of a 64 Bit value in place.
static tResult HostToNetwork(tUInt16 *pui16Value)
Swaps the bytes of a 16 Bit value from host to network byte order.
static tResult GetMACAddress(cString &strMACAddress)
Returns the MAC Address of the first networking interface.
static tUInt64 GetPhysicalMemoryTotal()
Returns the total amount of physical memory.
static tUInt64 GetVirtualMemoryTotal()
Returns the total amount of virtual memory.
static tResult SwapEndian(tUInt64 *pui64Value)
Swaps the bytes of a 64 Bit value in place.
static tResult NetworkToHost(tUInt64 *pui64Value)
Swaps the bytes of a 64 Bit value from network to host byte order.
static tResult SwapEndian(tInt16 *pi16Value)
Swaps the bytes of a 16 Bit value in place.
static tUInt32 OpenFolder(tHandle hWndParent, const cFilename &strFilename, tHandle &hProcessHandle, tBool bModal=tFalse)
Opens an Explorer window that points to the specified folder.
static tResult SendMail(const cString &strOriginator, const cString &strOriginatorName, const cString &strRecipient, const cString &strRecipientName, const cString &strSubject, const cString &strText, const cString &strFilePath)
Sends an email (win32).
#define tFalse
Value for tBool.
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
Internal struct used for storing the retrieved data.
cString strDescription
Adapter description.
cString strAdapterName
Name of the adapter.