#!/usr/bin/perl use strict; use SSDS; my $devAccess = new SSDS::DeviceAccess(); my $devs = $devAccess->findByLikeName("Satlantic Radiometer String"); foreach my $dev (@{$devs}) { foreach my $attrib_name ($dev->get_attribute_names()) { print("$attrib_name: " . $dev->$attrib_name . "\n"); } } my $deplAccess = new SSDS::DeploymentAccess(); my $devAccess = new SSDS::DeviceAccess(); my $moorDepls = $deplAccess->findByName("CIMT Mooring Deployment"); foreach my $md ( @{$moorDepls} ) { my $canDepls = $md->childDeployments(); foreach my $cd ( @{$canDepls} ) { my $instDepls = $cd->childDeployments(); foreach my $id (@{$instDepls}) { my $dev = $id->getDevice($id->id()); my $name = $dev->name(); my $startDate = $id->startDate(); my $endDate = $id->endDate(); next unless ($name eq "Satlantic Radiometer String"); print "\n----------------------------------------\n"; print "Start Date: $startDate\n"; print "End Date: $endDate\n"; print "Instrument Deployment " . $id->name() . "\n"; print "of Device " . $name . "\n"; my $outputs = $id->listOutputs(); foreach my $o ( @{$outputs} ) { my $name = $o->name(); my $url = $o->url(); print " Output file name = $name\n"; print " url = $url\n"; } print "\n"; my $ds = ${$id->listOutputs}[0]; print "Input DataStream name: " . $ds->name() . "\n"; foreach my $a ($ds->get_attribute_names()) { next unless $ds->$a; print " $a = " . $ds->$a . "\n"; } my $rd = $ds->getRecordDescription(); print "RecordDescription:\n"; foreach my $a ($rd->get_attribute_names()) { next unless $rd->$a; print " $a = " . $rd->$a . "\n"; } } } } print "\n";