Loading monitorCollectorJava/src/alma/TMCDB/MonitorCollectorImpl/MPboolean.java 0 → 100644 +171 −0 Original line number Original line Diff line number Diff line package alma.TMCDB.MonitorCollectorImpl; import java.util.logging.Logger; import org.omg.CORBA.SystemException; import alma.ACS.CBDescOut; import alma.ACS.CBbooleanOperations; import alma.ACS.CBbooleanPOA; import alma.ACS.CBbooleanPOATie; import alma.ACS.Property; import alma.ACS.ROboolean; import alma.ACS.RObooleanHelper; import alma.ACSErr.Completion; import alma.JavaContainerError.wrappers.AcsJContainerServicesEx; import alma.TMCDB.MonitorBlob; import alma.TMCDB.booleanBlobData; import alma.TMCDB.booleanBlobDataSeqHelper; import alma.acs.container.ContainerServices; public class MPboolean extends MonitorPointHelper implements CBbooleanOperations { private booleanBlobData[] blobDataSeq_m =null; private CBbooleanPOA server; private ROboolean property_m; public MPboolean(Logger log, String propertyName, long archivingInterval, Property propertyRef, MonitorBlob mb) { super(log, propertyName, archivingInterval, propertyRef, mb); server =new CBbooleanPOATie(this); monitorBlob_m.typeOfValue = alma.TMCDB.booleanValueType.value; //setMonitorServant(server); this.blobDataSeq_m =new booleanBlobData[prealocSeqLen_m]; seqLen_m = prealocSeqLen_m; try { property_m=RObooleanHelper.narrow(propertyRef); //m_logger.info("no such Characteristic for"+propertyName); if(property_m.default_timer_trigger()==0){ m_logger.info("Default_timer_trigger=0 in Property:"+propertyName); } } catch(Exception ex) { m_logger.info("no such Characteristic for"+ex.getMessage()); } m_logger.info("INIZIALIZZATA COMPONENTE "+propertyName); } @Override public void working(boolean value, Completion c, CBDescOut desc) { m_logger.info("---->Working on:"+propertyName_m); // Still place in current available buffer segments m_logger.info("--->Received:"+value); if ( curSeqPos_m < seqLen_m ) { // This log is commented because of operational constraints that are currently using 'debug' as operation log setting //ACS_SHORT_LOG((LM_DEBUG, "Adding data to buffer")); // Add data to current position // longBlobData a = new longBlobData(); // a.value = value; // a.time = c.timeStamp; // blobDataSeq_m[curSeqPos_m] = a; blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer System.out.print("--->Received:"+value); curSeqPos_m++; // Increment initial position pointer if buffer is full if (bufferFull) { System.out.println("Data lost from buffer"); curSeqInit_m++; } } else // Current available buffer segments are full { m_logger.warning("No more data segments are allowed. Buffer is full"); // Define buffer as full bufferFull = true; // Increment buffer initial position curSeqInit_m++; // Reset buffer current position curSeqPos_m = 0; // Add data to current position blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer curSeqPos_m++; } } @Override public void fillSeq() { //super.fillSeq(); synchronized(mutex) { try { if (curSeqInit_m == 0) { //blobDataSeq_m =new doubleBlobData[curSeqPos_m]; booleanBlobData[] tmpBlobDataSeq = new booleanBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("1---> BlobDataSeq "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[i]; } booleanBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); //blobDataSeq_m = new doubleBlobData[seqLen_m]; }else { booleanBlobData[] tmpBlobDataSeq = new booleanBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("2---> BlobDataSeq "+i+" "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[(i+curSeqInit_m)%seqLen_m]; } booleanBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); } }catch (Exception e) { m_logger.severe("execption:"+e.getMessage()); } } curSeqPos_m = 0; curSeqInit_m = 0; bufferFull = false; //System.out.println("---> fillSeq Stop, any type="+monitorBlob_m.blobDataSeq.type()+" (doubleBlobDataSeqHelper.type()=)"+doubleBlobDataSeqHelper.type()); } @Override public void done(boolean value, Completion c, CBDescOut desc) { m_logger.info("Done!"); } @Override public void activate(ContainerServices containerServices_m) { try { monitorServant_m = containerServices_m.activateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException ex) { m_logger.severe("Problems activating servant:"+ex.getMessage()); } catch (AcsJContainerServicesEx e) { m_logger.severe("Problems with Container services:"+e.getMessage()); } } @Override public void deactivate(ContainerServices containerServices_m) { try { containerServices_m.deactivateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException | AcsJContainerServicesEx ex) { m_logger.severe("Problems with CORBA/Container services:"+ex.getMessage()); } } } monitorCollectorJava/src/alma/TMCDB/MonitorCollectorImpl/MPlongLong.java 0 → 100644 +173 −0 Original line number Original line Diff line number Diff line package alma.TMCDB.MonitorCollectorImpl; import java.util.logging.Logger; import org.omg.CORBA.SystemException; import alma.ACS.CBDescOut; import alma.ACS.CBlongLongOperations; import alma.ACS.CBlongLongPOA; import alma.ACS.CBlongLongPOATie; import alma.ACS.Property; import alma.ACS.ROlongLong; import alma.ACS.ROlongLongHelper; import alma.ACSErr.Completion; import alma.JavaContainerError.wrappers.AcsJContainerServicesEx; import alma.TMCDB.MonitorBlob; import alma.TMCDB.longLongBlobData; import alma.TMCDB.longLongBlobDataSeqHelper; import alma.acs.container.ContainerServices; public class MPlongLong extends MonitorPointHelper implements CBlongLongOperations { private longLongBlobData[] blobDataSeq_m =null; private CBlongLongPOA server; private ROlongLong property_m; public MPlongLong(Logger log, String propertyName, long archivingInterval, Property propertyRef, MonitorBlob mb) { super(log, propertyName, archivingInterval, propertyRef, mb); server =new CBlongLongPOATie(this); monitorBlob_m.typeOfValue = alma.TMCDB.longValueType.value; //setMonitorServant(server); this.blobDataSeq_m =new longLongBlobData[prealocSeqLen_m]; seqLen_m = prealocSeqLen_m; try { property_m=ROlongLongHelper.narrow(propertyRef); //m_logger.info("no such Characteristic for"+propertyName); if(property_m.default_timer_trigger()==0){ m_logger.info("Default_timer_trigger=0 in Property:"+propertyName); } } catch(Exception ex) { m_logger.info("no such Characteristic for"+ex.getMessage()); } m_logger.info("INIZIALIZZATA COMPONENTE "+propertyName); } @Override public void working(long value, Completion c, CBDescOut desc) { m_logger.info("---->Working on:"+propertyName_m); // Still place in current available buffer segments m_logger.info("--->Received:"+value); if ( curSeqPos_m < seqLen_m ) { // This log is commented because of operational constraints that are currently using 'debug' as operation log setting //ACS_SHORT_LOG((LM_DEBUG, "Adding data to buffer")); // Add data to current position // longBlobData a = new longBlobData(); // a.value = value; // a.time = c.timeStamp; // blobDataSeq_m[curSeqPos_m] = a; blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer System.out.print("--->Received:"+value); curSeqPos_m++; // Increment initial position pointer if buffer is full if (bufferFull) { System.out.println("Data lost from buffer"); curSeqInit_m++; } } else // Current available buffer segments are full { m_logger.warning("No more data segments are allowed. Buffer is full"); // Define buffer as full bufferFull = true; // Increment buffer initial position curSeqInit_m++; // Reset buffer current position curSeqPos_m = 0; // Add data to current position blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer curSeqPos_m++; } } @Override public void fillSeq() { //super.fillSeq(); synchronized(mutex) { try { if (curSeqInit_m == 0) { //blobDataSeq_m =new doubleBlobData[curSeqPos_m]; longLongBlobData[] tmpBlobDataSeq = new longLongBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("1---> BlobDataSeq "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[i]; } longLongBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); //blobDataSeq_m = new doubleBlobData[seqLen_m]; }else { longLongBlobData[] tmpBlobDataSeq = new longLongBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("2---> BlobDataSeq "+i+" "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[(i+curSeqInit_m)%seqLen_m]; } longLongBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); } }catch (Exception e) { m_logger.severe("execption:"+e.getMessage()); } } curSeqPos_m = 0; curSeqInit_m = 0; bufferFull = false; //System.out.println("---> fillSeq Stop, any type="+monitorBlob_m.blobDataSeq.type()+" (doubleBlobDataSeqHelper.type()=)"+doubleBlobDataSeqHelper.type()); } @Override public void done(long value, Completion c, CBDescOut desc) { m_logger.info("Done!"); } @Override public void activate(ContainerServices containerServices_m) { try { monitorServant_m = containerServices_m.activateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException ex) { m_logger.severe("Problems activating servant:"+ex.getMessage()); } catch (AcsJContainerServicesEx e) { m_logger.severe("Problems with Container services:"+e.getMessage()); } } @Override public void deactivate(ContainerServices containerServices_m) { try { containerServices_m.deactivateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException | AcsJContainerServicesEx ex) { m_logger.severe("Problems with CORBA/Container services:"+ex.getMessage()); } } } monitorCollectorJava/src/alma/TMCDB/MonitorCollectorImpl/MPstring.java 0 → 100644 +178 −0 Original line number Original line Diff line number Diff line package alma.TMCDB.MonitorCollectorImpl; import java.util.logging.Logger; import org.omg.CORBA.SystemException; import alma.ACS.CBDescOut; import alma.ACS.CBbooleanOperations; import alma.ACS.CBbooleanPOA; import alma.ACS.CBbooleanPOATie; import alma.ACS.CBstringOperations; import alma.ACS.CBstringPOA; import alma.ACS.CBstringPOATie; import alma.ACS.Property; import alma.ACS.ROboolean; import alma.ACS.RObooleanHelper; import alma.ACS.ROstring; import alma.ACS.ROstringHelper; import alma.ACSErr.Completion; import alma.JavaContainerError.wrappers.AcsJContainerServicesEx; import alma.TMCDB.MonitorBlob; import alma.TMCDB.booleanBlobData; import alma.TMCDB.booleanBlobDataSeqHelper; import alma.TMCDB.stringBlobData; import alma.TMCDB.stringBlobDataSeqHelper; import alma.acs.container.ContainerServices; public class MPstring extends MonitorPointHelper implements CBstringOperations { private stringBlobData[] blobDataSeq_m =null; private CBstringPOA server; private ROstring property_m; public MPstring(Logger log, String propertyName, long archivingInterval, Property propertyRef, MonitorBlob mb) { super(log, propertyName, archivingInterval, propertyRef, mb); server =new CBstringPOATie(this); monitorBlob_m.typeOfValue = alma.TMCDB.booleanValueType.value; //setMonitorServant(server); this.blobDataSeq_m =new stringBlobData[prealocSeqLen_m]; seqLen_m = prealocSeqLen_m; try { property_m=ROstringHelper.narrow(propertyRef); //m_logger.info("no such Characteristic for"+propertyName); if(property_m.default_timer_trigger()==0){ m_logger.info("Default_timer_trigger=0 in Property:"+propertyName); } } catch(Exception ex) { m_logger.info("no such Characteristic for"+ex.getMessage()); } m_logger.info("INIZIALIZZATA COMPONENTE "+propertyName); } @Override public void working(String value, Completion c, CBDescOut desc) { m_logger.info("---->Working on:"+propertyName_m); // Still place in current available buffer segments m_logger.info("--->Received:"+value); if ( curSeqPos_m < seqLen_m ) { // This log is commented because of operational constraints that are currently using 'debug' as operation log setting //ACS_SHORT_LOG((LM_DEBUG, "Adding data to buffer")); // Add data to current position // longBlobData a = new longBlobData(); // a.value = value; // a.time = c.timeStamp; // blobDataSeq_m[curSeqPos_m] = a; blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer System.out.print("--->Received:"+value); curSeqPos_m++; // Increment initial position pointer if buffer is full if (bufferFull) { System.out.println("Data lost from buffer"); curSeqInit_m++; } } else // Current available buffer segments are full { m_logger.warning("No more data segments are allowed. Buffer is full"); // Define buffer as full bufferFull = true; // Increment buffer initial position curSeqInit_m++; // Reset buffer current position curSeqPos_m = 0; // Add data to current position blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer curSeqPos_m++; } } @Override public void fillSeq() { //super.fillSeq(); synchronized(mutex) { try { if (curSeqInit_m == 0) { //blobDataSeq_m =new doubleBlobData[curSeqPos_m]; stringBlobData[] tmpBlobDataSeq = new stringBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("1---> BlobDataSeq "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[i]; } stringBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); //blobDataSeq_m = new doubleBlobData[seqLen_m]; }else { stringBlobData[] tmpBlobDataSeq = new stringBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("2---> BlobDataSeq "+i+" "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[(i+curSeqInit_m)%seqLen_m]; } stringBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); } }catch (Exception e) { m_logger.severe("execption:"+e.getMessage()); } } curSeqPos_m = 0; curSeqInit_m = 0; bufferFull = false; //System.out.println("---> fillSeq Stop, any type="+monitorBlob_m.blobDataSeq.type()+" (doubleBlobDataSeqHelper.type()=)"+doubleBlobDataSeqHelper.type()); } @Override public void done(String value, Completion c, CBDescOut desc) { m_logger.info("Done!"); } @Override public void activate(ContainerServices containerServices_m) { try { monitorServant_m = containerServices_m.activateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException ex) { m_logger.severe("Problems activating servant:"+ex.getMessage()); } catch (AcsJContainerServicesEx e) { m_logger.severe("Problems with Container services:"+e.getMessage()); } } @Override public void deactivate(ContainerServices containerServices_m) { try { containerServices_m.deactivateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException | AcsJContainerServicesEx ex) { m_logger.severe("Problems with CORBA/Container services:"+ex.getMessage()); } } } monitorCollectorJava/src/alma/TMCDB/MonitorCollectorImpl/MonitorComponent.java +49 −42 Original line number Original line Diff line number Diff line Loading @@ -110,7 +110,7 @@ public class MonitorComponent { String prop = component_m.name()+":"+propertyName; String prop = component_m.name()+":"+propertyName; m_logger.info("---> MonitorComponent.enable_archiving "+prop); m_logger.info("MonitorComponent.enable_archiving "+prop); for (String propName : monitorPoints_m.keySet()) { for (String propName : monitorPoints_m.keySet()) { if (monitorPoints_m.get(propName).getPropertyName().equals(prop)) if (monitorPoints_m.get(propName).getPropertyName().equals(prop)) Loading @@ -120,7 +120,7 @@ public class MonitorComponent { public synchronized void addAllProperties() { public synchronized void addAllProperties() { m_logger.info("---> MonitorComponent.addAllProperties"); m_logger.info("MonitorComponent.addAllProperties"); // TODO: what implementation of List/Collection for monitorPoints_m? // TODO: what implementation of List/Collection for monitorPoints_m? monitorPoints_m = new HashMap<String, MonitorPointHelper>(numOfProp_m); monitorPoints_m = new HashMap<String, MonitorPointHelper>(numOfProp_m); Loading @@ -138,7 +138,7 @@ public class MonitorComponent { Object idef = p.property_ref._get_interface_def(); Object idef = p.property_ref._get_interface_def(); InterfaceDef type = InterfaceDefHelper.narrow(idef); InterfaceDef type = InterfaceDefHelper.narrow(idef); m_logger.info("---> MonitorComponent.addAllProperties " + p.name + " " + type.name() m_logger.info("MonitorComponent.addAllProperties " + p.name + " " + type.name() + " "); + " "); /* /* Loading @@ -152,6 +152,11 @@ public class MonitorComponent { monitoringInterval); monitoringInterval); } } } } m_logger.info("The following monitorPoint has been added"); for (String m : monitorPoints_m.keySet()) { m_logger.info("MonitorPoint:"+m); } } } private long propertyArchivingInterval(PropertyDesc p) { private long propertyArchivingInterval(PropertyDesc p) { Loading Loading @@ -236,50 +241,52 @@ public class MonitorComponent { * Here we use if but could be something else * Here we use if but could be something else */ */ if (propertyType.endsWith("double")) { if (propertyType.endsWith("double")) { //m_logger.info("---> double "+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); m_logger.info("---> double "+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); if (propertyType.startsWith("RO")) { if (propertyType.startsWith("RO")) { monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); //doubleBlobData[] list = new doubleBlobData[100]; MPdouble mpd = new MPdouble(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); //MonitorPoint<CBdoublePOA, doubleBlobData> mp = new MonitorPoint<CBdoublePOA, doubleBlobData>(propertyName, propertyRef, propertyType, alma.TMCDB.doubleValueType.value, archivingInterval, monitorDataBlock_m.monitorBlobs[index]); mpd.activate(containerServices_m); MPdouble mp1 = new MPdouble(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); monitorPoints_m.put(propertyName, mpd); //org.omg.CORBA.Object ob= CallbackHelper.narrow(mp); m_logger.info("Added ROdouble:"+propertyName); //CBdoublePOA ser =new CBdoublePOATie(mp1); } //mp1.setMonitorServant(ser); //mp.setLogger(m_logger); mp1.activate(containerServices_m); monitorPoints_m.put(propertyName, mp1); m_logger.info("---> MonitorComponent added Property "+propertyName); } // else { // // mp = new Monitorable(TPROP, propertyName, archivingInterval, property, typeOfData, mb); // } }else if (propertyType.endsWith("long")) { }else if (propertyType.endsWith("long")) { //m_logger.info("Added ROLong:"+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); m_logger.info("---> double "+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); if (propertyType.startsWith("RO")) { if (propertyType.startsWith("RO")) { monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); MonitorPoint<CBlongPOA, longBlobData> mp = new MonitorPoint<CBlongPOA, longBlobData>(propertyName, propertyRef, propertyType, alma.TMCDB.longValueType.value, archivingInterval, monitorDataBlock_m.monitorBlobs[index]); MPlong mpl = new MPlong(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); mpl.activate(containerServices_m); //monitorPoints_m.put(propertyName, mp); monitorPoints_m.put(propertyName, mpl); m_logger.info("---> MonitorComponent added Property "+propertyName); m_logger.info("Added ROLong:"+propertyName); } }else if (propertyType.endsWith("boolean")) { //m_logger.info("Added ROboolean:"+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); if (propertyType.startsWith("RO")) { monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); MPboolean mpb = new MPboolean(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); mpb.activate(containerServices_m); monitorPoints_m.put(propertyName, mpb); m_logger.info("Added ROboolean:"+propertyName); } }else if (propertyType.endsWith("Long")) { //m_logger.info("Added ROboolean:"+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); if (propertyType.startsWith("RO")) { monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); MPlongLong mpll = new MPlongLong(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); mpll.activate(containerServices_m); monitorPoints_m.put(propertyName, mpll); m_logger.info("Added ROlongLong:"+propertyName); } }else if (propertyType.endsWith("string")) { //m_logger.info("Added ROboolean:"+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); if (propertyType.startsWith("RO")) { monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); MPstring mpll = new MPstring(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); mpll.activate(containerServices_m); monitorPoints_m.put(propertyName, mpll); m_logger.info("Added ROstring:"+propertyName); } } }else { }else { m_logger.info("UNIMPLEMENTED Porperty Type:"+propertyType); m_logger.info("UNIMPLEMENTED Porperty Type:"+propertyType); } } m_logger.info("---> the following monitorPoint has been added"); for (String m : monitorPoints_m.keySet()) { m_logger.info("---> "+m); } } } public void startMonitoring() { public void startMonitoring() { Loading Loading @@ -309,7 +316,7 @@ public class MonitorComponent { public void stopMonitoring() { public void stopMonitoring() { m_logger.info("---> MonitorComponent.stopMonitoring"); m_logger.info("MonitorComponent.stopMonitoring"); if (monitoring_m) { if (monitoring_m) { for (String propName : monitorPoints_m.keySet()) { for (String propName : monitorPoints_m.keySet()) { monitorPoints_m.get(propName).stopMonitoring(); monitorPoints_m.get(propName).stopMonitoring(); Loading @@ -334,7 +341,7 @@ public class MonitorComponent { String prop = component_m.name()+":"+propertyName; String prop = component_m.name()+":"+propertyName; m_logger.info("---> MonitorComponent.set_archiving_interval "+prop); m_logger.info("MonitorComponent.set_archiving_interval "+prop); for (String propName : monitorPoints_m.keySet()) { for (String propName : monitorPoints_m.keySet()) { if (monitorPoints_m.get(propName).getPropertyName().equals(prop)) if (monitorPoints_m.get(propName).getPropertyName().equals(prop)) Loading @@ -357,7 +364,7 @@ public class MonitorComponent { public synchronized void setDeviceSerialNumber(String serialNumber) { public synchronized void setDeviceSerialNumber(String serialNumber) { m_logger.info("---> MonitorComponent.setDeviceSerialNumber"); m_logger.info("MonitorComponent.setDeviceSerialNumber"); monitorDataBlock_m.deviceSerialNumber = serialNumber; monitorDataBlock_m.deviceSerialNumber = serialNumber; } } Loading @@ -365,7 +372,7 @@ public class MonitorComponent { public synchronized void setPropertySerialNumber(String propertyName, public synchronized void setPropertySerialNumber(String propertyName, String[] serialNumbers) { String[] serialNumbers) { m_logger.info("---> MonitorComponent.setPropertySerialNumber"); m_logger.info("MonitorComponent.setPropertySerialNumber"); for (String propName : monitorPoints_m.keySet()) { for (String propName : monitorPoints_m.keySet()) { Loading @@ -380,7 +387,7 @@ public class MonitorComponent { public synchronized void fillSeq() { public synchronized void fillSeq() { m_logger.info("---> MonitorComponent.fillSeq"); m_logger.info("MonitorComponent.fillSeq"); if (monitoring_m) { if (monitoring_m) { // TODO: really it could be undefined here? // TODO: really it could be undefined here? Loading Loading
monitorCollectorJava/src/alma/TMCDB/MonitorCollectorImpl/MPboolean.java 0 → 100644 +171 −0 Original line number Original line Diff line number Diff line package alma.TMCDB.MonitorCollectorImpl; import java.util.logging.Logger; import org.omg.CORBA.SystemException; import alma.ACS.CBDescOut; import alma.ACS.CBbooleanOperations; import alma.ACS.CBbooleanPOA; import alma.ACS.CBbooleanPOATie; import alma.ACS.Property; import alma.ACS.ROboolean; import alma.ACS.RObooleanHelper; import alma.ACSErr.Completion; import alma.JavaContainerError.wrappers.AcsJContainerServicesEx; import alma.TMCDB.MonitorBlob; import alma.TMCDB.booleanBlobData; import alma.TMCDB.booleanBlobDataSeqHelper; import alma.acs.container.ContainerServices; public class MPboolean extends MonitorPointHelper implements CBbooleanOperations { private booleanBlobData[] blobDataSeq_m =null; private CBbooleanPOA server; private ROboolean property_m; public MPboolean(Logger log, String propertyName, long archivingInterval, Property propertyRef, MonitorBlob mb) { super(log, propertyName, archivingInterval, propertyRef, mb); server =new CBbooleanPOATie(this); monitorBlob_m.typeOfValue = alma.TMCDB.booleanValueType.value; //setMonitorServant(server); this.blobDataSeq_m =new booleanBlobData[prealocSeqLen_m]; seqLen_m = prealocSeqLen_m; try { property_m=RObooleanHelper.narrow(propertyRef); //m_logger.info("no such Characteristic for"+propertyName); if(property_m.default_timer_trigger()==0){ m_logger.info("Default_timer_trigger=0 in Property:"+propertyName); } } catch(Exception ex) { m_logger.info("no such Characteristic for"+ex.getMessage()); } m_logger.info("INIZIALIZZATA COMPONENTE "+propertyName); } @Override public void working(boolean value, Completion c, CBDescOut desc) { m_logger.info("---->Working on:"+propertyName_m); // Still place in current available buffer segments m_logger.info("--->Received:"+value); if ( curSeqPos_m < seqLen_m ) { // This log is commented because of operational constraints that are currently using 'debug' as operation log setting //ACS_SHORT_LOG((LM_DEBUG, "Adding data to buffer")); // Add data to current position // longBlobData a = new longBlobData(); // a.value = value; // a.time = c.timeStamp; // blobDataSeq_m[curSeqPos_m] = a; blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer System.out.print("--->Received:"+value); curSeqPos_m++; // Increment initial position pointer if buffer is full if (bufferFull) { System.out.println("Data lost from buffer"); curSeqInit_m++; } } else // Current available buffer segments are full { m_logger.warning("No more data segments are allowed. Buffer is full"); // Define buffer as full bufferFull = true; // Increment buffer initial position curSeqInit_m++; // Reset buffer current position curSeqPos_m = 0; // Add data to current position blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer curSeqPos_m++; } } @Override public void fillSeq() { //super.fillSeq(); synchronized(mutex) { try { if (curSeqInit_m == 0) { //blobDataSeq_m =new doubleBlobData[curSeqPos_m]; booleanBlobData[] tmpBlobDataSeq = new booleanBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("1---> BlobDataSeq "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[i]; } booleanBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); //blobDataSeq_m = new doubleBlobData[seqLen_m]; }else { booleanBlobData[] tmpBlobDataSeq = new booleanBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("2---> BlobDataSeq "+i+" "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[(i+curSeqInit_m)%seqLen_m]; } booleanBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); } }catch (Exception e) { m_logger.severe("execption:"+e.getMessage()); } } curSeqPos_m = 0; curSeqInit_m = 0; bufferFull = false; //System.out.println("---> fillSeq Stop, any type="+monitorBlob_m.blobDataSeq.type()+" (doubleBlobDataSeqHelper.type()=)"+doubleBlobDataSeqHelper.type()); } @Override public void done(boolean value, Completion c, CBDescOut desc) { m_logger.info("Done!"); } @Override public void activate(ContainerServices containerServices_m) { try { monitorServant_m = containerServices_m.activateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException ex) { m_logger.severe("Problems activating servant:"+ex.getMessage()); } catch (AcsJContainerServicesEx e) { m_logger.severe("Problems with Container services:"+e.getMessage()); } } @Override public void deactivate(ContainerServices containerServices_m) { try { containerServices_m.deactivateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException | AcsJContainerServicesEx ex) { m_logger.severe("Problems with CORBA/Container services:"+ex.getMessage()); } } }
monitorCollectorJava/src/alma/TMCDB/MonitorCollectorImpl/MPlongLong.java 0 → 100644 +173 −0 Original line number Original line Diff line number Diff line package alma.TMCDB.MonitorCollectorImpl; import java.util.logging.Logger; import org.omg.CORBA.SystemException; import alma.ACS.CBDescOut; import alma.ACS.CBlongLongOperations; import alma.ACS.CBlongLongPOA; import alma.ACS.CBlongLongPOATie; import alma.ACS.Property; import alma.ACS.ROlongLong; import alma.ACS.ROlongLongHelper; import alma.ACSErr.Completion; import alma.JavaContainerError.wrappers.AcsJContainerServicesEx; import alma.TMCDB.MonitorBlob; import alma.TMCDB.longLongBlobData; import alma.TMCDB.longLongBlobDataSeqHelper; import alma.acs.container.ContainerServices; public class MPlongLong extends MonitorPointHelper implements CBlongLongOperations { private longLongBlobData[] blobDataSeq_m =null; private CBlongLongPOA server; private ROlongLong property_m; public MPlongLong(Logger log, String propertyName, long archivingInterval, Property propertyRef, MonitorBlob mb) { super(log, propertyName, archivingInterval, propertyRef, mb); server =new CBlongLongPOATie(this); monitorBlob_m.typeOfValue = alma.TMCDB.longValueType.value; //setMonitorServant(server); this.blobDataSeq_m =new longLongBlobData[prealocSeqLen_m]; seqLen_m = prealocSeqLen_m; try { property_m=ROlongLongHelper.narrow(propertyRef); //m_logger.info("no such Characteristic for"+propertyName); if(property_m.default_timer_trigger()==0){ m_logger.info("Default_timer_trigger=0 in Property:"+propertyName); } } catch(Exception ex) { m_logger.info("no such Characteristic for"+ex.getMessage()); } m_logger.info("INIZIALIZZATA COMPONENTE "+propertyName); } @Override public void working(long value, Completion c, CBDescOut desc) { m_logger.info("---->Working on:"+propertyName_m); // Still place in current available buffer segments m_logger.info("--->Received:"+value); if ( curSeqPos_m < seqLen_m ) { // This log is commented because of operational constraints that are currently using 'debug' as operation log setting //ACS_SHORT_LOG((LM_DEBUG, "Adding data to buffer")); // Add data to current position // longBlobData a = new longBlobData(); // a.value = value; // a.time = c.timeStamp; // blobDataSeq_m[curSeqPos_m] = a; blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer System.out.print("--->Received:"+value); curSeqPos_m++; // Increment initial position pointer if buffer is full if (bufferFull) { System.out.println("Data lost from buffer"); curSeqInit_m++; } } else // Current available buffer segments are full { m_logger.warning("No more data segments are allowed. Buffer is full"); // Define buffer as full bufferFull = true; // Increment buffer initial position curSeqInit_m++; // Reset buffer current position curSeqPos_m = 0; // Add data to current position blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer curSeqPos_m++; } } @Override public void fillSeq() { //super.fillSeq(); synchronized(mutex) { try { if (curSeqInit_m == 0) { //blobDataSeq_m =new doubleBlobData[curSeqPos_m]; longLongBlobData[] tmpBlobDataSeq = new longLongBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("1---> BlobDataSeq "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[i]; } longLongBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); //blobDataSeq_m = new doubleBlobData[seqLen_m]; }else { longLongBlobData[] tmpBlobDataSeq = new longLongBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("2---> BlobDataSeq "+i+" "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[(i+curSeqInit_m)%seqLen_m]; } longLongBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); } }catch (Exception e) { m_logger.severe("execption:"+e.getMessage()); } } curSeqPos_m = 0; curSeqInit_m = 0; bufferFull = false; //System.out.println("---> fillSeq Stop, any type="+monitorBlob_m.blobDataSeq.type()+" (doubleBlobDataSeqHelper.type()=)"+doubleBlobDataSeqHelper.type()); } @Override public void done(long value, Completion c, CBDescOut desc) { m_logger.info("Done!"); } @Override public void activate(ContainerServices containerServices_m) { try { monitorServant_m = containerServices_m.activateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException ex) { m_logger.severe("Problems activating servant:"+ex.getMessage()); } catch (AcsJContainerServicesEx e) { m_logger.severe("Problems with Container services:"+e.getMessage()); } } @Override public void deactivate(ContainerServices containerServices_m) { try { containerServices_m.deactivateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException | AcsJContainerServicesEx ex) { m_logger.severe("Problems with CORBA/Container services:"+ex.getMessage()); } } }
monitorCollectorJava/src/alma/TMCDB/MonitorCollectorImpl/MPstring.java 0 → 100644 +178 −0 Original line number Original line Diff line number Diff line package alma.TMCDB.MonitorCollectorImpl; import java.util.logging.Logger; import org.omg.CORBA.SystemException; import alma.ACS.CBDescOut; import alma.ACS.CBbooleanOperations; import alma.ACS.CBbooleanPOA; import alma.ACS.CBbooleanPOATie; import alma.ACS.CBstringOperations; import alma.ACS.CBstringPOA; import alma.ACS.CBstringPOATie; import alma.ACS.Property; import alma.ACS.ROboolean; import alma.ACS.RObooleanHelper; import alma.ACS.ROstring; import alma.ACS.ROstringHelper; import alma.ACSErr.Completion; import alma.JavaContainerError.wrappers.AcsJContainerServicesEx; import alma.TMCDB.MonitorBlob; import alma.TMCDB.booleanBlobData; import alma.TMCDB.booleanBlobDataSeqHelper; import alma.TMCDB.stringBlobData; import alma.TMCDB.stringBlobDataSeqHelper; import alma.acs.container.ContainerServices; public class MPstring extends MonitorPointHelper implements CBstringOperations { private stringBlobData[] blobDataSeq_m =null; private CBstringPOA server; private ROstring property_m; public MPstring(Logger log, String propertyName, long archivingInterval, Property propertyRef, MonitorBlob mb) { super(log, propertyName, archivingInterval, propertyRef, mb); server =new CBstringPOATie(this); monitorBlob_m.typeOfValue = alma.TMCDB.booleanValueType.value; //setMonitorServant(server); this.blobDataSeq_m =new stringBlobData[prealocSeqLen_m]; seqLen_m = prealocSeqLen_m; try { property_m=ROstringHelper.narrow(propertyRef); //m_logger.info("no such Characteristic for"+propertyName); if(property_m.default_timer_trigger()==0){ m_logger.info("Default_timer_trigger=0 in Property:"+propertyName); } } catch(Exception ex) { m_logger.info("no such Characteristic for"+ex.getMessage()); } m_logger.info("INIZIALIZZATA COMPONENTE "+propertyName); } @Override public void working(String value, Completion c, CBDescOut desc) { m_logger.info("---->Working on:"+propertyName_m); // Still place in current available buffer segments m_logger.info("--->Received:"+value); if ( curSeqPos_m < seqLen_m ) { // This log is commented because of operational constraints that are currently using 'debug' as operation log setting //ACS_SHORT_LOG((LM_DEBUG, "Adding data to buffer")); // Add data to current position // longBlobData a = new longBlobData(); // a.value = value; // a.time = c.timeStamp; // blobDataSeq_m[curSeqPos_m] = a; blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer System.out.print("--->Received:"+value); curSeqPos_m++; // Increment initial position pointer if buffer is full if (bufferFull) { System.out.println("Data lost from buffer"); curSeqInit_m++; } } else // Current available buffer segments are full { m_logger.warning("No more data segments are allowed. Buffer is full"); // Define buffer as full bufferFull = true; // Increment buffer initial position curSeqInit_m++; // Reset buffer current position curSeqPos_m = 0; // Add data to current position blobDataSeq_m[curSeqPos_m].value = value; blobDataSeq_m[curSeqPos_m].time = c.timeStamp; // Increment current position pointer curSeqPos_m++; } } @Override public void fillSeq() { //super.fillSeq(); synchronized(mutex) { try { if (curSeqInit_m == 0) { //blobDataSeq_m =new doubleBlobData[curSeqPos_m]; stringBlobData[] tmpBlobDataSeq = new stringBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("1---> BlobDataSeq "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[i]; } stringBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); //blobDataSeq_m = new doubleBlobData[seqLen_m]; }else { stringBlobData[] tmpBlobDataSeq = new stringBlobData[curSeqPos_m]; for (int i = 0; i < curSeqPos_m; i++) { m_logger.info("2---> BlobDataSeq "+i+" "+blobDataSeq_m[i].time+" "+blobDataSeq_m[i].value); tmpBlobDataSeq[i] = blobDataSeq_m[(i+curSeqInit_m)%seqLen_m]; } stringBlobDataSeqHelper.insert(monitorBlob_m.blobDataSeq, tmpBlobDataSeq); } }catch (Exception e) { m_logger.severe("execption:"+e.getMessage()); } } curSeqPos_m = 0; curSeqInit_m = 0; bufferFull = false; //System.out.println("---> fillSeq Stop, any type="+monitorBlob_m.blobDataSeq.type()+" (doubleBlobDataSeqHelper.type()=)"+doubleBlobDataSeqHelper.type()); } @Override public void done(String value, Completion c, CBDescOut desc) { m_logger.info("Done!"); } @Override public void activate(ContainerServices containerServices_m) { try { monitorServant_m = containerServices_m.activateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException ex) { m_logger.severe("Problems activating servant:"+ex.getMessage()); } catch (AcsJContainerServicesEx e) { m_logger.severe("Problems with Container services:"+e.getMessage()); } } @Override public void deactivate(ContainerServices containerServices_m) { try { containerServices_m.deactivateOffShoot(server); // At this point ref count of monitorServant_m will be 2 } catch(SystemException | AcsJContainerServicesEx ex) { m_logger.severe("Problems with CORBA/Container services:"+ex.getMessage()); } } }
monitorCollectorJava/src/alma/TMCDB/MonitorCollectorImpl/MonitorComponent.java +49 −42 Original line number Original line Diff line number Diff line Loading @@ -110,7 +110,7 @@ public class MonitorComponent { String prop = component_m.name()+":"+propertyName; String prop = component_m.name()+":"+propertyName; m_logger.info("---> MonitorComponent.enable_archiving "+prop); m_logger.info("MonitorComponent.enable_archiving "+prop); for (String propName : monitorPoints_m.keySet()) { for (String propName : monitorPoints_m.keySet()) { if (monitorPoints_m.get(propName).getPropertyName().equals(prop)) if (monitorPoints_m.get(propName).getPropertyName().equals(prop)) Loading @@ -120,7 +120,7 @@ public class MonitorComponent { public synchronized void addAllProperties() { public synchronized void addAllProperties() { m_logger.info("---> MonitorComponent.addAllProperties"); m_logger.info("MonitorComponent.addAllProperties"); // TODO: what implementation of List/Collection for monitorPoints_m? // TODO: what implementation of List/Collection for monitorPoints_m? monitorPoints_m = new HashMap<String, MonitorPointHelper>(numOfProp_m); monitorPoints_m = new HashMap<String, MonitorPointHelper>(numOfProp_m); Loading @@ -138,7 +138,7 @@ public class MonitorComponent { Object idef = p.property_ref._get_interface_def(); Object idef = p.property_ref._get_interface_def(); InterfaceDef type = InterfaceDefHelper.narrow(idef); InterfaceDef type = InterfaceDefHelper.narrow(idef); m_logger.info("---> MonitorComponent.addAllProperties " + p.name + " " + type.name() m_logger.info("MonitorComponent.addAllProperties " + p.name + " " + type.name() + " "); + " "); /* /* Loading @@ -152,6 +152,11 @@ public class MonitorComponent { monitoringInterval); monitoringInterval); } } } } m_logger.info("The following monitorPoint has been added"); for (String m : monitorPoints_m.keySet()) { m_logger.info("MonitorPoint:"+m); } } } private long propertyArchivingInterval(PropertyDesc p) { private long propertyArchivingInterval(PropertyDesc p) { Loading Loading @@ -236,50 +241,52 @@ public class MonitorComponent { * Here we use if but could be something else * Here we use if but could be something else */ */ if (propertyType.endsWith("double")) { if (propertyType.endsWith("double")) { //m_logger.info("---> double "+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); m_logger.info("---> double "+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); if (propertyType.startsWith("RO")) { if (propertyType.startsWith("RO")) { monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); //doubleBlobData[] list = new doubleBlobData[100]; MPdouble mpd = new MPdouble(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); //MonitorPoint<CBdoublePOA, doubleBlobData> mp = new MonitorPoint<CBdoublePOA, doubleBlobData>(propertyName, propertyRef, propertyType, alma.TMCDB.doubleValueType.value, archivingInterval, monitorDataBlock_m.monitorBlobs[index]); mpd.activate(containerServices_m); MPdouble mp1 = new MPdouble(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); monitorPoints_m.put(propertyName, mpd); //org.omg.CORBA.Object ob= CallbackHelper.narrow(mp); m_logger.info("Added ROdouble:"+propertyName); //CBdoublePOA ser =new CBdoublePOATie(mp1); } //mp1.setMonitorServant(ser); //mp.setLogger(m_logger); mp1.activate(containerServices_m); monitorPoints_m.put(propertyName, mp1); m_logger.info("---> MonitorComponent added Property "+propertyName); } // else { // // mp = new Monitorable(TPROP, propertyName, archivingInterval, property, typeOfData, mb); // } }else if (propertyType.endsWith("long")) { }else if (propertyType.endsWith("long")) { //m_logger.info("Added ROLong:"+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); m_logger.info("---> double "+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); if (propertyType.startsWith("RO")) { if (propertyType.startsWith("RO")) { monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); MonitorPoint<CBlongPOA, longBlobData> mp = new MonitorPoint<CBlongPOA, longBlobData>(propertyName, propertyRef, propertyType, alma.TMCDB.longValueType.value, archivingInterval, monitorDataBlock_m.monitorBlobs[index]); MPlong mpl = new MPlong(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); mpl.activate(containerServices_m); //monitorPoints_m.put(propertyName, mp); monitorPoints_m.put(propertyName, mpl); m_logger.info("---> MonitorComponent added Property "+propertyName); m_logger.info("Added ROLong:"+propertyName); } }else if (propertyType.endsWith("boolean")) { //m_logger.info("Added ROboolean:"+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); if (propertyType.startsWith("RO")) { monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); MPboolean mpb = new MPboolean(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); mpb.activate(containerServices_m); monitorPoints_m.put(propertyName, mpb); m_logger.info("Added ROboolean:"+propertyName); } }else if (propertyType.endsWith("Long")) { //m_logger.info("Added ROboolean:"+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); if (propertyType.startsWith("RO")) { monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); MPlongLong mpll = new MPlongLong(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); mpll.activate(containerServices_m); monitorPoints_m.put(propertyName, mpll); m_logger.info("Added ROlongLong:"+propertyName); } }else if (propertyType.endsWith("string")) { //m_logger.info("Added ROboolean:"+propertyName+", "+propertyType+", "+propertyRef+", "+archivingInterval); if (propertyType.startsWith("RO")) { monitorDataBlock_m.monitorBlobs[index] = new MonitorBlob(); MPstring mpll = new MPstring(m_logger,propertyName,archivingInterval,propertyRef,monitorDataBlock_m.monitorBlobs[index]); mpll.activate(containerServices_m); monitorPoints_m.put(propertyName, mpll); m_logger.info("Added ROstring:"+propertyName); } } }else { }else { m_logger.info("UNIMPLEMENTED Porperty Type:"+propertyType); m_logger.info("UNIMPLEMENTED Porperty Type:"+propertyType); } } m_logger.info("---> the following monitorPoint has been added"); for (String m : monitorPoints_m.keySet()) { m_logger.info("---> "+m); } } } public void startMonitoring() { public void startMonitoring() { Loading Loading @@ -309,7 +316,7 @@ public class MonitorComponent { public void stopMonitoring() { public void stopMonitoring() { m_logger.info("---> MonitorComponent.stopMonitoring"); m_logger.info("MonitorComponent.stopMonitoring"); if (monitoring_m) { if (monitoring_m) { for (String propName : monitorPoints_m.keySet()) { for (String propName : monitorPoints_m.keySet()) { monitorPoints_m.get(propName).stopMonitoring(); monitorPoints_m.get(propName).stopMonitoring(); Loading @@ -334,7 +341,7 @@ public class MonitorComponent { String prop = component_m.name()+":"+propertyName; String prop = component_m.name()+":"+propertyName; m_logger.info("---> MonitorComponent.set_archiving_interval "+prop); m_logger.info("MonitorComponent.set_archiving_interval "+prop); for (String propName : monitorPoints_m.keySet()) { for (String propName : monitorPoints_m.keySet()) { if (monitorPoints_m.get(propName).getPropertyName().equals(prop)) if (monitorPoints_m.get(propName).getPropertyName().equals(prop)) Loading @@ -357,7 +364,7 @@ public class MonitorComponent { public synchronized void setDeviceSerialNumber(String serialNumber) { public synchronized void setDeviceSerialNumber(String serialNumber) { m_logger.info("---> MonitorComponent.setDeviceSerialNumber"); m_logger.info("MonitorComponent.setDeviceSerialNumber"); monitorDataBlock_m.deviceSerialNumber = serialNumber; monitorDataBlock_m.deviceSerialNumber = serialNumber; } } Loading @@ -365,7 +372,7 @@ public class MonitorComponent { public synchronized void setPropertySerialNumber(String propertyName, public synchronized void setPropertySerialNumber(String propertyName, String[] serialNumbers) { String[] serialNumbers) { m_logger.info("---> MonitorComponent.setPropertySerialNumber"); m_logger.info("MonitorComponent.setPropertySerialNumber"); for (String propName : monitorPoints_m.keySet()) { for (String propName : monitorPoints_m.keySet()) { Loading @@ -380,7 +387,7 @@ public class MonitorComponent { public synchronized void fillSeq() { public synchronized void fillSeq() { m_logger.info("---> MonitorComponent.fillSeq"); m_logger.info("MonitorComponent.fillSeq"); if (monitoring_m) { if (monitoring_m) { // TODO: really it could be undefined here? // TODO: really it could be undefined here? Loading