|
WSF
|
#include "script/WsfScriptPlatformPartClass.hpp"#include "UtMemory.hpp"#include "WsfGroup.hpp"#include "WsfGroupManager.hpp"#include "WsfPlatform.hpp"#include "WsfPlatformPart.hpp"#include "WsfScriptContext.hpp"#include "WsfSimulation.hpp"#include "WsfStringId.hpp"#include "script/WsfScriptDefs.hpp"
Functions | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, Platform, 0, "WsfPlatform", "") | |
| UT_DEFINE_SCRIPT_METHOD_NOCHECK (WsfScriptPlatformPartClass, WsfPlatformPart, IsTurnedOff, 0, "bool", "") | |
| UT_DEFINE_SCRIPT_METHOD_NOCHECK (WsfScriptPlatformPartClass, WsfPlatformPart, IsTurnedOn, 0, "bool", "") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, InitiallyTurnedOn, 0, "bool", "") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, TimeSinceLastStatusChange, 0, "double", "") | |
| UT_DEFINE_SCRIPT_METHOD_NOCHECK (WsfScriptPlatformPartClass, WsfPlatformPart, IsNonOperational, 0, "bool", "") | |
| UT_DEFINE_SCRIPT_METHOD_NOCHECK (WsfScriptPlatformPartClass, WsfPlatformPart, IsOperational, 0, "bool", "") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, SetOperational, 1, "bool", "bool") | |
| if (aObjectPtr !=nullptr) | |
| aReturnVal | SetBool (canBeMadeOper) |
| aReturnVal | SetBool (canBeMadeNonOper) |
| aReturnVal | SetBool (canBeTurnedOn) |
| aReturnVal | SetBool (canBeTurnedOff) |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, SendMessage_1, 1, "void", "WsfMessage") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, SendMessage_2, 2, "void", "WsfMessage, string") | |
| WsfStringId | processorId (aVarArgs[1].GetString()) |
| if (messagePtr !=nullptr) | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, SetDebugEnabled, 1, "void", "bool") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, DebugEnabled, 0, "bool", "") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, SetDamageFactor, 1, "void", "double") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, DamageFactor, 0, "double", "") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, CategoryMemberOf, 1, "bool", "string") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, GroupMemberOf_2, 1, "bool", "string") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, GroupMemberOf_3, 1, "bool", "WsfGroup") | |
| if ((groupPtr !=nullptr) &&groupPtr->IsGroupMember(aObjectPtr->GetPlatform() ->GetIndex(), aObjectPtr->GetUniqueId())) | |
| aReturnVal | SetPointer (new UtScriptRef(nullptr, aReturnClassPtr, UtScriptRef::cDONT_MANAGE)) |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, GroupsByName, 0, "Array<string>", "") | |
| GroupsByName(); returns list of group names that this platform part is a member of. | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, Groups, 0, "Array<WsfGroup>", "") | |
| Groups(); returns list of group objects that this platform part is a member of. | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, GroupJoin, 1, "void", "string") | |
| GroupJoin(int); add the platform part to the given group. | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptPlatformPartClass, WsfPlatformPart, GroupLeave, 1, "void", "string") | |
| GroupLeave(int); remove the platform part from the given group. | |
Variables | |
| WsfGroup * | groupPtr = SIMULATION->GetGroupManager().GetGroup(tempIdList[aVarArgs[0].GetInt()]) |
| if | ( | (groupPtr !=nullptr) &&groupPtr->IsGroupMember(aObjectPtr->GetPlatform() ->GetIndex(), aObjectPtr->GetUniqueId()) | ) |
| if | ( | aObjectPtr ! | = nullptr | ) |
| if | ( | messagePtr ! | = nullptr | ) |
References processorId(), simTime, and TIME_NOW.
| WsfStringId processorId | ( | aVarArgs. | GetString()[1] | ) |
Referenced by WsfXIO_TaskService::HandleRequest(), and if().
| aReturnVal SetBool | ( | canBeMadeNonOper | ) |
| aReturnVal SetBool | ( | canBeMadeOper | ) |
| aReturnVal SetBool | ( | canBeTurnedOff | ) |
| aReturnVal SetBool | ( | canBeTurnedOn | ) |
| aReturnVal SetPointer | ( | new | UtScriptRefnullptr, aReturnClassPtr, UtScriptRef::cDONT_MANAGE | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| CategoryMemberOf | , | ||
| 1 | , | ||
| "bool" | , | ||
| "string" | ) |
bool isCategoryMemberOf = CategoryMemberOf(string aCategory); Returns true if the platform part is a member of the given category.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| DamageFactor | , | ||
| 0 | , | ||
| "double" | , | ||
| "" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| DebugEnabled | , | ||
| 0 | , | ||
| "bool" | , | ||
| "" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| GroupJoin | , | ||
| 1 | , | ||
| "void" | , | ||
| "string" | ) |
GroupJoin(int); add the platform part to the given group.
References groupPtr, and SIMULATION.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| GroupLeave | , | ||
| 1 | , | ||
| "void" | , | ||
| "string" | ) |
GroupLeave(int); remove the platform part from the given group.
References groupPtr, and SIMULATION.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| GroupMemberOf_2 | , | ||
| 1 | , | ||
| "bool" | , | ||
| "string" | ) |
bool isGroupMemberOf = GroupMemberOf(string aGroupName); Returns true if the platform part is a member of the given group.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| GroupMemberOf_3 | , | ||
| 1 | , | ||
| "bool" | , | ||
| "WsfGroup" | ) |
bool isGroupMemberOf = GroupMemberOf(WsfGroup aGroup); Returns true if the platform part is a member of the given group.
References groupPtr.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| Groups | , | ||
| 0 | , | ||
| "Array<WsfGroup>" | , | ||
| "" | ) |
Groups(); returns list of group objects that this platform part is a member of.
References groupPtr, and SIMULATION.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| GroupsByName | , | ||
| 0 | , | ||
| "Array<string>" | , | ||
| "" | ) |
GroupsByName(); returns list of group names that this platform part is a member of.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| InitiallyTurnedOn | , | ||
| 0 | , | ||
| "bool" | , | ||
| "" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| Platform | , | ||
| 0 | , | ||
| "WsfPlatform" | , | ||
| "" | ) |
References platformPtr.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| SendMessage_1 | , | ||
| 1 | , | ||
| "void" | , | ||
| "WsfMessage" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| SendMessage_2 | , | ||
| 2 | , | ||
| "void" | , | ||
| " | WsfMessage, | ||
| string" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| SetDamageFactor | , | ||
| 1 | , | ||
| "void" | , | ||
| "double" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| SetDebugEnabled | , | ||
| 1 | , | ||
| "void" | , | ||
| "bool" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| SetOperational | , | ||
| 1 | , | ||
| "bool" | , | ||
| "bool" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| TimeSinceLastStatusChange | , | ||
| 0 | , | ||
| "double" | , | ||
| "" | ) |
| UT_DEFINE_SCRIPT_METHOD_NOCHECK | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| IsNonOperational | , | ||
| 0 | , | ||
| "bool" | , | ||
| "" | ) |
| UT_DEFINE_SCRIPT_METHOD_NOCHECK | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| IsOperational | , | ||
| 0 | , | ||
| "bool" | , | ||
| "" | ) |
| UT_DEFINE_SCRIPT_METHOD_NOCHECK | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| IsTurnedOff | , | ||
| 0 | , | ||
| "bool" | , | ||
| "" | ) |
| UT_DEFINE_SCRIPT_METHOD_NOCHECK | ( | WsfScriptPlatformPartClass | , |
| WsfPlatformPart | , | ||
| IsTurnedOn | , | ||
| 0 | , | ||
| "bool" | , | ||
| "" | ) |
| WsfGroup* groupPtr = SIMULATION->GetGroupManager().GetGroup(tempIdList[aVarArgs[0].GetInt()]) |