C++ SDK Reference  12.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diguy_dis_constants.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) 2005-2013 Boston Dynamics
4  * ALL RIGHTS RESERVED.
5  *
6  * These coded instructions, statements, and computer programs
7  * contain unpublished proprietary information of Boston Dynamics
8  * and are protected by Copyright Laws of the United States.
9  * They may not be used, duplicated, or disclosed in any form, in
10  * whole or in part, without the prior written consent from Boston
11  * Dynamics.
12  *
13  * RESTRICTED RIGHTS LEGEND
14  * Use, duplication, or disclosure by the government is subject
15  * to restrictions as set forth in FAR 52.227.19(c)(2) or
16  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
17  * Computer Software clause at DFARS 252.227-7013 and/or in
18  * similar or successor clauses in the FAR, or the DOD or NASA
19  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
20  * Commercial Computer Software--Restricted Rights at 48 CFR
21  * 52.227-19, as applicable. Unpublished-rights reserved under
22  * the Copyright Laws of the United States.
23  * Contractor/Manufacturer is:
24  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
25  */
26 
27 /*********************************************************************
28  **
29  *t DI-Guy API, DIS Constants and Enumerations
30  **
31  ** This file contains constants defined by the DIS
32  ** networking standard. They should be compatible with
33  ** other DIS networking applications that follow the
34  ** DIS standard.
35  */
36 
37 #ifndef __diguy_dis_constants_H
38 #define __diguy_dis_constants_H
39 
40 
41 /****************************************************************************/
42 /*l
43  *b Description:
44  **
45  ** Lifeform state values from an Entity State PDU.
46  **
47  ** Note that the values for sitting, squatting, crouching, and wading
48  ** don't appear to be part of the official DIS standard, but are included
49  ** for compatibility with MaK Technologies, Inc. VR-Link.
50  */
51 enum
52 {
63 
68 };
69 
70 
71 /****************************************************************************/
72 /*l
73  *b Description:
74  **
75  ** Primary weapon position values from an Entity State PDU.
76  */
77 enum
78 {
83 };
84 
85 
86 /****************************************************************************/
87 /*l
88  *b Description:
89  **
90  ** Secondary weapon position values from an Entity State PDU.
91  */
92 enum
93 {
98 };
99 
101 /****************************************************************************/
102 /*l
103  *b Description:
104  **
105  ** Damage appearance values from an Entity State PDU.
106  */
107 enum
108 {
113 };
116 /****************************************************************************/
117 /*l
118  *b Description:
119  **
120  ** Smoke appearance values from an Entity State PDU.
121  */
122 enum
123 {
128 };
130 
131 /****************************************************************************/
132 /*l
133  *b Description:
134  **
135  ** Trailing effect values from an Entity State PDU.
136  */
137 enum
138 {
143 };
144 
145 
146 /****************************************************************************/
147 /*l
148  *b Description:
149  **
150  ** Flames appearance values from an Entity State PDU.
151  */
152 enum
153 {
156 };
157 
158 
159 /****************************************************************************/
160 /*l
161  *b Description:
162  **
163  ** Power plant status values from an Entity State PDU.
164  */
165 enum
166 {
169 };
170 
171 
172 /****************************************************************************/
173 /*l
174  *b Description:
175  **
176  ** This enumeration lists missile trail status values from an Entity
177  ** State PDU.
178  */
179 enum
180 {
183 };
184 
185 
186 /****************************************************************************/
187 /*l
188  *b Description:
189  **
190  ** This enumeration lists the Articulated part info for DI-Guy's gazing.
191  */
192 enum
193 {
194  DIGUY_DIS_FOCUS_TARGET = 10240
195 };
196 
197 
198 /****************************************************************************/
199 /*l
200  ** \enum diguyCustomPDUType
201  **
202  *b Description:
203  **
204  ** This enumeration lists the message IDs for DI-Guy's custom pdus,
205  ** not all are usuable outside of diguyscenario
206  **
207  *i DIGUY_CUSTOM_PDU_ID_SET_CHAR_TYPE
208  **
209  *- - Contents: String
210  *- - Meaning: call diguyCharacter::set_character_type()
211  **
212  *i DIGUY_CUSTOM_PDU_ID_SET_CHAR_APPEARANCE
213  **
214  *- - Contents: String A, String B
215  *- - Meaning: call diguyCharacter::set_appearance() optionally call
216  *- diguyCharacter::set_current_head_appearance()
217  **
218  *i DIGUY_CUSTOM_PDU_ID_SET_CHAR_ACTION
219  **
220  *- - Contents: String A, String B
221  *- - Meaning: Set the character action to A, the second string is either "p" or ""
222  *- (the empty string). A value of "p" for the second string indicates that the
223  *- action is paused. Characters are typically paused if the sending application
224  *- such as DI-Guy Scenario has been playing and the user hits "pause" on the VCR control.
225  **
226  *i DIGUY_CUSTOM_PDU_ID_SET_CHAR_VISIBLE
227  **
228  *- - Contents: Long Boolean
229  **
230  *i DIGUY_CUSTOM_PDU_ID_SET_SCENARIO_FRAME
231  **
232  *- - Contents: Long val
233  *- - Meaning: call diguyScenario::set_frame_desired(val)
234  **
235  *i DIGUY_CUSTOM_PDU_ID_SET_SCENARIO_PLAYBACK_MODE
236  **
237  *- - Contents: Long val
238  *- - Meaning: call diguyScenario::set_playback_mode(val)
239  **
240  *i DIGUY_CUSTOM_PDU_ID_LOAD_SCENARIO_CAMERA
241  **
242  *- - Contents: string
243  *- - Meaning: call diguyScenario::get_scenario_camera()->load_settings(string)
244  **
245  *i DIGUY_CUSTOM_PDU_ID_RESET
246  **
247  *- - Meaning: call diguyScenario::reset()
248  **
249  *i DIGUY_CUSTOM_PDU_ID_HAIL
250  **
251  *i DIGUY_CUSTOM_PDU_ID_LOAD_SCENARIO_FILE
252  **
253  *- - Contents: string
254  *- - Meaning: call diguyScenario::load(string)
255  **
256  *i DIGUY_CUSTOM_PDU_ID_SET_CAMERA_DETAILS
257  **
258  *- Internal Use only
259  **
260  *i DIGUY_CUSTOM_PDU_ID_XC_LOAD_SCENARIO
261  **
262  *- - Contents:
263  ** - NetU16 => Target_site
264  ** - NetU16 => Target_host
265  ** - String => Filename
266  ** - String => Reference name
267  **
268  *i DIGUY_CUSTOM_PDU_ID_XC_LOAD_SCENARIO_COMPLETE
269  **
270  *- - Contents: string
271  *- - Meaning: Indicates scenario has finished loading
272  **
273  *i DIGUY_CUSTOM_PDU_ID_XC_MERGE_SCENARIO
274  **
275  *- - Contents:
276  ** - NetU16 => Target_site
277  ** - NetU16 => Target_host
278  ** - NetFlt32 => Time of Day
279  ** - NetFlt32[3] => Refx, Refy, Refz
280  ** - NetFlt32[3] => x, y, z
281  ** - NetFlt32[3] => w,r,p
282  ** - String => Filename
283  ** - String => Reference name
284  **
285  *i DIGUY_CUSTOM_PDU_ID_XC_MERGE_SCENARIO_COMPLETE
286  **
287  *- - Contents: string
288  *- - Meaning: Indicates scenario has finished loading
289  **
290  *i DIGUY_CUSTOM_PDU_ID_XC_SET_TIN_TOD
291  **
292  *- - Contents:
293  ** - NetU16 => Target_site
294  ** - NetU16 => Target_host
295  ** - NetFlt32 => Time of Day
296  *- - Meaning: call diguyScenario::set_tin_time_of_day()
297  **
298  *i DIGUY_CUSTOM_PDU_ID_XC_TIME_NOW
299  **
300  *- - Contents:
301  ** - NetFlt32 => seconds since midnight
302  ** - NetFlt32 => seconds to smooth
303  *- - Meaning: call diguyScenario::set_sync_info()
304  **
305  *i DIGUY_CUSTOM_PDU_ID_XC_CONTROL
306  **
307  *- - Contents:
308  ** - NetU16 => Target_site
309  ** - NetU16 => Target_host
310  ** - String => Command ("RUN", "STOP", "RESET", "FF", "REWIND")
311  **
312  *i DIGUY_CUSTOM_PDU_ID_XC_TRIGGER_SCRIPT
313  **
314  *- - Contents:
315  ** - NetU16 => Target_site
316  ** - NetU16 => Target_host
317  ** - String Script name
318  **
319  *i DIGUY_CUSTOM_PDU_ID_XC_EVAL_SCRIPT
320  **
321  *- - Contents:
322  ** - NetU16 => Target_site
323  ** - NetU16 => Target_host
324  ** - String => Script text
325  **
326  *i DIGUY_CUSTOM_PDU_ID_XC_SET_FF_SPEED
327  **
328  *- - Contents:
329  ** - NetU16 => Target_site
330  ** - NetU16 => Target_host
331  ** - NetFlt32 => Speed multiple
332  **
333  *i DIGUY_CUSTOM_PDU_ID_XC_TRIGGER_SIGNAL
334  **
335  *- - Contents:
336  ** - NetU16 => Target_site
337  ** - NetU16 => Target_host
338  ** - String => Signal to trigger
339  **
340  *i DIGUY_CUSTOM_PDU_ID_XC_RESET_SCENARIO
341  **
342  *- - Contents:
343  ** - NetU16 => Target_site
344  ** - NetU16 => Target_host
345  **
346  *i DIGUY_CUSTOM_PDU_ID_XC_ENTER_SLAVE_MODE
347  **
348  *- - Contents:
349  ** - NetU16 => Target_site
350  ** - NetU16 => Target_host
351  **
352  *i DIGUY_CUSTOM_PDU_ID_XC_EXIT_SLAVE_MODE
353  **
354  *- - Contents:
355  ** - NetU16 => Target_site
356  ** - NetU16 => Target_host
357  **
358  *i DIGUY_CUSTOM_PDU_ID_VARIABLE_STATE
359  **
360  *- - Contents:
361  ** - NetU16 => Target_site
362  ** - NetU16 => Target_host
363  ** - String => variable
364  ** - String => value
365  **
366  *i DIGUY_CUSTOM_PDU_ID_SAVE_SCENARIO
367  **
368  *- - Contents:
369  ** - NetU16 => Target_site
370  ** - NetU16 => Target_host
371  ** - NetU16 => use_user_name
372  ** - String => file name
373  **
374  *i DIGUY_CUSTOM_PDU_ID_SAVE_SCENARIO_COMPLETE
375  **
376  *- - Contents:
377  ** - String => file name
378  **
379  *i DIGUY_CUSTOM_PDU_ID_AI_SEND_MESSAGE_TO_CHARACTER
380  **
381  *- - Contents:
382  ** - NetU16 => Target_site
383  ** - NetU16 => Target_host
384  ** - NetU16 => target AI network number
385  ** - String => sender
386  ** - String => message_type
387  ** - String => message
388  ** - String => message_params
389  *- - Meaning: call
390  *e diguyCharacter::agent_accept_message(sender,
391  *e message_type,
392  *e message,
393  *e message_params);
394  *- on character with diguyCharacter::get_network_entity_number() == target AI network number
395  **
396  *i DIGUY_CUSTOM_PDU_ID_AI_SEND_MESSAGE_TO_GROUP
397  **
398  *- - Contents:
399  ** - String => group_name
400  ** - String => sender
401  ** - String => message_type
402  ** - String => message
403  ** - String => message_params
404  *- - Meaning: call
405  *e diguyCharacterGroup::send_message_to_all_members(sender,
406  *e message_type,
407  *e message,
408  *e message_params);
409  **
410  *i DIGUY_CUSTOM_PDU_ID_AI_BROADCAST_MESSAGE
411  **
412  *- - Contents:
413  ** - String => sender
414  ** - NetFlt32 => radius
415  ** - String => message_type
416  ** - String => message
417  ** - String => message_params
418  *- - Meaning: call
419  *e diguyCharacter::agent_broadcast_message(sender,
420  *e radius,
421  *e message_type,
422  *e message,
423  *e message_params);
424  ** Where character is the sender of message.
425  **
426  *i DIGUY_CUSTOM_PDU_ID_AI_BROADCAST_MESSAGE_TO_GROUP
427  **
428  *- - Contents:
429  ** - String => sender
430  ** - String => group_name
431  ** - NetFlt32 => radius
432  ** - String => message_type
433  ** - String => message
434  ** - String => message_params
435  *- - Meaning: call
436  *e diguyCharacter::agent_broadcast_message_to_group(group_name,
437  *e radius,
438  *e message_type,
439  *e message,
440  *e message_params);
441  ** Where character is the sender of message.
442  **
443  *i DIGUY_CUSTOM_PDU_ID_BEGIN_APPEARANCE_EFFECT
444  **
445  *- - Contents:
446  ** - String => appearance effect
447  ** - bool => flag if theres extended data
448  *- - Optional extended data:
449  ** - NetFlt32 => override scale
450  ** - NetFlt32[3] => override_offset x, y, z
451  ** - NetFlt32 => override duration
452  *- - Meaning: call
453  *e diguyCharacter::begin_appearance_effect(app_name, link_name, override_scale,
454  *e override_offset_x, override_offset_y, override_offset_z,
455  *e override_duration,
456  ** or
457  *e diguyCharacter::begin_appearance_effect(app_name);
458  **
459  *i DIGUY_CUSTOM_PDU_ID_END_APPEARANCE_EFFECT ( Gradual Stop )
460  **
461  *- - Contents:
462  *- - String => appearance_effect_name
463  ** - String => link_name
464  *- - Meaning: call
465  *e diguyCharacter::end_appearance_effect(appearance_effect_name,link_name)
466  **
467  *i DIGUY_CUSTOM_PDU_ID_STOP_APPEARANCE_EFFECT ( Instant Stop )
468  **
469  *- - Contents:
470  *- - String => appearance_effect_name
471  ** - String => link_name
472  *- - Meaning: call
473  *e diguyCharacter::stop_appearance_effect(appearance_effect_name, link_name)
474  **
475  *i DIGUY_CUSTOM_PDU_ID_SET_SCENE_OBJECT_BIT
476  **
477  *- - Contents:
478  *- - bool => true false
479  *- - Meaning: call
480  *e diguyCharacter::set_is_scene_object(value)
481  **
482  *i DIGUY_CUSTOM_PDU_ID_BROADCAST_EXERCISE_DATETIME
483  **
484  *b internal use only
485  *- - Contents:
486  ** - NetU16 => Target_site
487  ** - NetU16 => Target_host
488  ** - NetU16[7] => year, month, day, hour, minute, second, msec
489  *- - Meaning: call
490  ** bdiScenario::set_network_datetime(network_datetime);
491  **
492  *i DIGUY_CUSTOM_PDU_ID_REQUEST_EXERCISE_DATETIME_BROADCAST
493  **
494  ** Unused
495  **
496  *i DIGUY_CUSTOM_PDU_ID_SET_SHAPE_VARIATION
497  **
498  *- - Contents:
499  *- - complicated: a series of NetU16 ( link index ), NetU16 (shape index )
500  *- followed by a slightly compressed chunk of pixel data.
501  *- should probably only happen once per character.
502  *e int offset = 0;
503  *e short link_index = 0;
504  *e while(pdu->pullShort(link_index, offset) == 0)
505  *e {
506  *e short shape_index = 0;
507  *e pdu->pullShort(shape_index, offset);
508  *e bdiLink * link = character->get_link_at_index(link_index);
509  *e if(link)
510  *e {
511  *e bdiShape * shape = link->get_shape(shape_index);
512  *e if(!shape->get_unique_ramp_data())
513  *e {
514  *e const unsigned char * data_blob = NULL;
515  *e int bytes_read;
516  *e if(pdu->pullUnsignedData(data_blob, offset, bytes_read) == 0)
517  *e {
518  *e unsigned char * data_blob_copy = new unsigned char [shape->get_unique_ramp_data_size()*4 ];
519  *e int q;
520  *e for(q = 0; q < bytes_read/3; q++)
521  *e {
522  *e data_blob_copy[q*4] = data_blob[q*3];
523  *e data_blob_copy[q*4+1] = data_blob[q*3+1];
524  *e data_blob_copy[q*4+2] = data_blob[q*3+2];
525  *e data_blob_copy[q*4+3] = 255;;
526  *e }
527  *e // fill the rest of the buffer
528  *e for( ; q < shape->get_unique_ramp_data_size(); q++)
529  *e {
530  *e data_blob_copy[q*4] = 128;
531  *e data_blob_copy[q*4+1] = 128;
532  *e data_blob_copy[q*4+2] = 128;
533  *e data_blob_copy[q*4+3] = 255;;
534  *e }
535  *e shape->set_unique_ramp_data(data_blob_copy);
536  *e }
537  *e }
538  *e }
539  *e }
540  **
541  *i DIGUY_CUSTOM_PDU_ID_EXECUTE_GESTURE
542  **
543  *- - Contents:
544  ** - String => gesture_name
545  ** - Long => reps
546  ** - NetFlt32 => overall_duration
547  ** - NetFlt32 => channel_A_weight
548  *- - Meaning: call
549  ** diguyCharacter::execute_gesture(gesture_name,reps, overall_duration, channel_A_weight);
550  **
551  *i DIGUY_CUSTOM_PDU_ID_CHARACTER_SCALE
552  **
553  *- - Contents:
554  ** - NetFlt32[3] => scale x,y,z
555  *- - Meaning: call
556  *- diguyCharacter::set_scale(x,y,z);
557  **
558  *i DIGUY_CUSTOM_PDU_ID_PLUGIN_RESERVED0
559  *i DIGUY_CUSTOM_PDU_ID_PLUGIN_RESERVED9
560  */
562 {
617 } ;
618 
619 #endif /* __diguy_dis_constants_H */
620 
621 
622 /*
623  * Copyright (C) 2005-2013 Boston Dynamics
624  * ALL RIGHTS RESERVED.
625  *
626  * These coded instructions, statements, and computer programs
627  * contain unpublished proprietary information of Boston Dynamics
628  * and are protected by Copyright Laws of the United States.
629  * They may not be used, duplicated, or disclosed in any form, in
630  * whole or in part, without the prior written consent from Boston
631  * Dynamics.
632  *
633  * RESTRICTED RIGHTS LEGEND
634  * Use, duplication, or disclosure by the government is subject
635  * to restrictions as set forth in FAR 52.227.19(c)(2) or
636  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
637  * Computer Software clause at DFARS 252.227-7013 and/or in
638  * similar or successor clauses in the FAR, or the DOD or NASA
639  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
640  * Commercial Computer Software--Restricted Rights at 48 CFR
641  * 52.227-19, as applicable. Unpublished-rights reserved under
642  * the Copyright Laws of the United States.
643  * Contractor/Manufacturer is:
644  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
645  */
646