nasa / TrickHLA

TrickHLA: An IEEE 1516 High Level Architecture (HLA) Simulation Interoperability Standard Implementation for Trick Base Simulations
Other
38 stars 15 forks source link

Support different HLA data rates on child threads. #102

Closed dandexter closed 1 year ago

dandexter commented 1 year ago

Received a request to allow child threads to send and receive cyclic HLA data at a different rate.

dandexter commented 1 year ago

TrickHLA will be designed to support different HLA data rates on child threads while supporting data coherency, but with the following constraints:

  1. The data cycle time for child threads cannot be any faster than the main thread data cycle time defined by the THLA simulation object.
  2. Child thread data cycle times must be an integer multiple of the main thread data cycle time (i.e., Tchild = N * Tmain).
  3. When the child thread data cycle time does not match the main thread data cycle time, you must specify the names of all the object instance used by the child thread.
  4. TrickHLA only supports data cycle times to the object instance level and not the individual object attribute level.
  5. If all the child thread data cycle times match the main thread data cycle time, you do not need to specify the object instance names used by each child thread.
  6. An object instance can be used by more than one child thread, but you must specify the object instance name for every child thread that uses the data.
    • To ensure data coherency, you will be constrained to using the same data cycle time for all child threads that use the same object instance.
  7. All object instances associated to a child thread must use the same data cycle time.
    • A child thread can only support one data cycle time used by all associated object instances to ensure data coherency.
  8. Data coherency is ensured over the duration of the data cycle time. Once in a data cycle, you will not receive any new data on the child thread until the data cycle frame boundary.
  9. Data coherency depends on you correctly specifying all the names of the object instances used by a child thread. If an object instance name is left off the list TrickHLA has no way of detecting this and there will be a data coherency problem for that HLA object instance.