Machines Manual

内容表

关于

A maxon::MachineInterface interface represents either the local machine (running Cinema 4D ) or a machine connected via RPC. Typically one accesses the local machine to obtain specific interfaces.

MachinesInterface

maxon::MachinesInterface gives access to the local or connected machines:

// This example lists all connected machines including the local machine.
maxon::BaseArray<maxon::MachineRef> machines; maxon::MachinesInterface::GetRPCMachines (machines) iferr_return ;
for ( auto machine : machines) { const maxon::DataDictionary machineInfo = machine.GetMachineInfo() iferr_return ; const maxon::String computerName = machineInfo.Get(maxon::MACHINEINFO::COMPUTERNAME) iferr_return ; DiagnosticOutput ( "Machine @" , computerName); }

MachineInterface

A maxon::MachineInterface represents the local machine or a connected machine.

The connection state is stored as maxon::MACHINESTATE .

General information on the machine can be obtained with:

// This example prints various infos on the local machine to the console. const maxon::MachineRef localMachine = maxon::MachinesInterface::GetLocal (); const maxon::DataDictionary machineInfo = localMachine.GetMachineInfo() iferr_return ; const maxon::String computerName = machineInfo.Get(maxon::MACHINEINFO::COMPUTERNAME) iferr_return ; const maxon::String osVersion = machineInfo.Get(maxon::MACHINEINFO::OSVERSION) iferr_return ; const maxon::String uid = localMachine.GetUniqueId(); DiagnosticOutput ( "Machine @ (@) running @" , computerName, uid, osVersion);

A maxon::MachineInterface gives access to various interfaces:

The maxon::MachineInterface provides this observable:

延伸阅读

maxon::String
定义: string.h:1197
maxon::MachinesInterface::GetLocal
static MAXON_METHOD MachineRef GetLocal()
iferr_return
#define iferr_return
定义: resultbase.h:1434
maxon::BaseArray
定义: basearray.h:366
DiagnosticOutput
#define DiagnosticOutput(formatString,...)
定义: debugdiagnostics.h:166
maxon::MachinesInterface::GetRPCMachines
static MAXON_METHOD Result< void > GetRPCMachines(WritableArrayInterface< MachineRef > &machines)

Copyright  © 2014-2025 乐数软件    

工业和信息化部: 粤ICP备14079481号-1