DI-Guy API, VR-Link

Generated from diguy_module_net.h

DI-Guy API Version 12.5.1

This file was automatically generated from diguy_module_net.h. Do not edit this file directly; the changes will be lost.
Includes: declspec_diguy.h

Contents:

Alphabetical Index

Link against: libdiguy_module_dis or libdiguy_module_hla

enumeration diguyCoordinateSystemType

typedef enum
{
	DIGUY_COORDINATE_SYSTEM_NONE       = 0,
	DIGUY_COORDINATE_SYSTEM_UTM        = 1,
	DIGUY_COORDINATE_SYSTEM_FLAT_EARTH = 2,
	DIGUY_COORDINATE_SYSTEM_GEOCENTRIC = 3

} diguyCoordinateSystemType;

class diguyNetInterface

Description:

This class provides accessors to the interface parameters, as well as functions for going online and offline.

class BDI_DECLSPEC_diguy diguyNetInterface
{
public:
    virtual int go_online(diguyScenario* scenario, void* exconn = NULL) = 0;
    virtual int go_offline() = 0;
    virtual int get_online() = 0;
    virtual int set_cfg_file(const char* cfg_filename) = 0;
    virtual int update() = 0;
    virtual int set_exercise(int exercise) = 0;
    virtual int get_exercise() = 0;
     virtual int set_host(int host) = 0;
    virtual int get_host() = 0;
    virtual int set_site(int site) = 0;
    virtual int get_site() = 0;
    virtual int set_port(int port) = 0;
    virtual int get_port() = 0;
    virtual int set_ipaddr(const char* ipaddr) = 0;
    virtual int get_ipaddr(char** ipaddr) = 0;
    virtual int set_display_remote_chars(int display) = 0;
    virtual int get_display_remote_chars() = 0;
    virtual void set_send_custom_pdus(int) = 0;
    virtual int get_send_custom_pdus() = 0;
    virtual void enter_vpnet_mode() = 0;
    virtual diguyCharacter* get_character_from_id(char const* id) = 0;
    virtual char* get_name_from_entity(void* reflected_entity) = 0;
    virtual int set_publish_local_chars(int publish) = 0;
     virtual int get_publish_local_chars() = 0;
    virtual int set_position_offset(float z, float yaw, float roll, float pitch) = 0;
    virtual int get_position_offset(float* z,
        float* yaw,
        float* roll,
        float* pitch) = 0;
    virtual void* get_next_participant_name(char* buf, void* handle) = 0;
     virtual int get_model_from_septet(const char** chartype,
        const char** appearance,
        const int septet[7]) = 0;
    virtual int get_septet_from_model(int septet[7],
        const char* chartype,
        const char* appearance) = 0;
    virtual void set_timeout_interval(float interval) = 0;
    virtual float get_timeout_interval() = 0;
    virtual void set_time_to_live(int time_to_live) = 0;
    virtual int get_time_to_live() = 0;
    virtual int set_lat_lon(double lat, double lon) = 0;
    virtual int get_lat_lon(double* lat, double* lon) = 0;
    virtual void format_lat_or_lon(char* outbuf,
        double value,
        bool is_lat,
        bool is_decimal,
        bool value_is_degrees) = 0;
    virtual int set_utm_zone(int zone, int southzone) = 0;
    virtual int set_utm(int zone,
        int southzone,
        double easting,
        double northing) = 0;
    virtual int get_utm(int* zone,
        int* southzone,
        double* easting,
        double* northing) = 0;
    virtual int set_use_user_defined_coords(int use_user_defined) = 0;
    virtual int get_use_user_defined_coords() = 0;
    virtual int get_earth_coord(char* outbuf,
        const float x,
        const float y,
        const float z) = 0;
    virtual void toggle_earth_coord_format() = 0;
    virtual int set_use_database_coords(int use_dbc) = 0;
    virtual int get_num_coordinate_systems();
    virtual const char* get_coordinate_system_name(int index);
    virtual int set_coordinate_system_type(const char* name);
    virtual const char* get_coordinate_system_type_name();
    virtual int set_coordinate_system_type(diguyCoordinateSystemType system_type);
    virtual diguyCoordinateSystemType get_coordinate_system_type();
    virtual void set_use_UTM_standard_offsets(int standard_offsets);
    virtual int get_use_UTM_standard_offsets();
    virtual double parse_dms_to_radians(const char* dms_string) = 0;
    virtual int convert_mgrs_to_local(const char* MGRS_str,
        float* x,
        float* y,
        float* z) = 0;
    virtual const char* convert_local_to_mgrs(float x, float y, float z) = 0;
    virtual float convert_local_to_lat(float x, float y, float z) = 0;
    virtual float convert_local_to_long(float x, float y, float z) = 0;
    virtual const char* convert_local_to_lat_long_string(float x, float y, float z) = 0;
    virtual int convert_lat_long_to_local(float lat, float lon, float* x, float* y, float* z) = 0;
    virtual int set_ground_clamp_reflected_land_entities_enabled(int enabled);
    virtual int get_ground_clamp_reflected_land_entities_enabled();
    virtual int set_ground_clamp_reflected_land_entities_from_host(int from_host);
    virtual int get_ground_clamp_reflected_land_entities_from_host();
    virtual int set_ground_clamp_max_climb(float max_climb);
    virtual float get_ground_clamp_max_climb();
    virtual int set_ground_clamp_max_drop(float max_drop);
    virtual float get_ground_clamp_max_drop();
    virtual void set_network_datetime_mode(diguyDatetimeNetworkMode network_datetime_mode);
    virtual diguyDatetimeNetworkMode get_network_datetime_mode();
    virtual void set_network_datetime_broadcast_interval(float broadcast_interval);
    virtual float get_network_datetime_broadcast_interval();
    virtual int set_sync_mode_enabled(int enabled) = 0;
    virtual int get_sync_mode_enabled() = 0;
    virtual int set_sync_mode_master(int master) = 0;
    virtual int get_sync_mode_master() = 0;
    virtual int set_sync_mode_slave_cam(int sl_cam) = 0;
    virtual int get_sync_mode_slave_cam() = 0;
    virtual int set_sync_mode_camera_offset(float offset_r, float offset_y, float offset_p) = 0;
    virtual int get_sync_mode_camera_offset(float* offset_r,
        float* offset_y,
        float* offset_p) = 0;
    virtual int set_sync_mode_camera_slaved(int slaved) = 0;
    virtual int get_sync_mode_camera_slaved() = 0;
    virtual int set_camera_details_out_of_date() = 0;
    virtual int set_use_adaptive_guide(int use_adaptive_guide) = 0;
    
    virtual int get_use_adaptive_guide() = 0;
    virtual int set_federation_name(const char* federation_name);
    virtual const char* get_federation_name();
    virtual int set_culling_enabled(int culling);
    virtual int get_culling_enabled();
    virtual void set_network_datetime_enable_diguy_custom_pdus(int enable_diguy_custom_pdus);
    virtual int  get_network_datetime_enable_diguy_custom_pdus();
    virtual void set_network_datetime_enable_dis_start_resume_pdus(int enable_dis_start_resume_pdus);
    virtual int  get_network_datetime_enable_dis_start_resume_pdus();

function diguyNetInterface::go_online

Prototype:

virtual int go_online(diguyScenario* scenario, void* exconn = NULL) = 0;
Description:

This function tells DI-Guy that it should start talking over VR-Link.

It should be called when DI-Guy should join an exercise.

Arguments:

scenariopointer to the diguyScenario which will be connected to the network
exconn optional pointer to a VR-Link exercise connection to use
Returns:

0 on success, -1 on failure

function diguyNetInterface::go_offline

Prototype:

virtual int go_offline() = 0;
Description:

This function tells DI-Guy that it should stop talking over VR-Link.

Returns:

0 on success, -1 on failure

function diguyNetInterface::get_online

Prototype:

virtual int get_online() = 0;
Description:

This function asks if DI-Guy is connected to the network.

Returns:

1 if yes, 0 if no

function diguyNetInterface::set_cfg_file

Prototype:

virtual int set_cfg_file(const char* cfg_filename) = 0;
Description:

This function sets the filename of the VR-Link configuration file that will be read by the DI-Guy software. The default is "network.cfg". This function must be called before the network module is initialized.

C++ only

Arguments:

cfg_filefilename of desired configuration file
Returns:

0 on success, -1 on failure

function diguyNetInterface::update

Prototype:

virtual int update() = 0;
Description:

This function tells DI-Guy that it should read PDUs from the network and process them. Call this function periodically.

Returns:

0 on success, -1 on failure

function diguyNetInterface::set_exercise

Prototype:

virtual int set_exercise(int exercise) = 0;
Description:

Sets the exercise id to be used by DI-Guy networking.

The function will fail if DI-Guy is on-line (is participating in an exercise).

Arguments:

exercisethe exercise id to use
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_exercise

Prototype:

virtual int get_exercise() = 0;
Description:

Gets the exercise id being used by DI-Guy networking.

Returns:

the exercise id

function diguyNetInterface::get_host

Prototype:

virtual int get_host() = 0;
Description:

Gets the host id being used by DI-Guy networking.

Returns:

the host id

function diguyNetInterface::set_site

Prototype:

virtual int set_site(int site) = 0;
Description:

Sets the site id to be used by DI-Guy networking.

The function will fail if DI-Guy is on-line (is participating in an exercise).

Arguments:

sitethe site id to use; the site id identifies where the local machine is located
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_site

Prototype:

virtual int get_site() = 0;
Description:

Gets the site id being used by DI-Guy networking.

Returns:

the site id

function diguyNetInterface::set_port

Prototype:

virtual int set_port(int port) = 0;
Description:

Sets the network port number to be used by DI-Guy networking.

The function will fail if DI-Guy is on-line (is participating in an exercise).

Arguments:

portthe port number to use
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_port

Prototype:

virtual int get_port() = 0;
Description:

Gets the port number of the port being used for DI-Guy networking.

Returns:

the port address

function diguyNetInterface::set_ipaddr

Prototype:

virtual int set_ipaddr(const char* ipaddr) = 0;
Description:

Sets the IP address to be used by DI-Guy networking. This address is the address to which messages are sent. Normally, it is a broadcast or multicast address.

The function will fail if DI-Guy is on-line (is participating in an exercise).

Arguments:

ipaddrthe IP address
ipaddr is a string containing 4 integers separated by periods, or the null string, which means "let DI-Guy choose the address". An address of "0" or "0.0.0.0" means broadcast.

Returns:

0 on success, -1 on failure

function diguyNetInterface::get_ipaddr

Prototype:

virtual int get_ipaddr(char** ipaddr) = 0;
Description:

Gets the IP address currently being used by DI-Guy networking. This address is the address to which messages are sent. Normally this is a broadcast or multicast address.

Arguments:

ipaddrIP address, returned; see below
Returns:

0 on success, -1 on failure

ipaddr is a char**, into which a char* will be placed. This char* points to static data owned by DI-Guy. Do not store this pointer, and do not modify what it points to. Copy the strings you need out of the static buffer. (Assignment of a char* to a Microsoft CString will work very nicely, for example.)

ipaddr is a string containing 4 integers separated by periods.

function diguyNetInterface::set_display_remote_chars

Prototype:

virtual int set_display_remote_chars(int display) = 0;
Description:

Sets whether DI-Guy networking will display remote characters.

The function will fail if DI-Guy is on-line (is participating in an exercise).

Arguments:

displaypass 1 if DI-Guy networking should display remote characters, 0 if not
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_display_remote_chars

Prototype:

virtual int get_display_remote_chars() = 0;
Description:

Returns whether DI-Guy networking will display remote characters when online.

Returns:

1 if enabled, 0 if not

function diguyNetInterface::set_send_custom_pdus

Prototype:

virtual void set_send_custom_pdus(int) = 0;
Description:

This function sets whether DI-Guy is sending custom pdus.

Arguments:

0 if custom pdus should not be sent, 1 if custom pdus should be sent

function diguyNetInterface::get_send_custom_pdus

Prototype:

virtual int get_send_custom_pdus() = 0;
Description:

This function returns whether DI-Guy is sending custom pdus.

Returns:

0 if custom pdus are not being sent, 1 if custom pdus are being sent

function diguyNetInterface::enter_vpnet_mode

Prototype:

virtual void enter_vpnet_mode() = 0;
Description:

Turns the 'never create character' bit on.

function diguyNetInterface::get_character_from_id

Prototype:

virtual diguyCharacter* get_character_from_id(char const* id) = 0;
Description:

returns the diguyCharacter associated with the entity id specified.

Arguments:

idUnder HLA, two formats are permitted: the H L A object name, or the DIS entity identifier ("site:application:entity", where each is an integer)
Under DIS, only the DIS Entity Identifier is permitted.

function diguyNetInterface::get_name_from_entity

Prototype:

virtual char* get_name_from_entity(void* reflected_entity) = 0;
Description:

Returns the name corresponding to the entity. The caller must delete the returned string.

Arguments:

reflected_entityentity to be named
Returns:

name of reflected entity

function diguyNetInterface::set_publish_local_chars

Prototype:

virtual int set_publish_local_chars(int publish) = 0;
Description:

Sets whether DI-Guy networking will publish local characters to the network.

This function WILL succeed even if DI-Guy is on-line (is participating in an exercise).

Arguments:

publishpass 1 if DI-Guy networking should publish local characters to the network, 0 if not
Returns:

0 on success, -1 on failure

function diguyNetInterface::set_position_offset

Prototype:

virtual int set_position_offset(float z, float yaw, float roll, float pitch) = 0;
Description:

This function sets the position offset which is currently added to each character when it is published, and subtracted from each character when it is reflected. This is useful to compensate for inter-application location error.

Arguments:

z z offset in meters
yaw orientation offset in degrees
roll orientation offset in degrees
pitchorientation offset in degrees
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_position_offset

Prototype:

virtual int get_position_offset(float* z,
    float* yaw,
    float* roll,
    float* pitch) = 0;
Description:

This function gets the position offset which is currently added to each character when it is published, and subtracted from each character when it is reflected. The offset is useful to compensate for inter-application database location and orientation error.

Arguments:

z z offset in meters
yaw orientation offset in degrees
roll orientation offset in degrees
pitchorientation offset in degrees
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_next_participant_name

Prototype:

virtual void* get_next_participant_name(char* buf, void* handle) = 0;
Description:

This function allows iteration through the list of names remote VR-Link hosts that DI-Guy knows about.

Arguments:

buf destination buffer for host name (64 bytes is plenty)
handle return value from last call to the function; pass NULL to get the first host name; pass previous return value to get the next host name
Returns:

void* to be passed as handle argument on the next call; NULL when end of list is reached

function diguyNetInterface::get_septet_from_model

Prototype:

virtual int get_septet_from_model(int septet[7],
    const char* chartype,
    const char* appearance) = 0;
Description:

Fetches what DIS entity type septet should be used for a given character type and appearance.

Arguments:

chartype a string which names the DI-Guy character type
appearance a string which names the DI-Guy character appearance
septet array of seven integers, returned, indicating the kind, domain, country, category, subCategory, specific, and extra of the entity in question
Returns:

0 on success, -1 on failure

function diguyNetInterface::set_timeout_interval

Prototype:

virtual void set_timeout_interval(float interval) = 0;
Description:

This functions sets the amount of time that can elapse since the last update before an entity is timed out. The default is 12 seconds.

Arguments:

intervalnumber of seconds until timeout

function diguyNetInterface::get_timeout_interval

Prototype:

virtual float get_timeout_interval() = 0;
Returns:

timeout value in seconds; see set_timeout_interval()

function diguyNetInterface::set_time_to_live

Prototype:

virtual void set_time_to_live(int time_to_live) = 0;
Description:

This function sets the number of hops a packet can take before being killed. Setting this value to -1 means that the system default will be used.

This value must be set before the connection goes online.

Arguments:

time_to_livenumber of hops until packed is killed

function diguyNetInterface::get_time_to_live

Prototype:

virtual int get_time_to_live() = 0;
Returns:

number of hops until packed is killed; see set_time_to_live()

Coordinate System Functions

function diguyNetInterface::set_lat_lon

Prototype:

virtual int set_lat_lon(double lat, double lon) = 0;
Description:

Sets the latitude and longitude to be used by DI-Guy networking. The latitude and longitude are taken as the location, on Earth, of the origin of the database.

The function will fail if DI-Guy is on-line (is participating in an exercise).

Arguments:

latthe latitude in radians, positive north
lonthe longitude in radians, positive east
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_lat_lon

Prototype:

virtual int get_lat_lon(double* lat, double* lon) = 0;
Description:

Gets the latitude and longitude currently being used by DI-Guy networking for the placement of the database origin.

Arguments:

latlatitude of origin, returned; see below
lonlongitude of origin, returned; see below
Returns:

0 on success, -1 on failure

lat and lon are char**'s, into which char*'s will be placed. These char*'s point to static data owned by DI-Guy. Do not store these pointers, and do not modify what they point to. Copy the strings needed out of the static buffers. (Assignment of a char* to a Microsoft CString will work very nicely, for example.)

lat and lon are expressed as strings of the form:

N and E are taken as positive. S and W will negate the value otherwise computed. d, m, and s are positive, floating point values, taken as degrees, minutes, and seconds, respectively. A leading minus sign will negate the entire value otherwise computed (so, e.g., a '-' and a 'S' will result in a double- negation).

function diguyNetInterface::format_lat_or_lon

Prototype:

virtual void format_lat_or_lon(char* outbuf,
    double value,
    bool is_lat,
    bool is_decimal,
    bool value_is_degrees) = 0;
Description:

returns a string of the form

N and E are used for positive angles. S and W are used for negative angles. In the d m s format, d and m are integers (degrees and minutes) and s (seconds) is a floating point value. In the d format, d (degrees) is a floating point value.

Arguments:

outbufa buffer into which to copy the resulting string
value the lat or lon value to be converted into a string
is_latboolean indicating latitude (North/South) rather than longitude(East/West)
is_decimalboolean indicating that decimal degrees are desired, rather than degrees, minutes, and seconds
value_is_degreesboolean indicating whether the input value is in degrees (as opposed to radians)

function diguyNetInterface::set_utm_zone

Prototype:

virtual int set_utm_zone(int zone, int southzone) = 0;
Description:

Sets the UTM zone of the location currently being used by DI-Guy networking for the placement of the database origin. The easting and northing are assumed not to change.

Arguments:

zonethe utm zone
southzonepass 1 if the origin is in the southern hemisphere
Returns:

0 on success, -1 on failure

function diguyNetInterface::set_utm

Prototype:

virtual int set_utm(int zone,
    int southzone,
    double easting,
    double northing) = 0;
Description:

Sets, in UTM coordinates, the location currently being used by DI-Guy networking for the placement of the database origin.

Arguments:

zone the utm zone
southzonepass 1 if the origin is in the southern hemisphere
easting the normalized (positive only) easting of the database origin within the zone
northing the normalized (positive only) northing of the database origin within the zone
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_utm

Prototype:

virtual int get_utm(int* zone,
    int* southzone,
    double* easting,
    double* northing) = 0;
Description:

Gets, in UTM coordinates, the location currently being used by DI-Guy networking for the placement of the database origin.

Arguments:

zone the utm zone, returned
southzone1 if the origin is in the southern hemisphere, returned
easting the normalized (positive only) easting of the database origin within the zone, returned
northing the normalized (positive only) northing of the database origin within the zone, returned
Returns:

0 on success, -1 on failure

function diguyNetInterface::set_use_user_defined_coords

Prototype:

virtual int set_use_user_defined_coords(int use_user_defined) = 0;
Description:

This function sets whether user-defined latitude/longitude coordinates should be used for the origin of the database, or the coordinates that come from graphics files for scenario scene objects.

Arguments:

use_user_definedpass 1 if user-defined coordinates should be used, 0 if coordinates from graphics file should be used
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_use_user_defined_coords

Prototype:

virtual int get_use_user_defined_coords() = 0;
Returns:

0 if graphics file coordinates are used, 1 if user-defined coordinates are used

function diguyNetInterface::get_earth_coord

Prototype:

virtual int get_earth_coord(char* outbuf,
    const float x,
    const float y,
    const float z) = 0;
Description:

Converts a 3d database-origin-relative location into a string describing it in earth coordinates. This string could be in a number of different formats including decimal lat/lon, dms lat/lon, and UTM.

Arguments:

outbuf buffer into which to put the output string
x, y, z3 floats specifying location
Returns:

0 on success, -1 on failure. Fails if DI-Guy Scenario is not currently on the network, meaning that a database-to-earth coordinate conversion cannot be performed.

function diguyNetInterface::toggle_earth_coord_format

Prototype:

virtual void toggle_earth_coord_format() = 0;
Description:

Changes the format of the output of get_earth_coord. Toggles between UTM, dms lat/lon, decimal lat/lon, and "punting", meaning that the caller of get_earth_coord() should fend for itself. This generally means that the caller will use database-origin-relative coordinates.

function diguyNetInterface::set_use_database_coords

Prototype:

virtual int set_use_database_coords(int use_dbc) = 0;
Description:

Sets whether networking should use database coordinates or not. If database coordinates are used, the database origin is placed at the center of the earth. This makes coordinate conversion to and from UTM unnecessary. Using database coordinates renders ineffective any UTM-related settings which would position the database.

Arguments:

use_database_coords1 if database coordinates should be used, 0 otherwise
Returns:

0 if successful, -1 on failure.

function diguyNetInterface::get_num_coordinate_systems

Prototype:

virtual int get_num_coordinate_systems();
Description:

This function returns the number of potential coordinate converters that the networking module supports.

Returns:

number of converters

function diguyNetInterface::set_coordinate_system_type

Prototype:

virtual int set_coordinate_system_type(const char* name);
Description:

Sets the coordinate system based on the name given. Currently supports: "No Conversion", "UTM", "Flat Earth", "Geocentric".

Returns:

0 on success, -1 on failure.

function diguyNetInterface::set_coordinate_system_type

Prototype:

virtual int set_coordinate_system_type(diguyCoordinateSystemType system_type);
Description:

Sets the coordinate system based on the system type.

Returns:

0 on success, -1 on failure.

function diguyNetInterface::get_coordinate_system_type

Prototype:

virtual diguyCoordinateSystemType get_coordinate_system_type();
Description:

Gets the current coordinate system in use.

Returns:

diguyCoordinateSystemType enumeration

function diguyNetInterface::set_use_UTM_standard_offsets

Prototype:

virtual void set_use_UTM_standard_offsets(int standard_offsets);
Description:

Documentation Pending

function diguyNetInterface::get_use_UTM_standard_offsets

Prototype:

virtual int get_use_UTM_standard_offsets();
Description:

Documentation Pending

function diguyNetInterface::parse_dms_to_radians

Prototype:

virtual double parse_dms_to_radians(const char* dms_string) = 0;
Description:

Parses a string of the form

N and E are taken as positive. S and W will negate the value otherwise computed. d m and s are positive, floating point values, taken as degrees, minutes, and seconds, respectively. A leading minus sign will negate the entire value otherwise computed (so, e.g., a '-' and a 'S' will result in a double-negation).

Arguments:

dms_stringa string of the format described above
Returns:

a double precision floating point value in radians.

function diguyNetInterface::convert_mgrs_to_local

Prototype:

virtual int convert_mgrs_to_local(const char* MGRS_str,
    float* x,
    float* y,
    float* z) = 0;
Description:

Documentation Pending

function diguyNetInterface::convert_local_to_lat

Prototype:

virtual float convert_local_to_lat(float x, float y, float z) = 0;
Description:

Documentation Pending

function diguyNetInterface::convert_local_to_long

Prototype:

virtual float convert_local_to_long(float x, float y, float z) = 0;
Description:

Documentation Pending

function diguyNetInterface::convert_lat_long_to_local

Prototype:

virtual int convert_lat_long_to_local(float lat, float lon, float* x, float* y, float* z) = 0;
Description:

Documentation Pending

Ground Clamp Functions

function diguyNetInterface::set_ground_clamp_reflected_land_entities_enabled

Prototype:

virtual int set_ground_clamp_reflected_land_entities_enabled(int enabled);
Description:

Sets whether land-based network entities will be ground clamped, changing their altitude to better correlate with the local terrain.

Arguments:

enabledpass 1 to enable automatic ground clamping; 0 to disable
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_ground_clamp_reflected_land_entities_enabled

Prototype:

virtual int get_ground_clamp_reflected_land_entities_enabled();
Returns:

1 if land-based network entities will be ground clamped, 0 if not

function diguyNetInterface::set_ground_clamp_reflected_land_entities_from_host

Prototype:

virtual int set_ground_clamp_reflected_land_entities_from_host(int from_host);
Description:

Similar to set_ground_clamp_reflected_land_entities_enabled(), but will clamp only entities from the specified host. If there is one host on the network that has particular trouble sending correlated altitudes this function can be used to clamp its entities without clamping all entities from all hosts.

This has been useful in some simulation exercises where participants from multiple vendors are in use. Entities from JCATS in particular have required this.

Arguments:

from_hosthost whose land entities will be clamped
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_ground_clamp_reflected_land_entities_from_host

Prototype:

virtual int get_ground_clamp_reflected_land_entities_from_host();
Returns:

host whose land entities will be clamped; see set_ground_clamp_reflected_land_entities_from_host()

function diguyNetInterface::set_ground_clamp_max_climb

Prototype:

virtual int set_ground_clamp_max_climb(float max_climb);
Description:

Sets the maximum upward change in altitude that ground clamping will have.

Arguments:

max_climbmaximum upward change in altitude, in meters
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_ground_clamp_max_climb

Prototype:

virtual float get_ground_clamp_max_climb();
Returns:

maximum upward change in altitude from ground clamping, in meters

function diguyNetInterface::set_ground_clamp_max_drop

Prototype:

virtual int set_ground_clamp_max_drop(float max_drop);
Description:

Similar to set_ground_clamp_max_climb(), but for downward change.

function diguyNetInterface::get_ground_clamp_max_drop

Prototype:

virtual float get_ground_clamp_max_drop();
Returns:

maximum downward change in altitude from ground clamping, in meters

Network Time Functions

function diguyNetInterface::set_network_datetime_mode

Prototype:

virtual void set_network_datetime_mode(diguyDatetimeNetworkMode network_datetime_mode);
Description:

Sets whether network datetime data will be broadcast, received, or ignored. See documentation for diguyDatetimeNetworkMode for more information.

Arguments:

network_datetime_modehow to handle network datetime data

function diguyNetInterface::get_network_datetime_mode

Prototype:

virtual diguyDatetimeNetworkMode get_network_datetime_mode();
Returns:

how handle network datetime data will be handled; see set_network_datetime_mode().

function diguyNetInterface::set_network_datetime_broadcast_interval

Prototype:

virtual void set_network_datetime_broadcast_interval(float broadcast_interval);
Description:

Sets how often datetime data will be broadcast if this host is in mode DIGUY_DATETIME_NETWORK_MODE_BROADCAST.

Default is broadcast every 5 seconds.

Arguments:

broadcast_intervalhow often to broadcast datetime data, in seconds

function diguyNetInterface::get_network_datetime_broadcast_interval

Prototype:

virtual float get_network_datetime_broadcast_interval();
Returns:

how often datetime data will broadcast, in seconds

Sync Mode Functions
These functions enable DI-Guy to do pseudo frame syncing across multiple machines.

function diguyNetInterface::set_sync_mode_enabled

Prototype:

virtual int set_sync_mode_enabled(int enabled) = 0;
Description:

Sets whether sync mode will be enabled when online.

The function will fail if DI-Guy is already online, participating in an exercise.

Arguments:

enabledpass 1 if sync mode should be enabled when online, 0 if not
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_sync_mode_enabled

Prototype:

virtual int get_sync_mode_enabled() = 0;
Description:

Gets whether sync mode is enabled when online.

Returns:

1 if sync mode is enabled when online, 0 if not

function diguyNetInterface::set_sync_mode_master

Prototype:

virtual int set_sync_mode_master(int master) = 0;
Description:

Sets whether this machine will serve as sync master when online and in sync mode.

Arguments:

masterpass 1 if this machine will serve as sync master when online and in sync mode, 0 if not
Returns:

0 on success, -1 on failure

function diguyNetInterface::get_sync_mode_master

Prototype:

virtual int get_sync_mode_master() = 0;
Description:

Gets whether this machine will serve as sync master when online and in sync mode.

Returns:

1 if this machine will serve as sync master when online and in sync mode, 0 if not

function diguyNetInterface::set_sync_mode_slave_cam

Prototype:

virtual int set_sync_mode_slave_cam(int sl_cam) = 0;
Description:

Sets whether this machine's camera will be slaved to a remote master when online and in sync mode and not sync master.

The function will fail if DI-Guy is already online, participating in an exercise.

Arguments:

sl_cam - pass 1 if this machine's camera will be slaved to a remote master when online and in sync mode and not sync master, 0 if not

Returns:

0 on success, -1 on failure

function diguyNetInterface::get_sync_mode_slave_cam

Prototype:

virtual int get_sync_mode_slave_cam() = 0;
Description:

Gets whether this machine's camera will be slaved to a remote master when online, in sync mode, and not sync master.

Returns:

1 if this machine's camera will be slaved, 0 if not

function diguyNetInterface::set_sync_mode_camera_offset

Prototype:

virtual int set_sync_mode_camera_offset(float offset_r, float offset_y, float offset_p) = 0;
Description:

This function sets the camera orientation offset to be used in sync_mode (when VR-Link is online).

Arguments:

offset_rorientation offset
offset_yorientation offset
offset_porientation offset
yaw and pitch represent PERCENTAGES of the camera's horizontal and vertical field of view, respectively. The ROLL (which is in degrees) is applied first, then the yaw, then the pitch.

A typical two screen arrangement would use yaws of 50 and -50 for the left screen, and right screen, respectively. For three screens, the yaws would be -100, 0, and 100.

Using percentages this way makes the screens contiguous even if the camera's field of view changes.

THIS FUNCTION DOES NOTHING (and returns -1) if called while VR-Link is online

Returns:

0 on success, -1 on failure (VR-Link is online).

function diguyNetInterface::get_sync_mode_camera_offset

Prototype:

virtual int get_sync_mode_camera_offset(float* offset_r,
    float* offset_y,
    float* offset_p) = 0;
Description:

This function gets the camera orientation offset to be used in sync_mode (when VR-Link is online).

Arguments:

offset_rorientation offset
offset_yorientation offset
offset_porientation offset
yaw and pitch represent PERCENTAGES of the camera's horizontal and vertical field of view, respectively. The ROLL (which is in degrees) is applied first, then the yaw, then the pitch.

In the orientation offset the yaw and pitch represent PERCENTAGES of the camera's horizontal and vertical field of view, respectively. The ROLL (which is in degrees) is applied first, then the yaw, then the pitch.

A typical two screen arrangement would use yaws of 50 and -50 for the left screen, and right screen, respectively. For three screens, the yaws would be 100, 0, and -100 going from left to right.

Using percentages this way makes the screens contiguous even if the camera's field of view changes.

Returns:

0 on success, -1 on failure

function diguyNetInterface::set_sync_mode_camera_slaved

Prototype:

virtual int set_sync_mode_camera_slaved(int slaved) = 0;
Description:

This function sets whether the camera will be slaved when VR-Link is online, in sync mode, and not sync master.

It can be set even when VR-Link is online.

Arguments:

slaved whether the camera will be slaved when VR-Link is
online, in sync mode, and not sync master.

Returns:

0 on success, -1 on failure

function diguyNetInterface::get_sync_mode_camera_slaved

Prototype:

virtual int get_sync_mode_camera_slaved() = 0;
Description:

This function gets whether the camera is currently slaved. It does NOT simply return what was passed to set_sync_mode_camera_slaved().

Returns:

Whether the camera is currently slaved. This will be 1 only if VR-link is online, is in sync mode, and is not the sync master, and if sync_mode_camera_slaved has been set to 1.

function diguyNetInterface::set_camera_details_out_of_date

Prototype:

virtual int set_camera_details_out_of_date() = 0;
Description:

Lets VR-Link know that the user has moved the camera, so that if it is in sync mode, and is the sync master, it can let other hosts know the new camera position so they can move their cameras.

Returns:

0 on success, -1 on failure

function diguyNetInterface::set_use_adaptive_guide

Prototype:

virtual int set_use_adaptive_guide(int use_adaptive_guide) = 0;
Description:

Lets DI-Guy know that it should use an adaptive guide that attempts to fix reckoning errors by stepping. Defaults to on.

Returns:

0 on success, -1 on failure

function diguyNetInterface::get_use_adaptive_guide

Prototype:

virtual int get_use_adaptive_guide() = 0;
Returns:

0 if adaptive guide is disabled 1 otherwise.

Experimental Functions
The following functions are experimental and may change or disappear with no warning.

function diguyNetInterface::set_federation_name

Prototype:

virtual int set_federation_name(const char* federation_name);

function diguyNetInterface::set_culling_enabled

Prototype:

virtual int set_culling_enabled(int culling);

function diguyNetInterface::get_culling_enabled

Prototype:

virtual int get_culling_enabled();

function diguyNetInterface::set_network_datetime_enable_diguy_custom_pdus

Prototype:

virtual void set_network_datetime_enable_diguy_custom_pdus(int enable_diguy_custom_pdus);
Description:

Sets whether network datetime data will be broadcast via custom PDUs.

NOTE: This is functionality that is under development and should currently not be used by non DI-Guy programmers.

Arguments:

enable_diguy_custom_pduspass 1 to broadcast network datetime data via custom PDUs, 0 to not

function diguyNetInterface::get_network_datetime_enable_diguy_custom_pdus

Prototype:

virtual int  get_network_datetime_enable_diguy_custom_pdus();
Returns:

1 if network datetime data will be broadcast via custom PDUs, 0 if not

function diguyNetInterface::set_network_datetime_enable_dis_start_resume_pdus

Prototype:

virtual void set_network_datetime_enable_dis_start_resume_pdus(int enable_dis_start_resume_pdus);
Description:

Sets whether this host will send DIS standard start/resume PDUs.

NOTE: This is functionality that is under development and should currently not be used by non DI-Guy programmers.

Arguments:

enable_dis_start_resume_pduspass 1 to send DIS start/resume PDUs, 0 to not

function diguyNetInterface::get_network_datetime_enable_dis_start_resume_pdus

Prototype:

virtual int  get_network_datetime_enable_dis_start_resume_pdus();
Returns:

1 if DIS start/resume should be send, 0 if not


Alphabetical Index




Copyright (C) 1992-2012 Boston Dynamics

ALL RIGHTS RESERVED.

These coded instructions, statements, and computer programs contain unpublished proprietary information of Boston Dynamics and are protected by Copyright Laws of the United States. They may not be used, duplicated, or disclosed in any form, in whole or in part, without the prior written consent from Boston Dynamics.

RESTRICTED RIGHTS LEGEND

Use, duplication, or disclosure by the government is subject to restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Sofware clause at DFARS 252.227-7013 and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19, as applicable. Unpublished-rights reserved under the Copyright Laws of the United States.

Contractor/Manufacturer is:

Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.