![]() |
DI-Guy SDK Documentation
13.2
|
This class provides accessors to the interface parameters, as well as functions for going online and offline. More...
#include <diguy_module_net.h>
Public Member Functions | |
| virtual int | go_online (diguyScenario *scenario, void *exconn=NULL)=0 |
| This function tells DI-Guy that it should start talking over VR-Link. More... | |
| virtual int | go_offline ()=0 |
| This function tells DI-Guy that it should stop talking over VR-Link. More... | |
| virtual int | get_online ()=0 |
| This function asks if DI-Guy is connected to the network. More... | |
| virtual int | set_cfg_file (const char *cfg_filename)=0 |
| This function sets the filename of the VR-Link configuration file that will be read by the DI-Guy software. More... | |
| virtual int | update ()=0 |
| This function tells DI-Guy that it should read PDUs from the network and process them. More... | |
| virtual int | set_exercise (int exercise)=0 |
| Sets the exercise id to be used by DI-Guy networking. More... | |
| virtual int | get_exercise ()=0 |
| Gets the exercise id being used by DI-Guy networking. More... | |
| virtual int | set_host (int host)=0 |
| Sets the host id to be used by DI-Guy networking. More... | |
| virtual int | get_host ()=0 |
| Gets the host id being used by DI-Guy networking. More... | |
| virtual int | set_site (int site)=0 |
| Sets the site id to be used by DI-Guy networking. More... | |
| virtual int | get_site ()=0 |
| Gets the site id being used by DI-Guy networking. More... | |
| virtual int | set_port (int port)=0 |
| Sets the network port number to be used by DI-Guy networking. More... | |
| virtual int | get_port ()=0 |
| Gets the port number of the port being used for DI-Guy networking. More... | |
| virtual int | set_ipaddr (const char *ipaddr)=0 |
| Sets the IP address to be used by DI-Guy networking. More... | |
| virtual int | get_ipaddr (char **ipaddr)=0 |
| Gets the IP address currently being used by DI-Guy networking. More... | |
| virtual int | set_federation_name (const char *federation_name) |
| Sets the HLA Federation name you wish to create or join. More... | |
| virtual const char * | get_federation_name () |
| Gets the HLA Federation name. More... | |
| virtual int | set_federate_name (const char *federate_name) |
| Sets the HLA Federate name to use. More... | |
| virtual const char * | get_federate_name () |
| Gets the HLA Federate name. More... | |
| virtual int | set_federate_type (const char *federate_type) |
| Sets the HLA Federate type to identify as. More... | |
| virtual const char * | get_federate_type () |
| Gets the HLA Federate name. More... | |
| virtual int | set_display_remote_chars (int display)=0 |
| Sets whether DI-Guy networking will display remote characters. More... | |
| virtual int | get_display_remote_chars ()=0 |
| Returns whether DI-Guy networking will display remote characters when online. More... | |
| virtual void | set_send_custom_pdus (int)=0 |
| This function sets whether DI-Guy is sending custom pdus. More... | |
| virtual int | get_send_custom_pdus ()=0 |
| This function returns whether DI-Guy is sending custom pdus. More... | |
| virtual int | get_send_diguy_125_appearance_packets ()=0 |
| This function returns whether DI-Guy sends custom pdus that concatenate hand item with the body appearance name. More... | |
| virtual void | set_send_diguy_125_appearance_packets (int)=0 |
| This function set whether whether DI-Guy sends custom pdus that concatenate hand item with the body appearance name. More... | |
| virtual void | enter_vpnet_mode ()=0 |
| Turns the 'never create character' bit on. More... | |
| virtual diguyCharacter * | get_character_from_id (char const *id)=0 |
| returns the diguyCharacter associated with the entity id specified. More... | |
| virtual char * | get_name_from_entity (void *reflected_entity)=0 |
| Returns the name corresponding to the entity. More... | |
| virtual int | set_publish_local_chars (int publish)=0 |
| Sets whether DI-Guy networking will publish local characters to the network. More... | |
| virtual int | get_publish_local_chars ()=0 |
| Returns whether DI-Guy networking will publish local characters when online. More... | |
| virtual int | set_position_offset (float z, float yaw, float roll, float pitch)=0 |
| 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. More... | |
| virtual int | get_position_offset (float *z, float *yaw, float *roll, float *pitch)=0 |
| 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. More... | |
| virtual void * | get_next_participant_name (char *buf, void *handle)=0 |
| This function allows iteration through the list of names remote VR-Link hosts that DI-Guy knows about. More... | |
| virtual int | get_model_from_septet (const char **chartype, const char **appearance, const char **hand_item, const int septet[7])=0 |
| Fetches what character type and what appearance should be used for a given DIS entity type septet. More... | |
| virtual int | get_septet_from_model (int septet[7], const char *chartype, const char *appearance, const char *hand_item)=0 |
| Fetches what DIS entity type septet should be used for a given character type and appearance. More... | |
| virtual void | set_timeout_interval (float interval)=0 |
| This functions sets the amount of time that can elapse since the last update before an entity is timed out. More... | |
| virtual float | get_timeout_interval ()=0 |
| Returns: timeout value in seconds; see set_timeout_interval() More... | |
| virtual void | set_time_to_live (int time_to_live)=0 |
| This function sets the number of hops a packet can take before being killed. More... | |
| virtual int | get_time_to_live ()=0 |
| Returns: number of hops until packed is killed; see set_time_to_live() More... | |
Coordinate System Functions | |
| virtual int | set_lat_lon (double lat, double lon)=0 |
| Sets the latitude and longitude to be used by DI-Guy networking. More... | |
| virtual int | get_lat_lon (double *lat, double *lon)=0 |
| Gets the latitude and longitude currently being used by DI-Guy networking for the placement of the database origin. More... | |
| virtual void | format_lat_or_lon (char *outbuf, double value, bool is_lat, bool is_decimal, bool value_is_degrees)=0 |
| returns a string of the form More... | |
| virtual int | set_utm_zone (int zone, int southzone)=0 |
| Sets the UTM zone of the location currently being used by DI-Guy networking for the placement of the database origin. More... | |
| virtual int | set_utm (int zone, int southzone, double easting, double northing)=0 |
| Sets, in UTM coordinates, the location currently being used by DI-Guy networking for the placement of the database origin. More... | |
| virtual int | get_utm (int *zone, int *southzone, double *easting, double *northing)=0 |
| Gets, in UTM coordinates, the location currently being used by DI-Guy networking for the placement of the database origin. More... | |
| virtual int | set_use_user_defined_coords (int use_user_defined)=0 |
| 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. More... | |
| virtual int | get_use_user_defined_coords ()=0 |
| Returns: 0 if graphics file coordinates are used, 1 if user-defined coordinates are used. More... | |
| virtual int | get_earth_coord (char *outbuf, const float x, const float y, const float z)=0 |
| Converts a 3d database-origin-relative location into a string describing it in earth coordinates. More... | |
| virtual void | toggle_earth_coord_format ()=0 |
| Changes the format of the output of get_earth_coord. More... | |
| virtual int | set_use_database_coords (int use_dbc)=0 |
| Sets whether networking should use database coordinates or not. More... | |
| virtual int | get_num_coordinate_systems () |
| This function returns the number of potential coordinate converters that the networking module supports. More... | |
| virtual const char * | get_coordinate_system_name (int index) |
| This function returns the name of the coordinate system at the specified index. More... | |
| virtual int | set_coordinate_system_type (const char *name) |
| Sets the coordinate system based on the name given. More... | |
| virtual const char * | get_coordinate_system_type_name () |
| returns the coordinate system name. More... | |
| virtual int | set_coordinate_system_type (diguyCoordinateSystemType system_type) |
| Sets the coordinate system based on the system type. More... | |
| virtual diguyCoordinateSystemType | get_coordinate_system_type () |
| Gets the current coordinate system in use. More... | |
| virtual void | set_use_UTM_standard_offsets (int standard_offsets) |
| Documentation Pending. More... | |
| virtual int | get_use_UTM_standard_offsets () |
| Documentation Pending. More... | |
| virtual double | parse_dms_to_radians (const char *dms_string)=0 |
| Parses a string of the form. More... | |
| virtual int | convert_mgrs_to_local (const char *MGRS_str, float *x, float *y, float *z)=0 |
| Documentation Pending. More... | |
| virtual const char * | convert_local_to_mgrs (float x, float y, float z)=0 |
| Documentation Pending. More... | |
| virtual float | convert_local_to_lat (float x, float y, float z)=0 |
| Documentation Pending. More... | |
| virtual double | convert_local_to_lat_double (double x, double y, double z)=0 |
| Documentation Pending. More... | |
| virtual float | convert_local_to_long (float x, float y, float z)=0 |
| Documentation Pending. More... | |
| virtual double | convert_local_to_long_double (double x, double y, double z)=0 |
| Documentation Pending. More... | |
| virtual const char * | convert_local_to_lat_long_string (float x, float y, float z)=0 |
| Documentation Pending. More... | |
| virtual int | convert_lat_long_to_local (float lat, float lon, float *x, float *y, float *z)=0 |
| Documentation Pending. More... | |
| virtual int | convert_lat_long_to_local_double (double lat, double lon, float *x, float *y, float *z)=0 |
| Documentation Pending. More... | |
Ground Clamp Functions | |
| virtual int | set_ground_clamp_reflected_land_entities_enabled (int enabled) |
| Sets whether land-based network entities will be ground clamped, changing their altitude to better correlate with the local terrain. More... | |
| virtual int | get_ground_clamp_reflected_land_entities_enabled () |
| Returns: 1 if land-based network entities will be ground clamped, 0 if not. More... | |
| virtual int | set_ground_clamp_reflected_land_entities_from_host (int from_host) |
| Similar to set_ground_clamp_reflected_land_entities_enabled(), but will clamp only entities from the specified host. More... | |
| 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() More... | |
| virtual int | set_ground_clamp_max_climb (float max_climb) |
| Sets the maximum upward change in altitude that ground clamping will have. More... | |
| virtual float | get_ground_clamp_max_climb () |
| Returns: maximum upward change in altitude from ground clamping, in meters. More... | |
| virtual int | set_ground_clamp_max_drop (float max_drop) |
| Similar to set_ground_clamp_max_climb(), but for downward change. More... | |
| virtual float | get_ground_clamp_max_drop () |
| Returns: maximum downward change in altitude from ground clamping, in meters. More... | |
| virtual void | set_translation_threshold (float value) |
| virtual float | get_translation_threshold () |
| virtual void | set_z_velocity_threshold (float value) |
| virtual float | get_z_velocity_threshold () |
| virtual void | set_rotation_threshold (float value) |
| virtual float | get_rotation_threshold () |
Network Time Functions | |
| virtual void | set_network_datetime_mode (diguyDatetimeNetworkMode network_datetime_mode) |
| Sets whether network datetime data will be broadcast, received, or ignored. More... | |
| virtual diguyDatetimeNetworkMode | get_network_datetime_mode () |
| Returns: how handle network datetime data will be handled; see set_network_datetime_mode(). More... | |
| virtual void | set_network_datetime_broadcast_interval (float broadcast_interval) |
| Sets how often datetime data will be broadcast if this host is in mode DIGUY_DATETIME_NETWORK_MODE_BROADCAST. More... | |
| virtual float | get_network_datetime_broadcast_interval () |
| Returns: how often datetime data will broadcast, in seconds. More... | |
Sync Mode Functions | |
These functions enable DI-Guy to do pseudo frame syncing across multiple machines. | |
| virtual int | set_sync_mode_enabled (int enabled)=0 |
| Sets whether sync mode will be enabled when online. More... | |
| virtual int | get_sync_mode_enabled ()=0 |
| Gets whether sync mode is enabled when online. More... | |
| virtual int | set_sync_mode_master (int master)=0 |
| Sets whether this machine will serve as sync master when online and in sync mode. More... | |
| virtual int | get_sync_mode_master ()=0 |
| Gets whether this machine will serve as sync master when online and in sync mode. More... | |
| virtual int | set_sync_mode_slave_cam (int sl_cam)=0 |
| Sets whether this machine's camera will be slaved to a remote master when online and in sync mode and not sync master. More... | |
| virtual int | get_sync_mode_slave_cam ()=0 |
| Gets whether this machine's camera will be slaved to a remote master when online, in sync mode, and not sync master. More... | |
| virtual int | set_sync_mode_camera_offset (float offset_r, float offset_y, float offset_p)=0 |
| This function sets the camera orientation offset to be used in sync_mode (when VR-Link is online). More... | |
| virtual int | get_sync_mode_camera_offset (float *offset_r, float *offset_y, float *offset_p)=0 |
| This function gets the camera orientation offset to be used in sync_mode (when VR-Link is online). More... | |
| virtual int | set_sync_mode_camera_slaved (int slaved)=0 |
| This function sets whether the camera will be slaved when VR-Link is online, in sync mode, and not sync master. More... | |
| virtual int | get_sync_mode_camera_slaved ()=0 |
| This function gets whether the camera is currently slaved. More... | |
| virtual int | set_camera_details_out_of_date ()=0 |
| 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. More... | |
| virtual int | set_use_adaptive_guide (int use_adaptive_guide)=0 |
| Lets DI-Guy know that it should use an adaptive guide that attempts to fix reckoning errors by stepping. More... | |
| virtual int | get_use_adaptive_guide ()=0 |
| Returns: 0 if adaptive guide is disabled 1 otherwise. More... | |
Experimental Functions | |
The following functions are experimental and may change or disappear with no warning. | |
| virtual int | set_fom_file_name (const char *file_name) |
| virtual const char * | get_fom_file_name () |
| virtual int | set_base_module_name (const char *file_name) |
| virtual const char * | get_base_module_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) |
| Sets whether network datetime data will be broadcast via custom PDUs. More... | |
| virtual int | get_network_datetime_enable_diguy_custom_pdus () |
| Returns: 1 if network datetime data will be broadcast via custom PDUs, 0 if not. More... | |
| virtual void | set_network_datetime_enable_dis_start_resume_pdus (int enable_dis_start_resume_pdus) |
| Sets whether this host will send DIS standard start/resume PDUs. More... | |
| virtual int | get_network_datetime_enable_dis_start_resume_pdus () |
| Returns: 1 if DIS start/resume should be send, 0 if not. More... | |
| virtual int | set_draw_laser_designators_effects (int enabled)=0 |
| Turns on/off laser designator effects. More... | |
| virtual int | get_draw_laser_designators_effects ()=0 |
| virtual int | set_laser_designators_effects_visible (int visible)=0 |
| turns on/off laser designator drawing, effects are still updated (meant for sensor fusion) More... | |
| virtual int | set_draw_laser_designators_lines (int enabled)=0 |
| turns on/off laser designator line drawing More... | |
| virtual int | get_draw_laser_designators_lines ()=0 |
| virtual int | set_use_wildcards_in_munitions_map (int enabled)=0 |
| turns on/off use of 0 as wildcard in munition_types.cfg septet mapping More... | |
| virtual int | get_use_wildcards_in_munitions_map ()=0 |
Private Functions | |
The functions and variables past this point are for internal use only. No external access to them is expected or necessary. | |
| diguyNetInterfaceData * | m_data |
| virtual int | server_mode ()=0 |
| internal functions More... | |
| virtual int | client_mode ()=0 |
| virtual void | establish_new_offsets ()=0 |
| virtual void | draw ()=0 |
| virtual bdiDataTracker * | get_network_datetime_data_tracker ()=0 |
| diguyNetInterfaceData * | get_data () |
| virtual int | update_coordinate_sytem ()=0 |
| virtual int | update_settings ()=0 |
| diguyNetInterface () | |
| A private constructor. More... | |
| virtual | ~diguyNetInterface () |
| A private destructor. More... | |
| int | diguy_module_net_initialize () |
| This function allows VR-Link to install some callbacks so that DSS file load and save will include VR-Link-specific info. More... | |
This class provides accessors to the interface parameters, as well as functions for going online and offline.
|
protected |
A private constructor.
Use the DI-Guy function diguy_module_net_initialize() to create a diguyNetInterface. Use get_net_interface() to obtain a pointer to it.
|
protectedvirtual |
A private destructor.
Use the DI-Guy function diguy_module_net_deinitialize() to destroy the diguyNetInterface.
|
pure virtual |
This function tells DI-Guy that it should start talking over VR-Link.
It should be called when DI-Guy should join an exercise.
| scenario | pointer 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
|
pure virtual |
This function tells DI-Guy that it should stop talking over VR-Link.
Returns:
0 on success, -1 on failure
|
pure virtual |
This function asks if DI-Guy is connected to the network.
Returns:
1 if yes, 0 if no
|
pure virtual |
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
| cfg_file | filename of desired configuration file |
Returns:
0 on success, -1 on failure
|
pure virtual |
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
|
pure virtual |
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).
| exercise | the exercise id to use. Must be <= 255 in DIS |
Returns:
0 on success, -1 on failure
|
pure virtual |
Gets the exercise id being used by DI-Guy networking.
Returns:
the exercise id
|
pure virtual |
Sets the host id to be used by DI-Guy networking.
The function will fail if DI-Guy is on-line (is participating in an exercise).
| host | the host id to use; the host id identifies the local machine |
Returns:
0 on success, -1 on failure
|
pure virtual |
Gets the host id being used by DI-Guy networking.
Returns:
the host id
|
pure virtual |
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).
| site | the site id to use; the site id identifies where the local machine is located |
Returns:
0 on success, -1 on failure
|
pure virtual |
Gets the site id being used by DI-Guy networking.
Returns:
the site id
|
pure virtual |
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).
| port | the port number to use |
Returns:
0 on success, -1 on failure
|
pure virtual |
Gets the port number of the port being used for DI-Guy networking.
Returns:
the port address
|
pure virtual |
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).
| ipaddr | the 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
|
pure virtual |
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.
| ipaddr | IP 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.
|
virtual |
Sets the HLA Federation name you wish to create or join.
| federation_name | as string |
Returns:
0 on success, -1 on failure
|
virtual |
Gets the HLA Federation name.
Returns:
String containing HLA federation name
|
virtual |
Sets the HLA Federate name to use.
Federate names should be unique for each connection instance.
| federate_name | as string |
Returns:
0 on success, -1 on failure
|
virtual |
Gets the HLA Federate name.
Returns:
String containing HLA federate name
|
virtual |
Sets the HLA Federate type to identify as.
| federate_type | as string |
Returns:
0 on success, -1 on failure
|
virtual |
Gets the HLA Federate name.
Returns:
String containing HLA federate type
|
pure virtual |
Sets whether DI-Guy networking will display remote characters.
The function will fail if DI-Guy is on-line (is participating in an exercise).
| display | pass 1 if DI-Guy networking should display remote characters, 0 if not |
Returns:
0 on success, -1 on failure
|
pure virtual |
Returns whether DI-Guy networking will display remote characters when online.
Returns:
1 if enabled, 0 if not
|
pure virtual |
This function sets whether DI-Guy is sending custom pdus.
0 if custom pdus should not be sent, 1 if custom pdus should be sent
|
pure virtual |
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
|
pure virtual |
This function returns whether DI-Guy sends custom pdus that concatenate hand item with the body appearance name.
DI-Guy 13.0 and up separate these.
|
pure virtual |
This function set whether whether DI-Guy sends custom pdus that concatenate hand item with the body appearance name.
DI-Guy 13.0 and up separate these.
|
pure virtual |
Turns the 'never create character' bit on.
|
pure virtual |
returns the diguyCharacter associated with the entity id specified.
| id | Under 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.
|
pure virtual |
Returns the name corresponding to the entity.
The caller must delete the returned string.
| reflected_entity | entity to be named |
Returns:
name of reflected entity
|
pure virtual |
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).
| publish | pass 1 if DI-Guy networking should publish local characters to the network, 0 if not |
Returns:
0 on success, -1 on failure
|
pure virtual |
Returns whether DI-Guy networking will publish local characters when online.
Returns:
1 if enabled, 0 if not
|
pure virtual |
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.
| z | z offset in meters |
| yaw | orientation offset in degrees |
| roll | orientation offset in degrees |
| pitch | orientation offset in degrees |
Returns:
0 on success, -1 on failure
|
pure virtual |
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.
| z | z offset in meters |
| yaw | orientation offset in degrees |
| roll | orientation offset in degrees |
| pitch | orientation offset in degrees |
Returns:
0 on success, -1 on failure
|
pure virtual |
This function allows iteration through the list of names remote VR-Link hosts that DI-Guy knows about.
| 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
|
pure virtual |
Fetches what character type and what appearance should be used for a given DIS entity type septet.
| chartype | address of char*, for returning a string which |
| names | the DI Guy character type |
| appearance | address of char*, for returning a string which |
| names | the DI Guy character appearance |
| septet | array of seven integers specifying the kind, domain, country, category, subCategory, specific, and extra of the entity in question |
Returns:
0 on success, -1 on failure
|
pure virtual |
Fetches what DIS entity type septet should be used for a given character type and appearance.
| 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
|
pure virtual |
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.
| interval | number of seconds until timeout |
|
pure virtual |
Returns: timeout value in seconds; see set_timeout_interval()
|
pure virtual |
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.
| time_to_live | number of hops until packed is killed |
|
pure virtual |
Returns: number of hops until packed is killed; see set_time_to_live()
|
pure virtual |
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).
| lat | the latitude in radians, positive north |
| lon | the longitude in radians, positive east |
Returns:
0 on success, -1 on failure
|
pure virtual |
Gets the latitude and longitude currently being used by DI-Guy networking for the placement of the database origin.
| lat | latitude of origin, returned; see below |
| lon | longitude 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).
|
pure virtual |
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.
| outbuf | a buffer into which to copy the resulting string |
| value | the lat or lon value to be converted into a string |
| is_lat | boolean indicating latitude (North/South) rather than longitude(East/West) |
| is_decimal | boolean indicating that decimal degrees are desired, rather than degrees, minutes, and seconds |
| value_is_degrees | boolean indicating whether the input value is in degrees (as opposed to radians) |
|
pure virtual |
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.
| zone | the utm zone |
| southzone | pass 1 if the origin is in the southern hemisphere |
Returns:
0 on success, -1 on failure
|
pure virtual |
Sets, in UTM coordinates, the location currently being used by DI-Guy networking for the placement of the database origin.
| zone | the utm zone |
| southzone | pass 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
|
pure virtual |
Gets, in UTM coordinates, the location currently being used by DI-Guy networking for the placement of the database origin.
| zone | the utm zone, returned |
| southzone | 1 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
|
pure virtual |
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.
| use_user_defined | pass 1 if user-defined coordinates should be used, 0 if coordinates from graphics file should be used |
Returns:
0 on success, -1 on failure
|
pure virtual |
Returns: 0 if graphics file coordinates are used, 1 if user-defined coordinates are used.
|
pure virtual |
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.
| outbuf | buffer into which to put the output string |
| x,y,z | 3 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.
|
pure virtual |
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.
|
pure virtual |
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.
| use_database_coords | 1 if database coordinates should be used, 0 otherwise |
Returns:
0 if successful, -1 on failure.
|
virtual |
This function returns the number of potential coordinate converters that the networking module supports.
Returns:
number of converters
|
virtual |
This function returns the name of the coordinate system at the specified index.
This is a string representation of a diguyCoordinateSystemType enumeration.
Returns:
name of converter
|
virtual |
Sets the coordinate system based on the name given.
Currently supports: "No Conversion", "UTM", "Flat Earth", "Geocentric".
Returns:
0 on success, -1 on failure.
|
virtual |
returns the coordinate system name.
Current possible values are "No Conversion", "UTM", "Flat Earth", "Geocentric".
Returns:
name of coordinate system type
|
virtual |
Sets the coordinate system based on the system type.
Returns:
0 on success, -1 on failure.
|
virtual |
Gets the current coordinate system in use.
Returns:
diguyCoordinateSystemType enumeration
|
virtual |
Documentation Pending.
|
virtual |
Documentation Pending.
|
pure virtual |
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).
| dms_string | a string of the format described above |
Returns:
a double precision floating point value in radians.
|
pure virtual |
Documentation Pending.
|
pure virtual |
Documentation Pending.
|
pure virtual |
Documentation Pending.
|
pure virtual |
Documentation Pending.
|
pure virtual |
Documentation Pending.
|
pure virtual |
Documentation Pending.
|
pure virtual |
Documentation Pending.
|
pure virtual |
Documentation Pending.
|
pure virtual |
Documentation Pending.
|
virtual |
Sets whether land-based network entities will be ground clamped, changing their altitude to better correlate with the local terrain.
| enabled | pass 1 to enable automatic ground clamping; 0 to disable |
Returns:
0 on success, -1 on failure
|
virtual |
Returns: 1 if land-based network entities will be ground clamped, 0 if not.
|
virtual |
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.
| from_host | host whose land entities will be clamped |
Returns:
0 on success, -1 on failure
|
virtual |
Returns: host whose land entities will be clamped; see set_ground_clamp_reflected_land_entities_from_host()
|
virtual |
Sets the maximum upward change in altitude that ground clamping will have.
| max_climb | maximum upward change in altitude, in meters |
Returns:
0 on success, -1 on failure
|
virtual |
Returns: maximum upward change in altitude from ground clamping, in meters.
|
virtual |
Similar to set_ground_clamp_max_climb(), but for downward change.
|
virtual |
Returns: maximum downward change in altitude from ground clamping, in meters.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Sets whether network datetime data will be broadcast, received, or ignored.
See documentation for diguyDatetimeNetworkMode for more information.
| network_datetime_mode | how to handle network datetime data |
|
virtual |
Returns: how handle network datetime data will be handled; see set_network_datetime_mode().
|
virtual |
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.
| broadcast_interval | how often to broadcast datetime data, in seconds |
|
virtual |
Returns: how often datetime data will broadcast, in seconds.
|
pure virtual |
Sets whether sync mode will be enabled when online.
The function will fail if DI-Guy is already online, participating in an exercise.
| enabled | pass 1 if sync mode should be enabled when online, 0 if not |
Returns:
0 on success, -1 on failure
|
pure virtual |
Gets whether sync mode is enabled when online.
Returns:
1 if sync mode is enabled when online, 0 if not
|
pure virtual |
Sets whether this machine will serve as sync master when online and in sync mode.
| master | pass 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
|
pure virtual |
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
|
pure virtual |
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.
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
|
pure virtual |
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
|
pure virtual |
This function sets the camera orientation offset to be used in sync_mode (when VR-Link is online).
| offset_r | orientation offset |
| offset_y | orientation offset |
| offset_p | orientation 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).
|
pure virtual |
This function gets the camera orientation offset to be used in sync_mode (when VR-Link is online).
| offset_r | orientation offset |
| offset_y | orientation offset |
| offset_p | orientation 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
|
pure virtual |
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.
| 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
|
pure virtual |
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.
|
pure virtual |
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
|
pure virtual |
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
|
pure virtual |
Returns: 0 if adaptive guide is disabled 1 otherwise.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
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.
| enable_diguy_custom_pdus | pass 1 to broadcast network datetime data via custom PDUs, 0 to not |
|
virtual |
Returns: 1 if network datetime data will be broadcast via custom PDUs, 0 if not.
|
virtual |
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.
| enable_dis_start_resume_pdus | pass 1 to send DIS start/resume PDUs, 0 to not |
|
virtual |
Returns: 1 if DIS start/resume should be send, 0 if not.
|
pure virtual |
Turns on/off laser designator effects.
|
pure virtual |
|
pure virtual |
turns on/off laser designator drawing, effects are still updated (meant for sensor fusion)
|
pure virtual |
turns on/off laser designator line drawing
|
pure virtual |
|
pure virtual |
turns on/off use of 0 as wildcard in munition_types.cfg septet mapping
|
pure virtual |
|
pure virtual |
internal functions
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
|
protectedpure virtual |
|
protectedpure virtual |
|
friend |
This function allows VR-Link to install some callbacks so that DSS file load and save will include VR-Link-specific info.
It should be called BEFORE the scenario object is constructed.
Returns:
0 on success, -1 on failure
Example:
|
protected |