<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hello.</div>
<div><br>
</div>
<div>I’ve been using the EtherCAT master for years to great success, but I’m stuck on a problem I can’t figure out that I think several people here are doing successfully. I can’t implement distributed clocks in my application.</div>
<div><br>
</div>
<div>I am having the same problem on two systems I have up and running:</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>SYSTEM ONE:</div>
<div><br>
</div>
<div>EtherLAB Master 1.52, E1000E Driver, Scan Rate 4Khz, Ubuntu Server 14.04LTS, RT-PREEMPT 3.12.50-rt68</div>
<div><br>
</div>
<div>alias=0, position=0, device=EK1100 </div>
<div>
<div>alias=0, position=1, device=EL1104 </div>
<div>alias=0, position=2, device=EL2004</div>
<div>alias=0, position=3, device=EL9510</div>
<div>alias=0, position=4, device=EL3356</div>
<div>alias=0, position=5, device=Kollmorgen AKD</div>
<div>alias=0, position=6, device=MTS LVDT</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>SYSTEM TWO:</div>
<div><br>
</div>
<div>EtherLAB Master 1.52, E1000E Driver, Scan Rate 8Khz, Ubuntu Server 14.04LTS, RT-PREEMPT 3.12.50-rt68</div>
<div><br>
</div>
<div>
<div>alias=0, position=0, device=EK1100</div>
<div>alias=0, position=1, device=EL3001</div>
<div>alias=0, position=2, device=EL1104</div>
<div>alias=0, position=3, device=EL1104</div>
<div>alias=0, position=4, device=EL1104</div>
<div>alias=0, position=5, device=EL2004</div>
<div>alias=0, position=6, device=EL2004</div>
<div>alias=0, position=7, device=EL9505</div>
<div>alias=0, position=8, device=EL7041</div>
<div>alias=0, position=9, device=EL7041</div>
<div>alias=0, position=10, device=EL7041</div>
<div>alias=0, position=11, device=EL7041</div>
<div>alias=0, position=12, device=EL7041</div>
<div>alias=0, position=13, device=EL7041</div>
<div>alias=0, position=14, device=EK1110</div>
<div>alias=1, position=0, device=SIGMA5-05</div>
<div>alias=2, position=0, device=Yaskawa SIGMA5-05</div>
<div>alias=3, position=0, device=Yaskawa SIGMA5-05</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Both of the system are fully operational. However, for various reasons, I need to implement distributed clocks on these systems. I’ve never been able to get this to work.</div>
<div><br>
</div>
<div><br>
</div>
<div>What follows is the code I used for both systems to try this. I read through examples on the mailing list, plus the examples, but I’m not seeing what I’m doing wrong. The result is always the same: all the fieldbus cards go into operation, but the servo
drives won’t because of “bad configuration.” Take out the distributed clock code, and they work fine. I’m getting away with it for now, but I do need better clock resolution.</div>
<div><br>
</div>
<div>The systems have an LRW domain, then a separate read domain and write domain for the servo drive(s) for a total of three domains (LRW, read, write). The yaskawa drives necessitate this. The scan rate is usually 4Khz, but I have tried it at both 1Khz and
8Khz and gotten the same results. Everything about the implementation is fairly straight-forward. There’s just something fundamental about the DC configuration that I’m not understanding.</div>
<div><br>
</div>
<div>Almost all the code below is taken right from the examples or the message boards (thanks, everybody!). If anyone could tell me what I’m going wrong or offer any insights, it’s greatly appreciated. For brevity, I tried to narrow it down to relevant parts,
but please let me know any additional information or code I can provide.</div>
<div><br>
</div>
<div>Thank you in advance,</div>
<div>Tom</div>
<div><br>
</div>
<div><br>
</div>
<div>**********************************************************</div>
<div><br>
</div>
<div>
<div>// EtherCAT distributed clock variables</div>
<div><br>
</div>
<div>#define DC_FILTER_CNT 1024</div>
<div>#define SYNC_MASTER_TO_REF 1</div>
<div><br>
</div>
<div>static uint64_t dc_start_time_ns = 0LL;</div>
<div>static uint64_t dc_time_ns = 0;</div>
<div>static uint8_t dc_started = 0;</div>
<div>static int32_t dc_diff_ns = 0;</div>
<div>static int32_t prev_dc_diff_ns = 0;</div>
<div>static int64_t dc_diff_total_ns = 0LL;</div>
<div>static int64_t dc_delta_total_ns = 0LL;</div>
<div>static int dc_filter_idx = 0;</div>
<div>static int64_t dc_adjust_ns;</div>
<div>static int64_t system_time_base = 0LL;</div>
<div>static uint64_t wakeup_time = 0LL;</div>
<div>static uint64_t overruns = 0LL;</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>/** Get the time in ns for the current cpu, adjusted by system_time_base.</div>
<div> *</div>
<div> * \attention Rather than calling rt_get_time_ns() directly, all application</div>
<div> * time calls should use this method instead.</div>
<div> *</div>
<div> * \ret The time in ns.</div>
<div> */</div>
<div>uint64_t system_time_ns(void)</div>
<div>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>struct timespec ts;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>clock_gettime(GLOBAL_CLOCK_TO_USE, &ts);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return TIMESPEC2NS(ts);</div>
<div>}</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>static</div>
<div>void sync_distributed_clocks(void)</div>
<div>{</div>
<div> uint32_t ref_time = 0;</div>
<div> uint64_t prev_app_time = dc_time_ns;</div>
<div><br>
</div>
<div> dc_time_ns = system_time_ns();</div>
<div><br>
</div>
<div> // set master time in nano-seconds</div>
<div> ecrt_master_application_time(master_, dc_time_ns);</div>
<div><br>
</div>
<div> // get reference clock time to synchronize master cycle</div>
<div> ecrt_master_reference_clock_time(master_, &ref_time);</div>
<div> dc_diff_ns = (uint32_t) prev_app_time - ref_time;</div>
<div><br>
</div>
<div> // call to sync slaves to ref slave</div>
<div> ecrt_master_sync_slave_clocks(master_);</div>
<div>}</div>
<div><br>
</div>
<div><br>
</div>
<div>/** Return the sign of a number</div>
<div> *</div>
<div> * ie -1 for -ve value, 0 for 0, +1 for +ve value</div>
<div> *</div>
<div> * \retval the sign of the value</div>
<div> */</div>
<div>#define sign(val) \</div>
<div> ({ typeof (val) _val = (val); \</div>
<div> ((_val > 0) - (_val < 0)); })</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><br>
</div>
<div>/*****************************************************************************/</div>
<div><br>
</div>
<div>/** Update the master time based on ref slaves time diff</div>
<div> *</div>
<div> * called after the ethercat frame is sent to avoid time jitter in</div>
<div> * sync_distributed_clocks()</div>
<div> */</div>
<div> </div>
<div>static unsigned int cycle_ns = 1000000; // 1 millisecond </div>
<div><br>
</div>
<div>void update_master_clock(void)</div>
<div>{</div>
<div><br>
</div>
<div> // calc drift (via un-normalised time diff)</div>
<div> int32_t delta = dc_diff_ns - prev_dc_diff_ns;</div>
<div> prev_dc_diff_ns = dc_diff_ns;</div>
<div><br>
</div>
<div> // normalise the time diff</div>
<div> dc_diff_ns =</div>
<div> ((dc_diff_ns + (cycle_ns / 2)) % cycle_ns) - (cycle_ns / 2);</div>
<div><br>
</div>
<div> // only update if primary master</div>
<div> if (dc_started) {</div>
<div><br>
</div>
<div> // add to totals</div>
<div> dc_diff_total_ns += dc_diff_ns;</div>
<div> dc_delta_total_ns += delta;</div>
<div> dc_filter_idx++;</div>
<div><br>
</div>
<div> if (dc_filter_idx >= DC_FILTER_CNT) {</div>
<div> // add rounded delta average</div>
<div> dc_adjust_ns +=</div>
<div> ((dc_delta_total_ns + (DC_FILTER_CNT / 2)) / DC_FILTER_CNT);</div>
<div><br>
</div>
<div> // and add adjustment for general diff (to pull in drift)</div>
<div> dc_adjust_ns += sign(dc_diff_total_ns / DC_FILTER_CNT);</div>
<div><br>
</div>
<div> // limit crazy numbers (0.1% of std cycle time)</div>
<div> if (dc_adjust_ns < -1000) {</div>
<div> dc_adjust_ns = -1000;</div>
<div> }</div>
<div> if (dc_adjust_ns > 1000) {</div>
<div> dc_adjust_ns = 1000;</div>
<div> }</div>
<div><br>
</div>
<div> // reset</div>
<div> dc_diff_total_ns = 0LL;</div>
<div> dc_delta_total_ns = 0LL;</div>
<div> dc_filter_idx = 0;</div>
<div> }</div>
<div><br>
</div>
<div> // add cycles adjustment to time base (including a spot adjustment)</div>
<div> system_time_base += dc_adjust_ns + sign(dc_diff_ns);</div>
<div> }</div>
<div> else {</div>
<div> dc_started = (dc_diff_ns != 0);</div>
<div><br>
</div>
<div> if (dc_started) </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>{</div>
<div> // record the time of this initial cycle</div>
<div> dc_start_time_ns = dc_time_ns;</div>
<div> }</div>
<div> }</div>
<div><br>
</div>
<div>}</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>struct timespec dcTime_;</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>int</div>
<div>ecatMain_process(void* lp)</div>
<div>{</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_master_receive(master_);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>clock_gettime(CLOCK_REALTIME, &dcTime_);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_master_application_time(master_, TIMESPEC2NS(dcTime_));</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_master_sync_reference_clock(master_);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_master_sync_slave_clocks(master_);<span class="Apple-tab-span" style="white-space:pre">
</span></div>
<div><br>
</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_domain_process(lrwDomainMgr_.domain);<span class="Apple-tab-span" style="white-space:pre">
</span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_domain_process(noLrwWriteDomainMgr_.domain);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_domain_process(noLrwReadDomainMgr_.domain);<span class="Apple-tab-span" style="white-space:pre">
</span></div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>… // handle my business</div>
</div>
<div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>// write application time to master</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>clock_gettime(CLOCK_REALTIME, &dcTime_);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_master_application_time(master_, TIMESPEC2NS(dcTime_));</div>
<div><br>
</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>if (sync_ref_counter_) </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>sync_ref_counter_--;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>} </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>else </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>sync_ref_counter_ = 1; // sync every cycle</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_master_sync_reference_clock(master_);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>}</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// send process data</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_domain_queue(lrwDomainMgr_.domain);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_domain_queue(noLrwWriteDomainMgr_.domain);</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_domain_queue(noLrwReadDomainMgr_.domain);</div>
<div><br>
</div>
<div> </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// sync distributed clock just before master_send to set</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// most accurate master clock time</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>sync_distributed_clocks();</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// send EtherCAT data</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>ecrt_master_send(master_);</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// update the master clock</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// Note: called after ecrt_master_send() to reduce time</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// jitter in the sync_distributed_clocks() call</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>update_master_clock();</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return 1;</div>
<div>}</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>int</div>
<div>ecatMain_start(void* lp)</div>
<div>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>//</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// domain regs must end in a null entry</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>//</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>lrwDomainMgr_.domainRegs = realloc(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>lrwDomainMgr_.domainRegs, </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>sizeof(ec_pdo_entry_reg_t) * (lrwDomainMgr_.size + 1) );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>memset(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>&(lrwDomainMgr_.domainRegs[lrwDomainMgr_.size]),</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>0, </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>sizeof(ec_pdo_entry_reg_t) );<span class="Apple-tab-span" style="white-space:pre">
</span></div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>noLrwReadDomainMgr_.domainRegs = realloc(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>noLrwReadDomainMgr_.domainRegs, </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>sizeof(ec_pdo_entry_reg_t) * (noLrwReadDomainMgr_.size + 1) );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>memset(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>&(noLrwReadDomainMgr_.domainRegs[noLrwReadDomainMgr_.size]),</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>0, </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>sizeof(ec_pdo_entry_reg_t) );<span class="Apple-tab-span" style="white-space:pre">
</span></div>
<div><br>
</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>noLrwWriteDomainMgr_.domainRegs = realloc(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>noLrwWriteDomainMgr_.domainRegs, </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>sizeof(ec_pdo_entry_reg_t) * (noLrwWriteDomainMgr_.size + 1) );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>memset(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>&(noLrwWriteDomainMgr_.domainRegs[noLrwWriteDomainMgr_.size]),</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>0, </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>sizeof(ec_pdo_entry_reg_t) );<span class="Apple-tab-span" style="white-space:pre">
</span></div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>//</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// NOTE: the Output Domain must be registered with</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// ecrt_domain_reg_pdo_entry_list before the Input Domain otherwise you </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// will not have any data exchanged even though the drive goes into OP</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// mode.</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>//</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT("\nAttempting to register PDOs on WRITE ONLY domain...\n");</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>if (ecrt_domain_reg_pdo_entry_list(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>noLrwWriteDomainMgr_.domain, noLrwWriteDomainMgr_.domainRegs)) </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT("WRITE ONLY PDO entry registration failed!\n");</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return FALSE;</div>
<div> <span class="Apple-tab-span" style="white-space:pre"></span>}<span class="Apple-tab-span" style="white-space:pre">
</span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT("\nAttempting to register PDOs on READ ONLY domain...\n");</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>if (ecrt_domain_reg_pdo_entry_list(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>noLrwReadDomainMgr_.domain, noLrwReadDomainMgr_.domainRegs)) </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT("READ ONLY PDO entry registration failed!\n");</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return FALSE;</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>}<span class="Apple-tab-span" style="white-space:pre">
</span></div>
<div><br>
</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>//</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>// And now we register the bi-directional domain.</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>//</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT("\nAttempting to register PDOs on LRW domain...\n");</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>if (ecrt_domain_reg_pdo_entry_list(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>lrwDomainMgr_.domain, lrwDomainMgr_.domainRegs)) </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT("LRW PDO entry registration failed!\n");</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return FALSE;</div>
<div> <span class="Apple-tab-span" style="white-space:pre"></span>}<span class="Apple-tab-span" style="white-space:pre">
</span></div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>/*</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>* Finishes the configuration phase and prepares for cyclic operation.</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>* This function tells the master that the configuration phase </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>* is finished and the realtime operation will begin.</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>* The function allocates internal memory for the domains and calculates </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>* the logical FMMU addresses for domain members. </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>* It tells the master state machine that the bus configuration is </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>* now to be applied</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>*/</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT("\nAttempting to activate ECAT master...\n");<span class="Apple-tab-span" style="white-space:pre">
</span> </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>if (ecrt_master_activate(master_))</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>"%s Failed to activate master!\n",</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>__FUNCTION__ );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return FALSE;</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>}</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>/*</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>* Returns the domain's process data. </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>*/</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT( "%s getting LRW process data from master.\n", __FUNCTION__ );<span class="Apple-tab-span" style="white-space:pre">
</span> </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>if (!(lrwDomainMgr_.processData </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>= ecrt_domain_data(lrwDomainMgr_.domain))) </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>"%s set ecProcessData -- domain data is NULL!\n",</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>__FUNCTION__ );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return FALSE;</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>}</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>if (!(noLrwReadDomainMgr_.processData </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>= ecrt_domain_data(noLrwReadDomainMgr_.domain))) </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>"%s set read ProcessData -- domain data is NULL!\n",</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>__FUNCTION__ );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return FALSE;</div>
<div> }<span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>if (!(noLrwWriteDomainMgr_.processData </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>= ecrt_domain_data(noLrwWriteDomainMgr_.domain))) </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT(</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>"%s set write ProcessData -- domain data is NULL!\n",</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>__FUNCTION__ );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return FALSE;</div>
<div> }</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>… // blah blah blah</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>doScan_ = TRUE;</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>PRINT( "%s completed successfully.\n", __FUNCTION__ );</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>return TRUE;<span class="Apple-tab-span" style="white-space:pre">
</span></div>
<div>}</div>
</div>
<div>
<div id="">
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt;"><br>
</p>
</div>
</div>
</body>
</html>