WSF
WsfScriptPlatformPartClass.cpp File Reference
#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"
Include dependency graph for WsfScriptPlatformPartClass.cpp:

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

WsfGroupgroupPtr = SIMULATION->GetGroupManager().GetGroup(tempIdList[aVarArgs[0].GetInt()])

Function Documentation

◆ if() [1/3]

if ( (groupPtr !=nullptr) &&groupPtr->IsGroupMember(aObjectPtr->GetPlatform() ->GetIndex(), aObjectPtr->GetUniqueId()) )
Initial value:
{
WsfGroup* groupPtr = SIMULATION->GetGroupManager().GetGroup(aVarArgs[0].GetString())
#define SIMULATION
Definition WsfScriptDefs.hpp:26
WsfGroup * groupPtr
Definition WsfScriptPlatformClass.cpp:4783
A class to support the concept of 'groups' and 'group membership'.
Definition WsfGroup.hpp:30

WsfGroup GroupByName(string aGroupName); returns the WsfGroup object that matches the given name, if the platform part is a member.

References groupPtr.

◆ if() [2/3]

if ( aObjectPtr ! = nullptr)
Initial value:
{
bool canBeMadeNonOper = false

◆ if() [3/3]

if ( messagePtr ! = nullptr)

References processorId(), simTime, and TIME_NOW.

◆ processorId()

WsfStringId processorId ( aVarArgs. GetString()[1])

◆ SetBool() [1/4]

aReturnVal SetBool ( canBeMadeNonOper )

◆ SetBool() [2/4]

aReturnVal SetBool ( canBeMadeOper )

◆ SetBool() [3/4]

aReturnVal SetBool ( canBeTurnedOff )

◆ SetBool() [4/4]

aReturnVal SetBool ( canBeTurnedOn )

◆ SetPointer()

aReturnVal SetPointer ( new UtScriptRefnullptr, aReturnClassPtr, UtScriptRef::cDONT_MANAGE)

◆ UT_DEFINE_SCRIPT_METHOD() [1/17]

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() [2/17]

UT_DEFINE_SCRIPT_METHOD ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
DamageFactor ,
0 ,
"double" ,
""  )

◆ UT_DEFINE_SCRIPT_METHOD() [3/17]

UT_DEFINE_SCRIPT_METHOD ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
DebugEnabled ,
0 ,
"bool" ,
""  )

◆ UT_DEFINE_SCRIPT_METHOD() [4/17]

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() [5/17]

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() [6/17]

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() [7/17]

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() [8/17]

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() [9/17]

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() [10/17]

UT_DEFINE_SCRIPT_METHOD ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
InitiallyTurnedOn ,
0 ,
"bool" ,
""  )

◆ UT_DEFINE_SCRIPT_METHOD() [11/17]

UT_DEFINE_SCRIPT_METHOD ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
Platform ,
0 ,
"WsfPlatform" ,
""  )

References platformPtr.

◆ UT_DEFINE_SCRIPT_METHOD() [12/17]

UT_DEFINE_SCRIPT_METHOD ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
SendMessage_1 ,
1 ,
"void" ,
"WsfMessage"  )

References simTime, and TIME_NOW.

◆ UT_DEFINE_SCRIPT_METHOD() [13/17]

UT_DEFINE_SCRIPT_METHOD ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
SendMessage_2 ,
2 ,
"void" ,
" WsfMessage,
string"  )

References simTime, and TIME_NOW.

◆ UT_DEFINE_SCRIPT_METHOD() [14/17]

UT_DEFINE_SCRIPT_METHOD ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
SetDamageFactor ,
1 ,
"void" ,
"double"  )

References simTime, and TIME_NOW.

◆ UT_DEFINE_SCRIPT_METHOD() [15/17]

UT_DEFINE_SCRIPT_METHOD ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
SetDebugEnabled ,
1 ,
"void" ,
"bool"  )

◆ UT_DEFINE_SCRIPT_METHOD() [16/17]

UT_DEFINE_SCRIPT_METHOD ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
SetOperational ,
1 ,
"bool" ,
"bool"  )

References simTime, and TIME_NOW.

◆ UT_DEFINE_SCRIPT_METHOD() [17/17]

UT_DEFINE_SCRIPT_METHOD ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
TimeSinceLastStatusChange ,
0 ,
"double" ,
""  )

References simTime, and TIME_NOW.

◆ UT_DEFINE_SCRIPT_METHOD_NOCHECK() [1/4]

UT_DEFINE_SCRIPT_METHOD_NOCHECK ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
IsNonOperational ,
0 ,
"bool" ,
""  )

◆ UT_DEFINE_SCRIPT_METHOD_NOCHECK() [2/4]

UT_DEFINE_SCRIPT_METHOD_NOCHECK ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
IsOperational ,
0 ,
"bool" ,
""  )

◆ UT_DEFINE_SCRIPT_METHOD_NOCHECK() [3/4]

UT_DEFINE_SCRIPT_METHOD_NOCHECK ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
IsTurnedOff ,
0 ,
"bool" ,
""  )

◆ UT_DEFINE_SCRIPT_METHOD_NOCHECK() [4/4]

UT_DEFINE_SCRIPT_METHOD_NOCHECK ( WsfScriptPlatformPartClass ,
WsfPlatformPart ,
IsTurnedOn ,
0 ,
"bool" ,
""  )

Variable Documentation

◆ groupPtr

WsfGroup* groupPtr = SIMULATION->GetGroupManager().GetGroup(tempIdList[aVarArgs[0].GetInt()])

WsfGroup GroupByIndex(int aIndex); returns the WsfGroup object that is in the given element, if the platform part is a member

Copyrights Multiple, All Rights Reserved