AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface

◆ BulkDataSds() [2/2]

drama::BulkDataSds::BulkDataSds ( std::weak_ptr< Task theTask,
const sds::Id SdsTemplate,
ShareType  type = ShareType::Create,
bool  Create = true,
bool  DeleteOnDestruct = true,
void Address = nullptr,
const std::string &  Name = "",
int  Key = 0 
)

Define a bulk data shared memory segment of the specified type for use with DRAMA 2 methods which can send bulk data, for transfer of an SDS structure.

The parameters for this routine are used quite differently in the different systems for which DRAMA is implemented, and these system dependent details are described in more detail below.

The bulk data segment is created, and the SDS item is exported into it.

Parameters
theTaskThe DRAMA Task we are part of. This is passed by pointer, but BulkDataSds is not taking ownership of the subject object, which must continue to exist until the BulkDataSds object is destroyed.
SdsTemplateTemplate Sds structure. The SDS structure placed in the shared memory shall be created using this SDS id and the ExportDefined() method. This allow you to create a large SDS array without defining it (and hence not requiring all the memory needed) as the template for the data in this structure.
typeThe type of the shared memory item.
CreateIf true, the memory section does not actually exist and this routine is to create it.
DeleteOnDestructIf set true, then the shared memory segment will be deleted when the BulkData item destructor is invoked.
AddressOn systems with global address spaces, eg. VxWorks, the address of the memory is enough to specify it completely - together with its size. In any case, if the section is already mapped, this argument must specify the address at which it is mapped. If the section is created by this routine, it will ignored.
NameUsed to identify the mapped section on some machines. On UNIX, for example, if mapped files are used, this is the file name in question. If Name is not actually used on the current system it should be passed as an empty string.
KeyOn some systems, this is an alternative way of specifying the mapped section. For example, if System V shared memory is used under UNIX, this is the identifier for that shared memory.