Skip to content

TelSurge Classes

prachtaine edited this page Nov 17, 2016 · 1 revision

Surgery

Description:

A Surgery is the root object in TelSurge. Each party (device) has a copy of the Surgery in which they are participating. Clients send a data packet to the master containing a copy of their Surgery object and the master merges it with its own. Similarly, the master will send each client a copy of its Surgery object and each client will merge it with its own. This keeps every copy of the Surgery up-to-date.

Properties:

OmniPosition InControlPosition

The OmniPosition of the user that is currently in control of the robot.

User Master

The user that is setup to be master in the surgery. This is set when the "Initialize" button is pressed with the "Set as Master" checkbox checked. There can only be one master in a surgery.

List(User) ConnectedClients

The list of users connected in the surgery other than the master.

User UserInControl

The user that is currently in control of the robot.

Functions

Surgery Surgery()

Creates a new Surgery object. Defaults ConnectedClients to an empty list.

void Merge(Surgery, IsInControl, IsMaster)

Handles merging a received Surgery object with its own. This keeps all copies of a Surgery up-to-date across all connected devices.