:orphan: .. **************************************************************************** .. CUI//REL TO USA ONLY .. .. The Advanced Framework for Simulation, Integration, and Modeling (AFSIM) .. .. The use, dissemination or disclosure of data in this file is subject to .. limitation or restriction. See accompanying README and LICENSE for details. .. **************************************************************************** WsfBMAssignmentMessage ---------------------- .. class:: WsfBMAssignmentMessage **WsfBMAssignmentMessage** is the script interface for the battle manager assignment messages. Methods ======= .. method:: void SetAssignmentTime(double time_seconds) Sets the time of the assignment in seconds since the simulation start. .. method:: double GetAssignmentTime() Returns the time of the assignment in seconds since the simulation start. .. method:: void SetAssignedID(int assigned_platform_id, int assigned_weapon_index) Sets the assigned weapon within the assignment message. **Parameters** **int assigned_platform_id:** Platform id of the assigned asset. **int weapon_idx:** Weapon index(0-based) of the :class:`WsfWeapon` on the reported platform for this assignment. .. method:: int GetAssignedUnitID() Returns the Platform id of the assigned asset from the call to `SetAssignedID <#WsfBMAssignmentMessage.SetAssignedID>`__. .. method:: int GetAssignedWeaponID() Returns the Weapon index(0-based) of the :class:`WsfWeapon` on the reported platform for this assignment. .. method:: void SetTrackID(int reporting_platform_idx, int tan) Sets the track for the assignment. **Parameters** **int reporting_platform_idx:** Reporting Platform Index. **int tan:** Track number. .. method:: int GetTrackingSystemID() Gets the reporting_platform_idx set within the [SetTrackID]{#SetTrackID} call. .. method:: int GetTrackID() Gets the tan set within the [SetTrackID]{#SetTrackID} call. .. method:: WsfTrackId GetTrackID() Gets the :class:`WsfTrackId` of the assignment track. .. method:: void SetInitiatingID(int assignment_initiator_platform_id) Sets the platform id of the assignment initiator. In the case of a delegate assignment, this will be the original assigning platform id. .. method:: int GetInitiatingUnitID() Returns the platform id of the assignment initiator. In the case of a delegate assignment, this will be the original assigning platform id. .. method:: void SetAssigningID(int assigning_platform_id) Sets the platform id of the assigning platform id. For commit (non-delegate) assignments, this will be the same as the initiating platform id. .. method:: int GetAssigningUnitID() Returns the platform id of the assigning platform id. For commit (non-delegate) assignments, this will be the same as the initiating platform id. .. method:: void SetSelfDefenseFlag(bool is_self_defense_assignment) Sets whether the assignment is a self-defense assignment if true, otherwise, a commanded assignment if false. This is for use between a weapons manager and a weapon, but if a self defense assignment is made at a lower level, this will need to be recorded in the assignment status report as well. .. method:: bool GetSelfDefenseFlag() Returns whether the assignment is a self-defense assignment if true, otherwise, a commanded assignment if false. This is for use between a weapons manager and a weapon, but if a self defense assignment is made at a lower level, this will need to be recorded in the assignment status report as well. .. method:: void SetMaxFiringTime(double max_time_seconds) Sets the max time allowed for the assignment prosecution. .. method:: double GetMaxFiringTime() Returns the max time allowed for the assignment prosecution. .. method:: void SetAssignmentReasonNewAssignment() Sets the reason for the assignment message because it is a new assignment. .. method:: void SetAssignmentReasonRetransmit() Sets the reason for the assignment message because it is a retransmit. .. method:: void SetAssignmentReasonUpdate() Sets the reason for the assignment message because it is an update to an existing assignment. .. method:: void SetAssignmentReasonReassignment() Sets the reason for the assignment message because it is a reassignment. .. method:: void SetAssignmentReasonCancel() Sets the reason for the assignment message because it is a cancellation to an existing assignment. .. method:: void IsAssignmentReasonNewAssignment() Returns true if the assignment reason was set with `SetAssignmentReasonNewAssignment <#WsfBMAssignmentMessage.SetAssignmentReasonNewAssignment>`__ , otherwise false. .. method:: void IsAssignmentReasonRetransmit() Returns true if the assignment reason was set with `IsAssignmentReasonRetransmit <#WsfBMAssignmentMessage.IsAssignmentReasonRetransmit>`__, otherwise false. .. method:: void IsAssignmentReasonUpdate() Returns true if the assignment reason was set with `IsAssignmentReasonUpdate <#WsfBMAssignmentMessage.IsAssignmentReasonUpdate>`__, otherwise false. .. method:: void IsAssignmentReasonReassignment() Returns true if the assignment reason was set with `IsAssignmentReasonReassignment <#WsfBMAssignmentMessage.IsAssignmentReasonReassignment>`__, otherwise false. .. method:: void IsAssignmentReasonCancel() Returns true if the assignment reason was set with `IsAssignmentReasonCancel <#WsfBMAssignmentMessage.IsAssignmentReasonCancel>`__, otherwise false. .. method:: string GetAssignmentReasonString() Convenience function for returning a string version of the assignment reason for debugging or logging purposes. .. method:: void SetShotDoctrineS1() Sets the shot doctrine for the assignment to Shoot-1. .. method:: void SetShotDoctrineS2() Sets the shot doctrine for the assignment to Shoot-2. .. method:: void SetShotDoctrineSLS() Sets the shot doctrine for the assignment to Shoot-Look-Shoot. .. method:: bool IsShotDoctrineS1() Returns true if the shot doctrine for the assignment is Shoot-1. .. method:: bool IsShotDoctrineS2() Returns true if the shot doctrine for the assignment is Shoot-2. .. method:: bool IsShotDoctrineSLS() Returns true if the shot doctrine for the assignment is Shoot-Look-Shoot. .. method:: string GetShotDoctrineString() Convenience function for returning a string version of the shot doctrine for debugging or logging purposes. .. method:: void SetTransmittedFlag() Sets the assignment as having been transmitted. **Primarily a Disseminate C^2 Interface** .. method:: bool GetTransmittedFlag() Returns true if the assignment has been marked as transmitted, otherwise false. .. method:: void Print() Logs the assignment message to the log output stream.