| Quintiq file version 2.0 | 
| #parent: #root | 
| Method SendDataRequestSetBulkTransmission (LibDEF_Systems targets_i, LibDEF_Set set_i, Boolean isNewSet_i,  | 
|   NamedValueTree cachedSetNvt_i) | 
| { | 
|   Description: 'Send a Data-Request message of that Set which has been updated in DataRepository in bulk (non-chunked tranmission).' | 
|   TextBody: | 
|   [* | 
|     nvt := LibDEF_DataAccessor::CreateMessageData(); | 
|      | 
|     headerType := ifexpr( isNewSet_i,  | 
|                           LibDEF_DataAccessor::TYPE_DATA_SETCREATED(),  | 
|                           LibDEF_DataAccessor::TYPE_DATA_SETUPDATED() ); | 
|      | 
|     // define Type and required Header | 
|     LibDEF_DataAccessor::SetDataHeaderProperty( nvt, LibDEF_DataAccessor::HEADER_TYPE(),           headerType ); | 
|     LibDEF_DataAccessor::SetDataHeaderProperty( nvt, LibDEF_DataAccessor::HEADER_SETGUID(),        set_i.GUID() ); | 
|     LibDEF_DataAccessor::SetDataHeaderProperty( nvt, LibDEF_DataAccessor::HEADER_SETLASTUPDATED(), set_i.LastUpdated() ); | 
|      | 
|     // Fill in the data body of the NVT message with the Set (either with the given cached Set NVT or export a new NVT from the Set). | 
|     // To save performance cost on exporting the set, a cached Set NVT can be given by the caller method | 
|     // so we don't need to do the NVTIO::Export anymore. | 
|     if( not isnull( cachedSetNvt_i ) ) | 
|     { | 
|       LibDEF_DataAccessor::SetDataBody( nvt, cachedSetNvt_i ); | 
|     } | 
|     else | 
|     { | 
|       LibDEF_DataAccessor::SetDataBody( nvt, NamedValueTreeIO::Export( set_i ) ); | 
|     } | 
|      | 
|     // some local variables | 
|     channel    := set_i.SetType().Channel(); | 
|     dataBroker := this.DataBroker(); | 
|      | 
|     traverse( targets_i, Elements, target ) | 
|     { | 
|       event := dataBroker.EventCreate( target, false ); | 
|       LibDEF_Util::EventLog( event, "Sending " + headerType + " request to system '" + target.Name() + "'" ); | 
|      | 
|       dataBroker.SendData( target, nvt, LibDEF_DataAccessor::KIND_REQUEST(), event, | 
|                            channel.Name(), channel.MajorVersion(), channel.MinorVersion() ); | 
|     } | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |