Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4COM)  1.26.2
ISystem Interface Reference

Inherits IDispatch.

Collaboration diagram for ISystem:
Collaboration graph

Classes

struct  DateAndTime
 
struct  Diagnosis
 
struct  MemoryInfo
 
struct  SpecialPathInfo
 

Public Types

Public Member Functions

HRESULT GetName ([out, retval] BSTR *name)
 
HRESULT SetName ([in] BSTR name)
 
HRESULT GetTemperature ([out, retval] FLOAT *temperature)
 
HRESULT GetTemperatureMax ([out, retval] FLOAT *temperature)
 
HRESULT GetIpAddress ([out, retval] BSTR *address)
 
HRESULT SetIpAddress ([in] BSTR address)
 
HRESULT GetSubnetMask ([out, retval] BSTR *address)
 
HRESULT SetSubnetMask ([in] BSTR address)
 
HRESULT GetGateway ([out, retval] BSTR *address)
 
HRESULT SetGateway ([in] BSTR address)
 
HRESULT GetCurrentMode ([out, retval] SystemMode *mode)
 
HRESULT SetTargetMode ([in] SystemMode mode)
 
HRESULT GetCpuLoad ([out, retval] FLOAT *cpuLoad)
 
HRESULT GetCpuLoadMax ([out, retval] FLOAT *cpuLoad)
 
HRESULT GetDisplayedDiagnosis ([out, retval] struct Diagnosis *diagnosis)
 
HRESULT GetNewestDiagnosisIndex ([out, retval] LONG *index)
 
HRESULT GetOldestDiagnosisIndex ([out, retval] LONG *index)
 
HRESULT GetDiagnosisLog ([in] LONG startIndex, [in] LONG numToRead, [out, retval] SAFEARRAY(struct Diagnosis)*diagnosis)
 
HRESULT ConvertDiagnosisNumberToText ([in] VARIANT diagnosisNumber, [out, retval] BSTR *diagnosis)
 
HRESULT GetOperationHours ([out, retval] LONG *hours)
 
HRESULT GetVersionInfo ([in] BSTR component, [out, retval] BSTR *version)
 
HRESULT GetSerialNumber ([out, retval] BSTR *serial)
 
HRESULT GetMacAddress ([out, retval] BSTR *address)
 
HRESULT ClearError (void)
 
HRESULT Reboot (void)
 
HRESULT Cleanup (void)
 
HRESULT GetLanguage ([out, retval] Language *language)
 
HRESULT SetLanguage ([in] Language language)
 
HRESULT GetHardwareDetails ([out, retval] BSTR *hardwareDetails)
 
HRESULT GetMemoryInfo ([out, retval] struct MemoryInfo *memory)
 
HRESULT GetDateAndTimeUtc ([out, retval] struct DateAndTime *dateTime)
 
HRESULT GetSpecialPath ([in] SpecialPath pathIdentifier, [out, retval] BSTR *path)
 
HRESULT GetSpecialPathInfo ([in] SpecialPath path, [out, retval] struct SpecialPathInfo *pathInfo)
 
HRESULT SetDiagnosis ([in] DiagnosisCategory category, [in] LONG number, BSTR diagnosisText)
 

Public Attributes

const BSTR VERSION_FIRMWARE = "VERSION_FIRMWARE"
 
const BSTR VERSION_HARDWARE = "VERSION_HARDWARE"
 
const BSTR VERSION_LOGIC = "VERSION_LOGIC"
 
const BSTR VERSION_BSP = "VERSION_BSP"
 
const BSTR VERSION_MLPI_SERVER_CORE = "VERSION_MLPI_SERVER_CORE"
 

Detailed Description

Definition of the ISystem interface which contains various system settings of the connected MLPI Device.

The ISystem interface contains various methods of reading or writing system-relevant settings of the connected MLPI Device. This includes the diagnosis logbook, Ethernet settings, health status and much more.

Definition at line 72 of file ISystem.idl.

Member Enumeration Documentation

This enumeration must be used when accessing language settings in the device.

Enumerator
LANGUAGE_GERMAN 

device language German

LANGUAGE_ENGLISH 

device language English

Definition at line 87 of file ISystem.idl.

This enumeration must be used when accessing the mode settings in the device. The mode can only be set to initialization mode (MLPI_SYSTEMMODE_P0), parameter mode (MLPI_SYSTEMMODE_P2) or operation mode (MLPI_SYSTEMMODE_BB). Also in case of an error during a mode transition, the read only modes can be displayed.

Enumerator
SYSTEMMODE_P0 

initialization mode.

SYSTEMMODE_P1 

transition state from initialization mode to parameter mode.

SYSTEMMODE_P2 

parameter mode.

SYSTEMMODE_P3 

transition state from parameter mode to operation mode.

SYSTEMMODE_BB 

operation mode.

SYSTEMMODE_SWITCHING 

mode switching active.

Definition at line 99 of file ISystem.idl.

This enumeration must be used when accessing the diagnostic details in the device.

Enumerator
DIAGNOSIS_PASSIVE 

Passive.

DIAGNOSIS_ACTIVE 

Active.

DIAGNOSIS_RESET 

Reset.

DIAGNOSIS_UNKNOWN 

Unknown.

Definition at line 111 of file ISystem.idl.

This enumeration must be used when accessing the diagnostic details in the device.

Enumerator
DESPATCHER_CONTROL 

Control.

DESPATCHER_DRIVE 

Drive.

DESPATCHER_LOGIC 

PLC FB.

DESPATCHER_AXIS 

Axis.

DESPATCHER_KINEMATIC 

Kinematic.

DESPATCHER_PCI 

PCI.

Definition at line 121 of file ISystem.idl.

This enumeration contains different logical paths on the device. Use GetSpecialPath to retrieve absolute path information on a specific device.

Enumerator
PATH_SYSTEM 

SYSTEM path, root.

PATH_OEM 

OEM path, root.

PATH_USER 

User path, root.

PATH_PROJECTDATAPROTECTED 

Protected project data path.

PATH_PROJECTDATA 

Project data path.

PATH_PROJECTDATA_BUNDLES 

C/C++ user bundles path.

PATH_PROJECTDATA_PLC 

PLC project data path.

PATH_PROJECTDATA_TMP 

Temporary project data path.

PATH_PROJECTDATA_JVM 

Java VM root path.

PATH_PROJECTDATA_JVM_BUNDLES 

Java VM bundles path.

PATH_PROJECTDATA_JVM_LIC 

Java VM licenses path.

PATH_PROJECTDATA_JVM_USER 

Java VM user data path.

PATH_PROJECTDATAPROTECTED_BUNDLES 

Protected C/C++ user bundles path.

PATH_PROJECTDATAPROTECTED_JVM 

Protected Java VM root path.

PATH_PROJECTDATAPROTECTED_JVM_BUNDLES 

Protected Java VM bundles path.

PATH_PROJECTDATAPROTECTED_JVM_LIC 

Protected Java VM licenses path.

PATH_PROJECTDATAPROTECTED_JVM_USER 

Protected Java VM user data path.

Definition at line 134 of file ISystem.idl.

This enumeration contains different diagnosis categories on the device.

Enumerator
DIAGNOSIS_ERROR_FATAL 

fatal error, cause error reaction in motion system.

DIAGNOSIS_ERROR_NONFATAL 

non-fatal error, cause no error reaction.

DIAGNOSIS_WARNING 

warning.

DIAGNOSIS_MESSAGE 

message.

Definition at line 157 of file ISystem.idl.

Member Function Documentation

HRESULT ISystem::GetName ( [out, retval] BSTR *  name)

This method reads the device name.

Parameters
[out]nameReturns the name of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
string data = connection.System.GetName();
// print to console
Console.WriteLine("Name of device: " + data);
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetName, where you can find further documentation.
HRESULT ISystem::SetName ( [in] BSTR  name)

This method sets the device name.

Parameters
[in]nameWrites the name of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
Console.WriteLine("Old Name: " + connection.System.GetName());
// change name
connection.System.SetName("Skynet");
Console.WriteLine("New Name: " + connection.System.GetName());
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemSetName, where you can find further documentation.
HRESULT ISystem::GetTemperature ( [out, retval] FLOAT *  temperature)

This method reads the device temperature.

Parameters
[out]temperatureReturns the temperature of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
float temperature = connection.System.GetTemperature();
// print to console
Console.WriteLine("Temperature: " + temperature.ToString());
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetTemperature, where you can find further documentation.
HRESULT ISystem::GetTemperatureMax ( [out, retval] FLOAT *  temperature)

This method reads the device maximum temperature.

Parameters
[out]temperatureReturns the maximum temperature of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
float temperature = connection.System.GetTemperatureMax();
// print to console
Console.WriteLine("MaxTemperature: " + temperature.ToString());
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetTemperatureMax, where you can find further documentation.
HRESULT ISystem::GetIpAddress ( [out, retval] BSTR *  address)

This method reads the IP address of the device. Value is a UTF16 string in dot format "XXX.XXX.XXX.XXX".

Parameters
[out]addressReturns the the IP address of the device as string.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
string ipAddress = connection.System.GetIpAddress();
string subnetMask = connection.System.GetSubnetMask();
string gateway = connection.System.GetGateway();
string macAddress = connection.System.GetMacAddress();
// print to console
Console.WriteLine("IpAddress: " + ipAddress);
Console.WriteLine("SubnetMask: " + subnetMask);
Console.WriteLine("Gateway: " + gateway);
Console.WriteLine("MacAddress: " + macAddress);
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetIpAddress, where you can find further documentation.
HRESULT ISystem::SetIpAddress ( [in] BSTR  address)

This method writes the IP address of the device. Value is a string in dot format "XXX.XXX.XXX.XXX". Reboot necessary for the new IP address to become active.

Parameters
[in]addressString holding the new IP address to be set for the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// set Ethernet settings of engineering port
connection.System.SetIpAddress("192.168.0.17");
connection.System.SetSubnetMask("255.255.0.0");
connection.System.SetGateway("192.168.0.1");
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemSetIpAddress, where you can find further documentation.
HRESULT ISystem::GetSubnetMask ( [out, retval] BSTR *  address)

This method reads the Subnet mask of the device. Value is a UTF16 string in dot format "XXX.XXX.XXX.XXX".

Parameters
[out]addressReturns the subnet mask of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
See GetIpAddress
Note:
This method maps to the mlpiCore function mlpiSystemGetSubnetMax, where you can find further documentation.
HRESULT ISystem::SetSubnetMask ( [in] BSTR  address)

This method writes the Subnet mask of the device. Value is a UTF16 string in dot format "XXX.XXX.XXX.XXX".

Parameters
[in]addressString containing the new subnet mask.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
See SetIpAddress
Note:
This method maps to the mlpiCore function mlpiSystemSetSubnetMask, where you can find further documentation.
HRESULT ISystem::GetGateway ( [out, retval] BSTR *  address)

This method reads the Gateway address of the device. Value is a UTF16 string in dot format "XXX.XXX.XXX.XXX".

Parameters
[out]addressReturns the current gateway address of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
See GetIpAddress
Note:
This method maps to the mlpiCore function mlpiSystemGetGateway, where you can find further documentation.
HRESULT ISystem::SetGateway ( [in] BSTR  address)

This method writes the Gateway address of the device. Value is a UTF16 string in dot format "XXX.XXX.XXX.XXX".

Parameters
[in]addressString containing the new gateway address.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
See SetIpAddress
Note:
This method maps to the mlpiCore function mlpiSystemSetGateway, where you can find further documentation.
HRESULT ISystem::GetCurrentMode ( [out, retval] SystemMode mode)

This method reads the device mode.

Parameters
[out]modeReturns the current system mode of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
SystemMode currentMode = connection.System.GetCurrentMode();
// print data to console
Console.WriteLine("Current SystemMode: " + currentMode.ToString());
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetCurrentMode, where you can find further documentation.
HRESULT ISystem::SetTargetMode ( [in] SystemMode  mode)

This function writes the control mode. After writing the mode, the control will NOT be in this mode. It will be in the process of switching to this mode. In order to switch to a certain mode, and perform an action while in this mode, you have to set the mode, then read it back until the desired mode is reached.

Parameters
[in]modeThe commanded target mode for the device to switch to.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
SystemMode currentMode = connection.System.GetCurrentMode();
// print data to console
Console.WriteLine("Current SystemMode: " + currentMode.ToString());
// let's switch to another mode
SystemMode newMode = (currentMode == SystemMode.SYSTEMMODE_BB) ? SystemMode.SYSTEMMODE_P0 : SystemMode.SYSTEMMODE_BB;
Console.WriteLine("Starting switching operation to " + newMode.ToString());
connection.System.SetTargetMode(newMode);
// poll for state change
int timeout = 20000;
do
{
Thread.Sleep(100);
timeout -= 100;
if (timeout < 0)
throw new Exception("timeout during mode switching!");
}
while (connection.System.GetCurrentMode() != newMode);
Console.WriteLine("Reached new mode!");
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemSetTargetMode, where you can find further documentation.
HRESULT ISystem::GetCpuLoad ( [out, retval] FLOAT *  cpuLoad)

This method reads the device CPU load.

Parameters
[out]cpuLoadReturns the current CPU load of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
float cupLoad = connection.System.GetCpuLoad();
// print data to console
Console.WriteLine("CPU Load: " + cupLoad.ToString());
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetCpuLoad, where you can find further documentation.
HRESULT ISystem::GetCpuLoadMax ( [out, retval] FLOAT *  cpuLoad)

This method reads the device maximum CPU Load.

Parameters
[out]cpuLoadReturns the maximum CPU load of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
float cupLoad = connection.System.GetCpuLoadMax();
// print data to console
Console.WriteLine("CPU Load Maximum: " + cupLoad.ToString());
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
} //!
Note:
This method maps to the mlpiCore function mlpiSystemGetCpuLoadMax, where you can find further documentation.
HRESULT ISystem::GetDisplayedDiagnosis ( [out, retval] struct Diagnosis diagnosis)

This function reads the displayed diagnostic message of the device. The diagnosis displayed is the diagnosis with the highest severity of all currently active diagnoses. This means that the displayed diagnostic message can differ from the newest or most recently inserted diagnostic message.

Parameters
[out]diagnosisReturns structure with information about the diagnosis.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
// read displayed diagnosis of device
Diagnosis diagnosis = connection.System.GetDisplayedDiagnosis();
// add timestamp
string strFormattedOutput = "";
strFormattedOutput += "Time: "
+ diagnosis.dateTime.day.ToString("00") + "."
+ diagnosis.dateTime.month.ToString("00") + "."
+ diagnosis.dateTime.year.ToString("00") + " - "
+ diagnosis.dateTime.minute.ToString("00") + ":"
+ diagnosis.dateTime.hour.ToString("00") + ":"
+ diagnosis.dateTime.second.ToString("00") + System.Environment.NewLine;
// add current state
strFormattedOutput += "State: " + diagnosis.state.ToString() + System.Environment.NewLine;
// add dispatcher of diagnosis
strFormattedOutput += "Despatcher: " + diagnosis.despatcher.ToString() + System.Environment.NewLine;
// add error number
strFormattedOutput += "Number: 0x" + String.Format("{0:X}", diagnosis.number) + System.Environment.NewLine;
// add description
strFormattedOutput += "Text: " + diagnosis.text;
// print to console
Console.WriteLine(strFormattedOutput);
Note:
This method maps to the mlpiCore function mlpiSystemGetDisplayedDiagnosis, where you can find further documentation.
HRESULT ISystem::GetNewestDiagnosisIndex ( [out, retval] LONG *  index)

To each new diagnosis in the diagnosis logbook, a unique incremented diagnosis index is assigned. This method returns the index of the newest and therefore most recently inserted diagnosis. This index can be used as a parameter with the function mlpiSystemGetDiagnosisLog to read the complete logbook of the newest diagnostic messages.

Parameters
[out]indexReceives the current index of the newest diagnosis as integer.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
See documentation of method GetDiagnosisLog
Note:
This method maps to the mlpiCore function mlpiSystemGetNewestDiagnosisIndex, where you can find further documentation.
HRESULT ISystem::GetOldestDiagnosisIndex ( [out, retval] LONG *  index)

As the memory of the device is limited, it is not possible to hold all diagnostic messages in the logbook from the start of power up. Because of this, older diagnostic messages are first swapped to disk and then discarded. Use this function to get the index of the oldest diagnostic message that is still stored in memory and can be returned by the function mlpiSystemGetDiagnosisLog.

Parameters
[out]indexReceives the index of the oldest available diagnosis as integer.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
See documentation of method GetDiagnosisLog
Note:
This method maps to the mlpiCore function mlpiSystemGetOldestDiagnosisIndex, where you can find further documentation.
HRESULT ISystem::GetDiagnosisLog ( [in] LONG  startIndex,
[in] LONG  numToRead,
[out, retval] SAFEARRAY(struct Diagnosis)*  diagnosis 
)

This method reads and returns the device diagnosis log. The method returns an array of diagnostic messages from the newest to the oldest diagnostic message. Each diagnosis in the diagnosis logbook has a unique incrementing diagnosis index. You need to specify from which index you want to start reading the diagnosis logbook. To get the index of the newest and therefore most recently inserted diagnosis, you can use the method GetNewestDiagnosisIndex. As the memory of the device is limited, it is not possible to hold all diagnostic messages in the logbook from the start of power up. Because of this, older diagnostic messages are first swapped to disk and then discarded. Use the function GetOldestDiagnosisIndex to get the oldest available diagnosis to read. Diagnostic messages which are not located between the newest and oldest diagnosis index can no longer be read using this method. This function will not return an error if the number of diagnoses you want to read is larger than the number of diagnoses available.

Parameters
[in]startIndexIndex of the first diagnosis index to start reading. This is the newest(highest) index.
[in]numToReadNumber of diagnostic messages to read.
[out]diagnosisReturns an array of diagnosis structs. Each element for a diagnosis in the log.
Returns
Return value indicating success (>=0) or error (<0).
Example C#
...
// read the complete diagnosis log of device
int newestIndex = connection.System.GetNewestDiagnosisIndex();
int oldestIndex = connection.System.GetOldestDiagnosisIndex();
int numAvailable = newestIndex - oldestIndex;
Diagnosis[] diagnosisLog = (Diagnosis[])connection.System.GetDiagnosisLog(newestIndex, numAvailable);
// print each diagnosis log entry in the returned array
foreach (Diagnosis diagnosis in diagnosisLog)
{
string strFormattedOutput = "";
strFormattedOutput += diagnosis.index.ToString() + System.Environment.NewLine;
strFormattedOutput += "-Time: "
+ diagnosis.DateAndTime.day.ToString("00") + "."
+ diagnosis.DateAndTime.month.ToString("00") + "."
+ diagnosis.DateAndTime.year.ToString("00") + " - "
+ diagnosis.DateAndTime.minute.ToString("00") + ":"
+ diagnosis.DateAndTime.hour.ToString("00") + ":"
+ diagnosis.DateAndTime.second.ToString("00") + System.Environment.NewLine;
strFormattedOutput += "-State: " + diagnosis.state.ToString() + System.Environment.NewLine;
strFormattedOutput += "-Despatcher: " + diagnosis.despatcher.ToString() + System.Environment.NewLine;
strFormattedOutput += "-Number: 0x" + String.Format("{0:X}", diagnosis.number) + System.Environment.NewLine;
strFormattedOutput += "-Text: " + diagnosis.text;
Console.WriteLine(strFormattedOutput);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetDiagnosisLog, where you can find further documentation.
HRESULT ISystem::ConvertDiagnosisNumberToText ( [in] VARIANT  diagnosisNumber,
[out, retval] BSTR *  diagnosis 
)

This function tries to retrieve a textual description for a given diagnosis number. Please note that this is not possible for every diagnosis number that is returned from the system. This includes user-specific diagnosis numbers or diagnosis numbers which represent a group of error conditions. In case no match was found the string "No entry found in data base" is returned.

Parameters
[in]diagnosisNumberDiagnosis number to be translated into text.
[out]diagnosisReturns the diagnosis text as string.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// let's convert a sercos error to a text description
int diagnosisNumber;
unchecked
{
diagnosisNumber = (int)0xF02D7001;
}
string diagnosisText = connection.System.ConvertDiagnosisNumberToText(diagnosisNumber);
// print data to console
Console.WriteLine("Diagnosis Text: " + diagnosisText);
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemConvertDiagnosisNumberToText, where you can find further documentation.
HRESULT ISystem::GetOperationHours ( [out, retval] LONG *  hours)

This method reads the device operational hours.

Parameters
[out]hoursReturns the number of operation hours of the device as integer.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
{
// read data from device
int data = connection.System.GetOperationHours();
// print to console
Console.WriteLine("Operation Hours of device: " + data.ToString());
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetOperationHours, where you can find further documentation.
HRESULT ISystem::GetVersionInfo ( [in] BSTR  component,
[out, retval] BSTR *  version 
)

This method reads the hardware version.

Parameters
[in]componentString which specifies the component the version of which you want to read.
[out]versionReturns a version struct containing version information about the component.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// get data from device
string versionFirmware = connection.System.GetVersionInfo("VERSION_FIRMWARE");
string versionHardware = connection.System.GetVersionInfo("VERSION_HARDWARE");
string versionLogic = connection.System.GetVersionInfo("VERSION_LOGIC");
string versionBoard = connection.System.GetVersionInfo("VERSION_BSP");
// print data to console
Console.WriteLine("Version-Firmware: " + versionFirmware);
Console.WriteLine("Version-Hardware: " + versionHardware);
Console.WriteLine("Version-Logic: " + versionLogic);
Console.WriteLine("Version-Board: " + versionBoard);
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetVersionInfo, where you can find further documentation.
HRESULT ISystem::GetSerialNumber ( [out, retval] BSTR *  serial)

This method reads the serial number of the device.

Parameters
[out]serialReturns the serial number of the device as string.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
string data = connection.System.GetSerialNumber();
// print to console
Console.WriteLine("" + data);
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetSerialNumber, where you can find further documentation.
HRESULT ISystem::GetMacAddress ( [out, retval] BSTR *  address)

This method reads the MAC address of the device. Value is a UTF16 string in format "00:00:00:00:00:00".

Parameters
[out]addressReturns the MAC address of the man connection of the device as string.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
See GetIpAddress
Note:
This method maps to the mlpiCore function mlpiSystemGetMacAddress, where you can find further documentation.
HRESULT ISystem::ClearError ( void  )

This function clears pending errors.

Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// reset all pending errors on the device
connection.System.ClearError();
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemClearError, where you can find further documentation.
HRESULT ISystem::Reboot ( void  )

This function performs a reboot of the complete device. This is only allowed if the device is switched to P0 (SYSTEMMODE_P0) beforehand.

Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// reboot the device
connection.System.Reboot();
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemReboot, where you can find further documentation.
HRESULT ISystem::Cleanup ( void  )

This function performs a reboot and total clean up of the complete device. This is only allowed if the device is switched to P0 (SYSTEMMODE_P0) beforehand. Please note that the device reboots immediately and that all project data are deleted during the next boot up.

Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// reset configuration of the device to default values
connection.System.Cleanup();
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemCleanup, where you can find further documentation.
HRESULT ISystem::GetLanguage ( [out, retval] Language language)

This method reads the system language of the device.

Parameters
[out]languageReturns the current language setting of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
Language language = connection.System.GetLanguage();
// print to console
Console.WriteLine("Language: " + language.ToString());
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetLanguage, where you can find further documentation.
HRESULT ISystem::SetLanguage ( [in] Language  language)

This method writes the system language of the device. The language setting will affect the messages shown in the device display for example.

Parameters
[in]languageThe new language to switch to.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
Note:
This method maps to the mlpiCore function mlpiSystemSetLanguage, where you can find further documentation.
HRESULT ISystem::GetHardwareDetails ( [out, retval] BSTR *  hardwareDetails)

This method reads the hardware details of the device.

Parameters
[out]hardwareDetailsReturns a hardware information string.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
string data = connection.System.GetHardwareDetails();
// print to console
Console.WriteLine("Language: " + data.ToString());
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetHardwareDetails, where you can find further documentation.
HRESULT ISystem::GetMemoryInfo ( [out, retval] struct MemoryInfo memory)

This method retrieves information about the RAM which is currently free on the device. The function can be used to trace the total system performance of the device.

Parameters
[out]memoryReturns the current memory information of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
MemoryInfo info = connection.System.GetMemoryInfo();
// print to console
Console.WriteLine("totalVolatileBytes: " + info.totalVolatileBytes.ToString());
Console.WriteLine("freeVolatileBytes: " + info.freeVolatileBytes.ToString());
Console.WriteLine("totalNonvolatileBytes: " + info.totalNonvolatileBytes.ToString());
Console.WriteLine("freeNonvolatileBytes: " + info.freeNonvolatileBytes.ToString());
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetMemoryInfo, where you can find further documentation.
HRESULT ISystem::GetDateAndTimeUtc ( [out, retval] struct DateAndTime dateTime)

This method reads the device system time.

Parameters
[out]dateTimeReturns a structure with detailed time information of the on-board clock of the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
DateAndTime dat = connection.System.GetDateAndTimeUtc();
// print to console
Console.WriteLine("Date and Time: " + dat.day + "." + dat.month + "." + dat.year + " " + dat.hour + ":" + dat.minute + ":" + dat.second);
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemGetDateAndTimeUtc, where you can find further documentation.
HRESULT ISystem::GetSpecialPath ( [in] SpecialPath  pathIdentifier,
[out, retval] BSTR *  path 
)

This function returns the platform-specific absolute path of the given symbolic path. For example, it is possible to retrieve the absolute path of the system path on the connected device. This information can then be used to access files via ftp on the given path. This function is necessary, because it is not guaranteed that the system path always has the same absolute path. Those special paths can vary on different operating systems or storage devices.

Parameters
[in]pathIdentifierEnumeration that identifies the path to query.
[out]pathString where the special path will be stored. Starts and ends with path delimiter ("/").
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
...
string pathSYS = connection.System.GetSpecialPath(SpecialPath.PATH_SYSTEM);
string pathOEM = connection.System.GetSpecialPath(SpecialPath.PATH_OEM);
string pathUSR = connection.System.GetSpecialPath(SpecialPath.PATH_USER);
Console.WriteLine("SYSTEM root path: " + pathSYS); // --> e.g. "/ata0/"
Console.WriteLine("OEM root path: " + pathOEM); // --> e.g. "/ata0a/"
Console.WriteLine("USER root path: " + pathUSR); // --> e.g. "/ata0b/"
Note:
This method maps to the mlpiCore function mlpiSystemGetSpecialPath, where you can find further documentation.
HRESULT ISystem::GetSpecialPathInfo ( [in] SpecialPath  path,
[out, retval] struct SpecialPathInfo pathInfo 
)

This method retrieves information about the currently free spaces of special paths on the device.

Parameters
[in]pathRoot path which identifies the volume from which to retrieve the free disk space.
[out]pathInfoReturns the current path information about the device.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// read data from device
SpecialPathInfo pathInfo = connection.System.GetSpecialPathInfo(SpecialPath.PATH_USER);
// print to console
Console.WriteLine("User Path - Free Bytes: " + pathInfo.freeBytes);
Console.WriteLine("User Path - Total Bytes: " + pathInfo.totalBytes);
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
todo
Note:
This method maps to the mlpiCore function mlpiSystemGetSpecialPathInfo, where you can find further documentation.
HRESULT ISystem::SetDiagnosis ( [in] DiagnosisCategory  category,
[in] LONG  number,
BSTR  diagnosisText 
)

This function writes a diagnosis with message to the diagnosis system of the device.

Parameters
[in]categoryDiagnosis category (DiagnosisCategory).
[in]numberUser-specific diagnosis number. (Maximum 4 hexadecimal characters!)
[in]diagnosisTextDiagnosis text.
Note
The maximum length of a diagnosis text is 60 characters.
Returns
Return value indicating success (>=0) or error (<0).
Example C#:
try
{
// print a simple message to the diagnosis log which might also get shown in the display of the device
connection.System.SetDiagnosis(DiagnosisCategory.DIAGNOSIS_MESSAGE, 23, "All your base are belong to us!");
}
catch (System.Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
Note:
This method maps to the mlpiCore function mlpiSystemSetDiagnosis, where you can find further documentation.

Member Data Documentation

const BSTR ISystem::VERSION_FIRMWARE = "VERSION_FIRMWARE"

This variable defines the value to read the firmware version string.

Definition at line 75 of file ISystem.idl.

const BSTR ISystem::VERSION_HARDWARE = "VERSION_HARDWARE"

This variable defines the value to read the hardware version string.

Definition at line 77 of file ISystem.idl.

const BSTR ISystem::VERSION_LOGIC = "VERSION_LOGIC"

This variable defines the value to read the logic version string.

Definition at line 79 of file ISystem.idl.

const BSTR ISystem::VERSION_BSP = "VERSION_BSP"

This variable defines the value to read the board support version string.

Definition at line 81 of file ISystem.idl.

const BSTR ISystem::VERSION_MLPI_SERVER_CORE = "VERSION_MLPI_SERVER_CORE"

This variable defines the value to read the MLPI server core version string.

Definition at line 83 of file ISystem.idl.


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