
|
|
This file was automatically generated from diguySignal.h. Do not edit this file directly; the changes will be lost.Includes: diguy_constants.h | diguy_typedefs.h | declspec_diguy.h
Contents:
Alphabetical IndexLink against: libdiguy
class diguySignal
|
class BDI_DECLSPEC_diguy diguySignal { public: const char* get_name(); int set_name(const char* name); const char* get_type_name(); int reset(); int trigger(); int triggered(); int triggered_at_least_n_times(int n); int signal_palette_show(); int signal_palette_hide(); int get_is_visible_in_signal_palette(); const char* get_info_text(); void set_info_text(const char* info_text); enum { CALLBACK_ID_PRE_TRIGGER = 1, CALLBACK_ID_POST_TRIGGER }; #ifdef CPLUSPLUS_ONLY int add_callback(int callback_id, diguySignalCallback* callback, void* callback_params = 0, void* callback_user_data = 0); int remove_callback(int callback_id, diguySignalCallback* callback); int remove_callback_with_user_data(int callback_id, void* callback_user_data); int add_callback_script(int callback_id, const char* callback_script, const char* callback_script_type = NULL); int remove_callback_script(int callback_id, const char* callback_script, const char* callback_script_type = NULL); int map_event_handler_to_callback_id(int callback_id, const char* handler_name); int unmap_event_handler_from_callback_id(int callback_id, const char* handler_name, int unmap_all_matches = 0);
function diguySignal::get_name |
Prototype:
Description:const char* get_name();
Returns the name of the object. This pointer will never be NULL.Returns:
name of the signalCallable From:
- C++
- Script
function diguySignal::set_name |
Prototype:
Description:int set_name(const char* name);
This function sets the name of this object.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguySignal::get_type_name |
Prototype:
Description:const char* get_type_name();
Returns the type name of the object. This pointer will never be NULL.Returns:
type name of the objectCallable From:
- C++
- Script
function diguySignal::reset |
Prototype:
Description:int reset();
This function resets the signal. The number of times the signal has been triggered will be set to 0.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
- Decision Bead
function diguySignal::trigger |
Prototype:
Description:int trigger();
This function triggers the signal. If a sound is associated with the signal, it will be played. The number of times the signal has been triggered will be incremented by one.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
- Decision Bead
function diguySignal::triggered |
Prototype:
Returns:int triggered();
Returns the number of times this signal has been triggered since the scenario started or since the last call to reset().Callable From:
- C++
- Script
- Decision Bead
function diguySignal::triggered_at_least_n_times |
Prototype:
Returns:int triggered_at_least_n_times(int n);
Returns 1 if the signal has been triggered at least n times, else returns 0.Callable From:
- C++
- Script
- Decision Bead
function diguySignal::signal_palette_show |
Prototype:
Description:int signal_palette_show();
This function causes the button for this signal to become visible in the DI-Guy Scenario Signal Palette.
This function is for DI-Guy Scenario only.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguySignal::signal_palette_hide |
Prototype:
Description:int signal_palette_hide();
This function causes the button for this signal to become hidden in the DI-Guy Scenario Signal Palette.
This function is for DI-Guy Scenario only.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguySignal::get_is_visible_in_signal_palette |
Prototype:
Description:int get_is_visible_in_signal_palette();
This function returns a flag specifying whether the signal's button is visible in the DI-Guy Scenario Signal Palette.
This function is for DI-Guy Scenario only.Returns:
1 if the signal's button is visible, 0 if notCallable From:
- C++
- Script
function diguySignal::get_info_text |
Prototype:
Description:const char* get_info_text();
This function returns an optional signal description buffer.Returns:
pointer to info textCallable From:
- C++
- Script
function diguySignal::set_info_text |
Prototype:
Description:void set_info_text(const char* info_text);
This function sets an optional signal description buffer.Arguments:
Callable From:
info_text text of info
- C++
- Script
| Callback Functions |
enumeration |
Description:enum { CALLBACK_ID_PRE_TRIGGER = 1, CALLBACK_ID_POST_TRIGGER };
This is an enumeration of the different callbacks that can be registered with add_callback() and add_callback_script().Usable From:
- C++
- Script
function diguySignal::add_callback |
Prototype:
Description:int add_callback(int callback_id, diguySignalCallback* callback, void* callback_params = 0, void* callback_user_data = 0);
This function adds a user callback.Arguments:
callback pointer to function with prototype diguySignalCallback (typedefed above) callback_id integer id of when this callback is to be called callback_params not currently used; pass NULL callback_user_data pointer for user's own use; DI-Guy will do nothing to the contents of this pointer beyond passing it back when the callback is invoked callback_id should be one of the following values:CALLBACK_ID_PRE_TRIGGER
This callback will be called whenever the trigger() function is called, whether internally by DI-Guy of explicitly by the user in C++ or in a script. It will be called before the default handler of the function.
There are no parameters for this callback.CALLBACK_ID_POST_TRIGGER
This callback will be called whenever the trigger() function is called, whether internally by DI-Guy of explicitly by the user in C++ or in a script. It will be called after the default handler of the function.
There are no parameters for this callback.Callback Return Values:
Callbacks return a value of type diguyCallbackReturn, which will be DIGUY_CALLBACK_STOP or DIGUY_CALLBACK_CONTINUE. If the callback returns DIGUY_CALLBACK_STOP, the default handler of the function will not be called; the callback is asserting that it has done everything necessary for the function call. If the callback returns DIGUY_CALLBACK_CONTINUE, the default handler for the function will be called after the callback.Returns:
0 on success, -1 on failureCallable From:
- C++
function diguySignal::remove_callback |
Prototype:
Description:int remove_callback(int callback_id, diguySignalCallback* callback);
This function removes a user callback. All callbacks matching the specified callback_id and callback function will be removed.Arguments:
Returns:
callback_id integer id of when this callback is to be called callback pointer to function with prototype diguySignalCallback (typedefed above)
0 on success, -1 on failureCallable From:
- C++
function diguySignal::remove_callback_with_user_data |
Prototype:
Description:int remove_callback_with_user_data(int callback_id, void* callback_user_data);
This function removes a user callback. All callbacks matching the specified callback_id and callback_user_data pointer will be removed.Arguments:
Returns:
callback_id integer id of when this callback is to be called callback_user_data pointer for user's own use
0 on success, -1 on failureCallable From:
- C++
function diguySignal::add_callback_script |
Prototype:
Description:int add_callback_script(int callback_id, const char* callback_script, const char* callback_script_type = NULL);
This function adds a user callback script. Callback scripts can be removed with remove_callback_script().
See diguyCharacter::add_callback_script() for an example of use.Arguments:
callback_id integer id of the callback callback_script script text of callback to be added callback_script_type the type of script contained in callback_script If NULL is passed for callback_script_type, a default script type will be derived based on the default script interpreter of the scenario.Lua specific:
When the script is called, the object for which it is being called will be in the callback_object global.
To pass NULL when calling from a lua script, use nil.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguySignal::remove_callback_script |
Prototype:
Description:int remove_callback_script(int callback_id, const char* callback_script, const char* callback_script_type = NULL);
This function removes a user callback script previously added with add_callback_script().
See diguyCharacter::remove_callback_script() for an example of use.Arguments:
callback_id integer id of the callback callback_script script text of callback previously added callback_script_type the type of script contained in callback_script If NULL is passed for callback_script, all callback scripts whose ids match callback_id and whose types match callback_script_type will be removed.
If NULL is passed for callback_script_type, a default script type will be derived based on the default script interpreter of the scenario.Lua specific:
To pass NULL when calling from a lua script, use nil.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
| Event Handler Functions |
function diguySignal::map_event_handler_to_callback_id |
Prototype:
Description:int map_event_handler_to_callback_id(int callback_id, const char* handler_name);
This function maps the event handler with the given name to a callback id. This mapping will be saved in the .dss file and restored when the .dss file is loaded.
Mappings can also be made via the DI-Guy Scenario UI.
The event handler is one of the following:
Arguments:
- a signal callback function registered by diguyScenario::register_signal_event_handler() or diguyScenario::register_signal_event_handler_from_library()
- a script registered by diguyScenario::register_signal_event_handler_script()
- a Script, Decision, or Library Function in the scenario whose "Event Type" is "Signal"
Returns:
callback_id integer id of callback handler_name name of the event handler to map
0 on success, -1 on failureCallable From:
- C++
- Script
function diguySignal::unmap_event_handler_from_callback_id |
Prototype:
Description:int unmap_event_handler_from_callback_id(int callback_id, const char* handler_name, int unmap_all_matches = 0);
This function unmaps the event handler with the given name from a callback id.Arguments:
Returns:
callback_id integer id of callback handler_name name of the event handler to map unmap_all_matches pass 0 to unmap only the first match, pass 1 to unmap all matches
0 on success, -1 on failureCallable From:
- C++
- Script
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.