Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Bulk Data NT


Software Design and How-to Manual
Approved by:Date:Signature:


Bogdan Jeram

ESO




Anchor
_Toc27296410
_Toc27296410
Anchor
_Toc27302051
_Toc27302051
Anchor
_Toc27358706
_Toc27358706
Anchor
_Toc27362838
_Toc27362838
Anchor
_Toc27362963
_Toc27362963
Anchor
_Toc34190578
_Toc34190578
Anchor
_Toc35406483
_Toc35406483
Anchor
_Toc35416745
_Toc35416745
Anchor
_Toc35416790
_Toc35416790
Anchor
_Toc35750019
_Toc35750019
Anchor
_Toc38344320
_Toc38344320
Anchor
_Toc38344362
_Toc38344362
Anchor
_Toc40083806
_Toc40083806
Anchor
_Toc40083848
_Toc40083848
Anchor
_Toc40152598
_Toc40152598
Anchor
_Toc40152639
_Toc40152639
Anchor
_Toc42323729
_Toc42323729
Anchor
_Toc42326706
_Toc42326706
Anchor
_Toc42330103
_Toc42330103
Anchor
_Toc54670633
_Toc54670633
Anchor
_Toc54680971
_Toc54680971
Anchor
_Toc54684036
_Toc54684036
Anchor
_Toc54684644
_Toc54684644
Anchor
_Toc54749332
_Toc54749332
Anchor
_Toc56053315
_Toc56053315
Anchor
_Toc56054995
_Toc56054995
Anchor
_Toc56489071
_Toc56489071
Anchor
_Toc56499476
_Toc56499476
Anchor
_Toc57097223
_Toc57097223
Anchor
_Toc109117447
_Toc109117447
Anchor
_Toc109117465
_Toc109117465
Anchor
_Toc109117494
_Toc109117494
Anchor
_Toc109117530
_Toc109117530
Anchor
_Toc124577070
_Toc124577070
Anchor
_Toc130882258
_Toc130882258
Anchor
_Toc185914933
_Toc185914933
Anchor
_Toc194461269
_Toc194461269
|Owner |Bogdan Jeram (bjeram@eso.org)|

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
_Toc362618014
_Toc362618014
Sender flow - class BulkDataNTSenderFlow

...

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{*});