Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
Bulk Data NT
Software Design and How-to Manual
Approved by:Date:Signature:
ESO
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Keywords:
Change Record
REVISION | DATE | AUTHOR | SECTION/PAGE AFFECTED | REMARKS |
1.0 | 24-07-2013 | B. Jeram | All | Created. |
Table of Contents
1 Overview
2 Design and Implementation
2.1 Basic concepts
2.2 C++ API
2.2.1 Sender stream – class BulkDataNTSenderStream
2.2.2 Sender flow - class BulkDataNTSenderFlow
2.2.3 Sender flow status callback – class BulkDataNTSenderFlowStatusCallback
2.2.4 Receiver stream – class BulkDataNTReceiverStream<>
2.2.5 Receiver flow – class BulkDataNTReceiverFlow
2.2.6 Receiver callback – class BulkDataNTCallback
2.2.7 Configuration classes
2.3 ACS component (IDL)
2.3.1 Sender component - IDL: BulkDataSender and C++:BulkDataNTSenderImpl
2.3.2 Receiver component - IDL: BulkDataReceiver and C++:BulkDataNTReceiverImpl< TCallback>
2.4 Configuration data base (CDB)
2.4.1 Reading stream/flow configuration using C++ API
...
The sender stream class represents sender stream.
Sender stream constructor. As first parameter it takes the (sender) stream name. Optional it is possible to give configuration (SenderStreamConfiguration) as second parameter; otherwise a default sender stream configuration is used:
BulkDataNTSenderStream(const char *name, const SenderStreamConfiguration &)
A method to create a new sender flow (BulkDataNTSenderFlow) on the sender stream. As first parameter it takes (receiver) flow name. Optional is possible to provide also sender flow configuration (SenderFlowConfiguration), a sender flow status callback (BulkDataNTSenderFlowStatusCallback), and a flag if the callback should be deleted with the flow.
BulkDataNTSenderFlow* createFlow(const char *flowName, const SenderFlowConfiguration &cfg, BulkDataNTSenderFlowStatusCallback *cb,bool releaseCB)
An already created sender flow can be retrieved from the sender stream using flow name with the following method:
BulkDataNTSenderFlow * getFlow(const char *flowName)
Anchor | ||||
---|---|---|---|---|
|
...
If the CDB configuration is used in for defineing and configuring streams and flows inside a component the names of the stream and flows are equal to the corresponding names in the CDB. We can say that the stream/flow name and the configuration name are bound together.With the new bulk data it is possible to distinguish between stream/flow name and the configuration name. For this purpose it was added functionality to easy use the CDB configuration also directly from C++ API. In such a way we can for example define a default configuration(s) for streams/flows that can be used in someone's application/component. As described in section 2.2.7 there are defined 4 classes which instance represents configuring for a stream/flow. The configuration can be feed by invoking proper setter method(s), or it can be read from CDB.
The best is to look into an example how to retrieve a (default) configuration = how to use the C++ API: Let's assume that we have in CDB (alma branch) under folder DefaultCorrBDNTCfg in file DefaultCorrBDNTCfg.xml following configuration:
...
<ReceiverStream Name="DefaultCORRStreamCfg">
<ReceiverFlow Name="DefaultCORRSpectralDataFlowCfg"
cbReceiveProcessTimeoutSec="0.02"
>
</ReceiverFlow>
<ReceiverFlow Name="DefaultCORRXYZFlowCfg"/>
</ReceiverStream>
..
and we would like to use this configuration for our stream(s) and flow(s).First we have to obtain/read the (XML) data, in the standard way from the CDB:
CDB::DAL_ptr dal_p = getContainerServices()->getCDB();
ACE_CString CDBpath="alma/";
CDBpath += "DefaultCorrBDNTCfg"; //node name in CDB like
char *xmlNode = dal_p->get_DAO(CDBpath.c_str());
So now we have the configuration XML string from CDB which should be fed to the parser:
BulkDataConfigurationParser parser_m = new BulkDataConfigurationParser( "DefaultCorrBDNTCfg{*}" );
//if you want to have more than one BulkDataConfigurationParser (=more than one cfg node in CDB), should each have unique name / could be component name.
parser_m->parseReceiverConfig(xmlNode); //xmlNode can be also a XML string
Now, we have to obtain proper the configuration from the parser, in this case for ReceiverStream (ReceiverStreamConfiguration) and ReceiverFlow (ReceiverFlowConfiguration), but it is equivalent for the sender side (SenderStreamConfiguration / SenderFlowConfiguration)
ReceiverStreamConfiguration* rcvStrCfg = parser_m->getReceiverStreamConfiguration("DefaultCORRStreamCfg"); // get Receiver Stream cfg
// now we create receiver stream with the configuration
BulkDataNTReceiverStream<MyCallback> stream = new BulkDataNTReceiverStream<MyCallback>("MyStream", *{}rcvStrCfg{*});
And similar we get the configuration for the ReceiverFlow:
ReceiverFlowConfiguration {}rcvSpecDataFlowCfg* = parser_m->getReceiverFlowConfiguration("DefaultCORRStreamCfg", "DefaultCORRSpectralDataFlowCfg");
BulkDataNTReceiverFlow * specDataFlow = stream->createFlow("SpectralDataFlow", {}rcvSpecDataFlowCfg{*});