![]() |
VR-Forces 4.3 Class Documentation
|

Classes | |
| class | DtLuaScriptFunctionReference |
| Override of DtScriptInterface::DtScriptFunctionReference that holds a function reference by function name, represented as a string. More... | |
| struct | LuaExtension |
Public Member Functions | |
| virtual | ~DtLuaScriptInterfaceImpl () |
| virtual void | init () |
| Derived class inits may do things, so init should always be called. | |
| virtual DtString | type () const |
| Script engine type. | |
| virtual bool | invokeInit () |
| virtual void | invokeSuspend () |
| virtual bool | invokeResume () |
| virtual void | invokeTick () |
| This will be called by the parent to invoke the script tick. | |
| virtual bool | invokeCheck () |
| virtual void | invokeCheckInit () |
| virtual void | invokeShutdown () |
| virtual void | invokeDisable () |
| Only called for reactive tasks which can be enabled but not active. | |
| virtual bool | loadScript (bool reload) |
| This will be called by the parent to let the interface know when to load the script. | |
| virtual void | setLuaState (lua_State *L) |
| virtual lua_State * | getLuaState () |
| virtual std::string | dumpLuaStack () const |
| virtual int | luaStackSize () const |
| virtual void | collectGarbage () |
| virtual DtReaderWriter * | saveState () |
| Called when the scenario is saved. | |
| virtual bool | loadState (const DtReaderWriter *loadState) |
| Called when the scenario is loaded. | |
| virtual void | processClearForReuse () |
| This function should be overridden by the inheritor to clear out any task specific variables. | |
| virtual bool | initializeVRFLuaExtensions (lua_State *L) |
| virtual bool | importTaskParams (lua_State *L) |
| virtual luabind::object | createLuaTableFromRegistry (lua_State *L, const DtReaderWriterRegistry &rwRegistry, bool requireMetadata=true) |
| Converts a readerWriter registry into a lua table. | |
| void | luaEndTask (bool success) |
| Admin functions called from Lua. | |
| void | luaSendReportWithoutRecipients (const ::std::string reportType, luabind::object const ¶meters) |
| Send a DtSimReport subclass to the network (e.g. DtSpotReport) | |
| void | luaSendReport (const ::std::string reportType, luabind::object const &reciptients, luabind::object const ¶meters) |
| int | luaSendTask (DtScriptVrfObject &object, const ::std::string taskName, luabind::object const ¶meters) |
| Send task to another entity. | |
| int | luaSendTaskActAsSubtask (DtScriptVrfObject &object, const ::std::string taskName, luabind::object const ¶meters, bool actAsSubtask) |
| void | luaStopAllTasks () |
| Stops all tasks started by this task. | |
| void | luaSendSetDataToSelf (const ::std::string setName, luabind::object const ¶meters) |
| Send a set-data message to self. | |
| void | luaSendSetData (DtScriptVrfObject &object, const ::std::string setName, luabind::object const ¶meters) |
| Send a set-data message to another entity. | |
| luabind::object | luaGetReactionStatus () |
| Provide current reaction status to lua scripts. | |
| std::string | luaGetScriptId () |
| Provide the current script ID to lua scripts. | |
| std::string | luaGetSystemName () |
| Provide the current system name to lua scripts. | |
| luabind::object | luaGetObjectsNear (const DtLocation3D &loc, double distance) |
| luabind::object | luaGetObjectsNearWithFilter (const DtLocation3D &loc, double distance, luabind::object const ¶meters) |
| luabind::object | luaGetScriptAttribute (const std::string &attributeName, bool &error) |
| luabind::object | luaGetVrfObjects () |
| Returns a list of all scripted objects. | |
| DtLuaFeatureSet | luaGetFeaturesWithinArea (luabind::object const &points, luabind::object const &attributes) |
| Routines to query and return feature sets Returns a feature set which contains all features within the specified geometry containing the specified attributes. | |
| DtLuaFeatureSet | luaGetFeaturesWithinAreaNoAttributes (luabind::object const &points) |
| DtLuaFeatureSet | luaGetFeaturesWithinRange (const DtLocation3D &, double range, luabind::object const &attributes) |
| Returns a feature set which contains all features within the specified point and box size containing the specified attributes. | |
| DtLuaFeatureSet | luaGetFeaturesWithinRangeNoAttributes (const DtLocation3D &, double range) |
| DtTranslatableStream | translateStringFromScript (const std::string &format) |
| Returns a translatable object that can be used to send translated messages. | |
| boost::shared_ptr< DtLuaAsyncJob > | luaNavigateThroughFeatures (const luabind::object ¶meters) |
| Returns an async job object which will produce a path (set of points) from the input points. | |
| void | luaSendMessage (const DtScriptVrfObject &receiver, const std::string &message) |
| void | luaDeleteObject (std::string const &receiver) |
| void | luaDeleteScriptObject (const DtScriptVrfObject &receiver) |
| virtual void | processTextReport (const DtVrfObjectMessage *m) |
| void | luaSendInfluence (const DtScriptVrfObject &target, const std::string &influenceName, luabind::object const &influenceParams) |
| virtual void | processInfluence (DtInfluenceInteraction *m) |
| virtual void | processEntityDestroyed () |
| Performs processing that should occur when the entity is destroyed. | |
| virtual void | addPostSetDataCallback (const std::string &setDataType, const std::string &functionName) |
| Adds a callback to be invoked after the specified type of set data request is executed. ( | |
| virtual void | removePostSetDataCallback (const std::string &setDataType, const std::string &functionName) |
| Remove a callback invoked after the specified type of set data request is executed. ( | |
| virtual void | invokePostSetDataCallback (DtScriptFunctionReferencePtr functionReference, DtSetDataRequestMessage *setDatRequest) |
| Invokes a post set data callback for a lua script. | |
| virtual int | luaSendEmbeddedEntityTask (std::string eeName, std::string taskName, luabind::object const &parms) |
| Global functions that have Lua-specific dependencies. | |
| virtual int | luaSendEmbeddedEntityTaskActAsSubtask (std::string eeName, std::string taskName, luabind::object const &parms, bool actAsSubtask) |
| Global functions that have Lua-specific dependencies. | |
| virtual int | luaSendEmbeddedEntitySet (std::string eeName, std::string setName, luabind::object const &parms) |
| Send a set-data message to an Embedded Entity, implicitly deploying it if necessary. | |
| int | luaStartSubtask (const std::string taskName, luabind::object const ¶meters) |
| Subtasking related functions called from Lua. | |
| void | luaStopSubtask (int subtaskId) |
| Subtasking related functions called from Lua. | |
| void | luaStopAllSubtasks () |
| Stops all subtasks that were started by this task. | |
| bool | luaIsSubtaskRunning (int subtaskId) |
| bool | luaIsSubtaskComplete (int subtaskId) |
| bool | luaIsSubtaskCanceled (int subtaskId) |
| bool | luaSubtaskResult (int subtaskId) |
| virtual void | luaSetPrecipitationIntensity (DtScriptVrfObject &object, double intensity) |
| virtual void | luaSetPrecipitationType (DtScriptVrfObject &object, int type) |
| virtual void | luaSetCloudCover (DtScriptVrfObject &object, int state) |
| virtual void | luaSetVisibilityDistance (DtScriptVrfObject &object, double distance) |
| virtual void | luaSetWindDirection (DtScriptVrfObject &object, double) |
| virtual void | luaSetWindSpeed (DtScriptVrfObject &object, double) |
| virtual void | luaSetUnderwaterVisibility (DtScriptVrfObject &object, double visibility) |
| virtual void | luaSetSurfaceTransparency (DtScriptVrfObject &object, double transparency) |
| virtual void | luaSetSwellState (DtScriptVrfObject &object, unsigned int state) |
| virtual void | luaSetSwellStateDirection (DtScriptVrfObject &object, double direction) |
| virtual void | luaSetSeaState (DtScriptVrfObject &object, unsigned int state) |
| virtual void | luaSetSeaStateDirection (DtScriptVrfObject &object, double direction) |
| virtual void | luaSetWindDrivenSeaStateEnabled (DtScriptVrfObject &object, bool enabled) |
| virtual void | luaSetChoppiness (DtScriptVrfObject &object, double choppiness) |
| virtual void | luaSetSurgeDepth (DtScriptVrfObject &object, double depth) |
| virtual void | luaSetPriority (DtScriptVrfObject &object, int) |
| virtual bool | isWeatherObject (DtScriptVrfObject &) const |
| virtual unsigned int | luaGetPrecipitation (DtScriptVrfObject &object, double *) |
| virtual double | luaGetPrecipitationIntensity (DtScriptVrfObject &object) |
| virtual unsigned int | luaGetPrecipitationType (DtScriptVrfObject &object) |
| virtual int | luaGetCloudCover (DtScriptVrfObject &object) |
| virtual double | luaGetVisibilityDistance (DtScriptVrfObject &object) |
| virtual double | luaGetWindDirection (DtScriptVrfObject &object) |
| virtual double | luaGetWindSpeed (DtScriptVrfObject &object) |
| virtual double | luaGetUnderwaterVisibility (DtScriptVrfObject &object) |
| virtual double | luaGetSurfaceTransparency (DtScriptVrfObject &object) |
| virtual unsigned int | luaGetSwellState (DtScriptVrfObject &object) |
| virtual double | luaGetSwellStateDirection (DtScriptVrfObject &object) |
| virtual unsigned int | luaGetSeaState (DtScriptVrfObject &object) |
| virtual double | luaGetSeaStateDirection (DtScriptVrfObject &object) |
| virtual bool | luaGetWindDrivenSeaStateEnabled (DtScriptVrfObject &object) |
| virtual double | luaGetChoppiness (DtScriptVrfObject &object) |
| virtual double | luaGetSurgeDepth (DtScriptVrfObject &object) |
| virtual int | luaGetPriority (DtScriptVrfObject &object) |
| virtual double | luaGetIllumination (DtScriptVrfObject &object) |
| virtual unsigned int | luaGetPrecipitationByLocation (const DtLocation3D &location, double *) |
| virtual double | luaGetPrecipitationIntensityByLocation (const DtLocation3D &object) |
| virtual unsigned int | luaGetPrecipitationTypeByLocation (const DtLocation3D &object) |
| virtual int | luaGetCloudCoverByLocation (const DtLocation3D &object) |
| virtual double | luaGetVisibilityDistanceByLocation (const DtLocation3D &object) |
| virtual double | luaGetWindDirectionByLocation (const DtLocation3D &object) |
| virtual double | luaGetWindSpeedByLocation (const DtLocation3D &object) |
| virtual double | luaGetUnderwaterVisibilityByLocation (const DtLocation3D &object) |
| virtual double | luaGetSurfaceTransparencyByLocation (const DtLocation3D &object) |
| virtual unsigned int | luaGetSwellStateByLocation (const DtLocation3D &object) |
| virtual double | luaGetSwellStateDirectionByLocation (const DtLocation3D &object) |
| virtual unsigned int | luaGetSeaStateByLocation (const DtLocation3D &object) |
| virtual double | luaGetSeaStateDirectionByLocation (const DtLocation3D &object) |
| virtual bool | luaGetWindDrivenSeaStateEnabledByLocation (const DtLocation3D &object) |
| virtual double | luaGetChoppinessByLocation (const DtLocation3D &object) |
| virtual double | luaGetSurgeDepthByLocation (const DtLocation3D &object) |
| virtual int | luaGetPriorityByLocation (const DtLocation3D &object) |
| virtual double | luaGetIlluminationByLocation (const DtLocation3D &object) |
| virtual double | luaRunDurationTime () |
| virtual void | luaRunForDuration (double) |
| virtual void | luaStopSimulationDurationTimer () |
| virtual int | luaAskUserQuestion (const DtTranslatableStream &title, const DtTranslatableStream &message, luabind::object const &options, int displayFlags) |
| virtual int | luaAskUserQuestionST (const std::string &title, const DtTranslatableStream &message, luabind::object const &options, int displayFlags) |
| virtual int | luaAskUserQuestionTS (const DtTranslatableStream &title, const std::string &message, luabind::object const &options, int displayFlags) |
| virtual int | luaAskUserQuestionSS (const std::string &title, const std::string &message, luabind::object const &options, int displayFlags) |
| virtual int | luaStatusOfUserQuestion (int questionId) |
| Returns the status of the user question: -1 - Not yet answered 0+ - Answered and the option the user selected. | |
| virtual void | luaCancelUserQuestion (int questionId) |
| Cancels the question asked of the user. | |
| DtScriptVrfObject | luaCreateEntity (luabind::object const ¶meters) |
| Create an entity. | |
| DtScriptVrfObject | luaGetGlobalWeather () |
| Returns the current global weather object. This can be used for changing global weather. | |
| DtScriptVrfObject | luaCreateTacticalGraphic (luabind::object const ¶meters) |
| Create a tactical graphic. Must specify name or type. | |
| DtScriptVrfObject | luaCreateObstacle (luabind::object const ¶meters) |
| Create an obstacle. | |
| DtScriptVrfObject | luaCreateRoute (luabind::object const ¶meters) |
| Create a route. | |
| DtScriptVrfObject | luaCreateArea (luabind::object const ¶meters) |
| Create an area. | |
| DtScriptVrfObject | luaCreateWaypoint (luabind::object const ¶meters) |
| Create a waypoint. | |
| DtScriptVrfObject | luaCreatePhaseLine (luabind::object const ¶meters) |
| Creates a phase line. | |
| unsigned | luaBitwiseOr (unsigned val1, unsigned val2) |
| unsigned | luaBitwiseAnd (unsigned val1, unsigned val2) |
| unsigned | luaBitwiseXor (unsigned val1, unsigned val2) |
| unsigned | luaBitwiseNot (unsigned val) |
| unsigned | luaBitwiseLeftShift (unsigned val, unsigned shift) |
| unsigned | luaBitwiseRightShift (unsigned val, unsigned shift) |
Public Member Functions inherited from DtScriptInterface | |
| virtual | ~DtScriptInterface () |
| virtual void | setTaskId (int taskId) |
| virtual int | taskId () const |
| virtual void | setScriptId (const DtString &scriptId) |
| virtual const DtString & | scriptId () const |
| virtual void | setSystemName (const DtString &system) |
| virtual const DtString & | systemName () const |
| virtual void | setScriptPath (const DtFilename &scriptPath) |
| virtual const DtFilename & | scriptPath () const |
| virtual void | setEntity (DtVrfObject *entity) |
| virtual DtVrfObject * | entity () const |
| virtual void | setTaskVariables (const DtRwVariableBindings &variables) |
| virtual const DtRwVariableBindings & | taskVariables () const |
| virtual bool | updateTaskVariables () |
| virtual void | setTaskStarting (bool v) |
| virtual bool | taskStarting () const |
| virtual void | setController (DtScriptTaskControllerInterface *controller) |
| virtual DtScriptTaskControllerInterface * | controller () |
| double | getTerrainAltitude (const double lat, const double lon, bool &dataAvailable, std::string &surface) const |
| Gets the terrain height at the given location. | |
| double | getGroundAltitude (const double lat, const double lon, bool &isWater, bool &dataAvailable) |
| Gets the height of the ground at the given location. | |
| void | chordIntersectionDebug (const DtLocation3D &startLoc, const DtLocation3D &endLoc) |
| Script function for debugging chord-terrain intersections. | |
| bool | doesChordHitTerrain (const DtLocation3D &pt1, const DtLocation3D &pt2, bool &dataAvailable) const |
| Determines if the chord formed by (point1, point2) intersects the terrain. | |
| DtLocation3D | findClosestPointToRoad (const DtLocation3D &point, double searchRadius, bool &dataAvailable, bool &success) const |
| std::string | getForceName (int forceType) |
| bool | forcesHostile (std::string force1, std::string force2) |
| double | gaussian () |
| Returns a number drawn from a standard Gaussian distribution. | |
| virtual void | setTaskResuming (bool v) |
| Flag indicating if the task is resuming from a suspended state. | |
| virtual bool | taskResuming () const |
| Flag indicating if the task is resuming from a suspended state. | |
| virtual void | setIsBackgroundProces (bool isBgProc) |
| Flag indicating if this task is a background process. | |
| virtual bool | isBackgroundProcess () const |
| Flag indicating if this task is a background process. | |
| double | scriptGetExerciseTime () |
| Methods that are available for any script to use. | |
| int | scriptGetApplicationId () |
| Methods that are available for any script to use. | |
| double | scriptGetSimulationTime () |
| Methods that are available for any script to use. | |
| double | scriptGetTimeMultiplier () |
| Methods that are available for any script to use. | |
| double | scriptGetTimeOfDay () |
| Methods that are available for any script to use. | |
| double | scriptGetWindSpeed () |
| Returns wind speed in meters/second. | |
| double | scriptGetWindDirection () |
| Returns wind direction in radians. | |
| DtScriptVrfObject | scriptGetVrfObjectByName (const std::string name) |
| Methods that are available for any script to use. | |
| void | printError (const std::string message) |
| Methods that are available for any script to use. | |
| void | printErrorTranslatableStream (const DtTranslatableStream &message) |
| Methods that are available for any script to use. | |
| void | printWarn (const std::string message) |
| Methods that are available for any script to use. | |
| void | printWarnTranslatableStream (const DtTranslatableStream &message) |
| Methods that are available for any script to use. | |
| void | printInfo (const std::string message) |
| Methods that are available for any script to use. | |
| void | printInfoTranslatableStream (const DtTranslatableStream &message) |
| Methods that are available for any script to use. | |
| void | printVerbose (const std::string message) |
| Methods that are available for any script to use. | |
| void | printVerboseTranslatableStream (const DtTranslatableStream &message) |
| Methods that are available for any script to use. | |
| void | printDebug (const std::string message) |
| Methods that are available for any script to use. | |
| void | printDebugTranslatableStream (const DtTranslatableStream &message) |
| Methods that are available for any script to use. | |
| bool | entityTypeMatches (const std::string &, const std::string &) |
| Methods that are available for any script to use. | |
| void | setTickPeriod (double) |
| Tick management. Will store information in PSR of controller only. | |
| void | setRespondToNewSensorContacts (bool) |
| Set tick on new sensor contact. | |
| virtual void | addPostSetDataCallback (const std::string &setDataType, DtScriptFunctionReferencePtr functionReference) |
| Adds a callback to be invoked after the specified type of set data request is executed. | |
| virtual void | removePostSetDataCallback (const std::string &setDataType, DtScriptFunctionReferencePtr functionReference) |
| Remove a callback invoked after the specified type of set data request is executed. | |
| virtual void | clearPostSetDataCallbacks () |
| Clear all post-set data request callbacks. | |
| virtual void | processPostSetData (DtSimMessage *msg) |
| Methods that are available for any script to use. | |
| virtual void | processPostTick () |
| Invokes any post-set data request callbacks for set data requests executed this tick. | |
Static Public Member Functions | |
| static DtScriptInterface * | creator () |
| static void | addLuaScriptInterfaceExtension (DtLuaScriptInterfaceExtension::CreatorFcn extension, void *usr) |
| Add a new extension creator function. | |
| static void | addLuaScriptInterfaceExtension (DtLuaScriptInterfaceExtension::CreatorFcn extension, const DtVrfObject *onlyForEntity, void *usr) |
| Add a new extension creator function. | |
| static void | removeLuaScriptInterfaceExtension (DtLuaScriptInterfaceExtension::CreatorFcn extension, void *usr) |
| Remove an extension. | |
| static void | removeLuaScriptInterfaceExtension (DtLuaScriptInterfaceExtension::CreatorFcn extension, const DtVrfObject *onlyForEntity, void *usr) |
| Removes only for particular entity if registered for that entity. | |
| static void | addKeyToIgnore (const std::string &) |
| When serializing ignore any key found in this list. Uses instance of luaObjectSerializer. | |
| static void | removeKeyToIgnore (const std::string &) |
| Removes a key to ignore during serialization Uses instance of luaObjectSerializer. | |
| static void | textReportCallback (const DtVrfObjectMessage *m, void *usr) |
| static void | influenceCallback (DtInfluenceInteraction *m, void *usr) |
Static Public Member Functions inherited from DtScriptInterface | |
| static void | postSetDataCallback (DtSimMessage *msg, void *usr) |
| Callback registered to the set data manager. | |
| static void | postTickCallback (void *usr) |
| Invokes any post-set data request callbacks for set data requests executed this tick. | |
Static Public Member Functions inherited from DtObjectDebugger< DtLuaScriptInterfaceImpl > | |
| static DtObjectCounter::CounterType | ObjectCount () |
| static const DtObjectContainer * | ObjectContainer () |
Protected Types | |
| typedef std::vector < DtLuaScriptInterfaceExtension * > | LocalInterfaceExtensions |
| typedef std::vector< LuaExtension > | GlobalInterfaceExtensions |
Protected Member Functions | |
| DtLuaScriptInterfaceImpl () | |
| DtLuaScriptInterfaceImpl (const DtLuaScriptInterfaceImpl &other) | |
| DtLuaScriptInterfaceImpl & | operator= (const DtLuaScriptInterfaceImpl &other) |
| virtual bool | callLuaNoArgFunction (const std::string &functionName) |
| virtual void | updateFuncCallCount () |
Protected Member Functions inherited from DtScriptInterface | |
| DtScriptInterface () | |
| Call the DtScriptInterfaceHandler::createScriptInterface() function to create one. | |
| DtScriptInterface (const DtScriptInterface &other) | |
| DtScriptInterface & | operator= (const DtScriptInterface &other) |
| virtual void | scriptTaskComplete (bool success) |
| This function is meant to be called by the script itself or the script object to tell the parent that the script task is complete. | |
| virtual void | scriptTaskError () |
| virtual bool | scriptText (DtString &text) |
| Returns the script text as a string and a bool on whether the text is valid or not. | |
| virtual bool | scriptPath (DtString &path) |
| Returns the path to this script. | |
| virtual const DtReaderWriter * | getTaskParam (const DtString ¶mName) |
| virtual bool | getParamMetaDataType (const DtString ¶mName, DtString &typeName) |
Protected Member Functions inherited from DtObjectDebugger< DtLuaScriptInterfaceImpl > | |
| DtObjectDebugger () | |
| DtObjectDebugger (const DtObjectDebugger &) | |
| ~DtObjectDebugger () | |
Protected Attributes | |
| lua_State * | myLState |
| unsigned | myFuncCallCount |
| bool | myLuaScriptWarningShown |
| LocalInterfaceExtensions | myInterfaceExtensions |
Protected Attributes inherited from DtScriptInterface | |
| int | myTaskId |
| DtString | myScriptId |
| DtString | mySystemName |
| DtFilename | myScriptPath |
| DtScriptTaskControllerInterface * | myControllerInterface |
| DtVrfObject * | myEntity |
| DtRwVariableBindings | myTaskVariables |
| bool | myTaskStarting |
| Indicates that a new task is starting, and should be initialized on the next tick. | |
| bool | myTaskResuming |
| bool | myIsBackgroundProcess |
| DtPostSetDataCallbackSet | mySetDataCallbacks |
| Callbacks registered from the scripting language. | |
| DtSetDataMessageVector | mySetDataMessages |
| Stores copies of set data request messages that callbacks have been registered for. | |
| DtPostCallbackEntryPendingChanges | myPendingSetDataCallbackEntries |
| If a post set data callback is added or removed while invoking callbacks add to this map instead of inserting or removing immediately. | |
| DtSetDataMessageVector | myPendingSetDataMessages |
| If a set data request is executed while invoking callbacks, add it to this vector instead of mySetDataMessages. | |
| bool | myExecutingSetDataCallbacks |
| Set to true when invoking post set data callbacks. | |
Static Protected Attributes | |
| static GlobalInterfaceExtensions | theLuaInterfaceExtensions |
Additional Inherited Members | |
Public Types inherited from DtScriptInterface | |
| typedef boost::shared_ptr < DtScriptFunctionReference > | DtScriptFunctionReferencePtr |
| Shared ptr to DtScriptFunctionReference. | |
| typedef std::pair< std::string, DtScriptFunctionReferencePtr > | DtPostCallbackEntry |
| Matches a set data request type with a DtScriptFunctionReferencePtr. | |
| typedef std::set < DtPostCallbackEntry, PostSetDataCallbackLessThan > | DtPostSetDataCallbackSet |
| typedef std::vector < DtSimMessage * > | DtSetDataMessageVector |
| typedef std::map < DtPostCallbackEntry, bool > | DtPostCallbackEntryPendingChanges |
|
protected |
|
protected |
|
protected |
|
protected |
|
virtual |
|
protected |
|
static |
|
virtual |
Derived class inits may do things, so init should always be called.
Reimplemented from DtScriptInterface.
|
virtual |
Script engine type.
Implements DtScriptInterface.
|
virtual |
Implements DtScriptInterface.
|
virtual |
Implements DtScriptInterface.
|
virtual |
Implements DtScriptInterface.
|
virtual |
This will be called by the parent to invoke the script tick.
Implements DtScriptInterface.
|
virtual |
Implements DtScriptInterface.
|
virtual |
Implements DtScriptInterface.
|
virtual |
Implements DtScriptInterface.
|
virtual |
Only called for reactive tasks which can be enabled but not active.
When the task is completely disabled, this should be invoked.
Implements DtScriptInterface.
This will be called by the parent to let the interface know when to load the script.
Implements DtScriptInterface.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Called when the scenario is saved.
The stateState pointer may not be valid, in which case something went wrong with saving
Implements DtScriptInterface.
|
virtual |
Called when the scenario is loaded.
The load state pointer may not be valid, which does not indicate that the scenario loaded incorrectly, but that the data for this particular script interface was either corrupt or did not exist.
Implements DtScriptInterface.
|
virtual |
This function should be overridden by the inheritor to clear out any task specific variables.
This version should probably be called last if you override it rather than first to take care of things before these things get cleared. Note: This function should only be used when a script interface is being reused between different controllers/vrfObjects (to keep from having to delete and recreate the script interface).
Reimplemented from DtScriptInterface.
|
static |
Add a new extension creator function.
This creator will be called every time a new lua environment is created. Will be applied to all entities
| usr | A pointer that will be passed to the creator function when called. |
|
static |
Add a new extension creator function.
This creator will be called every time a new lua environment is created.
| onlyForEntity | Only invoke the creator if the entity being tasked is the entity this is registered for |
| usr | A pointer that will be passed to the creator function when called. |
|
static |
Remove an extension.
|
static |
Removes only for particular entity if registered for that entity.
If there is one registered for all entities and none registered for this entity then no action is taken
|
virtual |
|
virtual |
|
virtual |
Converts a readerWriter registry into a lua table.
|
static |
When serializing ignore any key found in this list. Uses instance of luaObjectSerializer.
|
static |
Removes a key to ignore during serialization Uses instance of luaObjectSerializer.
| void DtLuaScriptInterfaceImpl::luaEndTask | ( | bool | success | ) |
Admin functions called from Lua.
|
virtual |
Global functions that have Lua-specific dependencies.
Task/set forwarding for embedded entities. Send a task to an Embedded Entity, implicitly deploying it if necessary.
|
virtual |
Global functions that have Lua-specific dependencies.
Task/set forwarding for embedded entities. Send a task to an Embedded Entity, implicitly deploying it if necessary.
|
virtual |
Send a set-data message to an Embedded Entity, implicitly deploying it if necessary.
| int DtLuaScriptInterfaceImpl::luaStartSubtask | ( | const std::string | taskName, |
| luabind::object const & | parameters | ||
| ) |
Subtasking related functions called from Lua.
Starts a subtask and returns the subtask ID. ID of -1 indicates it failed to start.
| void DtLuaScriptInterfaceImpl::luaStopSubtask | ( | int | subtaskId | ) |
Subtasking related functions called from Lua.
Starts a subtask and returns the subtask ID. ID of -1 indicates it failed to start.
| void DtLuaScriptInterfaceImpl::luaStopAllSubtasks | ( | ) |
Stops all subtasks that were started by this task.
| void DtLuaScriptInterfaceImpl::luaSendReportWithoutRecipients | ( | const ::std::string | reportType, |
| luabind::object const & | parameters | ||
| ) |
Send a DtSimReport subclass to the network (e.g. DtSpotReport)
| void DtLuaScriptInterfaceImpl::luaSendReport | ( | const ::std::string | reportType, |
| luabind::object const & | reciptients, | ||
| luabind::object const & | parameters | ||
| ) |
| int DtLuaScriptInterfaceImpl::luaSendTask | ( | DtScriptVrfObject & | object, |
| const ::std::string | taskName, | ||
| luabind::object const & | parameters | ||
| ) |
Send task to another entity.
| int DtLuaScriptInterfaceImpl::luaSendTaskActAsSubtask | ( | DtScriptVrfObject & | object, |
| const ::std::string | taskName, | ||
| luabind::object const & | parameters, | ||
| bool | actAsSubtask | ||
| ) |
| void DtLuaScriptInterfaceImpl::luaStopAllTasks | ( | ) |
Stops all tasks started by this task.
| void DtLuaScriptInterfaceImpl::luaSendSetDataToSelf | ( | const ::std::string | setName, |
| luabind::object const & | parameters | ||
| ) |
Send a set-data message to self.
| void DtLuaScriptInterfaceImpl::luaSendSetData | ( | DtScriptVrfObject & | object, |
| const ::std::string | setName, | ||
| luabind::object const & | parameters | ||
| ) |
Send a set-data message to another entity.
| luabind::object DtLuaScriptInterfaceImpl::luaGetReactionStatus | ( | ) |
Provide current reaction status to lua scripts.
| std::string DtLuaScriptInterfaceImpl::luaGetScriptId | ( | ) |
Provide the current script ID to lua scripts.
| std::string DtLuaScriptInterfaceImpl::luaGetSystemName | ( | ) |
Provide the current system name to lua scripts.
| luabind::object DtLuaScriptInterfaceImpl::luaGetObjectsNear | ( | const DtLocation3D & | loc, |
| double | distance | ||
| ) |
| luabind::object DtLuaScriptInterfaceImpl::luaGetObjectsNearWithFilter | ( | const DtLocation3D & | loc, |
| double | distance, | ||
| luabind::object const & | parameters | ||
| ) |
| luabind::object DtLuaScriptInterfaceImpl::luaGetScriptAttribute | ( | const std::string & | attributeName, |
| bool & | error | ||
| ) |
| luabind::object DtLuaScriptInterfaceImpl::luaGetVrfObjects | ( | ) |
Returns a list of all scripted objects.
| DtLuaFeatureSet DtLuaScriptInterfaceImpl::luaGetFeaturesWithinArea | ( | luabind::object const & | points, |
| luabind::object const & | attributes | ||
| ) |
Routines to query and return feature sets Returns a feature set which contains all features within the specified geometry containing the specified attributes.
| DtLuaFeatureSet DtLuaScriptInterfaceImpl::luaGetFeaturesWithinAreaNoAttributes | ( | luabind::object const & | points | ) |
| DtLuaFeatureSet DtLuaScriptInterfaceImpl::luaGetFeaturesWithinRange | ( | const DtLocation3D & | , |
| double | range, | ||
| luabind::object const & | attributes | ||
| ) |
Returns a feature set which contains all features within the specified point and box size containing the specified attributes.
The range is in meters. The range will create a bounding box with the point supplied at the center
| DtLuaFeatureSet DtLuaScriptInterfaceImpl::luaGetFeaturesWithinRangeNoAttributes | ( | const DtLocation3D & | , |
| double | range | ||
| ) |
| DtTranslatableStream DtLuaScriptInterfaceImpl::translateStringFromScript | ( | const std::string & | format | ) |
Returns a translatable object that can be used to send translated messages.
| boost::shared_ptr<DtLuaAsyncJob> DtLuaScriptInterfaceImpl::luaNavigateThroughFeatures | ( | const luabind::object & | parameters | ) |
Returns an async job object which will produce a path (set of points) from the input points.
The output path object will be altered as to move around the features.
| void DtLuaScriptInterfaceImpl::luaSendMessage | ( | const DtScriptVrfObject & | receiver, |
| const std::string & | message | ||
| ) |
| void DtLuaScriptInterfaceImpl::luaDeleteObject | ( | std::string const & | receiver | ) |
| void DtLuaScriptInterfaceImpl::luaDeleteScriptObject | ( | const DtScriptVrfObject & | receiver | ) |
|
static |
|
virtual |
| void DtLuaScriptInterfaceImpl::luaSendInfluence | ( | const DtScriptVrfObject & | target, |
| const std::string & | influenceName, | ||
| luabind::object const & | influenceParams | ||
| ) |
|
static |
|
virtual |
|
virtual |
Performs processing that should occur when the entity is destroyed.
Reimplemented from DtScriptInterface.
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Weather related accessors. See code or lua documentation for more specifics
|
virtual |
Calls to effect how long the simulation will run
|
virtual |
Calls to effect how long the simulation will run
|
virtual |
Calls to effect how long the simulation will run
|
virtual |
Commands that are used to manage user response questions asked from lua scripts Ask the user a question. The method returns the question id that is used in subsequent question methods. The user, when the question is answered, will only return a single response Display flags are: 0 - Buttons 1 - Radio buttons 2 - Combo box
|
virtual |
Commands that are used to manage user response questions asked from lua scripts Ask the user a question. The method returns the question id that is used in subsequent question methods. The user, when the question is answered, will only return a single response Display flags are: 0 - Buttons 1 - Radio buttons 2 - Combo box
|
virtual |
Commands that are used to manage user response questions asked from lua scripts Ask the user a question. The method returns the question id that is used in subsequent question methods. The user, when the question is answered, will only return a single response Display flags are: 0 - Buttons 1 - Radio buttons 2 - Combo box
|
virtual |
Commands that are used to manage user response questions asked from lua scripts Ask the user a question. The method returns the question id that is used in subsequent question methods. The user, when the question is answered, will only return a single response Display flags are: 0 - Buttons 1 - Radio buttons 2 - Combo box
Returns the status of the user question: -1 - Not yet answered 0+ - Answered and the option the user selected.
|
virtual |
Cancels the question asked of the user.
| DtScriptVrfObject DtLuaScriptInterfaceImpl::luaCreateEntity | ( | luabind::object const & | parameters | ) |
Create an entity.
Series of create commands that will use base DtCreateObjectBuilder to create the object and return the created object
| DtScriptVrfObject DtLuaScriptInterfaceImpl::luaGetGlobalWeather | ( | ) |
Returns the current global weather object. This can be used for changing global weather.
| DtScriptVrfObject DtLuaScriptInterfaceImpl::luaCreateTacticalGraphic | ( | luabind::object const & | parameters | ) |
Create a tactical graphic. Must specify name or type.
| DtScriptVrfObject DtLuaScriptInterfaceImpl::luaCreateObstacle | ( | luabind::object const & | parameters | ) |
Create an obstacle.
| DtScriptVrfObject DtLuaScriptInterfaceImpl::luaCreateRoute | ( | luabind::object const & | parameters | ) |
Create a route.
| DtScriptVrfObject DtLuaScriptInterfaceImpl::luaCreateArea | ( | luabind::object const & | parameters | ) |
Create an area.
| DtScriptVrfObject DtLuaScriptInterfaceImpl::luaCreateWaypoint | ( | luabind::object const & | parameters | ) |
Create a waypoint.
| DtScriptVrfObject DtLuaScriptInterfaceImpl::luaCreatePhaseLine | ( | luabind::object const & | parameters | ) |
Creates a phase line.
| unsigned DtLuaScriptInterfaceImpl::luaBitwiseOr | ( | unsigned | val1, |
| unsigned | val2 | ||
| ) |
Series of bitwise operations
| unsigned DtLuaScriptInterfaceImpl::luaBitwiseAnd | ( | unsigned | val1, |
| unsigned | val2 | ||
| ) |
Series of bitwise operations
| unsigned DtLuaScriptInterfaceImpl::luaBitwiseXor | ( | unsigned | val1, |
| unsigned | val2 | ||
| ) |
Series of bitwise operations
| unsigned DtLuaScriptInterfaceImpl::luaBitwiseNot | ( | unsigned | val | ) |
Series of bitwise operations
| unsigned DtLuaScriptInterfaceImpl::luaBitwiseLeftShift | ( | unsigned | val, |
| unsigned | shift | ||
| ) |
Series of bitwise operations
| unsigned DtLuaScriptInterfaceImpl::luaBitwiseRightShift | ( | unsigned | val, |
| unsigned | shift | ||
| ) |
Series of bitwise operations
|
virtual |
Adds a callback to be invoked after the specified type of set data request is executed. (
( const std::string& setDataType, DtScriptFunctionReferencePtr functionReference)
|
virtual |
Remove a callback invoked after the specified type of set data request is executed. (
( const std::string& setDataType, DtScriptFunctionReferencePtr functionReference)
|
virtual |
Invokes a post set data callback for a lua script.
functionReference must be a shared_ptr to a DtLuaScriptFunctionRefernce.
Implements DtScriptInterface.
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |