LabWindows/CVI Real-Time Module

GetRTSystemInfo

  • Updated2023-02-21
  • 2 minute(s) read

int GetRTSystemInfo (char address[], int addressType, RTSystemInfoPtr *systemInfo);

Purpose

Queries a specific RT system on the network for information about its identity and configuration.

GetRTSystemInfo returns the information in a system information pointer (RTSystemInfoPtr) that includes the system IP settings, MAC address, hostname, serial number, model description, system status, firmware revision, and so on.

Windows This function is supported only on Windows.

Parameters

Input
Name Type Description
address char [] Specifies RT system on which to operate. You can pass the IP address, DNS-resolvable hostname, or MAC address.

You must specify IP addresses in dot-decimal format, as a sequence of 4 decimal octets separated by dots. An example of an IP address is 127.0.0.1.

You must specify MAC addresses as a sequence of 6 hexadecimal octets separated by colons. An example of a MAC address is 00:AB:11:CD:2e:3f. Letters can be uppercase, lowercase, or mixed case.

Note    Newly formatted or otherwise unconfigured systems, which appear in MAX 0.0.0.0, do not have assigned IP addresses. To call this function on an unconfigured system, you must specify its MAC address.
addressType int Specifies the type of address string you pass to the address parameter.

You can pass one of the following values:

Value Description Example
AddressType_IP An IP address or DNS-resolvable hostname. 127.0.0.1
SomeHost
AddressType_MAC A MAC address. 01:23:45:AB:CD:EF
Output
Name Type Description
systemInfo RTSystemInfoPtr Output parameter that receives the RTSystemInfoPtr allocated by this function call. The library dynamically allocates the RTSystemInfoPtr and fills it with data retrieved from the RT system.

You must remember to call DisposeRTSystemInfo when you finish using the returned pointer.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. Unless otherwise stated, zero indicates successful execution and a negative number indicates that an error occurred.

You can call the GetRTUtilErrorString function to obtain a message that describes the error.

Additional Information

Library: Real-Time Utility Library

Include file: rtutil.h

LabWindows/CVI compatibility: LabWindows/CVI 8.5 and later

Example

Refer to realtime\RTSystemImaging\RTSystemImaging.cws for an example of using the GetRTSystemInfo function.

Log in to get a better experience