This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Plugins::Syncker::Manager Class

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Sim SDK edition to use it.
Header: #include <plugins/Unigine/Syncker/UnigineSyncker.h>
Notice
Syncker plugin must be loaded.

This class represents Syncker manager interface used to initialize and destroy Syncker in master and slave applications.

Manager Class

Members


bool getArgIsMaster ( ) #

Returns a value indicating if the command line argument "-sync_master" equals to 1.

Return value

true if the command line argument "-sync_master" equals to 1; otherwise, false.

int getArgUdpPort ( ) #

Returns the UDP port value set by the command line argument "-sync_port".

Return value

UDP port number. The default value is 8890.

Syncker::ADDRESSING_METHOD getArgAddressingMethod ( ) #

Returns the addressing mode value set by the command line argument "-sync_method".

Return value

Current addressing mode: one of the ADDRESSING_METHOD enum values.

Syncker::SWAP_SYNC_MODE getArgSwapSyncMode ( ) const#

Returns the swap synchronization mode set by the command line argument "-sync_swap".

int getArgPeersCount ( ) #

Returns the number of peers set by the command line argument "-sync_count".

Return value

Number of peers. The default value is 1. The number of peers includes all Slaves in the network + the Master.

const char * getArgBroadcastAddress ( ) #

Returns the broadcast address of the Master set by the command line argument "-sync_broadcast_address".

Return value

Broadcast address of the Master.

const char * getArgMulticastAddress ( ) #

Returns the multicast address of the Master set by the command line argument "-sync_multicast_address".

Return value

Multicast address of the Master. The default value is 239.0.0.1

const char * getArgMasterAddress ( ) #

Returns the IP address of the Master set by the command line argument "-sync_master_address".
Notice
Available for Slave only.

Return value

IP address of the Master.

int getArgUdpSlavePort ( ) #

Returns the UDP port used by the Slave set by the command line argument "-sync_slave_port".
Notice
Available for Slave only.

Return value

UDP port used by the Slave. The default value is 0 (any unused port available).

bool getArgAllowExtraSlaves ( ) #

Returns the value indicating if additional Slaves can be connected after starting the session set by the command line argument "-sync_allow_extra_slaves".
Notice
Available for Slave only.

Return value

true if additional Slaves can be connected after starting the session; otherwise, false.

Master * initMaster ( ) #

Initializes the Syncker as the Master application using values specified via the command-line arguments.

Return value

Pointer to the Master interface.

Master * initMasterBroadcast ( int peers_count, const char * broadcast_address, unsigned short udp_port, Syncker::SWAP_SYNC_MODE swap_mode = Syncker.SWAP_SYNC_MODE.DEFAULT ) #

Initializes the Syncker as the Master application with the broadcast mode enabled.
Notice

Arguments

  • int peers_count - Total number of Syncker hosts in the network (including the Master itself). Similar to specifying the -sync_count command-line argument.
  • const char * broadcast_address - Broadcast address to be used. Similar to specifying the -sync_broadcast_address command-line argument.
  • unsigned short udp_port - Broadcast address to be used. Similar to specifying the -sync_broadcast_address command-line argument.
  • Syncker::SWAP_SYNC_MODE swap_mode - Swap synchronization mode to be used by the Syncker. Similar to specifying the -sync_swap command-line argument.

Return value

Pointer to the Master interface.

Master * initMasterMulticast ( int peers_count, const char * multicast_address, unsigned short udp_port, Syncker::SWAP_SYNC_MODE swap_mode = Syncker.SWAP_SYNC_MODE.DEFAULT ) #

Initializes the Syncker as the Master application with the multicast mode enabled.

Arguments

  • int peers_count - Total number of Syncker hosts in the network (including the Master itself). Similar to specifying the -sync_count command-line argument.
  • const char * multicast_address - Multicast address to be used. Similar to specifying the -sync_multicast_address command-line argument.
  • unsigned short udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.
  • Syncker::SWAP_SYNC_MODE swap_mode - Swap synchronization mode to be used by the Syncker. Similar to specifying the -sync_swap command-line argument.

Return value

Pointer to the Master interface.

Master * initMasterUnicast ( int peers_count, unsigned short udp_port, Syncker::SWAP_SYNC_MODE swap_mode = Syncker.SWAP_SYNC_MODE.DEFAULT ) #

Initializes the Syncker as the Master application with the broadcast mode enabled.
Notice

Arguments

  • int peers_count - Total number of Syncker hosts in the network (including the Master itself). Similar to specifying the -sync_count command-line argument.
  • unsigned short udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.
  • Syncker::SWAP_SYNC_MODE swap_mode - Swap synchronization mode to be used by the Syncker. Similar to specifying the -sync_swap command-line argument.

Return value

Pointer to the Master interface.

bool isMasterInitialized ( ) #

Returns a value indicating if the Master was initialized.

Return value

true if the Master was initialized; otherwise, false.

Master * getMaster ( ) #

Returns the master interface.

Return value

Pointer to the Master interface.

Slave * initSlave ( ) #

Initializes the Syncker as the Slave application using values specified via the command-line arguments.

Return value

Pointer to the Slave interface.

bool isSlaveInitialized ( ) #

Returns a value indicating if the slave was initialized.

Return value

1 if the slave was initialized; otherwise, 0.

Slave * getSlave ( ) #

Returns the Slave interface.

Return value

Pointer to the slave interface.

bool isSynckerInitialized ( ) #

Returns a value indicating if the Syncker (Master or Slave) was initialized.

Return value

1 if the Syncker (master or slave) was initialized; otherwise, 0.

Syncker * getSyncker ( ) #

Returns the base class interface for Master and Slave.

Return value

Pointer to the syncker interface. It is the base class for Master and Slave.

void setDebugWindow ( bool window ) #

Sets a value indicating if the Syncker's debug window is open.

Arguments

  • bool window - Enable flag. Use 1 to show the debug window, or 0 - to hide it.

bool isDebugWindow ( ) #

Returns a value indicating if the Syncker's debug window is enabled.

Return value

true if the Syncker's debug window is enabled; otherwise, false.

void destroySyncker ( ) #

Performs shutdown and destroys the Syncker.
Notice
Called automatically, when the plugin is unloaded.

Slave * initSlaveBroadcast ( unsigned short udp_port, Syncker::SWAP_SYNC_MODE swap_mode = Syncker.SWAP_SYNC_MODE.DEFAULT ) #

Initializes the Syncker as the Slave application with the broadcast mode enabled. Master's IP address will be detected automatically.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • unsigned short udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.
  • Syncker::SWAP_SYNC_MODE swap_mode - Swap synchronization mode to be used by the Syncker. Similar to specifying the -sync_swap command-line argument.

Return value

Pointer to the slave interface.

Slave * initSlaveBroadcast ( const char * master_address, unsigned short udp_port, Syncker::SWAP_SYNC_MODE swap_mode = Syncker.SWAP_SYNC_MODE.DEFAULT ) #

Initializes the Syncker as the Slave application with the specified parameters and the broadcast mode enabled. Master's IP address is specified explicitly.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • const char * master_address - Master IP address to be used. Similar to specifying the -sync_master_address command-line argument.
  • unsigned short udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.
  • Syncker::SWAP_SYNC_MODE swap_mode - Swap synchronization mode to be used by the Syncker. Similar to specifying the -sync_swap command-line argument.

Return value

Pointer to the slave interface.

Slave * initSlaveMulticast ( const char * multicast_address, unsigned short udp_port, Syncker::SWAP_SYNC_MODE swap_mode = Syncker.SWAP_SYNC_MODE.DEFAULT ) #

Initializes the Syncker as the Slave application with the specified parameters and the multicast mode enabled. Master's IP address will be detected automatically.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • const char * multicast_address - Multicast address to be used. Similar to specifying the -sync_multicast_address command-line argument.
  • unsigned short udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.
  • Syncker::SWAP_SYNC_MODE swap_mode - Swap synchronization mode to be used by the Syncker. Similar to specifying the -sync_swap command-line argument.

Return value

Pointer to the slave interface.

Slave * initSlaveMulticast ( const char * master_address, const char * multicast_address, unsigned short udp_port, Syncker::SWAP_SYNC_MODE swap_mode = Syncker.SWAP_SYNC_MODE.DEFAULT ) #

Initializes the Syncker as the Slave application with the specified parameters and the multicast mode enabled. Master's IP address is specified explicitly.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • const char * master_address - Master IP address to be used. Similar to specifying the -sync_master_address command-line argument.
  • const char * multicast_address - Multicast address to be used. Similar to specifying the -sync_multicast_address command-line argument.
  • unsigned short udp_port - UDP port to be used. Similar to specifying the -sync_port command-line argument.
  • Syncker::SWAP_SYNC_MODE swap_mode - Swap synchronization mode to be used by the Syncker. Similar to specifying the -sync_swap command-line argument.

Return value

Pointer to the slave interface.

Slave * initSlaveUnicast ( unsigned short master_udp_port, unsigned short slave_udp_port = 0, Syncker::SWAP_SYNC_MODE swap_mode = Syncker.SWAP_SYNC_MODE.DEFAULT ) #

Initializes the Syncker as the Slave application with the specified parameters and the unicast mode enabled. Master's IP address will be detected automatically.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • unsigned short master_udp_port - UDP port to be used by the Master.
  • unsigned short slave_udp_port - UDP port to be used by the Slave. Similar to specifying the -sync_slave_port command-line argument.
  • Syncker::SWAP_SYNC_MODE swap_mode - Swap synchronization mode to be used by the Syncker. Similar to specifying the -sync_swap command-line argument.

Return value

Pointer to the slave interface.

Slave * initSlaveUnicast ( const char * master_address, unsigned short master_udp_port, unsigned short slave_udp_port = 0, Syncker::SWAP_SYNC_MODE swap_mode = Syncker.SWAP_SYNC_MODE.DEFAULT ) #

Initializes the Syncker as the Slave application with the specified parameters and the unicast mode enabled. Master's IP address is specified explicitly.
Notice
Master must be initialized with broadcast mode enabled as well.

Arguments

  • const char * master_address - Master IP address to be used. Similar to specifying the -sync_master_address command-line argument.
  • unsigned short master_udp_port - UDP port to be used by the Master.
  • unsigned short slave_udp_port - UDP port to be used by the Slave. Similar to specifying the -sync_slave_port command-line argument.
  • Syncker::SWAP_SYNC_MODE swap_mode - Swap synchronization mode to be used by the Syncker. Similar to specifying the -sync_swap command-line argument.

Return value

Pointer to the slave interface.

Syncker * initSyncker ( ) #

Initializes the Syncker as Master or Slave application depending on the values specified via the command-line arguments.

Return value

Pointer to the syncker interface. It is the base class for Master and Slave.

Manager * get ( ) #

Returns the Manager interface.

Return value

Pointer to the manager interface.
Last update: 2023-06-23
Build: ()